/**
 * Theme Name: Blocksy + GreenShift Child
 * Author: Indigetal WebCraft
 * Author URI: https://indigetal.com
 * Description: Blocksy child theme that adds GreenShift integrations, semantic tokens, data-presets, framework groups, and block variations — enabling a theme.json-first design system and editor-friendly styling workflow.
 * Version: 1.1.0
 * Template: blocksy
 * Text Domain: blocksy-greenshift-child
 */

/*** Updated 01.04.2026 by AaJS ***/

/* --- 1. HIDE AUTHOR BUT KEEP DATE ON ARCHIVE PAGES --- */
/* Hide the Author name and the "By" prefix on all archive/monthly pages */
.archive .entry-meta .author,
.archive .entry-meta .byline,
.archive .post-meta .author {
    display: none !important;
}

/* --- 2. CLEANUP DUPLICATE TITLES & PUBLISHER INFO --- */
/* Hide the duplicate title inside the RSS content area */
article.post .entry-content h1:first-of-type,
.single-post .entry-content > div > h1 {
    display: none !important;
}

/* Hide the publisher info specifically within the NewsArticle schema */
article.post .entry-content div[itemtype*="NewsArticle"] > div:first-of-type,
article.post .entry-content div[itemtype*="NewsArticle"] > img:first-of-type {
    display: none !important;
}

/* Hide the extra date/publisher text if it's in a paragraph */
.entry-content p:has(span[itemprop="datePublished"]),
.entry-content p:contains("Maritime Activity Reports") {
    display: none !important;
}

/* --- 3. THE "LIFE BACK" ARCHIVE ALIGNMENT (TEXT TO THE RIGHT) --- */
/* This puts the image on the left and pulls the text up to the right */
.archive .entry-content img,
.archive .entry-summary img {
    float: left !important;
    max-width: 250px !important;
    height: auto !important;
    margin-right: 25px !important;
    margin-bottom: 15px !important;
}

/* Keeps the "box" clean so posts don't overlap */
.archive article {
    clear: both;
    overflow: hidden;
}

/* --- 4. THE MARINE INSIGHT & SIDEBAR FRAME PROTECTOR --- */
/* Force the entire content block to stay inside the frame */
.entry-content, .entry-summary {
    max-width: 100% !important;
    overflow: hidden !important;
    word-wrap: break-word !important;
}

/* Force ALL elements (tables, divs, images) to respect the sidebar */
.entry-content * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Specific fix for images that are "floating" */
.entry-content img {
    float: none !important;
    margin: 10px 0 !important;
    height: auto !important;
}

/* Force the post container to stay inside the Blocksy grid */
.entry-content, .entry-summary, .archive .post {
    display: block !important;
    overflow-x: clip !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Strip any fixed widths from imported tables/divs */
.entry-content table, .entry-content div, .entry-content p {
    width: auto !important;
    max-width: 100% !important;
}

/* Specifically kills the "sidebar jump" for Marine Insight images */
.entry-content [style*="float"] {
    float: none !important;
    clear: both !important;
}

/* --- 5. THE SNIPER FOR THE BLURRY TOP IMAGE --- */
/* This kills ONLY the theme's header image, NOT your nice ones in the text */
.single-post .featured-image,
.single-post .entry-header img,
.single-post .ct-featured-image {
    display: none !important;
}

/* --- 6. THE SIZE SNIPER (SINGLE POST DOUBLE IMAGE KILLER) --- */
/* 1. Hide images inside the text ONLY if they have small attributes */
.single-post .entry-content img[width="150"],
.single-post .entry-content img[width="100"],
.single-post .entry-content img[height="150"],
.single-post .entry-content img[src*="-150x150"],
.single-post .entry-content img[src*="-100x100"] {
    display: none !important;
}

/* 2. THE SHIELD: Force any image LARGER than 300px to stay visible and centered */
.single-post .entry-content img {
    min-width: 301px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 20px auto !important; 
}

/* --- 7. MARINE TECHNOLOGY: SOURCE-MATCH SNIPER --- */
/* 1. Kills the 'New Wave Media' div sitting inside the article */
.single-post .entry-content article > div:first-of-type {
    display: none !important;
}

/* 2. Kills the paragraph containing the logo image */
.single-post .entry-content article > p:has(img[src*="mtn-logo"]) {
    display: none !important;
}

/* --- 8. MARINE TECHNOLOGY: DATE & LOGO CLEANUP --- */
/* 1. Kills the publisher-provided date span sitting alone at the top */
.single-post .entry-content article > p > span:first-child {
    display: none !important;
}

/* 2. Ensure actual news images remain centered at 90% */
.single-post .entry-content article img {
    display: block !important;
    margin: 20px auto !important;
    max-width: 90% !important;
}

/* --- 9. HELLENIC: THE POST-INNER CLEANUP --- */
/* 1. Kills the duplicate H1 title inside the content */
.single-post .entry-content .post-inner h1 {
    display: none !important;
}

/* 2. Kills the 'in Category' and 'Date' block specifically for Hellenic */
.single-post .entry-content .post-inner p:has(a[href*="hellenicshippingnews"]) {
    display: none !important;
}

/* 3. Removes the stray date span if it survived the paragraph kill */
.single-post .entry-content .post-inner span:contains("/") {
    display: none !important;
}

/* --- 10. RSS CUSTOM BUTTON: SLIM & TECHNICAL STYLE --- */

/* 1. The Normal State (Slimmer Profile) */
.rss-custom-button {
    background-color: #006ca9 !important;
    color: #ffffff !important;
    padding: 10px 15px !important; /* Slimmed height for a professional look - Reduced from 12px 24px */
    text-decoration: none !important;
    border-radius: 2px !important; /* Sharper corners for a technical aesthetic */
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s ease !important;
    font-size: 13px !important; /* Compact font size */
    line-height: 1 !important; /* Centers text in the slim button */
}

/* 2. The Hover State */
.rss-custom-button:hover {
    background-color: #004a75 !important; 
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none !important;
}

/* --- 11. HOME PAGE ALIGNMENT ONLY --- */

/* Surgical fix for the -9px gap to align Hero Image with Sidebar */
body.home .entry-content {
    margin-top: -9px !important;
    padding-top: 0 !important;
}

/* Zero out top spacing on Home Page only, without touching global styles */
body.home .site-main, 
body.home #primary,
body.home article {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Forces the first element (Hero) to ignore default block margins */
body.home .entry-content > *:first-child {
    margin-top: 0 !important;
}


 
/* --- 12. CHANGE THE COLOR OF THE BULLET POINTS ON THE HOME PAGE LIST */
body.home .entry-content ul {
    list-style-type: none; /* We remove the default and add our own */
    padding-left: 20px;
}

body.home .entry-content ul li::before {
    content: "\2022";  /* The bullet point character */
    color: #1da1f1;    /* Your Blueprint Blue */
    font-weight: bold;
    display: inline-block; 
    width: 1em;
    margin-left: -1em;
}

/* Remove the underline from the functional links */
body.home .entry-content ul li a {
    text-decoration: none !important;
}

/* Optional: Add the underline back only on hover for better UX */
body.home .entry-content ul li a:hover {
    text-decoration: underline !important;
}