/*
Theme Name: Melgund Recreation, Arts and Culture
Theme URI: https://melgund.org
Author: Melgund RAC
Author URI: https://melgund.org
Description: The ultimate Melgund RAC theme with full customizer control and perfect post layouts.
Version: 1.31.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: melgund-rac
*/

/* --- Global Variables --- */
:root {
    --brand-primary: #1a1a1a;
    --brand-accent: #e65100;
    --brand-red: #c62828;
    --brand-muted: #f5f5f5;
    --text-main: #1a1a1a;
    --text-muted: #666;
    --container-width: 1400px;
}

/* --- Reset & Base --- */
* { box-sizing: border-box; }
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: 'Outfit', sans-serif; font-weight: 700; margin: 0; }
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}
a { color: inherit; text-decoration: none; transition: 0.2s; }
a:hover { color: var(--brand-accent); }
img { max-width: 100%; height: auto; display: block; }

/* --- Header & Navigation --- */
.site-header { 
    background: transparent; 
    color: #fff; 
    padding: 1.5rem 0 1rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Solid background for internal pages */
body:not(.home) .site-header {
    background: #000;
    padding: 1.5rem 0 1rem;
}
.site-header.scrolled {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.75rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.header-flex { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 1rem; 
    flex-wrap: nowrap;
}
.site-branding { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.branding-text { display: flex; flex-direction: column; gap: 2px; }
.site-title { font-size: 1.25rem; line-height: 1; margin: 0; font-weight: 900; }
.site-title a { color: #fff; text-transform: uppercase; letter-spacing: 0.05em; }
.site-tagline { font-size: 0.55rem; text-transform: uppercase; letter-spacing: 0.15em; opacity: 0.8; line-height: 1.2; margin-top: 2px; }
.custom-logo { max-height: 60px; width: auto; }
.logo-box {
    width: 32px; height: 32px; background: var(--brand-accent);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1rem; border-radius: 2px;
}

/* --- Navigation & Dropdowns --- */
.main-navigation { flex-grow: 1; display: flex; align-items: center; justify-content: flex-end; }
.nav-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; align-items: center; }
.nav-menu li { position: relative; padding: 0.25rem 0; }
.nav-menu a { 
    font-size: 0.85rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    color: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.3s;
    padding: 0.5rem 0.5rem;
}
.nav-menu a:hover { color: #fff; }

/* Caret Indicator */
.menu-item-has-children > a::after {
    content: '▾';
    font-size: 0.8em;
    opacity: 0.6;
    display: inline-block;
    transition: transform 0.3s;
}
.menu-item-has-children.active > a::after {
    transform: rotate(180deg);
}

/* Sub-menu (Dropdown) - Desktop & Shared */
.nav-menu .sub-menu, 
.nav-menu ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 280px;
    width: 320px;
    max-width: 90vw;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-in-out;
    transform: translateY(10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    padding: 12px 0;
    border-top: 3px solid var(--brand-accent);
    z-index: 1001;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    list-style: none;
}

/* Nested Sub-menus (3rd level) */
.nav-menu ul ul {
    top: -12px; /* Pull up to align with parent padding */
    left: 100%;
    transform: translateX(10px);
}

.nav-menu li.active > .sub-menu, 
.nav-menu li.active > ul {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Nested Active State */
.nav-menu ul li.active > ul {
    transform: translateX(0) !important;
}

.nav-menu ul li {
    padding: 0;
    width: 100%;
    border: none;
    list-style: none;
}
.nav-menu ul a {
    padding: 0.85rem 1.75rem;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
    color: #333;
    text-align: left;
    white-space: normal;
    line-height: 1.4;
    font-weight: 600;
    text-transform: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.nav-menu ul a:hover {
    background: #fcfcfc;
    color: var(--brand-accent);
}
/* Submenu caret for horizontal opening */
.nav-menu ul .menu-item-has-children > a::after {
    content: '›';
    font-size: 1.2rem;
    margin-left: 10px;
    transform: none !important;
}

/* Secondary Nav Menu - Desktop */
.secondary-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
    align-items: center;
}
.secondary-nav-menu li {
    position: relative;
    padding: 0.15rem 0;
}
.secondary-nav-menu a {
    font-size: 0.72rem; /* much smaller text */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.65);
    display: block;
    transition: 0.3s;
    padding: 0.25rem 0.5rem;
}
.secondary-nav-menu a:hover {
    color: #fff;
}

/* Secondary Sub-menu (Dropdown) - Desktop */
.secondary-nav-menu .sub-menu, .secondary-nav-menu ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 240px;
    width: 280px;
    max-width: 400px;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-in-out;
    transform: translateY(10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    padding: 8px 0;
    border-top: 2px solid var(--brand-accent);
    z-index: 1001;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    list-style: none;
}
.secondary-nav-menu li.active > .sub-menu, .secondary-nav-menu li.active > ul {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.secondary-nav-menu ul li {
    padding: 0;
    width: 100%;
    border: none;
    list-style: none;
}
.secondary-nav-menu ul a {
    padding: 0.65rem 1.25rem;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    color: #333;
    text-align: left;
    white-space: normal;
    line-height: 1.4;
    font-weight: 600;
    text-transform: none;
    width: 100%;
    display: block;
}
.secondary-nav-menu ul a:hover {
    background: #f8f8f8;
    color: var(--brand-accent);
}
.secondary-nav-menu ul li:last-child { border-bottom: none; }

/* --- Mobile Styles --- */
@media (max-width: 1024px) {
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 1100;
    position: relative;
    width: 40px;
    height: 40px;
}
.hamburger-box {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    position: relative;
    transition: 0.3s;
}
.hamburger-box::before, .hamburger-box::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: #fff;
    left: 0;
    transition: 0.3s;
}
.hamburger-box::before { top: -8px; }
.hamburger-box::after { top: 8px; }

.toggled .hamburger-box { background: transparent; }
.toggled .hamburger-box::before { transform: rotate(45deg); top: 0; }
.toggled .hamburger-box::after { transform: rotate(-45deg); top: 0; }

.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(15px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s ease;
}
.toggled .menu-backdrop {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 1024px) {
    .menu-toggle { 
        display: flex; 
        align-items: center; 
        justify-content: center; 
        position: relative;
        z-index: 1060;
    }
    .main-navigation {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100vh;
        background: #0a0a0a;
        z-index: 1050;
        display: block;
        padding: 100px 40px 60px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .toggled .main-navigation { 
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    body.toggled { overflow: hidden; height: 100vh; }
    
    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0;
        padding: 0;
    }
    .nav-menu li {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .nav-menu a {
        padding: 1.25rem 0;
        font-size: 1.5rem;
        font-weight: 800;
        color: #fff;
        letter-spacing: -0.01em;
        justify-content: space-between;
    }
    .nav-menu a:hover, .nav-menu li.active > a {
        background: transparent;
        color: var(--brand-accent);
    }
    
    .nav-menu .sub-menu, .nav-menu ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(255,255,255,0.03);
        box-shadow: none;
        border: none;
        display: none;
        width: calc(100% + 80px);
        margin-left: -40px;
        padding: 1rem 40px;
    }
    .nav-menu ul li {
        border: none;
        margin-bottom: 0.25rem;
    }
    .nav-menu ul a {
        font-size: 1.1rem;
        padding: 0.75rem 0;
        color: rgba(255,255,255,0.6);
        font-weight: 600;
        text-align: left;
    }
}

    /* Secondary Nav Mobile Styles */
    .secondary-nav-menu {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
        padding: 0;
        list-style: none;
        border-top: 1.5px solid rgba(255,255,255,0.08); /* slight separation */
        margin-top: 1.5rem;
        padding-top: 0.75rem;
    }
    .secondary-nav-menu li {
        width: 100%;
        position: relative;
        border-bottom: 1px solid rgba(255,255,255,0.03);
        list-style: none;
    }
    .secondary-nav-menu a {
        padding: 1rem 2rem;
        font-size: 0.95rem;
        font-weight: 600;
        color: rgba(255,255,255,0.7);
        display: block;
        transition: 0.3s;
    }
    .secondary-nav-menu a:hover, .secondary-nav-menu li.active > a {
        background: rgba(255,255,255,0.05);
        color: var(--brand-accent);
    }
    
    .secondary-nav-menu .sub-menu, .secondary-nav-menu ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: #000;
        box-shadow: inset 0 5px 15px rgba(0,0,0,0.5);
        border-top: none;
        border-left: none;
        margin-left: 0;
        display: none;
        width: 100%;
        padding: 0;
        list-style: none;
    }
    .secondary-nav-menu .menu-item-has-children.active > .sub-menu, .secondary-nav-menu .menu-item-has-children.active > ul {
        display: block;
    }
    .secondary-nav-menu ul li {
        border-bottom: 1px solid rgba(255,255,255,0.02);
        list-style: none;
    }
    .secondary-nav-menu ul a {
        font-size: 0.85rem;
        padding: 0.85rem 2rem 0.85rem 3rem;
        color: #94a3b8;
        opacity: 0.9;
        border-left: 2px solid transparent;
    }
    .secondary-nav-menu ul a:hover {
        color: #fff;
        background: rgba(255,255,255,0.08);
        border-left-color: var(--brand-accent);
    }
    
    .header-actions { display: none; }
}

/* --- Hero Section --- */
.hero-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background: #000;
    overflow: hidden;
}
.hero-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 40%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}
.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 2;
    color: #fff;
}
.hero-content .container {
    width: 100%;
}
.hero-title { 
    font-size: 4.5rem; 
    line-height: 1.1; 
    margin-bottom: 1.5rem; 
    letter-spacing: -0.04em; 
    font-weight: 800; 
    max-width: 800px; 
    text-shadow: 0 4px 15px rgba(0,0,0,0.8), 0 2px 4px rgba(0,0,0,1);
}
.hero-title a { color: #fff !important; text-decoration: none !important; }
.hero-title a:hover { color: #fff !important; text-decoration: none !important; }
.hero-excerpt { 
    font-size: 1.1rem; 
    color: rgba(255,255,255,0.95); 
    margin-bottom: 2.5rem; 
    max-width: 550px; 
    line-height: 1.6; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.8), 0 1px 3px rgba(0,0,0,1);
}
.hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}
.hero-cat, .hero-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    vertical-align: middle;
}
.hero-cat a {
    background: var(--brand-red);
    color: #fff !important;
    padding: 4px 12px;
    margin-right: 6px;
    margin-bottom: 6px;
    border-radius: 2px;
    transition: 0.3s;
    font-size: 0.75rem;
    display: inline-block;
}
.hero-cat a:hover {
    background: var(--brand-accent);
}
.hero-tags a {
    background: rgba(255,255,255,0.15);
    color: #fff !important;
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 0.7rem;
    transition: 0.3s;
    display: inline-block;
}
.hero-tags a:hover { background: rgba(255,255,255,0.25); }
.hero-date {
    color: rgba(255,255,255,0.7);
}
.btn-white {
    background: #fff;
    color: var(--brand-primary) !important;
    padding: 1rem 2.5rem;
    font-weight: 700;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: 0.3s;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-decoration: none !important;
}
.btn-white:hover { background: var(--brand-accent) !important; color: #fff !important; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

/* --- Page Offsets for Fixed Header --- */
body:not(.home) .site-main {
    padding-top: 100px;
}
.breadcrumb-bar {
    background: #f9f9f9;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 2.5rem;
}

/* --- Section Headers --- */
.section-header {
    border-bottom: 1px solid #ddd;
    margin-bottom: 2.5rem;
    padding-bottom: 0.5rem;
    position: relative;
}
.section-header h2 { text-transform: uppercase; font-size: 1.5rem; letter-spacing: 0.02em; }
.section-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 200px;
    height: 3px;
    background: var(--brand-red);
}

/* --- Layout Utilities --- */
.grid { display: grid; gap: 1.5rem; } /* Reduced gap */
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.grid-3-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } /* Reduced gap */

/* Main + Sidebar Layout */
.content-sidebar-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 1024px) {
    .content-sidebar-layout {
        grid-template-columns: 2.5fr 1fr;
    }
}
.content-sidebar-layout.no-sidebar {
    grid-template-columns: 1fr !important;
}

.featured-image-caption {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
    padding: 0 0.5rem;
}

.aspect-video { 
    position: relative; 
    width: 100%; 
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden; 
    background: #eee;
}
.aspect-square { 
    position: relative; 
    width: 100%; 
    padding-top: 100%; /* 1:1 */
    overflow: hidden; 
    display: block; 
    background: #eee;
}
.object-cover, 
.aspect-video img, 
.aspect-square img, 
.hero-container img { 
    position: absolute !important; 
    top: 0 !important; 
    left: 0 !important; 
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover !important; 
}

/* --- Card Styles --- */
.grid .post, .grid-card { margin-bottom: 0; } /* Remove default post margins in grids */

.grid-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eaeaea;
}
.grid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.grid-card .aspect-video {
    border-radius: 0 !important;
}

.pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0;
}
.aspect-video .pill-container,
.aspect-square .pill-container {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 10;
}
.pill-container a, .pill {
    background: #f4f4f4;
    color: var(--brand-accent) !important;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    padding: 6px 14px;
    margin-right: 8px;
    margin-bottom: 8px;
    border-radius: 20px;
    transition: 0.2s;
    line-height: 1.3;
}
.pill-container a:hover {
    background: var(--brand-accent);
    color: #fff !important;
}
.pill.tag-pill { color: var(--text-muted) !important; font-weight: 600; }

.grid-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.grid-card-title {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    margin-top: 0;
}
.grid-card-title a:hover { color: var(--brand-accent); }

.grid-card-excerpt {
    font-size: 0.875rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}
.grid-card-excerpt:empty { display: none; }

.read-more-link {
    color: var(--brand-accent);
    font-weight: 800;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    align-self: flex-start;
    margin-top: auto;
}
.read-more-link:hover { color: var(--brand-primary); }

.list-item { display: flex; gap: 1.25rem; margin-bottom: 1.5rem; }
.list-item-img { 
    width: 100px; height: 100px; flex-shrink: 0; 
    border-radius: 4px; overflow: hidden; position: relative; 
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 5rem;
    margin-bottom: 5rem;
}
.pagination .nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    background: #fff;
    color: var(--brand-primary);
    font-size: 0.85rem;
    font-weight: 700;
    border: 2px solid #eee;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.pagination .page-numbers.current {
    background: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.3);
}
.pagination .page-numbers:hover:not(.current):not(.dots) {
    background: var(--brand-accent);
    color: #fff;
    border-color: var(--brand-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(230, 81, 0, 0.2);
}
.pagination .page-numbers.dots {
    border: none;
    background: transparent;
    min-width: 24px;
    box-shadow: none;
}
.pagination .prev, .pagination .next {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    font-weight: 800;
}

/* --- Post Page Specifics --- */
.breadcrumb-bar {
    background: #f9f9f9;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 3rem;
}
.breadcrumb-bar a:hover { color: var(--brand-red); }

.post-intro {
    border-left: 4px solid var(--brand-red);
    padding-left: 1.5rem;
    margin: 2.5rem 0;
    font-size: 1.35rem;
    line-height: 1.4;
    color: #222;
}
.post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 2.5rem;
}
.post-meta span { display: flex; align-items: center; gap: 0.5rem; }

.post-sidebar-area {
    background: var(--sidebar-bg);
    padding: 2rem 1.5rem;
}
.post-sidebar-area .widget-area {
    background: #fff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.post-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
}
.post-content p { margin-bottom: 1.5rem; }

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: var(--brand-primary);
}
.post-content h1:first-child,
.post-content h2:first-child,
.post-content h3:first-child,
.post-content h4:first-child,
.post-content h5:first-child,
.post-content h6:first-child {
    margin-top: 0;
}
.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}
.post-content li {
    margin-bottom: 0.5rem;
}
.post-content blockquote {
    border-left: 4px solid var(--brand-accent);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    font-size: 1.1rem;
    color: #555;
}
.post-content img {
    border-radius: 4px;
    margin-bottom: 1.5rem;
    height: auto;
}
.post-content figure {
    margin: 2rem 0;
}
.post-content figcaption {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Core WP block margin adjustments */
.post-content > *:last-child { margin-bottom: 0; }
.wp-block-image { margin: 2rem 0; }
.wp-block-image img { border-radius: 8px; max-width: 100%; height: auto; }
.wp-block-gallery { gap: 1rem; margin-bottom: 2rem; }
.wp-block-quote { border-left: 4px solid var(--brand-accent); padding-left: 1.5rem; font-style: italic; font-size: 1.25rem; color: #555; margin: 2rem 0; }

/* Search Form Styling */
.search-form { display: flex; width: 100%; }
.search-field { 
    flex-grow: 1; 
    padding: 0.75rem 1rem; 
    border: 1px solid #ddd; 
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-family: inherit;
}
.search-submit { 
    background: var(--brand-red); 
    color: #fff; 
    border: none; 
    padding: 0 1.5rem; 
    font-weight: 700; 
    text-transform: uppercase;
    font-size: 0.75rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: 0.2s;
}
.search-submit:hover { background: var(--brand-primary); }

/* Supporters Section */
.supporters-section {
    padding: 3rem 0;
    background: #fff;
    border-bottom: 1px solid #efefef;
    text-align: center;
}
.supporters-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-weight: 700;
    color: #999;
    margin-bottom: 2rem;
    display: block;
}
.supporters-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
    opacity: 0.55;
    transition: var(--transition, 0.2s);
}
.supporters-flex:hover {
    opacity: 0.9;
}
.supporter-logo {
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--brand-primary);
}

/* Call to Action (CTA) Section */
.cta-section {
    padding: 5rem 0;
    background: #fff;
    position: relative;
    overflow: hidden;
}
.cta-flex {
    display: flex;
    align-items: center;
    gap: 4rem;
}
.cta-image-wrapper {
    flex: 1;
    position: relative;
    max-width: 480px;
}
.cta-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}
.cta-floating-badge {
    position: absolute;
    bottom: -1rem;
    right: -1rem;
    background: var(--brand-accent);
    color: #111;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    max-width: 180px;
}
.cta-floating-badge h4 {
    font-size: 1.05rem;
    line-height: 1.25;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}
.cta-content-wrapper {
    flex: 1.2;
}
.cta-heading {
    font-size: 2.25rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
    font-weight: 800;
}
.cta-desc {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .cta-flex { flex-direction: column; }
    .cta-image-wrapper { max-width: 100%; }
    .hero-title { font-size: 3rem; }
    .grid-3-cols { grid-template-columns: 1fr; }
}