/**
 * UVU Review Theme - Main Stylesheet
 *
 * This file contains all non-critical CSS loaded after page render
 * Critical CSS is in style.css
 *
 * @package UVU_Review
 * @since 1.0.0
 */

/* ============================================
   FOCUS INDICATORS (WCAG 2.4.7 - Focus Visible)
   Using :focus-visible so mouse users don't see rings on click
   ============================================ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--theme-primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Remove outline for mouse users on elements that have custom hover states */
.hero-tab:focus:not(:focus-visible),
.hero-nav-btn:focus:not(:focus-visible),
.game-btn:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================
   CRITICAL OVERRIDES
   ============================================ */

/* Hide hamburger menu on desktop */
@media (min-width: 992px) {
    .header-controls .menu-toggle,
    button.menu-toggle {
        display: none !important;
    }
}

/* Show hamburger menu on mobile */
@media (max-width: 991px) {
    .header-controls .menu-toggle,
    button.menu-toggle {
        display: block !important;
    }
}

/* ============================================
   GLOBAL RESPONSIVE TRANSITIONS
   Smooth animations when viewport changes
   ============================================ */

/* Base transition for layout elements */
.site-footer,
.footer-desktop,
.footer-mobile,
.footer-logo-column,
.footer-links-container,
.footer-column,
.footer-mobile-column,
.footer-copyright,
.footer-social-icons {
    transition: padding 0.3s ease,
                gap 0.3s ease,
                margin 0.3s ease;
}

/* Category section transitions */
.recommended-section,
.recommended-layout,
.recommended-main,
.recommended-sidebar,
.posts-grid {
    transition: gap 0.3s ease,
                grid-template-columns 0.3s ease;
}

/* Post card transitions */
.post-featured,
.post-secondary,
.sidebar-post {
    transition: transform 0.25s ease,
                box-shadow 0.25s ease,
                padding 0.3s ease;
}

/* Typography transitions */
.section-title,
.post-title,
.footer-column h3 {
    transition: font-size 0.2s ease;
}

/* Image transitions */
.post-thumbnail,
.post-thumbnail img {
    transition: transform 0.3s ease;
}

/* Hero section transitions */
.hero-layout,
.hero-featured,
.hero-grid,
.hero-sidebar {
    transition: gap 0.3s ease;
}

/* ============================================
   PRELOADER STYLES - Custom Spinning Rings Design
   ============================================ */

.site-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.site-preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Container for the rings and logo */
.preloader-rings {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SVG Ring base styles */
.preloader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* Outer Ring - 1/3 circle, spins clockwise */
.preloader-ring.outer-ring {
    animation: spinClockwise 1.8s linear infinite;
}

.preloader-ring.outer-ring .ring-arc {
    /* Circle circumference = 2 * PI * 45 ≈ 283 */
    /* 1/3 arc = 94, gap = 189 */
    stroke-dasharray: 94 189;
    stroke-dashoffset: 0;
    transition: stroke-dasharray 0.8s ease, stroke-dashoffset 0.8s ease;
}

/* Inner Ring - Two 2/3 arcs, spins counter-clockwise */
.preloader-ring.inner-ring {
    animation: spinCounterClockwise 2.2s linear infinite;
}

.preloader-ring.inner-ring .ring-arc {
    /* Circle circumference = 2 * PI * 35 ≈ 220 */
    stroke-dasharray: 73 37;
    transition: stroke-dasharray 0.6s ease, stroke-dashoffset 0.6s ease, opacity 0.6s ease;
}

/* Position the two arcs opposite each other with color variation */
.preloader-ring.inner-ring .arc-1 {
    stroke-dashoffset: 0;
    opacity: 0.85;
}

.preloader-ring.inner-ring .arc-2 {
    stroke-dashoffset: 110;
    opacity: 0.6;
}

/* Center Logo Container - properly centered */
.preloader-logo-container {
    position: absolute;
    width: 70px;
    height: 70px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-r-logo {
    width: 100%;
    height: 100%;
    display: block;
}

/* The R letter - always visible, centered */
.preloader-r-logo .logo-r {
    opacity: 1;
    transform-origin: center center;
}

/* The compass - hidden initially, morphs in on load */
.preloader-r-logo .logo-compass {
    opacity: 0;
    transform-origin: 165px 250px; /* Center point of compass decoration */
    transition: opacity 0.6s ease;
}

/* ============================================
   PRELOADER MORPH SEQUENCE
   ============================================ */

/* Phase 1: Inner arcs merge together */
.site-preloader.compass-reveal .inner-ring {
    animation: innerMerge 0.6s ease forwards;
}

.site-preloader.compass-reveal .inner-ring .arc-1,
.site-preloader.compass-reveal .inner-ring .arc-2 {
    stroke-dasharray: 110 0;
    stroke-dashoffset: 0;
    opacity: 0;
    transition: all 0.5s ease;
}

/* Phase 2: Outer ring expands to full circle */
.site-preloader.compass-reveal .outer-ring {
    animation: outerExpand 0.8s ease forwards;
}

.site-preloader.compass-reveal .outer-ring .ring-arc {
    stroke-dasharray: 283 0;
    stroke-dashoffset: 0;
}

/* Phase 3: Show compass with morph effect */
.site-preloader.compass-reveal .logo-compass {
    opacity: 1;
    animation: compassMorphIn 0.8s ease 0.3s forwards;
}

/* Keyframe Animations */
@keyframes spinClockwise {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spinCounterClockwise {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

@keyframes innerMerge {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(90deg) scale(0.9);
    }
    100% {
        transform: rotate(180deg) scale(0.7);
        opacity: 0;
    }
}

@keyframes outerExpand {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg) scale(1.05);
    }
    100% {
        transform: rotate(360deg) scale(0.85);
        opacity: 0.3;
    }
}

@keyframes compassMorphIn {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-45deg);
    }
    40% {
        opacity: 0.5;
        transform: scale(1.15) rotate(10deg);
    }
    70% {
        opacity: 0.9;
        transform: scale(0.95) rotate(-5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Final fade out - rings completely hidden */
.site-preloader.compass-reveal.loaded .outer-ring,
.site-preloader.compass-reveal.loaded .inner-ring {
    opacity: 0;
}

/* Dark mode preloader adjustments */
[data-theme="dark"] .site-preloader {
    background-color: #1a1a1a !important;
}

/* ============================================
   TABLE OF CONTENTS
   ============================================
   1. Hero Section (Front Page)
   2. Multimedia Section
   3. Footer Styles
   4. Navigation & Mega Menu
   5. Post & Article Layouts
   6. Archive & Search Pages
   7. Single Post Styles
   8. Sidebar & Widgets
   9. Forms & Buttons
   10. Pagination
   11. Responsive Design
   12. Utility Classes
   ============================================ */

/* ============================================
   1. HERO SECTION (FRONT PAGE)
   ============================================ */

.hero-section {
    margin: 1.1rem 0;
    width: 100%;
    overflow: visible;
}

.hero-section .wrapper {
    max-width: 1366px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

.hero-layout {
    display: grid;
    grid-template-columns: 50% 25% 25%;
    gap: 1.25rem;
    margin-bottom: 2rem;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
    align-items: start;
}

/* When sidebar is present on front page, adjust hero layout */
.content-sidebar-wrapper .hero-layout {
    grid-template-columns: 60% 40%;
    gap: 2rem;
}

/* Hide filter column when sidebar present */
.content-sidebar-wrapper .hero-sidebar {
    display: none;
}

/* Large Featured Post (50%) */
.hero-featured {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    overflow: visible;
}

.hero-featured > .swiper {
    flex-shrink: 0;
}

/* Ensure swiper fills its container properly */
.hero-swiper,
.swiper.hero-swiper {
    background: transparent;
}

/* Posts below carousel - styled like swiper slides */
.hero-below-carousel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    flex: 1;
    min-height: 0;
}

.hero-post-below {
    position: relative;
    display: block;
    height: 220px;
    overflow: hidden;
    border-radius: var(--theme-border-radius);
}

.hero-below-link {
    display: block;
    position: relative;
    height: 100%;
    text-decoration: none;
}

.hero-below-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-below-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hero-post-below:hover .hero-below-image img {
    transform: scale(1.05);
}

.hero-below-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.12) 40%, rgba(0, 0, 0, 0.55) 70%, rgba(0, 0, 0, 0.82) 100%);
    z-index: 2;
}

.hero-below-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 3;
    color: #fff;
}

.hero-below-meta-top {
    margin-bottom: 0.5rem;
}

.hero-below-title {
    font-size: 1rem;
    line-height: 1.3;
    margin: 0 0 0.25rem;
    font-weight: 700;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: text-decoration-color 0.3s ease;
}

.hero-post-below:hover .hero-below-title {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255, 255, 255, 0.7);
}

.hero-below-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0.9;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

/* Swiper container */
.hero-swiper-container {
    flex-shrink: 0;
    overflow: visible;
    margin-bottom: 1rem;
}

/* Swiper Carousel Styles - Less square, more cinematic */
.hero-swiper,
.swiper.hero-swiper {
    width: 100% !important;
    height: 450px !important;
    min-height: 450px !important;
    border-radius: var(--theme-border-radius);
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.hero-swiper .swiper-wrapper {
    height: 450px !important;
    will-change: transform;
    backface-visibility: hidden;
}

.hero-swiper .swiper-slide {
    height: 450px !important;
    min-height: 450px !important;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.hero-post-large {
    position: relative !important;
    display: block !important;
    height: 450px !important;
    min-height: 450px !important;
    overflow: hidden !important;
}

/* Swiper Navigation Arrows - Bottom right corner, cleaner design */
.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
    top: auto;
    bottom: 15px;
}

.hero-swiper .swiper-button-prev {
    left: auto;
    right: 60px;
}

.hero-swiper .swiper-button-next {
    right: 15px;
}

.hero-swiper .swiper-button-prev:after,
.hero-swiper .swiper-button-next:after {
    font-size: 14px;
    font-weight: 600;
}

.hero-swiper .swiper-button-prev:hover,
.hero-swiper .swiper-button-next:hover {
    background: var(--theme-primary-color);
    border-color: var(--theme-primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Swiper Pagination - Hidden on desktop (arrows are used instead) */
.hero-swiper .swiper-pagination {
    display: none;
}

/* Mobile nav strip: [< prev] [dots] [next >] — hidden on desktop */
.hero-nav-strip {
    display: none;
}

/* Prev/next buttons in the strip */
.hero-nav-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;                  /* Remove default button padding */
    box-sizing: border-box;      /* Include border in stated dimensions */
    -webkit-appearance: none;    /* Remove iOS Safari native button chrome */
    appearance: none;
    border-radius: 6px;
    border: 1px solid rgba(136, 136, 136, 0.55);
    background: #fff;
    color: #111;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    line-height: 1;
}

.hero-nav-btn svg {
    display: block;
    flex-shrink: 0;
}

.hero-nav-btn:hover {
    background: var(--theme-primary-color);
    border-color: var(--theme-primary-color);
    color: #fff;
}

[data-theme="dark"] .hero-nav-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(136, 136, 136, 0.55);
    color: #fff;
}

[data-theme="dark"] .hero-nav-btn:hover {
    background: var(--theme-primary-color);
    border-color: var(--theme-primary-color);
}

/* External pagination dots — Swiper adds position:absolute on init, override it */
.hero-swiper-pagination {
    display: none;
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: auto !important;
    flex: 1;
}

/* Shared bullet styles for both locations */
.hero-swiper .swiper-pagination-bullet,
.hero-swiper-pagination .swiper-pagination-bullet {
    background: var(--text-secondary, #555);
    opacity: 0.35;
    width: 8px;
    height: 8px;
    transition: all 0.3s ease;
    margin: 0 3px !important;
}

.hero-swiper .swiper-pagination-bullet-active,
.hero-swiper-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--theme-primary-color);
    width: 20px;
    border-radius: 4px;
}

.hero-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: var(--theme-border-radius);
}

.hero-thumbnail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.55) 25%, rgba(0, 0, 0, 0.12) 60%, transparent 100%);
    pointer-events: none;
}

.hero-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--theme-border-radius);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    z-index: 2;
    color: #fff;
}

.hero-meta-top {
    margin-bottom: 0.75rem;
}

.hero-title {
    font-size: 2rem;
    line-height: 1.15;
    margin: 0 0 0.75rem;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-title a {
    color: #fff;
    text-decoration: none;
    position: relative;
    display: inline;
    background-image: linear-gradient(to right, #fff 0%, #fff 100%);
    background-size: 0 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.hero-title a:hover {
    background-size: 100% 2px;
}

.hero-excerpt {
    display: none;
}

.hero-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

/* Abbreviated Authors (for swiper/cards) */
.authors-abbreviated {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.authors-abbreviated .author-name {
    color: var(--theme-primary-color);
    font-size: inherit;
    font-weight: 600;
    font-family: inherit;
    display: inline;
    margin: 0;
    text-decoration: none;
}

/* [data-theme="dark"] .authors-abbreviated .author-name {
    color: #ccc;
} */

.authors-abbreviated .author-name:hover {
    color: var(--theme-secondary-color);
    text-decoration: underline;
}

.authors-abbreviated .authors-more {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.3s ease;
    margin-left: 0.25em;
}

.authors-abbreviated .authors-more:hover {
    color: #fff;
    text-decoration: underline;
}

/* Grid Posts (25%) */
.hero-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    overflow: visible;
    align-self: start;
}

.hero-post-small {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

.hero-post-small:first-child {
    padding-top: 0;
}

[data-theme="dark"] .hero-post-small {
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.calendar-view-all:hover {
    color: #fff !important;
}

.hero-post-small:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hero-small-thumbnail {
    flex-shrink: 0;
    width: 140px;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: var(--theme-border-radius);
}

.hero-small-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--theme-border-radius);
}

.hero-small-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.125rem;
}

.hero-small-meta-top {
    margin-bottom: 0;
}

.hero-small-meta-top .category-badge {
    font-size: 0.6875rem;
    padding: 2px 8px;
}

.hero-small-title {
    font-size: 0.9375rem;
    line-height: 1.3;
    margin: 0;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-small-title a {
    color: var(--theme-light-header);
    text-decoration: none;
    transition: color 0.3s ease;
}

.hero-small-title a:hover {
    color: var(--theme-primary-color);
}

.hero-small-meta {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.6); /* min 4.5:1 contrast on white (WCAG AA) */
    margin: 0;
    line-height: 1.3;
}

[data-theme="dark"] .hero-small-meta {
    color: rgba(255, 255, 255, 0.75);
}

/* Filterable Sidebar (25%) */
.hero-sidebar {
    background: #f8f8f8;
    border-radius: var(--theme-border-radius);
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

[data-theme="dark"] .hero-sidebar {
    background: var(--theme-dark-bg);
}

.hero-sidebar-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .hero-sidebar-tabs {
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.hero-tab {
    flex: 1 1 0;
    padding: 0.5rem 0.125rem;
    border: none;
    background: none;
    color: var(--theme-light-text);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.188rem;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    position: relative;
}

/* Hover underline - expands from center */
.hero-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: rgba(1, 99, 47, 0.35);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.hero-tab:hover::after {
    transform: scaleX(1);
}

/* Active tab - solid green underline (separate from hover) */
.hero-tab.active::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--theme-primary-color);
}

/* Hide hover underline when active */
.hero-tab.active::after {
    display: none;
}

.hero-tab i {
    flex-shrink: 0;
    font-size: 0.75rem;
}

.hero-tab:hover {
    color: var(--theme-primary-color);
}

.hero-tab.active {
    color: var(--theme-primary-color);
    font-weight: 600;
}

.hero-sidebar-content {
    position: relative;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.hero-sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.hero-sidebar-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}

.hero-sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.hero-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.hero-tab-content {
    display: none;
}

.hero-tab-content.active {
    display: block;
}

.hero-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hero-sidebar-post {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.5rem 0.625rem;
    border-radius: var(--theme-border-radius);
    transition: background-color 0.2s ease;
    cursor: pointer;
    background: transparent;
}

.hero-sidebar-post:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .hero-sidebar-post:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-post-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 4px;
}

.sidebar-post-content {
    flex: 1;
}

.sidebar-post-title {
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0 0 0.25rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-post-title a {
    color: var(--theme-light-header);
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar-post-title a:hover {
    color: var(--theme-primary-color);
}

.sidebar-post-meta {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .sidebar-post-meta {
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   2. MULTIMEDIA SECTION (Redesigned)
   ============================================ */

/* ============================================
   MULTIMEDIA SECTION - Full Width
   ============================================ */
.multimedia-section {
    margin: 0;
    padding: 2.5rem 0;
    background: #f5f5f5;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .multimedia-section {
    background: #141414;
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.multimedia-section .section-header {
    margin-bottom: 1.5rem;
}

.multimedia-section .section-title {
    background: linear-gradient(135deg, #005828 0%, #048442 35%, #2a9d5c 70%, #005828 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    color: #fff;
    padding: 14px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    border-radius: var(--theme-border-radius);
    box-shadow: 0 4px 15px rgba(0, 88, 40, 0.3);
    position: relative;
    overflow: hidden;
}

.multimedia-section .section-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: shimmer 3s infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

[data-theme="dark"] .multimedia-section .section-title {
    background: linear-gradient(135deg, #1a4528 0%, #275d38 35%, #048442 70%, #1a4528 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    box-shadow: 0 4px 20px rgba(4, 132, 66, 0.4);
}

/* Main Grid: Video (60%) + Podcasts (40%) */
.multimedia-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1.25rem;
    align-items: start;
}

.multimedia-grid--video-only {
    grid-template-columns: 1fr;
    max-width: 900px;
}

/* YouTube Video Area */
.multimedia-video {
    border-radius: var(--theme-border-radius);
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.youtube-player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.youtube-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Placeholder when no playlist is set */
.multimedia-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 2rem;
    text-align: center;
    color: var(--theme-light-text);
    background: #1a1a1a;
}

.multimedia-placeholder i {
    font-size: 3.5rem;
    color: #FF0000;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.multimedia-placeholder p {
    margin: 0.25rem 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.multimedia-placeholder .placeholder-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

/* Podcast Cards - Stacked Column (1-2 podcasts) */
.multimedia-podcasts {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* 3-4 podcasts: 2x2 grid */
.multimedia-podcasts.podcast-count-3,
.multimedia-podcasts.podcast-count-4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* When 3-4 podcasts, use equal column split with video */
.multimedia-grid--many-podcasts {
    grid-template-columns: 1fr 1fr;
}

.podcast-card {
    background: #fff;
    border-radius: var(--theme-border-radius);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    flex: 1;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .podcast-card {
    background: #1e1e1e;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.podcast-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--theme-light-header);
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .podcast-card-header {
    color: #fff;
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.podcast-card-header i {
    color: #1DB954;
    font-size: 1.1rem;
}

.podcast-card iframe {
    flex: 1;
    min-height: 152px;
    border: none;
    display: block;
    width: 100%;
}

/* Single podcast card — don't over-stretch */
.multimedia-podcasts .podcast-card:only-child {
    flex: none;
}

/* ============================================
   MULTIMEDIA CONTENT STRIP - Horizontal Scroll
   ============================================ */
.multimedia-strip {
    margin-top: 1.5rem;
}

.multimedia-strip-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid rgba(136, 136, 136, 0.55);
    margin-bottom: 1rem;
}

[data-theme="dark"] .multimedia-strip-tabs {
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.multimedia-tab {
    padding: 0.6rem 1rem;
    border: none;
    background: transparent;
    color: var(--theme-light-text);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    white-space: nowrap;
}

.multimedia-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--theme-primary-color);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.multimedia-tab:hover {
    color: var(--theme-primary-color);
}

.multimedia-tab.active {
    color: var(--theme-primary-color);
}

.multimedia-tab.active::after {
    transform: scaleX(1);
}

.multimedia-tab i {
    font-size: 0.85rem;
}

.multimedia-tab i.fa-youtube {
    color: #FF0000;
}

.multimedia-tab i.fa-spotify {
    color: #1DB954;
}

[data-theme="dark"] .multimedia-tab {
    color: rgba(255, 255, 255, 0.55);
}

[data-theme="dark"] .multimedia-tab:hover,
[data-theme="dark"] .multimedia-tab.active {
    color: #fff;
}

[data-theme="dark"] .multimedia-tab.active::after {
    background: #fff;
}

/* Tab content */
.multimedia-strip-content {
    position: relative;
}

/* Scroll fade hint on right edge */
.multimedia-strip-content::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 48px;
    background: linear-gradient(to right, transparent, #f5f5f5);
    pointer-events: none;
    z-index: 1;
}

[data-theme="dark"] .multimedia-strip-content::after {
    background: linear-gradient(to right, transparent, #141414);
}

.multimedia-tab-content {
    display: none;
}

.multimedia-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Horizontal scroll row */
.multimedia-strip-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.75rem;
    padding-right: 48px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

.multimedia-strip-scroll::-webkit-scrollbar {
    height: 4px;
}

.multimedia-strip-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.multimedia-strip-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
}

[data-theme="dark"] .multimedia-strip-scroll {
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

[data-theme="dark"] .multimedia-strip-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

/* Individual strip card */
.strip-card {
    flex: 0 0 200px;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    border-radius: var(--theme-border-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease;
}

.strip-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.strip-card:hover .strip-card-title {
    color: var(--theme-primary-color);
}

.strip-card:hover .strip-title-text {
    background-size: 100% 2px;
}

[data-theme="dark"] .strip-card {
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .strip-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .strip-card:hover .strip-card-title {
    color: var(--theme-primary-color);
}

.strip-card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.strip-card-thumb img {
    width: 100%;
    /* height: 100%; */
    object-fit: cover;
    transition: transform 0.3s ease;
}

.strip-card:hover .strip-card-thumb img {
    transform: scale(1.05);
}

.strip-card-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    font-size: 0.7rem;
}

.strip-card-badge.youtube-badge {
    background: #FF0000;
    color: #fff;
}

.strip-card-badge.spotify-badge {
    background: #1DB954;
    color: #fff;
}

.strip-card-info {
    padding: 0.6rem 0.75rem;
}

.strip-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 0.3rem;
    color: var(--theme-light-header);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.strip-title-text {
    display: inline;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    background-image: linear-gradient(to right, var(--theme-primary-color) 0%, var(--theme-primary-color) 100%);
    background-size: 0 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease;
}

[data-theme="dark"] .strip-card-title {
    color: #fff;
}

.strip-card-date {
    font-size: 0.7rem;
    color: var(--theme-light-text);
}

/* Strip card without thumbnail fallback */
.strip-card:not(:has(.strip-card-thumb)) .strip-card-info {
    padding: 0.75rem;
}

/* No content message in strip */
.multimedia-strip-scroll .no-content {
    flex: 0 0 100%;
    text-align: center;
    padding: 2rem;
    font-style: italic;
    color: var(--theme-light-text);
}

[data-theme="dark"] .strip-card-date {
    color: rgba(255, 255, 255, 0.5);
}

/* Platform Badges (shared) */
.platform-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.youtube-badge {
    background: #FF0000;
    color: #fff;
}

.youtube-badge i {
    font-size: 0.8rem;
}

.spotify-badge {
    background: #1DB954;
    color: #fff;
}

.spotify-badge i {
    font-size: 0.8rem;
}

.no-content {
    text-align: center;
    padding: 2rem 0;
    color: var(--theme-light-text);
    font-style: italic;
}

/* ============================================
   3. FOOTER STYLES
   ============================================ */

.site-footer {
    background: var(--theme-primary-color);
    color: #fff;
    /* margin-top: 3rem; */
    position: relative;
    overflow-x: clip; /* Clip horizontally to prevent scrollbar, but allow positioning */
    overflow-y: visible;
}

/* Desktop Footer Main */
.footer-desktop {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 0;
    position: relative;
    z-index: 1;
    overflow: visible; /* Allow watermark to extend beyond container */
}

.footer-main-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

/* Logo Column */
.footer-logo-column {
    flex-shrink: 0;
}

.footer-logo {
    display: block;
    line-height: 0;
}

.footer-logo img {
    width: auto;
    height: 54px;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

/* Links Container */
.footer-links-container {
    display: flex;
    flex: 1;
    gap: 3rem;
}

/* Desktop: Show columns */
.footer-column {
    display: block;
    flex: 1;
    min-width: 120px;
}

.footer-column h3 {
    margin: 0 0 1rem;
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding-bottom: 0.5rem;
    position: relative;
}

/* Underline under column headers */
.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2rem;
    height: 2px;
    background: #fff;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.875rem;
    position: relative;
    display: inline-block;
}

/* Footer link hover underline effect (expands from center) */
.footer-column ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #fff;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.footer-column ul li a:hover {
    color: #fff;
}

.footer-column ul li a:hover::after {
    transform: scaleX(1);
}

/* Watermark Background - Positioned relative to .footer-desktop content container */
.footer-watermark {
    position: absolute;
    right: 0; /* Align with right edge of content container */
    bottom: 0; /* Bottom aligns with bottom of footer-desktop (top of copyright) */
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

.footer-watermark img {
    width: auto;
    height: 340px; /* Tall enough to span footer content area */
    display: block;
}

/* Adjust watermark on smaller screens */
@media (max-width: 1400px) {
    .footer-watermark img {
        height: 300px;
    }
}

@media (max-width: 1200px) {
    .footer-watermark {
        opacity: 0.08;
    }

    .footer-watermark img {
        height: 260px;
    }
}

@media (max-width: 991px) {
    .footer-watermark {
        display: none;
    }
}

/* Follow Us Section */
.footer-follow-section {
    padding: 2rem 0 1.5rem;
    position: relative;
    z-index: 1;
}

.footer-follow-section h3 {
    font-weight: 700;
    color: #fff;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.footer-follow-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2rem;
    height: 2px;
    background: #fff;
}

.footer-social-icons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-social-icons .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-social-icons .social-icon:hover {
    background: #fff;
    color: var(--theme-primary-color);

}

/* Legal Section */
.footer-legal-section {
    position: relative;
    z-index: 1;
    padding-bottom: 1.5rem;
}

.footer-legal-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.25);
    margin-bottom: 1.5rem;
}

.footer-legal-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-legal-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s ease;
    position: relative;
}

/* Legal link hover underline effect */
.footer-legal-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #fff;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.footer-legal-links a:hover {
    color: #fff;
}

.footer-legal-links a:hover::after {
    transform: scaleX(1);
}

.footer-legal-links .privacy-choices-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-legal-links .ccpa-icon {
    width: 30px;
    height: 14px;
    flex-shrink: 0;
}

/* Mobile Footer Content - Hidden on desktop */
.footer-mobile {
    display: none;
}

/* Mobile Footer Logo */
.footer-mobile-logo {
    text-align: center;
    padding: 2rem 1.5rem 1.5rem;
}

.footer-mobile-logo img {
    height: 48px;
    width: auto;
}

/* Mobile Footer Columns (4 columns grid) */
.footer-mobile-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 0 1.5rem 1.5rem;
}

.footer-mobile-column h3 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    position: relative;
}

.footer-mobile-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 1.5rem;
    height: 2px;
    background: #fff;
}

.footer-mobile-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-mobile-column ul li {
    margin-bottom: 0;
}

.footer-mobile-column ul li a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

.footer-mobile-column ul li a:hover {
    color: #fff;
}

/* Mobile Social Section */
.footer-mobile-social {
    padding: 2rem 1.5rem;
    text-align: center;
}

.footer-mobile-social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-mobile-social-icons .social-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.1);
}

.footer-mobile-social-icons .social-icon:hover {
    background: #fff;
    color: var(--theme-primary-color);
}

/* Mobile Legal Links */
.footer-mobile-legal {
    padding: 0;
    /* No dark background - legal links stay in lighter green area */
}

.footer-mobile-legal-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 1.5rem;
}

.footer-mobile-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
    padding: 1.25rem 1.5rem;
    /* In lighter green area */
}

.footer-mobile-legal-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s ease;
    position: relative;
}

/* Mobile legal link hover underline effect */
.footer-mobile-legal-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #fff;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.footer-mobile-legal-links a:hover {
    color: #fff;
}

.footer-mobile-legal-links a:hover::after {
    transform: scaleX(1);
}

.footer-mobile-legal-links .ccpa-icon {
    width: 28px;
    height: auto;
    flex-shrink: 0;
}

.footer-mobile-copyright {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.25);
}

/* Copyright - Darker Green Bar */
.footer-copyright {
    text-align: center;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.25);
    font-size: 0.75rem;
}

.footer-copyright p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.025em;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #01632F;
    color: white;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 0;
    text-align: center;
}

.scroll-to-top i {
    font-size: 28px;
    line-height: 1;
    width: auto;
    margin: 0;
    padding: 0;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: #004220;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.scroll-to-top:active {
    transform: scale(0.95);
    background-color: #005a29;
}

/* ============================================
   2. NAVIGATION & MEGA MENU
   ============================================ */

.main-navigation {
    background-color: #000;
    overflow: visible;
}

.main-navigation .wrapper {
    padding: 0 20px;
    overflow: visible;
}

/* Max Mega Menu Styling - Ensure consistent font-weight */
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item > a.mega-menu-link {
    color: #fff !important;
    font-weight: 600 !important;
    padding: 14px 20px !important;
    transition: color 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    position: relative !important;
    background: transparent !important;
    text-decoration: none !important;
}

/* Ensure font-weight stays 600 on ALL states */
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item > a.mega-menu-link:hover,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item > a.mega-menu-link:focus,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item > a.mega-menu-link:active,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item:hover > a.mega-menu-link,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item.mega-toggle-on > a.mega-menu-link {
    font-weight: 600 !important;
    color: #fff !important;
}

/* ============================================
   NAV HOVER UNDERLINE EFFECT
   Expanding from center like hero filter tabs
   Works with both standard WP menus and Max Mega Menu
   ============================================ */

/* === STANDARD WORDPRESS MENU === */
.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.main-navigation ul li {
    position: relative;
}

.main-navigation ul li a {
    display: block;
    padding: 14px 20px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    transition: color 0.3s ease;
}

/* Standard menu - Hover underline pseudo-element (expands from center) */
.main-navigation ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.6);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.main-navigation ul li a:hover::after,
.main-navigation ul li a:focus::after {
    transform: scaleX(1);
}

/* Ensure font-weight stays consistent */
.main-navigation ul li a,
.main-navigation ul li a:hover,
.main-navigation ul li a:focus {
    font-weight: 600 !important;
}

/* Standard menu - Active/current state */
.main-navigation ul li.current-menu-item > a::before,
.main-navigation ul li.current-menu-ancestor > a::before,
.main-navigation ul li.current_page_item > a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--theme-primary-color);
}

.main-navigation ul li.current-menu-item > a::after,
.main-navigation ul li.current-menu-ancestor > a::after,
.main-navigation ul li.current_page_item > a::after {
    display: none;
}

/* === MAX MEGA MENU OVERRIDES === */
/* Ensure parent containers allow pseudo-element overflow */
#mega-menu-wrap-primary-menu,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item > a.mega-menu-link {
    overflow: visible !important;
}

/* Base link styling for Mega Menu */
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item > a.mega-menu-link {
    position: relative !important;
    overflow: visible !important;
    background: transparent !important;
}

/* Remove any default hover backgrounds from Max Mega Menu */
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item:hover,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item:focus,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item.mega-toggle-on,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item > a.mega-menu-link:hover,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item > a.mega-menu-link:focus {
    background: transparent !important;
    background-color: transparent !important;
}

/* Mega Menu - Hover underline expands from center */
/* Override Max Mega Menu's inline styles - using multiple selectors for higher specificity */
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item > a.mega-menu-link::after,
.header-main #mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item > a.mega-menu-link::after,
body #mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item > a.mega-menu-link::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 3px !important;
    background-color: rgba(255, 255, 255, 0.6) !important;
    transform: scaleX(0) !important;
    transform-origin: center center !important; /* Explicit X and Y */
    -webkit-transform-origin: center center !important;
    -ms-transform-origin: center center !important;
    transition: transform 0.3s ease !important;
    pointer-events: none !important;
    z-index: 10 !important;
}

/* Mega Menu - Hover state (on link itself) */
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item > a.mega-menu-link:hover::after,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item > a.mega-menu-link:focus::after {
    transform: scaleX(1) !important;
}

/* Mega Menu - Hover state (when hovering parent li - important for some MMM configs) */
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item:hover > a.mega-menu-link::after,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item:focus > a.mega-menu-link::after,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item.mega-toggle-on > a.mega-menu-link::after {
    transform: scaleX(1) !important;
}

/* ============================================
   ACTIVE/CURRENT NAV ITEM - solid underline
   ============================================ */

/* Mega Menu - Active item solid underline using ::before */
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item.mega-current-menu-item > a.mega-menu-link::before,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item.mega-current-menu-ancestor > a.mega-menu-link::before,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item.mega-current-page-ancestor > a.mega-menu-link::before {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background-color: var(--theme-primary-color) !important;
}

/* Mega Menu - Hide hover underline on active items */
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item.mega-current-menu-item > a.mega-menu-link::after,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item.mega-current-menu-ancestor > a.mega-menu-link::after,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item.mega-current-page-ancestor > a.mega-menu-link::after {
    display: none !important;
}

/* Mega Menu - Active item text styling */
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item.mega-current-menu-item > a.mega-menu-link,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item.mega-current-menu-ancestor > a.mega-menu-link,
#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-item.mega-current-page-ancestor > a.mega-menu-link {
    background: transparent !important;
    color: #fff !important;
}

[data-theme="dark"] .mega-menu-primary-menu .mega-menu-item li .mega-menu-link {
    background-color: #333 !important;
}

[data-theme="dark"] .mega-menu-primary-menu .mega-menu-item li .mega-menu-link:hover {
    color: var(--theme-primary-color) !important;
    background-color: #1a1a1a  !important;
}

.mega-menu-primary-menu .mega-menu-item li .mega-menu-link:hover {
    color : var(--theme-primary-color) !important;
}

/* Desktop Search Panel - Header Dropdown Style */

/* Search Toggle Icon States */
.search-toggle .fa-search {
    display: block;
}

.search-toggle .fa-times {
    display: none;
}

.search-toggle.active .fa-search {
    display: none;
}

.search-toggle.active .fa-times {
    display: block;
}

.search-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #e5e5e5;
    z-index: 9999;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .search-panel {
    background: #1a1a1a;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

.search-panel.active {
    max-height: 120px;
    padding: 20px 0;
    overflow: visible;
}

.search-panel-inner {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Hide the separate close button - search toggle now handles this */
.search-panel .search-close {
    display: none;
}

.search-panel-title {
    display: none;
}

.search-panel .search-form {
    flex: 1;
    margin: 0;
}

.search-panel .search-form-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-panel .search-field {
    width: 100%;
    padding: 12px 50px 12px 18px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    transition: all 0.3s ease;
    outline: none;
}

/* .search-panel .search-field::placeholder {
    color: rgba(255, 255, 255, 0.6);
} */

.search-panel .search-field:focus {
    border-color: var(--theme-primary-color);
    box-shadow: 0 0 0 3px rgba(0, 132, 61, 0.2);
}

/* Dark theme search field - better contrast */
[data-theme="dark"] .search-panel .search-field {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

[data-theme="dark"] .search-panel .search-field::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .search-panel .search-field:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--theme-primary-color);
}

.search-panel .search-submit {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--theme-primary-color);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 6px;
    transition: all 0.3s ease;
    min-height: auto;
    min-width: auto;
}

.search-panel .search-submit:hover {
    background: var(--theme-primary-hover-color);
}

.search-panel .search-submit i {
    font-size: 0.9rem;
}

/* Hide search toggle on mobile (search is in hamburger menu) */
@media (max-width: 991px) {
    .search-toggle {
        display: none !important;
    }

    .search-panel {
        display: none !important;
    }
}

/* Mobile Search Form - Embedded in Menu */
.mobile-search-form {
    padding: 15px 0;
}

.mobile-search-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-search-form .search-form {
    margin: 0;
}

.mobile-search-form .search-field {
    width: 100%;
    padding: 12px 50px 12px 15px;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

/* .mobile-search-form .search-field::placeholder {
    color: rgba(255, 255, 255, 0.6);
} */

.mobile-search-form .search-field:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.mobile-search-form .search-submit {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--theme-primary-color);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 20px;
    transition: background 0.3s ease;
}

.mobile-search-form .search-submit:hover {
    background: var(--theme-primary-hover-color);
}

.mobile-search-form .search-submit i {
    font-size: 1rem;
}

/* ============================================
   3. POST & ARTICLE LAYOUTS
   ============================================ */

.image-hover {
    position: relative;
    overflow: hidden;
    border-radius: var(--theme-border-radius);
}

.image-hover img {
    display: block;
}

/* Category Badges */
.entry-meta-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.category-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
    color: color-mix(in srgb, var(--cat-color) 70%, #000);
    background-color: color-mix(in srgb, var(--cat-color) 15%, transparent);
}

[data-theme="dark"] .category-badge {
    background-color: color-mix(in srgb, var(--cat-color) 22%, transparent);
    color: color-mix(in srgb, var(--cat-color) 60%, #fff);
}

.category-badge:hover {
    background-color: color-mix(in srgb, var(--cat-color) 25%, transparent);
    color: color-mix(in srgb, var(--cat-color) 70%, #000);
    text-decoration: none;
}

[data-theme="dark"] .category-badge:hover {
    background-color: color-mix(in srgb, var(--cat-color) 35%, transparent);
    color: color-mix(in srgb, var(--cat-color) 60%, #fff);
}

/* Category badges overlaid on images (hero swiper, below-carousel cards)
   Use solid category color + white text — dark bg from scrim needs inverted approach */
.hero-content .category-badge,
.hero-below-content .category-badge {
    background-color: var(--cat-color);
    color: #fff;
}

.hero-content .category-badge:hover,
.hero-below-content .category-badge:hover {
    background-color: color-mix(in srgb, var(--cat-color) 80%, #000);
    color: #fff;
}

/* Post Titles - Clear Font Size Hierarchy */
.entry-title,
.post-title {
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 0.5rem;
}

/* Main article title (used in sections as h3) */
h3.post-title {
    font-size: 1.5rem;
}

/* Sidebar article title (used in sections as h4) */
h4.post-title {
    font-size: 1rem;
}

/* Default for other uses */
.post-title {
    font-size: 1.25rem;
}

.entry-title a,
.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry-title a:hover,
.post-title a:hover {
    color: var(--theme-primary-color);
}

/* Post Meta */
.entry-meta,
.post-meta,
.post-meta-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: #666;
    margin: 0.25rem 0;
}

[data-theme="dark"] .entry-meta,
[data-theme="dark"] .post-meta,
[data-theme="dark"] .post-meta-bottom {
    color: #ccc;
}

.entry-meta a,
.post-meta a,
.post-meta-bottom a {
    color: var(--theme-primary-color);
    text-decoration: none;
}

.entry-meta a:hover,
.post-meta a:hover,
.post-meta-bottom a:hover {
    text-decoration: underline;
}

/* ============================================
   4. ARCHIVE & SEARCH PAGES
   ============================================ */

/* ============================================
   ARCHIVE HERO - Featured Stories Section
   ============================================ */
.archive-hero {
    padding: 2rem 0 2.5rem;
    background: #f5f5f5;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .archive-hero {
    background: #141414;
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.archive-hero-header {
    margin-bottom: 1.5rem;
}

.archive-hero-title {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
    color: var(--theme-light-header);
    font-family: 'Montserrat', sans-serif;
}

[data-theme="dark"] .archive-hero-title {
    color: #fff;
}

.archive-hero-desc {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

[data-theme="dark"] .archive-hero-desc {
    color: #aaa;
}

/* ============================================
   ARCHIVE HERO - ABC News 3-Column Grid
   ============================================ */

/* 3-Column Hero Grid: small | large | small */
.archive-hero-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

.archive-hero-grid--compact {
    grid-template-columns: 2fr 1fr;
}

.archive-hero-col {
    min-width: 0;
}

/* Side columns: 2 cards stacked */
.archive-hero-col--side {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Grid Cards (side columns) */
.archive-grid-card {
    display: flex;
    flex-direction: column;
}

.archive-grid-image {
    border-radius: var(--theme-border-radius);
    overflow: hidden;
    margin-bottom: 0.6rem;
}

.archive-grid-image a {
    display: block;
    line-height: 0;
}

.archive-grid-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.archive-grid-card:hover .archive-grid-image img {
    transform: scale(1.03);
}

.archive-grid-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 0.3rem;
}

.archive-grid-title a {
    color: var(--theme-light-header);
    text-decoration: none;
    transition: color 0.2s ease;
}

.archive-grid-title a:hover {
    color: var(--theme-primary-color);
}

[data-theme="dark"] .archive-grid-title a {
    color: #fff;
}

[data-theme="dark"] .archive-grid-title a:hover {
    color: var(--theme-primary-color);
}

.archive-grid-date {
    font-size: 0.75rem;
    color: #888;
}

[data-theme="dark"] .archive-grid-date {
    color: #777;
}

/* Center Lead Card */
.archive-grid-image--lead {
    margin-bottom: 0.75rem;
}

.archive-grid-image--lead img {
    aspect-ratio: 16 / 9;
}

.archive-grid-title--lead {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

.archive-grid-excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .archive-grid-excerpt {
    color: #bbb;
}

/* Most Read Strip (horizontal row below grid) */
.archive-most-read-strip {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .archive-most-read-strip {
    border-top-color: rgba(136, 136, 136, 0.55);
}

.archive-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--theme-primary-color);
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Montserrat', sans-serif;
}

.archive-section-label i {
    font-size: 0.7rem;
}

.archive-strip-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.archive-strip-item {
    padding-right: 1.25rem;
    border-right: 1px solid rgba(136, 136, 136, 0.55);
}

.archive-strip-item:last-child {
    border-right: none;
    padding-right: 0;
}

[data-theme="dark"] .archive-strip-item {
    border-right-color: rgba(136, 136, 136, 0.55);
}

.archive-strip-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.3rem;
}

.archive-strip-title a {
    color: var(--theme-light-header);
    text-decoration: none;
    transition: color 0.2s ease;
}

.archive-strip-title a:hover {
    color: var(--theme-primary-color);
}

[data-theme="dark"] .archive-strip-title a {
    color: #fff;
}

[data-theme="dark"] .archive-strip-title a:hover {
    color: var(--theme-primary-color);
}

.archive-strip-date {
    font-size: 0.75rem;
    color: #999;
}

[data-theme="dark"] .archive-strip-date {
    color: #777;
}

/* Archive Listing Heading */
.archive-listing-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--theme-light-header);
    margin: 2rem 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--theme-primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.archive-listing-heading i {
    color: var(--theme-primary-color);
    font-size: 0.9rem;
}

[data-theme="dark"] .archive-listing-heading {
    color: #fff;
}

/* Archive Main Content (within sidebar wrapper) */
.archive-main-content {
    flex: 1;
    min-width: 0;
}

/* Original archive header (fallback when no hero) */
.archive-header {
    margin: 0 0 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .archive-header {
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.archive-title {
    font-size: 2.4rem;
    margin: 0 0 10px;
    font-weight: 700;
}

.archive-description {
    color: #666;
    line-height: 1.6;
}

[data-theme="dark"] .archive-description {
    color: #ccc;
}

/* Archive List Layout */
.archive-list,
.search-list {
    max-width: 900px;
    margin: 0 auto;
}

.archive-post-item,
.search-post-item {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .archive-post-item,
[data-theme="dark"] .search-post-item {
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.archive-post-item .post-thumbnail,
.search-post-item .post-thumbnail {
    flex: 0 0 260px;
}

.archive-post-item .post-thumbnail img,
.search-post-item .post-thumbnail img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--theme-border-radius);
}

.archive-post-item .post-content-wrapper,
.search-post-item .post-content-wrapper {
    flex: 1;
}

.archive-post-item .post-title,
.search-post-item .post-title {
    font-size: 1.35rem;
    margin: 0 0 10px;
}

.archive-post-item .post-excerpt,
.search-post-item .post-excerpt {
    line-height: 1.6;
    font-size: 14px;
    color: #666;
}

[data-theme="dark"] .archive-post-item .post-excerpt,
[data-theme="dark"] .search-post-item .post-excerpt {
    color: #ccc;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

[data-theme="dark"] .no-results p {
    color: #ccc;
}

/* ============================================
   5. SINGLE POST STYLES
   ============================================ */

.single-post .single-banner-header {
    padding-top: 2rem;
    margin-bottom: 30px;
}

/* Category badge at top */
.entry-categories-top {
    margin-bottom: 1rem;
}

/* Entry title above image */
.single-banner-header .entry-title {
    font-size: 2em;
    line-height: 1.2;
    margin: 0 0 1rem;
    font-weight: 700;
}

/* Meta section above image */
.entry-meta-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .entry-meta-top {
    color: #bbb;
}

.entry-meta-top .meta-separator {
    color: #999;
}

.entry-meta-top .meta-date {
    display: inline-flex;
    align-items: center;
}

.entry-meta-top .read-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.entry-meta-top .read-time i {
    font-size: 0.85rem;
}

/* Featured image */
.single-banner-header .entry-image {
    margin-bottom: 1rem;
    margin-top: 0;
}

.single-banner-header .entry-image img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    border-radius: var(--theme-border-radius);
}

.featured-image-caption {
    font-size: 0.8rem;
    color: #666;
    margin-top: 8px;
    padding: 6px 0;
    line-height: 1.5;
    font-style: italic;
    border-left: 3px solid var(--theme-primary-color);
    padding-left: 10px;
}

[data-theme="dark"] .featured-image-caption {
    color: #aaa;
}

/* Video/Podcast Embed Container */
.single-banner-header .entry-media {
    margin-bottom: 1rem;
    margin-top: 0;
}

.video-embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--theme-border-radius);
    background: #000;
}

.video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.podcast-embed-container {
    width: 100%;
    border-radius: var(--theme-border-radius);
    overflow: hidden;
    background: var(--theme-bg-secondary);
}

.podcast-embed-container iframe {
    width: 100%;
    border: 0;
    display: block;
}

/* Meta section below image */
.entry-meta-below {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .entry-meta-below {
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.entry-meta-below .meta-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.meta-publish-date {
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.6);
}

.meta-publish-date i {
    margin-right: 4px;
}

[data-theme="dark"] .meta-publish-date {
    color: rgba(255, 255, 255, 0.6);
}

.meta-separator-bar {
    color: rgba(0, 0, 0, 0.25);
    font-size: 0.85rem;
    user-select: none;
}

[data-theme="dark"] .meta-separator-bar {
    color: rgba(255, 255, 255, 0.25);
}

/* Expandable Authors Feature */
.authors-expandable {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.9rem;
}

.authors-expandable .author-prefix {
    font-weight: 400;
    color: #666;
    margin-right: 2px;
}

[data-theme="dark"] .authors-expandable .author-prefix {
    color: #bbb;
}

.authors-expandable .primary-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.authors-expandable .primary-author a {
    color: var(--theme-primary-color);
    font-weight: 600;
    text-decoration: none;
}

.authors-expandable .primary-author a:hover {
    text-decoration: underline;
}

.author-avatar-small {
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    object-fit: cover;
    border: none !important;
    display: inline-block;
    vertical-align: middle;
}

.authors-toggle {
    background: none;
    border: none;
    color: var(--theme-primary-color);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.authors-toggle:hover {
    color: var(--theme-primary-hover-color);
    text-decoration: underline;
}

.authors-toggle .toggle-hide {
    display: none;
}

.authors-expandable.expanded .authors-toggle .toggle-show {
    display: none;
}

.authors-expandable.expanded .authors-toggle .toggle-hide {
    display: inline;
}

.additional-authors {
    display: none;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f8f8f8;
    border-radius: var(--theme-border-radius);
}

[data-theme="dark"] .additional-authors {
    background: #1e1e1e;
}

.authors-expandable.expanded .additional-authors {
    display: block;
}

.additional-author {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .additional-author {
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.additional-author:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.additional-author a {
    color: var(--theme-primary-color);
    font-weight: 500;
    text-decoration: none;
}

.additional-author a:hover {
    text-decoration: underline;
}

/* Legacy Author Section (for backwards compatibility) */
/* .meta-author-section {
    margin-bottom: 15px;
} */

.meta-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    flex-wrap: wrap;
}

[data-theme="dark"] .meta-author {
    color: #fff;
}

.author-prefix {
    font-weight: 600;
    color: #666;
}

[data-theme="dark"] .author-prefix {
    color: #ccc;
}

.author-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.author-avatar {
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    object-fit: cover;
    border: none !important;
    display: block;
}

.meta-author a {
    color: var(--theme-primary-color) !important;
    text-decoration: none;
    font-weight: 500;
}

.meta-author a:hover {
    text-decoration: underline;
}

.author-separator {
    display: inline;
    color: #666;
    margin: 0 4px;
}

[data-theme="dark"] .author-separator {
    color: #ccc;
}

/* Entry Meta - Reading Time & Share Buttons */
.meta-first-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 15px;
}

.meta-date {
    font-size: 14px;
    color: #666;
    flex-shrink: 0;
}

[data-theme="dark"] .meta-date {
    color: #ccc;
}

.meta-right-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
    min-width: 0;
}

.read-time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .read-time {
    color: rgba(255, 255, 255, 0.5);
}

.read-time i {
    font-size: 14px;
}

.last-updated {
    font-size: 0.85rem;
}

.last-updated.recent .updated-text {
    color: #dc3545;
    font-weight: bold;
}

.last-updated:not(.recent) .updated-text {
    color: rgba(0, 0, 0, 0.5);
    font-weight: normal;
}

[data-theme="dark"] .last-updated:not(.recent) .updated-text {
    color: rgba(255, 255, 255, 0.5);
}

/* Social Share Buttons */
.social-share {
    display: flex;
    gap: 10px;
    align-items: center;
}

.share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid rgba(136, 136, 136, 0.55);
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 16px;
    position: relative;
}

[data-theme="dark"] .share-icon {
    border-color: rgba(136, 136, 136, 0.55);
    color: #ccc;
}

.share-icon:hover {
    background-color: #00843d;
    border-color: #00843d;
    color: #fff;
    text-decoration: none;
}

.copy-link {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
}

#wpdcom .wpd-auth .wpd-login {
    display: none !important;
}

#comments p, #respond p {
    font-size: 0.75rem !important;
}

#wpdcom .ql-container {
    border-radius: 8px !important;

}

#wpdcom .wpd-form-row .wpdiscuz-item input[type="text"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="email"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="url"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="color"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="date"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="datetime"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="datetime-local"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="month"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="number"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="time"], #wpdcom textarea, #wpdcom select {
    border-radius: 8px !important;
}


#wpdcom .wpd_label__check i.wpdicon {
    border-radius: 8px !important;
}

#wpdcom .wpd-prim-button {
    border-radius: 8px !important;
    box-shadow: none !important;
}

.comments-btn {
    border: none !important;
    background: none !important;
    gap: 6px;
    width: auto !important;
    min-width: auto !important;
    padding: 0 8px;
}

.comments-btn:hover {
    transform: none !important;
    background: none !important;
    border: none !important;
}

.comments-btn:hover i,
.comments-btn:hover .comment-count {
    color: #00843d;
}

[data-theme="dark"] .comments-btn:hover i,
[data-theme="dark"] .comments-btn:hover .comment-count {
    color: #4ade80;
}

.comment-count {
    position: static;
    background: none;
    color: #666;
    border-radius: 0;
    width: auto;
    height: auto;
    font-size: 14px;
    display: inline;
    font-weight: normal;
    margin-left: 4px;
}

[data-theme="dark"] .comment-count {
    color: #ccc;
}


/* ===================================================
   NATIVE COMMENTS
   =================================================== */

/* ── Container ───────────────────────────────────── */
.comments-area {
    margin: 2.5rem 0 2rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .comments-area {
    border-top-color: rgba(136, 136, 136, 0.55);
}

/* ── Section headings ───────────────────────────── */
.comments-header {
    margin-bottom: 1.5rem;
}

.comments-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-color);
    border-bottom: 2px solid var(--theme-primary-color);
    padding-bottom: 0.35rem;
    display: inline-block;
    margin: 0;
}

.comment-reply-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-color);
    margin: 0 0 1.25rem;
}

.comment-reply-title small {
    display: inline-block;
    margin-left: 0.75rem;
}

.comment-reply-title small a {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--theme-primary-color);
    text-decoration: none;
}

/* ── Comment list — flat, divider-separated ──────── */
ol.comment-list,
ol.comment-list ol.children {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-item {
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

.comment-item:last-child {
    border-bottom: none;
}

[data-theme="dark"] .comment-item {
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

/* ── Comment card ────────────────────────────────── */
.comment-card {
    display: flex;
    gap: 0.875rem;
    padding: 1.125rem 0;
}

/* ── Initials avatar ─────────────────────────────── */
.comment-avatar-col {
    flex-shrink: 0;
    padding-top: 2px;
}

.comment-avatar-col a {
    display: block;
    line-height: 0;
}

.comment-initials-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    flex-shrink: 0;
    letter-spacing: 0.03em;
    user-select: none;
}

/* ── Content column ──────────────────────────────── */
.comment-content-col {
    flex: 1;
    min-width: 0;
}

/* ── Comment header ──────────────────────────────── */
.comment-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.2rem 0.375rem;
    margin-bottom: 0.45rem;
}

.comment-author-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-color);
}

.comment-author-name a {
    color: inherit;
    text-decoration: none;
}

.comment-author-name a:hover {
    color: var(--theme-primary-color);
}

.comment-dot {
    color: var(--text-tertiary);
    font-size: 0.6875rem;
}

.comment-timestamp {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    cursor: default;
}

.comment-pending {
    font-size: 0.6875rem;
    color: #b45309;
    background: rgba(180, 83, 9, 0.08);
    border-radius: 3px;
    padding: 0.1rem 0.4rem;
    font-style: normal;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

[data-theme="dark"] .comment-pending {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

/* ── Comment text ────────────────────────────────── */
.comment-text {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text-color);
    margin-bottom: 0.625rem;
}

.comment-text p {
    margin-bottom: 0.6rem;
}

.comment-text p:last-child {
    margin-bottom: 0;
}

/* ── Actions row ─────────────────────────────────── */
.comment-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Vote buttons — shared base */
.comment-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5625rem;
    background: transparent;
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 999px;
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1;
}

.comment-vote-btn svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

[data-theme="dark"] .comment-vote-btn {
    border-color: rgba(136, 136, 136, 0.55);
    color: rgba(255, 255, 255, 0.4);
}

/* Upvote */
.comment-upvote-btn:hover {
    border-color: var(--theme-primary-color);
    color: var(--theme-primary-color);
    background: rgba(1, 99, 47, 0.05);
}

.comment-upvote-btn.voted {
    background: color-mix(in srgb, var(--theme-primary-color) 10%, transparent);
    border-color: var(--theme-primary-color);
    color: var(--theme-primary-color);
}

[data-theme="dark"] .comment-upvote-btn:hover {
    border-color: var(--theme-primary-color);
    color: var(--theme-primary-color);
    background: rgba(0, 200, 83, 0.08);
}

[data-theme="dark"] .comment-upvote-btn.voted {
    background: rgba(0, 200, 83, 0.1);
    border-color: var(--theme-primary-color);
    color: var(--theme-primary-color);
}

/* Downvote */
.comment-downvote-btn:hover {
    border-color: #c0392b;
    color: #c0392b;
    background: rgba(192, 57, 43, 0.05);
}

.comment-downvote-btn.voted {
    background: rgba(192, 57, 43, 0.08);
    border-color: #c0392b;
    color: #c0392b;
}

[data-theme="dark"] .comment-downvote-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.07);
}

[data-theme="dark"] .comment-downvote-btn.voted {
    background: rgba(231, 76, 60, 0.1);
    border-color: #e74c3c;
    color: #e74c3c;
}

/* Reply & edit links */
.comment-reply-wrap a,
.comment-edit-wrap a,
.comment-reply-link {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.15s;
}

.comment-reply-wrap a:hover,
.comment-edit-wrap a:hover,
.comment-reply-link:hover {
    color: var(--theme-primary-color);
}

/* ── Nested replies ───────────────────────────────── */
ol.comment-list ol.children {
    /* Indent = avatar width (40px) + gap (0.875rem ≈ 14px) = ~54px */
    margin: 0 0 0 3.375rem;
    padding: 0 0 0 1rem;
    border-left: 2px solid rgba(136, 136, 136, 0.55);
    list-style: none;
}

[data-theme="dark"] ol.comment-list ol.children {
    border-left-color: rgba(136, 136, 136, 0.55);
}

ol.comment-list ol.children ol.children ol.children {
    margin-left: 1.5rem;
}

/* ── Comment navigation ──────────────────────────── */
.comment-navigation {
    display: flex;
    justify-content: space-between;
    margin: 1.5rem 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.comment-navigation a {
    color: var(--theme-primary-color);
    text-decoration: none;
}

.comment-navigation a:hover {
    color: var(--theme-primary-hover-color);
}

/* ── Misc ────────────────────────────────────────── */
.no-comments {
    font-style: italic;
    color: var(--text-tertiary);
    text-align: center;
    padding: 2rem;
}

.must-log-in {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    padding: 1rem 0;
}

.must-log-in a {
    color: var(--theme-primary-color);
    text-decoration: none;
}

/* ── Comment Form ────────────────────────────────── */
.comment-form {
    background: rgba(0, 0, 0, 0.015);
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

[data-theme="dark"] .comment-form {
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(136, 136, 136, 0.55);
}

.logged-in-as,
.comment-notes {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.logged-in-as a,
.comment-notes a {
    color: var(--theme-primary-color);
    text-decoration: none;
}

.comment-form .required {
    color: #c00;
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 0.325rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.5625rem 0.75rem;
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 5px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: #fff;
    color: var(--text-color);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

[data-theme="dark"] .comment-form input[type="text"],
[data-theme="dark"] .comment-form input[type="email"],
[data-theme="dark"] .comment-form input[type="url"],
[data-theme="dark"] .comment-form textarea {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(136, 136, 136, 0.55);
    color: var(--text-color);
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    border-color: var(--theme-primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(1, 99, 47, 0.1);
}

[data-theme="dark"] .comment-form input:focus,
[data-theme="dark"] .comment-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.12);
}

.comment-form textarea {
    resize: vertical;
    min-height: 110px;
}

/* Name / Email / Website — inline 3-up on desktop */
.comment-form-author,
.comment-form-email,
.comment-form-url {
    display: inline-block;
    width: calc(33.333% - 0.5rem);
    vertical-align: top;
    box-sizing: border-box;
    margin-right: 0.75rem;
}

.comment-form-url {
    margin-right: 0;
}

.comment-form-submit-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.25rem;
}

.comment-form .submit {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.625rem;
    background: var(--theme-primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.comment-form .submit:hover {
    background: var(--theme-primary-hover-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.comment-form .recaptcha-notice {
    font-size: 0.675rem;
    color: var(--text-tertiary);
    margin: 0.4rem 0 0;
}

.comment-form .recaptcha-notice a {
    color: var(--theme-primary-color);
    text-decoration: none;
}

/* ── Mobile ─────────────────────────────────────── */
@media (max-width: 640px) {
    .comment-form {
        padding: 1.125rem;
    }

    .comment-form-author,
    .comment-form-email,
    .comment-form-url {
        display: block;
        width: 100%;
        margin-right: 0;
    }

    .comment-card {
        gap: 0.625rem;
    }

    .comment-initials-avatar {
        width: 34px !important;
        height: 34px !important;
        font-size: 13px !important;
    }

    ol.comment-list ol.children {
        margin-left: 2.25rem;
        padding-left: 0.75rem;
    }
}

/* placeholder to close the replaced block */
.__placeholder_end_comment {
        flex-shrink: 0;
    }

    ol.comment-list ol.children {
        margin-left: 1.25rem;
        padding-left: 0.75rem;
    }
}

/* ── Comment cards (new structure) ─────────────── */

.comment-item {
    list-style: none;
    margin-bottom: 1rem;
}

.comment-card {
    display: flex;
    gap: 1rem;
    padding: 1.125rem 1.25rem;
    background: rgba(0, 0, 0, 0.018);
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 8px;
    transition: border-color 0.2s;
}

.comment-card:hover {
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .comment-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .comment-card:hover {
    border-color: rgba(136, 136, 136, 0.55);
}

/* Avatar column */
.comment-avatar-col {
    flex-shrink: 0;
    padding-top: 2px;
}

.comment-avatar-col a {
    display: block;
}

.comment-avatar-col .comment-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    border: 2px solid rgba(136, 136, 136, 0.55);
    display: block;
}

[data-theme="dark"] .comment-avatar-col .comment-avatar {
    border-color: rgba(136, 136, 136, 0.55);
}

/* Content column */
.comment-content-col {
    flex: 1;
    min-width: 0;
}

/* Comment header row */
.comment-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem 0.4rem;
    margin-bottom: 0.5rem;
}

.comment-author-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-color);
}

.comment-author-name a {
    color: inherit;
    text-decoration: none;
}

.comment-author-name a:hover {
    color: var(--theme-primary-color);
}

.comment-dot {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

.comment-timestamp {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.comment-pending {
    font-size: 0.7rem;
    color: #b45309;
    background: rgba(180, 83, 9, 0.08);
    border-radius: 3px;
    padding: 0 0.375rem;
    font-style: normal;
}

[data-theme="dark"] .comment-pending {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

/* Comment text */
.comment-text {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.comment-text p {
    margin-bottom: 0.6rem;
}

.comment-text p:last-child {
    margin-bottom: 0;
}

/* Actions row */
.comment-actions {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

/* Upvote button */
.comment-upvote-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.275rem 0.625rem;
    background: transparent;
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 999px;
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
    line-height: 1;
}

.comment-upvote-btn svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.comment-upvote-btn:hover {
    border-color: var(--theme-primary-color);
    color: var(--theme-primary-color);
    background: rgba(1, 99, 47, 0.05);
}

.comment-upvote-btn.voted {
    background: color-mix(in srgb, var(--theme-primary-color) 12%, transparent);
    border-color: var(--theme-primary-color);
    color: var(--theme-primary-color);
}

.comment-upvote-btn.voted svg {
    transform: translateY(-1px);
}

[data-theme="dark"] .comment-upvote-btn {
    border-color: rgba(136, 136, 136, 0.55);
    color: rgba(255, 255, 255, 0.45);
}

[data-theme="dark"] .comment-upvote-btn:hover {
    border-color: var(--theme-primary-color);
    color: var(--theme-primary-color);
    background: rgba(0, 200, 83, 0.08);
}

[data-theme="dark"] .comment-upvote-btn.voted {
    background: rgba(0, 200, 83, 0.12);
    border-color: var(--theme-primary-color);
    color: var(--theme-primary-color);
}

/* Reply & edit links */
.comment-reply-wrap a,
.comment-edit-wrap a,
.comment-reply-link {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.18s;
}

.comment-reply-wrap a:hover,
.comment-edit-wrap a:hover,
.comment-reply-link:hover {
    color: var(--theme-primary-color);
}

/* Nested replies — indent with left border */
ol.comment-list ol.children {
    margin: 0.625rem 0 0 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(136, 136, 136, 0.55);
    margin-bottom: 0;
    list-style: none;
}

[data-theme="dark"] ol.comment-list ol.children {
    border-left-color: rgba(136, 136, 136, 0.55);
}

/* Flatten very deep nesting */
ol.comment-list ol.children ol.children ol.children {
    margin-left: 0.5rem;
}

/* Comment navigation */
.comment-navigation {
    display: flex;
    justify-content: space-between;
    margin: 1.5rem 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.comment-navigation a {
    color: var(--theme-primary-color);
    text-decoration: none;
}

.comment-navigation a:hover {
    color: var(--theme-primary-hover-color);
}

/* ── Comment form ───────────────────────────────── */

.comments-header {
    margin-bottom: 1.5rem;
}

.comments-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-color);
    border-bottom: 2px solid var(--theme-primary-color);
    padding-bottom: 0.4rem;
    display: inline-block;
    margin: 0;
}

.comment-reply-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-color);
    margin: 0 0 1.25rem;
}

.comment-reply-title small {
    display: inline-block;
    margin-left: 0.75rem;
}

.comment-reply-title small a {
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--theme-primary-color);
    text-decoration: none;
}

.comment-form {
    background: rgba(0, 0, 0, 0.015);
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

[data-theme="dark"] .comment-form {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(136, 136, 136, 0.55);
}

.logged-in-as,
.comment-notes {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.logged-in-as a,
.comment-notes a {
    color: var(--theme-primary-color);
    text-decoration: none;
}

.comment-form .required {
    color: #c00;
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 0.325rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.5625rem 0.75rem;
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 5px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: #fff;
    color: var(--text-color);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

[data-theme="dark"] .comment-form input[type="text"],
[data-theme="dark"] .comment-form input[type="email"],
[data-theme="dark"] .comment-form input[type="url"],
[data-theme="dark"] .comment-form textarea {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(136, 136, 136, 0.55);
    color: var(--text-color);
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    border-color: var(--theme-primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(1, 99, 47, 0.1);
}

[data-theme="dark"] .comment-form input:focus,
[data-theme="dark"] .comment-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.12);
}

.comment-form textarea {
    resize: vertical;
    min-height: 110px;
}

/* Name / Email / Website — inline 3-up on desktop */
.comment-form-author,
.comment-form-email,
.comment-form-url {
    display: inline-block;
    width: calc(33.333% - 0.5rem);
    vertical-align: top;
    box-sizing: border-box;
    margin-right: 0.75rem;
}

.comment-form-url {
    margin-right: 0;
}

/* Submit row */
.comment-form-submit-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.25rem;
}

.comment-form .submit {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.625rem;
    background: var(--theme-primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.comment-form .submit:hover {
    background: var(--theme-primary-hover-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.comment-form .recaptcha-notice {
    font-size: 0.675rem;
    color: var(--text-tertiary);
    margin: 0.4rem 0 0;
}

.comment-form .recaptcha-notice a {
    color: var(--theme-primary-color);
    text-decoration: none;
}

/* Misc */
.no-comments {
    font-style: italic;
    color: var(--text-tertiary);
    text-align: center;
    padding: 2rem;
}

.must-log-in {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.must-log-in a {
    color: var(--theme-primary-color);
    text-decoration: none;
}

/* ── Mobile ─────────────────────────────────────── */
@media (max-width: 640px) {
    .comment-form {
        padding: 1.125rem;
    }

    .comment-form-author,
    .comment-form-email,
    .comment-form-url {
        display: block;
        width: 100%;
        margin-right: 0;
    }

    .comment-card {
        gap: 0.75rem;
    }

    .comment-avatar-col .comment-avatar {
        width: 34px !important;
        height: 34px !important;
    }

    ol.comment-list ol.children {
        margin-left: 1.25rem;
        padding-left: 0.75rem;
    }
}

/* Entry Content */
.entry-content {
    line-height: 1.8;
    font-size: 16px;
    margin: 30px 0;
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content a {
    color: var(--theme-primary-color);
    text-decoration: underline;
}

.entry-content a:hover {
    color: var(--theme-primary-hover-color);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--theme-border-radius);
}

.entry-content .wp-block-image img {
    border-radius: var(--theme-border-radius);
}

.entry-content figcaption {
    text-align: left;
    font-size: 0.8rem;
    color: #666;
    margin-top: 8px;
    padding: 6px 0 6px 10px;
    line-height: 1.5;
    font-style: italic;
    border-left: 3px solid var(--theme-primary-color);
}

[data-theme="dark"] .entry-content figcaption {
    color: #aaa;
}

/* ============================================
   LANDING PAGE TEMPLATE
   ============================================ */

/* Full-width landing page layout - OVERRIDE content-sidebar-wrapper */
.landing-page-wrapper,
.wrapper.landing-page-wrapper,
div.landing-page-wrapper {
    display: block !important;
    grid-template-columns: none !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

/* Ensure no sidebar appears on landing pages */
.landing-page-wrapper + .widget-area,
.landing-page-wrapper ~ .widget-area,
.landing-page-wrapper ~ #secondary,
.landing-page-wrapper ~ aside {
    display: none !important;
}

.landing-page-main {
    max-width: 100% !important;
    width: 100% !important;
    grid-column: auto !important;
}

.landing-page-article {
    max-width: 100%;
}

/* Landing page hero image */
.landing-hero-image {
    margin: 0 0 2rem;
    width: 100%;
}

.landing-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Landing page content - allow full width for custom blocks */
.landing-content {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Custom HTML blocks should have full control */
.landing-content .wp-block-html,
.landing-content .wp-block-custom-html {
    max-width: 100%;
    margin: 0;
}

/* Allow custom HTML blocks to control their own styling */
.entry-content .wp-block-html {
    max-width: 100%;
}

.entry-content .wp-block-html * {
    max-width: none;
}

/* Ensure shortcodes render properly */
.entry-content [class*="shortcode"],
.landing-content [class*="shortcode"] {
    display: block;
}

/* Landing page entry header */
.landing-page-article .entry-header {
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 20px;
    text-align: center;
}

.landing-page-article .entry-title {
    font-size: 2.5rem;
    line-height: 1.2;
}

/* Landing page sections within custom HTML */
.landing-content section,
.landing-content .section {
    width: 100%;
}

/* Responsive landing page */
@media (max-width: 768px) {
    .landing-page-article .entry-header {
        padding: 0 15px;
    }

    .landing-page-article .entry-title {
        font-size: 1.75rem;
    }
}

/* Entry Footer (Tags) */
.entry-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .entry-footer {
    border-top-color: rgba(136, 136, 136, 0.55);
}

.tags-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tags-label {
    font-weight: 600;
    color: #666;
}

[data-theme="dark"] .tags-label {
    color: #ccc;
}

.tags-links a {
    background-color: #F8F9FA;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
}

[data-theme="dark"] .tags-links a {
    background-color: #1e1e1e;
    color: #ccc;
}

.tags-links a:hover {
    background-color: var(--theme-primary-color);
    color: #fff;
}

/* Author Info Box - Enhanced Design */
.single-author-info-area {
    margin: 50px 0;
    padding: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .single-author-info-area {
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
    border-color: rgba(136, 136, 136, 0.55);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Author box header accent bar */
.single-author-info-area::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--theme-primary-color) 0%, #2ecc71 100%);
}

.single-author-info-wrapper {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    padding: 30px;
}

.author-image {
    flex-shrink: 0;
    position: relative;
}

.author-image img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

[data-theme="dark"] .author-image img {
    border-color: rgba(136, 136, 136, 0.55);
}

.author-image img:hover {
    transform: scale(1.05);
}

.author-details {
    flex: 1;
    min-width: 0;
}

.author-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    margin-bottom: 5px;
    font-weight: 600;
}

[data-theme="dark"] .author-label {
    color: #999;
}

.single-author-info-area .author-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a1a;
    text-decoration: none;
    display: inline-block;
    transition: color 0.3s ease;
}

[data-theme="dark"] .single-author-info-area .author-name {
    color: #fff;
}

.single-author-info-area .author-name:hover {
    color: var(--theme-primary-color);
    text-decoration: none;
}

/* Author role label */
.author-role {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--theme-primary-color);
    margin-bottom: 4px;
}

.author-major {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 8px;
}

.author-site {
    font-size: 0.9rem;
    color: var(--theme-primary-color);
    text-decoration: none;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.author-site:hover {
    text-decoration: underline;
}

.author-desc {
    line-height: 1.7;
    color: #555;
    font-size: 0.95rem;
}

[data-theme="dark"] .author-desc {
    color: #bbb;
}

.author-desc p {
    margin: 0;
}

/* Author social links */
.author-social-links {
    display: flex;
    gap: 10px;
    margin: 4px 0 8px;
}

.author-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.05);
    color: #666;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 14px;
}

[data-theme="dark"] .author-social-links a {
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
}

.author-social-links a:hover {
    background: var(--theme-primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* Responsive author box */
@media (max-width: 600px) {
    .single-author-info-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 25px 20px;
    }

    .author-image img {
        width: 90px;
        height: 90px;
    }

    .single-author-info-area .author-name {
        font-size: 1.3rem;
    }

    .author-social-links {
        justify-content: center;
    }
}

/* Compact author info (on single posts) */
.author-info--compact {
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.author-info--compact::before {
    height: 3px;
}

.author-info--compact .single-author-info-wrapper {
    padding: 20px 24px;
    align-items: center;
    gap: 16px;
}

.author-info--compact .author-image img {
    width: 64px;
    height: 64px;
    border-width: 3px;
}

.author-info--compact .author-name {
    font-size: 1.15rem;
    margin-bottom: 2px;
}

.author-info--compact .author-role {
    font-size: 0.72rem;
    margin-bottom: 4px;
}

.author-info--compact .author-social-links {
    margin: 2px 0 0;
    gap: 6px;
}

.author-info--compact .author-social-links a {
    width: 30px;
    height: 30px;
    font-size: 12px;
}

@media (max-width: 600px) {
    .author-info--compact .single-author-info-wrapper {
        flex-direction: row;
        text-align: left;
        padding: 16px;
    }

    .author-info--compact .author-image img {
        width: 52px;
        height: 52px;
    }

    .author-info--compact .author-social-links {
        justify-content: flex-start;
    }
}

/* "Written by" eyebrow label (compact author box on single posts) */
.author-written-by {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #aaa;
    margin-bottom: 2px;
}

[data-theme="dark"] .author-written-by {
    color: #666;
}

/* "More by [author] →" CTA link */
.author-more-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--theme-primary-color);
    text-decoration: none;
    transition: gap 0.2s ease;
}

.author-more-link:hover {
    gap: 8px;
    text-decoration: none;
    color: var(--theme-primary-color);
}

/* Post Navigation (Prev/Next) */
.post-navigation {
    margin: 40px 0;
}

.post-navigation .nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Full card is the <a> */
.nav-card {
    display: flex;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(136, 136, 136, 0.55);
    text-decoration: none;
    color: inherit;
    min-height: 88px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-card:hover {
    background: color-mix(in srgb, var(--theme-primary-color) 5%, #f8f9fa);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--theme-primary-color);
    text-decoration: none;
    color: inherit;
}

/* Thumbnail strip */
.nav-card-thumb {
    width: 88px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

/* Text body */
.nav-card-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

/* Direction label */
.nav-direction {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--theme-primary-color);
}

/* Category eyebrow */
.nav-cat {
    font-size: 0.6875rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Post title in nav card */
.nav-post-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #111;
    transition: color 0.2s;
}

.nav-card:hover .nav-post-title {
    color: var(--theme-primary-color);
}

/* Next card: thumbnail on right, text right-aligned */
.nav-next {
    flex-direction: row-reverse;
}

.nav-next .nav-card-body {
    align-items: flex-end;
    text-align: right;
}

/* When only one card: align to correct side */
.nav-previous:only-child {
    grid-column: 1;
}

.nav-next:only-child {
    grid-column: 2;
}

/* Dark mode */
[data-theme="dark"] .nav-card {
    background: #1e1e1e;
    border-color: rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .nav-post-title {
    color: #eee;
}

[data-theme="dark"] .nav-card:hover {
    background: color-mix(in srgb, var(--theme-primary-color) 8%, #1e1e1e);
    border-color: var(--theme-primary-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .nav-cat {
    color: #666;
}

/* ============================================
   6. CONTENT-SIDEBAR LAYOUT
   ============================================ */

/* Two-column layout for content with sidebar - CRITICAL */
.wrapper.content-sidebar-wrapper,
.content-sidebar-wrapper,
div.content-sidebar-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 350px !important;
    grid-template-rows: auto !important;
    gap: 40px !important;
    margin-bottom: 3rem !important;
    align-items: start !important;
}

/* Single post/article pages use narrower wrapper */
.single-post .content-sidebar-wrapper,
.single .content-sidebar-wrapper {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.content-sidebar-wrapper > .site-main,
.content-sidebar-wrapper > main {
    grid-column: 1 !important;
    min-width: 0 !important;
}

.content-sidebar-wrapper > .widget-area,
.content-sidebar-wrapper > #secondary,
.content-sidebar-wrapper > aside {
    grid-column: 2 !important;
    min-width: 0 !important;
    max-width: 350px !important;
}

/* ============================================
   HOMEPAGE WITH SIDEBAR LAYOUT
   Sidebar starts below hero, sections adapt
   ============================================ */

.homepage-sections-wrapper {
    margin-top: 2rem;
}

.homepage-with-sidebar {
    display: grid !important;
    grid-template-columns: 1fr 300px !important;
    gap: 2rem !important;
    align-items: start !important;
}

.homepage-sections-content {
    min-width: 0;
}

/* Sections within sidebar layout need adjusted widths */
.homepage-with-sidebar .recommended-section,
/* Adjust section grid layouts when sidebar is present */
.homepage-with-sidebar .recommended-layout {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Homepage sidebar within the layout */
.homepage-with-sidebar > .widget-area,
.homepage-with-sidebar > #secondary,
.homepage-with-sidebar > aside {
    /* Sidebar flows naturally with content, no scroll */
    align-self: start;
}

/* Make sidebar sticky only for the first portion, then flow naturally */
.homepage-sidebar {
    position: sticky;
    top: 120px;
}

/* Tablet: Adjust homepage sidebar layout */
@media (max-width: 1200px) {
    .homepage-with-sidebar {
        grid-template-columns: 1fr 250px !important;
        gap: 1.5rem !important;
    }

    .homepage-with-sidebar .recommended-layout {
        grid-template-columns: 1fr;
    }
}

/* Mobile: Stack homepage sidebar below sections */
@media (max-width: 991px) {
    .homepage-with-sidebar {
        display: block !important;
    }

    .homepage-with-sidebar > .widget-area,
    .homepage-with-sidebar > #secondary,
    .homepage-with-sidebar > aside,
    .homepage-sidebar {
        position: static;
        margin-top: 2rem;
    }
}

/* Homepage Widgets Section */
.homepage-widgets {
    margin: 2rem 0;
}

.homepage-widgets .homepage-widget {
    margin-bottom: 2rem;
}

.homepage-widgets .homepage-widget:last-child {
    margin-bottom: 0;
}

/* Tablet: Reduce sidebar width */
@media (max-width: 1200px) {
    .wrapper.content-sidebar-wrapper,
    .content-sidebar-wrapper,
    div.content-sidebar-wrapper {
        grid-template-columns: 1fr 280px !important;
        gap: 30px !important;
    }

    .content-sidebar-wrapper > .widget-area,
    .content-sidebar-wrapper > #secondary,
    .content-sidebar-wrapper > aside {
        max-width: 280px !important;
    }
}

/* Responsive: Stack on tablets and mobile - CRITICAL FIX */
@media (max-width: 991px) {
    /* Force single column layout, eliminate empty space */
    .wrapper.content-sidebar-wrapper,
    .content-sidebar-wrapper,
    div.content-sidebar-wrapper {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    /* Main content takes full width */
    .content-sidebar-wrapper > .site-main,
    .content-sidebar-wrapper > main {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        grid-column: auto !important;
    }

    /* Sidebar stacks below, full width */
    .content-sidebar-wrapper > .widget-area,
    .content-sidebar-wrapper > #secondary,
    .content-sidebar-wrapper > aside {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 30px 0 0 !important;
        display: block !important;
        grid-column: auto !important;
        overflow: hidden !important;
    }

    .widget-area {
        padding: 0 !important;
    }

    /* Ensure widgets don't overflow on mobile */
    .widget {
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .widget * {
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        box-sizing: border-box !important;
    }

    .widget img {
        height: auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ============================================
   7. SIDEBAR & WIDGETS
   ============================================ */

.widget-area {
    padding-left: 0;
}

.widget {
    background: transparent !important;
    background-color: transparent !important;
    border-radius: var(--theme-border-radius);
    padding: 20px;
    margin-bottom: 40px;
}

[data-theme="dark"] .widget {
    background: transparent !important;
    background-color: transparent !important;
}

/* Ensure all WordPress default widgets have transparent backgrounds */
.widget_text,
.widget_media_image,
.widget_media_gallery,
.widget_media_video,
.widget_media_audio,
.widget_custom_html,
.widget_block,
.widget_search,
.widget_recent_entries,
.widget_recent_comments,
.widget_archive,
.widget_categories,
.widget_meta,
.widget_pages,
.widget_calendar,
.widget_tag_cloud,
.widget_nav_menu,
.widget_rss,
[class*="widget_"] {
    background: transparent !important;
    background-color: transparent !important;
}

/* Search Widget - Light Theme Styling */
.widget_search .search-form,
.widget-area .search-form,
.sidebar .search-form {
    position: relative;
}

.widget_search .search-field,
.widget-area .search-field,
.sidebar .search-field {
    width: 100%;
    padding: 12px 50px 12px 15px;
    font-size: 1rem;
    background: #f5f5f5;
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: var(--theme-border-radius, 8px);
    font-family: 'Montserrat', sans-serif;
    color: #333;
    transition: all 0.3s ease;
    outline: none;
}

.widget_search .search-field::placeholder,
.widget-area .search-field::placeholder,
.sidebar .search-field::placeholder {
    color: #888;
}

.widget_search .search-field:focus,
.widget-area .search-field:focus,
.sidebar .search-field:focus {
    border-color: var(--theme-primary-color);
    box-shadow: 0 0 0 3px rgba(0, 132, 61, 0.15);
    background: #fff;
}

/* Search Widget - Dark Theme Styling */
[data-theme="dark"] .widget_search .search-field,
[data-theme="dark"] .widget-area .search-field,
[data-theme="dark"] .sidebar .search-field {
    background: #2a2a2a;
    border-color: rgba(136, 136, 136, 0.55);
    color: #fff;
}

[data-theme="dark"] .widget_search .search-field::placeholder,
[data-theme="dark"] .widget-area .search-field::placeholder,
[data-theme="dark"] .sidebar .search-field::placeholder {
    color: #999;
}

[data-theme="dark"] .widget_search .search-field:focus,
[data-theme="dark"] .widget-area .search-field:focus,
[data-theme="dark"] .sidebar .search-field:focus {
    background: #333;
    border-color: var(--theme-primary-color);
}

/* Search Widget Submit Button */
.widget_search .search-submit,
.widget-area .search-submit,
.sidebar .search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--theme-primary-color);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.widget_search .search-submit:hover,
.widget-area .search-submit:hover,
.sidebar .search-submit:hover {
    background: var(--theme-primary-hover-color);
}

.widget-title {
    background-color: rgba(0, 88, 40, 255);
    color: #fff;
    padding: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0 0 20px;
    border-radius: var(--theme-border-radius);
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .widget ul li {
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.widget ul li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Widget post items with thumbnails */
.widget .post-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.widget .post-thumbnail {
    flex: 0 0 90px;
    aspect-ratio: 3 / 2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--theme-border-radius);
    background: #e0e0e0;
}

[data-theme="dark"] .widget .post-thumbnail {
    background: #2a2a2a;
}

.widget .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--theme-border-radius);
}

.widget .post-content {
    flex: 1;
    min-width: 0;
}

.widget .post-title {
    font-size: 0.9rem;
    line-height: 1.3;
    margin: 0 0 5px;
    font-weight: 600;
}

.widget .post-title a {
    color: var(--theme-light-header);
}

.widget .post-meta {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .widget .post-meta {
    color: rgba(255, 255, 255, 0.6);
}

.widget a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget a:hover {
    color: var(--theme-primary-color);
}

/* ============================================
   7. FORMS & BUTTONS
   ============================================ */

button,
.button,
.btn {
    background: var(--theme-primary-color);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

/* button:hover,
.button:hover,
.btn:hover {
    background: var(--theme-primary-hover-color);
} */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: #1e1e1e;
    border-color: rgba(136, 136, 136, 0.55);
    color: #fff;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--theme-primary-color);
}

/* ============================================
   8. PAGINATION
   ============================================ */

.pagination {
    margin: 40px 0;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    background-color: #f0f0f0;
    padding: 8px 16px;
    border-radius: var(--theme-border-radius);
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

[data-theme="dark"] .pagination .page-numbers {
    background-color: #303030;
    color: #ccc;
}

.pagination .page-numbers:hover {
    background-color: #e0e0e0;
}

[data-theme="dark"] .pagination .page-numbers:hover {
    background-color: #404040;
}

.pagination .page-numbers.current {
    background-color: var(--theme-primary-color);
    color: #fff;
}

.pagination .page-numbers.current:hover {
    background-color: var(--theme-primary-hover-color);
}

.pagination .page-numbers.dots {
    background-color: transparent !important;
    padding: 0;
    margin: 0;
    cursor: default;
}

.pagination .page-numbers.dots:hover {
    background-color: transparent;
}

/* ============================================
   9. RESPONSIVE DESIGN
   ============================================ */

/* Small Laptops / Large Tablets (992px - 1200px) */
@media (min-width: 992px) and (max-width: 1200px) {
    /* Hero Section - 2 column layout for medium screens */
    .hero-layout {
        grid-template-columns: 55% 45%;
        gap: 1rem;
    }

    /* Featured section (swiper + below posts) takes left column */
    .hero-featured {
        grid-column: 1;
        grid-row: 1;
    }

    /* Stack grid and sidebar in right column */
    .hero-grid {
        grid-column: 2;
        grid-row: 1;
    }

    /* Hide sidebar on medium screens or stack below */
    .hero-sidebar {
        display: none;
    }

    /* Adjust swiper height for medium screens */
    .hero-swiper,
    .swiper.hero-swiper {
        height: 380px !important;
        min-height: 380px !important;
    }

    .hero-swiper .swiper-slide,
    .hero-post-large {
        height: 380px !important;
        min-height: 380px !important;
    }

    .hero-swiper .swiper-wrapper {
        height: 380px !important;
    }

    /* Below-carousel posts - smaller on medium screens */
    .hero-post-below {
        height: 160px;
    }

    .hero-below-title {
        font-size: 0.875rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    /* Grid posts - tighter on medium desktop */
    .hero-small-thumbnail {
        width: 140px;
    }

    .hero-small-title {
        font-size: 0.9375rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }
}

/* Tablet & Below (991px) */
@media (max-width: 991px) {
    /* Hide desktop search on mobile */
    .desktop-search-form {
        display: none !important;
    }

    /* Hero Section - Stack on tablet */
    .hero-layout {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        gap: 1.25rem !important;
        width: 100% !important;
    }

    .hero-featured,
    .hero-grid,
    .hero-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

    /* Hero grid - horizontal list on tablet */
    .hero-grid {
        display: flex !important;
        flex-direction: row !important;
        gap: 1rem !important;
        overflow-x: auto;
    }

    .hero-post-small {
        flex: 1 1 0;
        flex-direction: column;
        padding: 0;
        border-bottom: none;
        /* border-right: 1px solid rgba(136, 136, 136, 0.55); */
        min-width: 120px;
    }

    .hero-post-small:last-child {
        border-right: none;
        padding-right: 0;
    }

    /* Hide 6th grid post on tablet and below (queried for desktop) */
    .hero-grid .hero-post-small:nth-child(n+6) {
        display: none;
    }

    .hero-small-thumbnail {
        width: 100%;
        aspect-ratio: 3 / 2;
    }

    .hero-sidebar {
        display: block !important;
        height: auto !important;
        max-height: none !important;
    }

    /* When sidebar is present on front page */
    .content-sidebar-wrapper .hero-layout {
        flex-direction: column !important;
    }

    /* Ensure sidebar doesn't interfere */
    .content-sidebar-wrapper .hero-sidebar {
        display: block !important;
    }

    .hero-title {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    /* Hero carousel height adjustment for tablets */
    .hero-swiper,
    .swiper.hero-swiper {
        height: 400px !important;
        min-height: 400px !important;
    }

    .hero-swiper .swiper-slide,
    .hero-post-large {
        height: 400px !important;
        min-height: 400px !important;
    }

    .hero-swiper .swiper-wrapper {
        height: 400px !important;
    }

    /* Tighten gap between swiper and posts below */
    .hero-swiper-container {
        margin-bottom: 1rem;
    }

    /* Below-carousel posts on tablet - side by side */
    .hero-below-carousel {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* .hero-post-below {
        height: 200px;
    } */

    .hero-small-title {
        font-size: 0.875rem;
    }

    /* Footer Tablet Responsive */
    /* Hide desktop footer, show mobile footer */
    .footer-desktop {
        display: none !important;
    }

    .footer-mobile {
        display: block !important;
    }

    /* Mobile footer logo */
    .footer-mobile-logo {
        padding: 2rem 1.5rem 1rem;
        text-align: center;
    }

    .footer-mobile-logo img {
        max-width: 180px !important;
        height: auto !important;
        max-height: 50px !important;
    }

    /* Mobile footer 4-column grid */
    .footer-mobile-columns {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 1.5rem 1.5rem;
    }

    .footer-mobile-column h3 {
        font-size: 1rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.75px;
        margin-bottom: 0.875rem;
        padding-bottom: 0.5rem;
        position: relative;
        color: #fff;
    }

    .footer-mobile-column h3::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 1.5rem;
        height: 2px;
        background: #fff;
    }

    .footer-mobile-column ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .footer-mobile-column ul li {
        margin-bottom: 0;
    }

    .footer-mobile-column ul li a {
        font-size: 0.875rem;
        color: rgba(255, 255, 255, 0.75);
        text-decoration: none;
        transition: color 0.2s ease;
        display: block;
        padding: 4px 0;
        line-height: 1.4;
    }

    .footer-mobile-column ul li a:hover {
        color: #fff;
    }

    /* Mobile footer social section */
    .footer-mobile-social {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
        border-top: 1px solid rgba(136, 136, 136, 0.55);
    }

    .footer-mobile-social h3 {
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.75px;
        margin-bottom: 1rem;
        position: relative;
        padding-bottom: 0.5rem;
        color: #fff;
    }

    .footer-mobile-social h3::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 1.5rem;
        height: 2px;
        background: #fff;
    }

    .footer-mobile-social-icons {
        display: flex;
        justify-content: center;
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .footer-mobile-social-icons .social-icon {
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        border-radius: 50%;
        color: #fff;
        font-size: 0.95rem;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .footer-mobile-social-icons .social-icon:hover {
        background: #fff;
        color: var(--theme-primary-color);
        transform: translateY(-3px);
    }

    /* Mobile footer legal section */
    .footer-mobile-legal {
        padding: 0;
        /* No dark background - keeps legal links in lighter green area */
    }

    .footer-mobile-legal-divider {
        height: 1px;
        background: rgba(255, 255, 255, 0.15);
        margin: 0 1.5rem 1rem;
    }

    .footer-mobile-legal-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem 1.25rem;
        padding: 0 1.5rem 1.5rem;
    }

    .footer-mobile-legal-links a {
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        transition: color 0.2s ease;
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    .footer-mobile-legal-links a:hover {
        color: #fff;
    }

    .footer-mobile-legal-links .ccpa-icon {
        width: 26px;
        height: auto;
    }

    /* Only the copyright gets the dark background */
    .footer-mobile-copyright {
        text-align: center;
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.7);
        line-height: 1.5;
        padding: 1rem 1.5rem;
        background: rgba(0, 0, 0, 0.25);
    }

    /* Hide duplicate desktop copyright on mobile (mobile has its own) */
    .footer-copyright {
        display: none !important;
    }

    /* Archive Hero - 2-column on tablet */
    .archive-hero-grid {
        grid-template-columns: 1fr 1fr;
    }

    .archive-hero-grid .archive-hero-col--center {
        grid-column: 1 / -1;
        order: -1;
    }

    .archive-grid-title--lead {
        font-size: 1.3rem;
    }

    .archive-hero-title {
        font-size: 2rem;
    }

    .archive-strip-items {
        grid-template-columns: repeat(2, 1fr);
    }

    .archive-strip-item:nth-child(2) {
        border-right: none;
        padding-right: 0;
    }

    /* Archive/Search - Stack thumbnails */
    .archive-post-item,
    .search-post-item {
        flex-direction: column;
    }

    .archive-post-item .post-thumbnail,
    .search-post-item .post-thumbnail {
        flex: none;
        max-width: 100%;
    }

    .archive-post-item .post-thumbnail img,
    .search-post-item .post-thumbnail img {
        aspect-ratio: 16 / 9;
        height: auto;
    }

    /* Single Post */
    .meta-first-line {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        flex-wrap: wrap;
    }

    .meta-right-section {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .social-share {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
    }

    /* Author Info */
    .single-author-info-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-image {
        padding: 0;
    }

    /* Post Navigation */
    .post-navigation .nav-links {
        grid-template-columns: 1fr;
    }

    .nav-next:only-child {
        grid-column: 1;
    }

    .nav-next {
        flex-direction: row;
    }

    .nav-next .nav-card-body {
        align-items: flex-start;
        text-align: left;
    }

    .nav-card-thumb {
        width: 72px;
    }

    /* Sidebar */
    .widget-area {
        padding-left: 0;
        margin-top: 40px;
    }
}

/* Mobile (768px) */
@media (max-width: 768px) {
    /* Ensure no horizontal overflow on mobile - CRITICAL */
    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
    }

    body {
        margin: 0 !important;
        /* Do NOT set padding: 0 here — it would override the fixed-header padding-top set by JS and CSS fallbacks */
    }

    .wrapper {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    /* Better touch targets for mobile - excludes inline elements like badges */
    .main-navigation a,
    .mobile-secondary-links a,
    .footer-column a,
    .footer-mobile-column a,
    .social-icons a,
    .auth-buttons a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Category badges should NOT have min-height */
    .category-badge,
    .entry-meta-categories a,
    .hero-meta-top a,
    .hero-below-meta-top a,
    .hero-small-meta-top a {
        min-height: auto !important;
        min-width: auto !important;
        display: inline-block !important;
    }

    /* Form inputs touch-friendly */
    input[type="text"],
    input[type="email"],
    input[type="search"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
        min-height: 48px;
        padding: 12px 15px;
    }

    .site {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    /* Ensure images don't overflow */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Restore height: 100% for thumbnails that need to fill their container */
    .hero-small-thumbnail img,
    .sidebar-posts-list .post-thumbnail img,
    .recommended-main .post-secondary .post-thumbnail img {
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Ensure all content respects mobile width - exclude nav menu */
    *:not(.main-navigation):not(.mobile-menu-overlay):not(.mobile-menu-header):not(.mobile-menu-close) {
        /* max-width: 100%; */
        box-sizing: border-box;
    }

    /* Mobile nav drawer needs fixed max-width */
    .main-navigation {
        max-width: 320px !important;
        width: 100% !important;
    }

    .hero-section,
    .site-content,
    main {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Hero Section - Stack Everything */
    .hero-layout,
    .content-sidebar-wrapper .hero-layout {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        gap: 0.375rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .hero-featured,
    .hero-grid,
    .hero-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
    }

    /* Hero grid - vertical list on mobile */
    .hero-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    .hero-post-small {
        flex-direction: row;
        gap: 0.625rem;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(136, 136, 136, 0.55);
        border-right: none;
        padding-right: 0;
    }

    .hero-post-small:first-child {
        padding-top: 0;
    }

    .hero-post-small:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .hero-small-thumbnail {
        width: 150px;
        aspect-ratio: 3 / 2;
    }

    /* Filter column is responsive */
    .hero-sidebar {
        display: block !important;
        width: 100% !important;
    }

    /* When sidebar present, still show filter column */
    .content-sidebar-wrapper .hero-sidebar {
        display: block !important;
    }

    /* CRITICAL: Override Swiper heights for mobile */
    /* hero-featured should not have fixed height - it contains carousel + below posts */
    .hero-featured {
        height: auto !important;
        min-height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.375rem !important;
    }

    .hero-swiper,
    .swiper.hero-swiper {
        height: 280px !important;
        min-height: 280px !important;
        background: #000 !important;
        margin-bottom: 0 !important;
    }

    .hero-swiper .swiper-wrapper {
        height: 280px !important;
    }

    .hero-swiper .swiper-slide {
        height: 280px !important;
        min-height: 280px !important;
    }

    .hero-post-large {
        height: 280px !important;
        min-height: 280px !important;
    }

    /* Ensure hero thumbnail fills the slide on mobile */
    .hero-thumbnail,
    .hero-swiper .hero-thumbnail {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    .hero-thumbnail img,
    .hero-swiper .hero-thumbnail img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .hero-section {
        margin-top: 0.75rem;
        margin-bottom: 0.5rem;
    }

    /* Hide arrows on mobile — swipe is primary, dots strip provides secondary nav */
    .hero-swiper .swiper-button-prev,
    .hero-swiper .swiper-button-next {
        display: none;
    }

    /* Show external nav strip: [< prev] [· · ·] [next >] */
    .hero-nav-strip {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 6px 0 2px;
    }

    .hero-swiper-pagination {
        display: flex !important;
        justify-content: center;
        align-items: center;
        padding: 4px 0;
        margin: 0;
        min-height: 24px;
    }

    /* Hero content: clean even padding — no extra bottom clearance needed */
    .hero-content {
        padding: 15px;
    }

    .hero-title {
        font-size: 1.375rem;
        margin-bottom: 0.5rem;
    }

    .hero-small-title {
        font-size: 0.875rem;
        min-height: 0;
    }

    h3.post-title {
        font-size: 1.25rem; /* 20px on mobile - Large for main articles */
    }

    h4.post-title {
        font-size: 1rem; /* 16px on mobile - Medium for sidebar */
    }

    .post-title {
        font-size: 1.125rem; /* 18px default on mobile */
    }

    .hero-excerpt {
        font-size: 0.938rem;
    }

    .hero-tab {
        font-size: 0.75rem;
        padding: 0.5rem 0.25rem;
    }

    .sidebar-post-title {
        font-size: 0.813rem; /* 13px - Smallest on mobile */
    }

    /* Add gap between swiper and posts below on mobile */
    .hero-swiper-container {
        margin-bottom: 0.25rem;
    }

    /* Below-carousel posts on mobile - card layout with image on top, text below */
    .hero-below-carousel {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        align-items: start;
    }

    .hero-post-below {
        height: auto;
        display: flex;
        flex-direction: column;
        background: #fff;
        border-radius: var(--theme-border-radius);
        overflow: hidden;
    }

    [data-theme="dark"] .hero-post-below {
        background: #1e1e1e;
    }

    .hero-post-below .hero-below-link {
        display: flex;
        flex-direction: column;
        height: auto;
    }

    /* Image on top - not absolute positioned */
    .hero-below-image,
    .hero-post-below .hero-below-image {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 3 / 2;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }

    .hero-below-image img,
    .hero-post-below .hero-below-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Hide the overlay on mobile cards */
    .hero-post-below .hero-below-overlay {
        display: none;
    }

    /* Content below image - not absolute positioned */
    .hero-post-below .hero-below-content {
        position: relative;
        padding: 6px 0 8px;
        background: #fff;
        z-index: auto;
    }

    [data-theme="dark"] .hero-post-below .hero-below-content {
        background: var(--theme-dark-bg);
    }

    .hero-below-title {
        font-size: 0.875rem;
        line-height: 1.35;
        color: var(--theme-light-header);
        -webkit-line-clamp: 2;
        line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    [data-theme="dark"] .hero-below-title {
        color: #fff;
    }

    .hero-below-meta {
        font-size: 0.75rem;
        color: rgba(0, 0, 0, 0.6);
    }

    [data-theme="dark"] .hero-below-meta {
        color: rgba(255, 255, 255, 0.6);
    }

    /* Show category badge on mobile cards */
    .hero-below-meta-top {
        display: block;
        margin-top: -20px;
        margin-bottom: 0.2rem;
    }

    .hero-below-link .entry-meta-categories {
        gap: 0;
    }

    .scroll-to-top {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
    }

    .scroll-to-top i {
        font-size: 26px;
    }

    .archive-title,
    .search-title {
        font-size: 1.8rem;
    }

    .archive-post-item .post-title,
    .search-post-item .post-title {
        font-size: 1.15rem;
    }

    /* Archive Hero - Mobile */
    .archive-hero {
        padding: 1.5rem 0 2rem;
    }

    .archive-hero-title {
        font-size: 1.6rem;
    }

    .archive-hero-grid,
    .archive-hero-grid--compact {
        grid-template-columns: 1fr;
    }

    .archive-hero-col--side {
        gap: 1rem;
    }

    .archive-grid-title--lead {
        font-size: 1.2rem;
    }

    .archive-strip-items {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .archive-strip-item {
        border-right: none;
        padding-right: 0;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(136, 136, 136, 0.55);
    }

    .archive-strip-item:last-child {
        border-bottom: none;
    }

    [data-theme="dark"] .archive-strip-item {
        border-bottom-color: rgba(136, 136, 136, 0.55);
    }

    .archive-listing-heading {
        font-size: 1rem;
        margin: 1.5rem 0 1rem;
    }

    .single-banner-header .entry-image img {
        max-height: 50vw;
    }
}

/* Small Mobile (480px) */
@media (max-width: 480px) {
    .wrapper {
        padding: 0 10px;
    }

    /* Even smaller Swiper for very small phones */
    /* hero-featured should not have fixed height - it contains carousel + below posts */
    .hero-featured {
        height: auto !important;
        min-height: auto !important;
    }

    .hero-swiper,
    .swiper.hero-swiper {
        height: 240px !important;
        min-height: 240px !important;
    }

    .hero-post-below {
        height: auto;
    }

    .hero-post-below .hero-below-image {
        height: 120px !important;
    }

    .hero-swiper .swiper-wrapper {
        height: 240px !important;
    }

    .hero-swiper .swiper-slide {
        height: 240px !important;
        min-height: 240px !important;
    }

    .hero-post-large {
        height: 240px !important;
        min-height: 240px !important;
    }

    /* Tighter padding on very small screens — arrows are at top so no bottom clearance needed */
    .hero-content {
        padding: 12px;
    }

    .hero-title {
        font-size: 1.25rem; /* 20px on very small mobile */
    }

    .meta-first-line {
        flex-direction: column;
        align-items: flex-start;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .meta-right-section {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .read-time,
    .last-updated {
        flex-shrink: 0;
    }

    .social-share {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
        margin-top: 8px;
    }

    .share-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        font-size: 14px;
    }

    .copy-link {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
    }

    .read-time,
    .last-updated,
    .meta-publish-date {
        font-size: 12px;
    }

    .meta-separator-bar {
        font-size: 12px;
    }

    .meta-author {
        font-size: 13px;
    }

    .author-avatar {
        width: 28px !important;
        height: 28px !important;
    }

    .comment-count {
        font-size: 12px;
    }

    /* Post dates visible on mobile vertical cards — enough room with full-width layout */
}

/* ============================================
   10. 404 ERROR PAGE & SEARCH FORM
   ============================================ */

/* 404 Error Page */
.error-404-page {
    padding: 3rem 0;
}

.error-404 .page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.error-404 .page-title {
    font-size: 2.5rem;
    color: var(--theme-primary-color);
    margin-bottom: 0.5rem;
}

/* 404 Error Image */
.error-404-image {
    display: block;
    max-width: 280px;
    width: 100%;
    height: auto;
    margin: 0 auto 2rem;
    border-radius: var(--theme-border-radius);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.error-404 .page-content {
    max-width: 800px;
    margin: 0 auto;
}

.error-404 .page-content > p {
    text-align: center;
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: var(--theme-light-text);
}

/* 404 Responsive - Tablet */
@media (max-width: 768px) {
    .error-404-image {
        max-width: 220px !important;
    }

    .error-404 .page-title {
        font-size: 1.75rem;
    }
}

/* 404 Responsive - Mobile */
@media (max-width: 480px) {
    .error-404-image {
        max-width: 175px !important;
        margin-bottom: 1.5rem;
    }

    .error-404 .page-title {
        font-size: 1.75rem;
    }

    .error-404-page {
        padding: 2rem 0;
    }

    .error-404-search {
        padding: 1.5rem;
    }

    .error-404-links ul {
        flex-direction: column;
        gap: 0.75rem;
    }

    .error-404-links ul li a {
        width: 100%;
        text-align: center;
    }
}

.error-404-search {
    margin: 2rem 0;
    padding: 2rem;
    background: #f8f8f8;
    border-radius: var(--theme-border-radius);
    text-align: center;
}

[data-theme="dark"] .error-404-search {
    background: #1e1e1e;
}

.error-404-search h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.error-404-links {
    margin: 2rem 0;
    text-align: center;
}

.error-404-links h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.error-404-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.error-404-links ul li a {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--theme-primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.error-404-links ul li a:hover {
    background: var(--theme-primary-hover-color);
}

.error-404-recent-posts {
    margin: 3rem 0 0;
}

.error-404-recent-posts h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.recent-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.recent-post-item {
    background: #f8f8f8;
    border-radius: var(--theme-border-radius);
    overflow: hidden;
    transition: transform 0.3s ease;
}

[data-theme="dark"] .recent-post-item {
    background: #1e1e1e;
}

.recent-post-item:hover {
    transform: translateY(-4px);
}

.recent-post-item .post-thumbnail {
    overflow: hidden;
}

.recent-post-item .post-thumbnail img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.recent-post-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

.recent-post-item .post-content {
    padding: 1rem;
}

.recent-post-item .post-meta-top {
    margin-bottom: 0.5rem;
}

.recent-post-item .post-title {
    font-size: 1rem;
    margin: 0 0 0.75rem;
}

.recent-post-item .post-title a {
    color: var(--theme-light-header);
    text-decoration: none;
    transition: color 0.3s ease;
}

.recent-post-item .post-title a:hover {
    color: var(--theme-primary-color);
}

.recent-post-item .post-meta {
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .recent-post-item .post-meta {
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   CUSTOM LOGIN PAGE & FORM
   ============================================ */

/* Login Page Template */
.login-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding: 3rem 0;
}

.login-page-container {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.login-page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    margin-bottom: 1.5rem;
}

.login-logo img {
    max-width: 180px;
    height: auto;
}

.login-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--theme-light-header);
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .login-page-title {
    color: #fff;
}

.login-page-subtitle {
    font-size: 1rem;
    color: var(--theme-light-text);
    margin: 0;
}

[data-theme="dark"] .login-page-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

/* Login Form Wrapper */
.uvureview-login-form-wrapper {
    max-width: 420px;
    margin: 0 auto;
    padding: 0;
}

.uvureview-login-form {
    background: #fff;
    padding: 2rem;
    border-radius: var(--theme-border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .uvureview-login-form {
    background: #1e1e1e;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.uvureview-login-form .form-group {
    margin-bottom: 1.25rem;
}

.uvureview-login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--theme-light-header);
}

[data-theme="dark"] .uvureview-login-form label {
    color: #fff;
}

.uvureview-login-form .form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid rgba(136, 136, 136, 0.55);
    border-radius: 6px;
    background: #fff;
    color: var(--theme-light-header);
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

[data-theme="dark"] .uvureview-login-form .form-control {
    background: #2a2a2a;
    border-color: rgba(136, 136, 136, 0.55);
    color: #fff;
}

.uvureview-login-form .form-control:focus {
    outline: none;
    border-color: var(--theme-primary-color);
    box-shadow: 0 0 0 3px rgba(1, 99, 47, 0.15);
}

.uvureview-login-form .form-remember {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.uvureview-login-form .remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.uvureview-login-form .remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--theme-primary-color);
}

.uvureview-login-form .forgot-password {
    color: var(--theme-primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.uvureview-login-form .forgot-password:hover {
    color: var(--theme-primary-hover-color);
    text-decoration: underline;
}

.login-submit-button {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--theme-primary-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-submit-button:hover {
    background: var(--theme-primary-hover-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 99, 47, 0.3);
}

.login-submit-button:active {
    transform: translateY(0);
}

.login-register-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .login-register-link {
    border-color: rgba(136, 136, 136, 0.55);
}

.login-register-link a {
    color: var(--theme-primary-color);
    font-weight: 600;
    text-decoration: none;
}

.login-register-link a:hover {
    text-decoration: underline;
}

/* Login Messages */
.login-error-message,
.login-success-message {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.login-error-message {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

[data-theme="dark"] .login-error-message {
    background: rgba(185, 28, 28, 0.2);
    border-color: rgba(185, 28, 28, 0.3);
    color: #fca5a5;
}

.login-success-message {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

[data-theme="dark"] .login-success-message {
    background: rgba(22, 101, 52, 0.2);
    border-color: rgba(22, 101, 52, 0.3);
    color: #86efac;
}

.login-error-message i,
.login-success-message i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Logged In Message */
.uvureview-logged-in-message {
    text-align: center;
    padding: 2rem;
    background: #f8f8f8;
    border-radius: var(--theme-border-radius);
}

[data-theme="dark"] .uvureview-logged-in-message {
    background: #1e1e1e;
}

.uvureview-logged-in-message p {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.logged-in-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.logged-in-actions .button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--theme-primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logged-in-actions .button:hover {
    background: var(--theme-primary-hover-color);
    color: #fff;
}

.logged-in-actions .button-secondary {
    background: #6b7280;
}

.logged-in-actions .button-secondary:hover {
    background: #4b5563;
}

/* Login Form Responsive */
@media (max-width: 480px) {
    .uvureview-login-form-wrapper {
        padding: 1rem;
    }

    .uvureview-login-form {
        padding: 1.5rem;
    }

    .uvureview-login-form .form-remember {
        flex-direction: column;
        align-items: flex-start;
    }

    .logged-in-actions {
        flex-direction: column;
    }

    .logged-in-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   OAuth Social Login Buttons
   ============================================ */
.oauth-login-section {
    margin-top: 1.5rem;
}

.oauth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 1.25rem;
    color: #888;
    font-size: 0.875rem;
}

.oauth-divider::before,
.oauth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

.oauth-divider span {
    padding: 0 1rem;
    white-space: nowrap;
}

[data-theme="dark"] .oauth-divider::before,
[data-theme="dark"] .oauth-divider::after {
    border-color: rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .oauth-divider span {
    color: #aaa;
}

.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.oauth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid;
    font-family: 'Montserrat', sans-serif;
}

.oauth-button .oauth-icon {
    flex-shrink: 0;
}

/* Google Button - Light Mode */
.oauth-google {
    background: #fff;
    color: #3c4043;
    border-color: #dadce0;
}

.oauth-google:hover {
    background: #f8f9fa;
    border-color: #c6c9cc;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Google Button - Dark Mode */
[data-theme="dark"] .oauth-google {
    background: #4285f4;
    color: #fff;
    border-color: #4285f4;
}

[data-theme="dark"] .oauth-google:hover {
    background: #3367d6;
    border-color: #3367d6;
}

/* Microsoft Button - Light Mode */
.oauth-microsoft {
    background: #fff;
    color: #5e5e5e;
    border-color: #8c8c8c;
}

.oauth-microsoft:hover {
    background: #f8f8f8;
    border-color: #6c6c6c;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Microsoft Button - Dark Mode */
[data-theme="dark"] .oauth-microsoft {
    background: #2f2f2f;
    color: #fff;
    border-color: #5e5e5e;
}

[data-theme="dark"] .oauth-microsoft:hover {
    background: #3f3f3f;
    border-color: #7e7e7e;
}

/* OAuth Error Messages */
.oauth-error-message {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

[data-theme="dark"] .oauth-error-message {
    background: rgba(185, 28, 28, 0.2);
    border-color: rgba(185, 28, 28, 0.3);
    color: #fca5a5;
}

/* OAuth Buttons Responsive */
@media (min-width: 480px) {
    .oauth-buttons {
        flex-direction: row;
    }

    .oauth-button {
        flex: 1;
    }
}

/* ============================================
   AUTH PAGES (Login, Registration, Forgot Password)
   ============================================ */

/* Hide any WordPress-generated headers on auth pages */
.auth-page .entry-header,
.auth-page .page-header,
.auth-page .entry-title,
.auth-page .page-title,
.auth-page .post-thumbnail,
.auth-page .entry-featured-image,
.login-page .entry-header,
.login-page .page-header,
.login-page .entry-title,
.login-page .page-title,
.login-page .post-thumbnail,
.login-page .entry-featured-image,
.register-page .entry-header,
.register-page .page-header,
.register-page .entry-title,
.register-page .page-title,
.register-page .post-thumbnail,
.register-page .entry-featured-image,
.profile-page .entry-header,
.profile-page .page-header,
.profile-page .entry-title,
.profile-page .page-title,
.profile-page .post-thumbnail,
.profile-page .entry-featured-image {
    display: none !important;
}

/* ============================================
   AUTH PAGES - Hide Sidebar on Split-Screen Layouts
   ============================================ */

/* Hide sidebar/widget-area on auth pages with split-screen marketing layouts */
.login-page ~ .widget-area,
.login-page ~ #secondary,
.login-page ~ aside,
.register-page ~ .widget-area,
.register-page ~ #secondary,
.register-page ~ aside,
body.page-template-template-login .widget-area,
body.page-template-template-login #secondary,
body.page-template-template-register .widget-area,
body.page-template-template-register #secondary,
.auth-page .widget-area,
.auth-page #secondary {
    display: none !important;
}

/* Ensure auth pages use full width when sidebar is hidden */
.login-page,
.register-page {
    width: 100%;
}

.login-page + .widget-area,
.register-page + .widget-area {
    display: none !important;
}

/* ============================================
   AUTH PAGES - Split Screen Layout
   ============================================ */

/* Split screen container — fills space between header and footer */
.auth-split-container {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 200px);
    position: relative;
}

/* ── Marketing / Photo Panel ───────────────────────────────── */
.auth-marketing-side {
    flex: 0 0 52%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #01632f 0%, #00873a 100%);
    display: flex;
    flex-direction: column;
    /* Diagonal slash: right edge tapers inward at bottom (login — marketing left) */
    clip-path: polygon(0 0, 100% 0, calc(100% - 72px) 100%, 0 100%);
    z-index: 2;
}

/* Photo background */
.auth-marketing-side.has-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Jersey-stripe diagonal texture — athletic / Wolverines feel */
.auth-marketing-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        -55deg,
        transparent,
        transparent 30px,
        rgba(255, 255, 255, 0.03) 30px,
        rgba(255, 255, 255, 0.03) 31px
    );
    z-index: 0;
}

/* Gradient scrim — bottom-heavy so editorial text always reads over photo */
.auth-marketing-side::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(2, 44, 20, 0.96) 0%,
        rgba(1, 70, 34, 0.82) 22%,
        rgba(1, 90, 42, 0.55) 50%,
        rgba(0, 20, 10, 0.18) 100%
    );
    z-index: 1;
}

/* Logo — pinned top-left, above scrim */
.auth-marketing-logo {
    position: absolute;
    top: 2.25rem;
    left: 2.5rem;
    z-index: 3;
}

.auth-marketing-logo img {
    max-width: 170px;
    height: auto;
}

/* Bottom editorial content */
.auth-marketing-content {
    position: relative;
    z-index: 3;
    margin-top: auto; /* push to bottom */
    padding: 2.5rem 2.5rem 3rem;
    /* extra right padding on login so text clears the diagonal */
    padding-right: calc(72px + 1.5rem);
    color: #fff;
}

/* Newspaper-style rule above headline */
.auth-marketing-rule {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
    margin-top: 4rem;
}

.auth-marketing-rule::before {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.auth-marketing-rule-text {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

/* Large editorial headline */
.auth-marketing-headline {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.625rem;
    font-weight: 800;
    line-height: 1.06;
    margin: 0 0 0.75rem;
    color: #fff;
}

/* Subtitle tagline */
.auth-marketing-tagline {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.68);
    margin: 0 0 1.375rem;
    max-width: 300px;
}

/* Content category chips */
.auth-marketing-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.auth-marketing-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.65rem;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.09);
}

/* ── Form Panel ────────────────────────────────────────────── */
.auth-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Pull left to visually fill the diagonal gap on login */
    margin-left: -72px;
    padding: 3rem 2.5rem 3rem calc(72px + 2.5rem);
    background: #fff;
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .auth-form-side {
    background: #121212;
}

/* ── REGISTER: Mirror — marketing RIGHT, form LEFT ─────────── */
.register-page .auth-marketing-side {
    order: 2;
    /* Opposite diagonal: left edge tapers outward at bottom */
    clip-path: polygon(72px 0, 100% 0, 100% 100%, 0 100%);
}

.register-page .auth-marketing-logo {
    /* Logo moves to the inner top corner on the right panel */
    left: calc(72px + 1.5rem);
}

.register-page .auth-marketing-content {
    padding-right: 2.5rem;
    padding-left: calc(72px + 1.5rem);
}

.register-page .auth-form-side {
    order: 1;
    /* Reset left offset, mirror to right */
    margin-left: 0;
    padding-left: 2.5rem;
    margin-right: -72px;
    padding-right: calc(72px + 2.5rem);
}

/* ── Shared form header ────────────────────────────────────── */
.auth-page-container {
    max-width: 400px;
    width: 100%;
}

.auth-page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    margin-bottom: 1.5rem;
}

.auth-logo img {
    max-width: 180px;
    height: auto;
}

.auth-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--theme-light-header);
    margin-bottom: 0.4rem;
}

[data-theme="dark"] .auth-page-title {
    color: #fff;
}

.auth-page-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary, #555);
    margin: 0;
}

[data-theme="dark"] .auth-page-subtitle {
    color: rgba(255, 255, 255, 0.6);
}

/* ── Responsive ────────────────────────────────────────────── */

/* Tablet: remove diagonal, stack vertically */
@media (max-width: 960px) {
    .auth-split-container {
        flex-direction: column;
    }

    /* No diagonal on mobile — clean horizontal edge */
    .auth-marketing-side {
        flex: none;
        min-height: 260px;
        clip-path: none;
    }

    /* Reset register CSS ordering — natural DOM stack on mobile */
    .register-page .auth-marketing-side,
    .register-page .auth-form-side {
        order: unset;
    }

    /* Remove diagonal clip-path on register (higher specificity needed) */
    .register-page .auth-marketing-side {
        clip-path: none;
    }

    .auth-marketing-logo {
        top: 1.5rem;
        left: 1.75rem;
    }

    .register-page .auth-marketing-logo {
        left: 1.75rem;
    }

    .auth-marketing-content {
        padding: 1.5rem 1.75rem 1.75rem;
        padding-right: 1.75rem;
    }

    .register-page .auth-marketing-content {
        padding-left: 1.75rem;
        padding-right: 1.75rem;
    }

    .auth-marketing-headline {
        font-size: 1.75rem;
    }

    .auth-marketing-tagline {
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .auth-form-side,
    .register-page .auth-form-side {
        margin: 0;
        padding: 2.5rem 1.75rem;
    }
}

/* Mobile: compact marketing banner */
@media (max-width: 600px) {
    .auth-marketing-side {
        min-height: 220px;
    }

    .auth-marketing-headline {
        font-size: 1.5rem;
    }

    .auth-marketing-tagline {
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }

    .auth-marketing-tags {
        display: none;
    }

    .auth-form-side,
    .register-page .auth-form-side {
        padding: 2rem 1.25rem;
    }
}

/* Registration Form */
.uvureview-register-form-wrapper,
.uvureview-forgot-password-wrapper {
    max-width: 420px;
    margin: 0 auto;
}

.uvureview-register-form,
.uvureview-forgot-form {
    background: #fff;
    padding: 2rem;
    border-radius: var(--theme-border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .uvureview-register-form,
[data-theme="dark"] .uvureview-forgot-form {
    background: #1e1e1e;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.uvureview-register-form .form-group,
.uvureview-forgot-form .form-group {
    margin-bottom: 1.25rem;
}

.uvureview-register-form label,
.uvureview-forgot-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--theme-light-header);
}

[data-theme="dark"] .uvureview-register-form label,
[data-theme="dark"] .uvureview-forgot-form label {
    color: #fff;
}

.uvureview-register-form .form-control,
.uvureview-forgot-form .form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid rgba(136, 136, 136, 0.55);
    border-radius: 6px;
    background: #fff;
    color: var(--theme-light-header);
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

[data-theme="dark"] .uvureview-register-form .form-control,
[data-theme="dark"] .uvureview-forgot-form .form-control {
    background: #2a2a2a;
    border-color: rgba(136, 136, 136, 0.55);
    color: #fff;
}

.uvureview-register-form .form-control:focus,
.uvureview-forgot-form .form-control:focus {
    outline: none;
    border-color: var(--theme-primary-color);
    box-shadow: 0 0 0 3px rgba(1, 99, 47, 0.15);
}

.form-note {
    font-size: 0.85rem;
    color: var(--theme-light-text);
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .form-note {
    color: rgba(255, 255, 255, 0.6);
}

.register-submit-button,
.forgot-submit-button {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--theme-primary-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.register-submit-button:hover,
.forgot-submit-button:hover {
    background: var(--theme-primary-hover-color);
    transform: translateY(-1px);
}

/* Error/Success Messages */
.register-error-message,
.register-success-message,
.forgot-error-message,
.forgot-success-message {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.register-error-message,
.forgot-error-message {
    background: #fee2e2;
    color: #dc2626;
}

.register-success-message,
.forgot-success-message {
    background: #dcfce7;
    color: #16a34a;
}

.register-success-message a,
.forgot-success-message a {
    color: var(--theme-primary-color);
    font-weight: 600;
}

/* Links */
.register-login-link,
.forgot-back-link {
    text-align: center;
    margin-top: 1.5rem;
}

.register-login-link p,
.forgot-back-link p {
    margin: 0;
    color: var(--theme-light-text);
}

.register-login-link a,
.forgot-back-link a {
    color: var(--theme-primary-color);
    font-weight: 600;
    text-decoration: none;
}

.register-login-link a:hover,
.forgot-back-link a:hover {
    text-decoration: underline;
}

.forgot-instructions {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--theme-light-text);
}

[data-theme="dark"] .forgot-instructions {
    color: rgba(255, 255, 255, 0.7);
}

.register-disabled {
    text-align: center;
    padding: 2rem;
    background: #f3f4f6;
    border-radius: var(--theme-border-radius);
}

/* Reset Password Page */
.uvureview-reset-password-wrapper {
    max-width: 420px;
    margin: 0 auto;
}

.uvureview-reset-form {
    background: #fff;
    padding: 2rem;
    border-radius: var(--theme-border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .uvureview-reset-form {
    background: #1e1e1e;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.uvureview-reset-form .form-group {
    margin-bottom: 1.25rem;
}

.uvureview-reset-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--theme-light-header);
}

[data-theme="dark"] .uvureview-reset-form label {
    color: #fff;
}

.uvureview-reset-form .form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid rgba(136, 136, 136, 0.55);
    border-radius: 6px;
    background: #fff;
    color: var(--theme-light-header);
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

[data-theme="dark"] .uvureview-reset-form .form-control {
    background: #2a2a2a;
    border-color: rgba(136, 136, 136, 0.55);
    color: #fff;
}

.uvureview-reset-form .form-control:focus {
    outline: none;
    border-color: var(--theme-primary-color);
    box-shadow: 0 0 0 3px rgba(1, 99, 47, 0.15);
}

.reset-instructions {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--theme-light-text);
}

[data-theme="dark"] .reset-instructions {
    color: rgba(255, 255, 255, 0.7);
}

.reset-invalid-link {
    text-align: center;
}

.reset-request-new {
    margin-top: 1.5rem;
}

.reset-request-new .button {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--theme-primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.reset-request-new .button:hover {
    background: var(--theme-primary-hover-color);
    color: #fff;
}

/* ============================================
   PROFILE PAGE
   ============================================ */

.profile-page {
    padding: 2rem 0;
}

.profile-page-container {
    max-width: 700px;
    margin: 0 auto;
}

.profile-page-header {
    margin-bottom: 2rem;
}

.profile-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--theme-light-header);
    margin: 0;
}

[data-theme="dark"] .profile-page-title {
    color: #fff;
}

/* Profile Wrapper */
.uvureview-profile-wrapper {
    background: #fff;
    border-radius: var(--theme-border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    max-width: 720px;
    margin: 0 auto;
    margin-bottom: 3rem;
}

[data-theme="dark"] .uvureview-profile-wrapper {
    background: #1e1e1e;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Profile Header */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, var(--theme-primary-color) 0%, #00873a 100%);
    color: #fff;
}

/* Profile Avatar Section with Upload */
.profile-avatar-section {
    position: relative;
}

.avatar-upload-form {
    display: inline-block;
}

.profile-avatar-link {
    position: relative;
    display: block;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.avatar-preview {
    display: block;
    width: 100%;
    height: 100%;
}

.profile-avatar-section img,
.avatar-preview img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.avatar-edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.avatar-edit-overlay i {
    color: #fff;
    font-size: 1.25rem;
}

.avatar-edit-overlay span {
    color: #fff;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-avatar-link:hover .avatar-edit-overlay {
    opacity: 1;
}

.profile-avatar-link:hover img {
    opacity: 0.8;
}

/* Avatar Remove Button */
.avatar-remove-form {
    position: absolute;
    top: -5px;
    right: -5px;
    z-index: 10;
}

.avatar-remove-button {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    border: 2px solid #fff;
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    padding: 0;
}

.avatar-remove-button:hover {
    background: #b52a37;
    transform: scale(1.1);
}

/* Avatar Upload Submit Button (hidden by default, shown when file selected) */
.avatar-upload-submit {
    display: none;
    margin-top: 0.5rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.avatar-upload-submit:hover {
    background: rgba(255, 255, 255, 0.3);
}

.avatar-upload-submit.visible {
    display: inline-block;
}

.profile-header-info h2 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    color: #fff;
}

.profile-role-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.profile-email {
    margin: 0 0 0.25rem;
    opacity: 0.9;
    font-size: 0.95rem;
}

.profile-member-since {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    border-bottom: 2px solid rgba(136, 136, 136, 0.55);
    padding: 0 2rem;
    background: #fafbfc;
}

[data-theme="dark"] .profile-tabs {
    border-color: rgba(136, 136, 136, 0.55);
    background: #171717;
}

.profile-tab {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--theme-light-text);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

[data-theme="dark"] .profile-tab {
    color: rgba(255, 255, 255, 0.6);
}

.profile-tab:hover {
    color: var(--theme-primary-color);
}

.profile-tab.active {
    color: var(--theme-primary-color);
}

.profile-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--theme-primary-color);
}

/* Profile Tab Content */
.profile-tab-content {
    display: none;
    padding: 2rem 2.5rem;
}

.profile-tab-content.active {
    display: block;
}

/* Profile Forms */
.uvureview-profile-form,
.uvureview-social-form {
    max-width: 100%;
}


.uvureview-profile-form .form-group,
.uvureview-password-form .form-group,
.uvureview-social-form .form-group {
    margin-bottom: 1.25rem;
}

.uvureview-profile-form label,
.uvureview-password-form label,
.uvureview-social-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--theme-light-header);
}

.uvureview-social-form label i {
    margin-right: 0.5rem;
    width: 1rem;
    text-align: center;
}

[data-theme="dark"] .uvureview-profile-form label,
[data-theme="dark"] .uvureview-password-form label,
[data-theme="dark"] .uvureview-social-form label {
    color: #fff;
}

.uvureview-profile-form .form-control,
.uvureview-password-form .form-control,
.uvureview-social-form .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid rgba(136, 136, 136, 0.55);
    border-radius: 6px;
    background: #fff;
    color: var(--theme-light-header);
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

[data-theme="dark"] .uvureview-profile-form .form-control,
[data-theme="dark"] .uvureview-password-form .form-control,
[data-theme="dark"] .uvureview-social-form .form-control {
    background: #2a2a2a;
    border-color: rgba(136, 136, 136, 0.55);
    color: #fff;
}

.uvureview-profile-form .form-control:focus,
.uvureview-password-form .form-control:focus,
.uvureview-social-form .form-control:focus {
    outline: none;
    border-color: var(--theme-primary-color);
    box-shadow: 0 0 0 3px rgba(1, 99, 47, 0.15);
}

.uvureview-profile-form textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: var(--theme-light-text);
    opacity: 0.7;
}

[data-theme="dark"] .form-hint {
    color: rgba(255, 255, 255, 0.5);
}

.form-note {
    font-size: 0.9rem;
    color: var(--theme-light-text);
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .form-note {
    color: rgba(255, 255, 255, 0.6);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group.half {
    flex: 1;
}

/* Social form: 2-column grid on desktop */
.uvureview-social-form .social-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.25rem;
}

.profile-submit-button {
    padding: 0.75rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: var(--theme-primary-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    margin-top: 0.5rem;
    width: 100%;
}

.profile-submit-button:hover {
    background: var(--theme-primary-hover-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Profile Messages */
.profile-success-message,
.profile-error-message {
    padding: 0.875rem 1.25rem;
    border-radius: 6px;
    margin: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.profile-success-message {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

[data-theme="dark"] .profile-success-message {
    background: rgba(22, 163, 74, 0.15);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.2);
}

.profile-error-message {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

[data-theme="dark"] .profile-error-message {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.2);
}

/* Profile Logout */
.profile-logout {
    padding: 1.25rem 2.5rem;
    border-top: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .profile-logout {
    border-color: rgba(136, 136, 136, 0.55);
}

.logout-link {
    color: #dc2626;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.logout-link:hover {
    color: #b91c1c;
}

/* ── Password Strength Meter ─────────────────────── */
.psm-wrap {
    margin-top: 0.625rem;
    display: none; /* shown via JS once typing starts */
}

.psm-wrap.psm-visible {
    display: block;
}

.psm-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.625rem;
}

.psm-bar-track {
    flex: 1;
    height: 6px;
    background: rgba(136, 136, 136, 0.2);
    border-radius: 99px;
    overflow: hidden;
}

.psm-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.psm-bar-fill.psm-s1 { width: 25%; background: #dc2626; }
.psm-bar-fill.psm-s2 { width: 50%; background: #f97316; }
.psm-bar-fill.psm-s3 { width: 75%; background: #eab308; }
.psm-bar-fill.psm-s4 { width: 100%; background: #16a34a; }

.psm-label {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    min-width: 4rem;
    text-align: right;
    transition: color 0.3s ease;
}

.psm-label.psm-s1 { color: #dc2626; }
.psm-label.psm-s2 { color: #f97316; }
.psm-label.psm-s3 { color: #ca8a04; }
.psm-label.psm-s4 { color: #16a34a; }

.psm-rules {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 1rem;
}

.psm-rule {
    font-size: 0.75rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: color 0.2s ease;
}

.psm-rule::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid #d1d5db;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
    background: transparent;
}

.psm-rule.psm-ok {
    color: #16a34a;
}

.psm-rule.psm-ok::before {
    background: #16a34a;
    border-color: #16a34a;
    /* checkmark via clip-path trick */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%23fff' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 10px 10px;
    background-repeat: no-repeat;
    background-position: center;
}

[data-theme="dark"] .psm-rule {
    color: #6b7280;
}

[data-theme="dark"] .psm-rule::before {
    border-color: #4b5563;
}

[data-theme="dark"] .psm-bar-track {
    background: rgba(255, 255, 255, 0.1);
}

/* Match indicator */
.psm-match {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 1.25rem;
    transition: color 0.2s ease;
}

.psm-match.psm-match-ok  { color: #16a34a; }
.psm-match.psm-match-bad { color: #dc2626; }

/* Login Required */
.uvureview-login-required {
    text-align: center;
    padding: 3rem;
    background: #f9fafb;
    border-radius: var(--theme-border-radius);
}

[data-theme="dark"] .uvureview-login-required {
    background: #1e1e1e;
}

.uvureview-login-required p {
    margin-bottom: 1.5rem;
    color: var(--theme-light-text);
}

.uvureview-login-required .button {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--theme-primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.uvureview-login-required .button:hover {
    background: var(--theme-primary-hover-color);
    color: #fff;
}

/* Profile Responsive — Tablet */
@media (max-width: 768px) {
    .uvureview-profile-wrapper {
        border-radius: 8px;
    }

    .profile-header {
        padding: 1.75rem 1.5rem;
    }

    .profile-tab-content {
        padding: 1.75rem 1.5rem;
    }

    .profile-logout {
        padding: 1.25rem 1.5rem;
    }

    .profile-tabs {
        padding: 0 1rem;
    }

    .uvureview-social-form .social-fields-grid {
        grid-template-columns: 1fr;
    }

    .profile-success-message,
    .profile-error-message {
        margin: 1rem 1.5rem;
    }
}

/* Profile Responsive — Mobile */
@media (max-width: 480px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1.25rem;
        gap: 1rem;
    }

    .profile-header-info h2 {
        justify-content: center;
        font-size: 1.25rem;
    }

    .profile-avatar-link {
        margin: 0 auto;
    }

    .profile-tabs {
        padding: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .profile-tab {
        flex: 1;
        padding: 0.875rem 0.5rem;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .profile-tab-content {
        padding: 1.25rem;
    }

    .profile-submit-button {
        width: 100%;
    }

    .profile-success-message,
    .profile-error-message {
        margin: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}

/* ============================================
   SEARCH FILTERS - ENHANCED DESIGN
   ============================================ */

/* Search Hero - Full Width Section */
/* ============================================
   SEARCH PAGE — NBC-STYLE LAYOUT
   ============================================ */

.search-hero {
    padding: 2rem 0 2.5rem;
    background: #f5f5f5;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .search-hero {
    background: #141414;
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.search-hero .search-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

[data-theme="dark"] .search-hero .search-header {
    border-color: transparent;
}

.search-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.search-title span {
    color: var(--theme-primary-color);
    font-weight: 700;
}

.search-form-container {
    margin-top: 1.25rem;
}

.search-form-container .search-form {
    max-width: 100%;
}

.search-form-container .search-form-wrapper {
    max-width: 600px;
}

/* --- Search Layout Grid: Left Sidebar + Right Results --- */
.search-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2.5rem;
    align-items: start;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* --- Left Filter Sidebar --- */
.search-filter-sidebar {
    position: sticky;
    top: 90px;
    border-right: 1px solid rgba(136, 136, 136, 0.55);
    padding-right: 1.5rem;
}

[data-theme="dark"] .search-filter-sidebar {
    border-right-color: rgba(136, 136, 136, 0.55);
}

/* Clear all link */
.search-clear-all {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #dc2626;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1.25rem;
    transition: color 0.2s ease;
}

.search-clear-all:hover {
    color: #b91c1c;
    text-decoration: underline;
}

.search-clear-all i {
    font-size: 0.7rem;
}

/* Filter groups */
.search-filter-group {
    margin-bottom: 1.75rem;
}

.search-filter-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--theme-light-header);
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--theme-primary-color);
}

[data-theme="dark"] .search-filter-title {
    color: #fff;
}

/* Filter links list */
.search-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-filter-list li {
    margin: 0;
}

.search-filter-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.625rem;
    margin: 0 -0.625rem;
    font-size: 0.875rem;
    color: var(--theme-light-text);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.search-filter-link:hover {
    background: #e0e0e0;
    color: var(--theme-primary-color);;
}

[data-theme="dark"] .search-filter-link {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .search-filter-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--theme-primary-color);
}

.search-filter-link.active {
    background: rgba(1, 99, 47, 0.08);
    color: var(--theme-primary-color);
    font-weight: 600;
}

[data-theme="dark"] .search-filter-link.active {
    background: rgba(1, 99, 47, 0.15);
}

.search-filter-count {
    font-size: 0.75rem;
    color: var(--theme-light-text);
    opacity: 0.7;
}

[data-theme="dark"] .search-filter-count {
    color: rgba(255, 255, 255, 0.4);
}

/* Custom date range picker */
.search-filter-dates {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .search-filter-dates {
    border-top-color: rgba(136, 136, 136, 0.55);
}

.search-filter-sublabel {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--theme-light-text);
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .search-filter-sublabel {
    color: rgba(255, 255, 255, 0.6);
}

.search-date-form {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.search-date-form input[type="date"] {
    width: 100%;
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 4px;
    background: #fff;
    color: var(--theme-light-header);
    font-family: 'Montserrat', sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    line-height: 1.4;
}

[data-theme="dark"] .search-date-form input[type="date"] {
    background: #2a2a2a;
    border-color: rgba(136, 136, 136, 0.55);
    color: #fff;
}

.search-date-form input[type="date"]:focus {
    outline: none;
    border-color: var(--theme-primary-color);
}

.search-date-apply {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--theme-primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: 'Montserrat', sans-serif;
}

.search-date-apply:hover {
    background: var(--theme-primary-hover-color);
}

/* --- Results Bar: Count + Sort Tabs --- */
.search-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .search-results-bar {
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.search-results-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--theme-light-text);
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    border-left: none;
    border-radius: 0;
}

[data-theme="dark"] .search-results-count {
    color: rgba(255, 255, 255, 0.7);
    background: none;
}

.search-sort-tabs {
    display: flex;
    gap: 0;
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 6px;
    overflow: hidden;
}

[data-theme="dark"] .search-sort-tabs {
    border-color: rgba(136, 136, 136, 0.55);
}

.search-sort-tab {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--theme-light-text);
    background: transparent;
    transition: all 0.15s ease;
    border-right: 1px solid rgba(136, 136, 136, 0.55);
}

.search-sort-tab:last-child {
    border-right: none;
}

[data-theme="dark"] .search-sort-tab {
    color: rgba(255, 255, 255, 0.6);
    border-right-color: rgba(136, 136, 136, 0.55);
}

.search-sort-tab:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--theme-light-header);
}

[data-theme="dark"] .search-sort-tab:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.search-sort-tab.active {
    background: var(--theme-primary-color);
    color: #fff;
}

[data-theme="dark"] .search-sort-tab.active {
    background: var(--theme-primary-color);
    color: #fff;
}

/* Mobile filter toggle — hidden on desktop */
.search-filter-mobile-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #f5f5f5;
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--theme-light-header);
    cursor: pointer;
    margin-bottom: 0;
    font-family: 'Montserrat', sans-serif;
}

[data-theme="dark"] .search-filter-mobile-toggle {
    background: #1a1a1a;
    border-color: rgba(136, 136, 136, 0.55);
    color: #fff;
}

.search-filter-mobile-toggle .search-filter-badge {
    background: var(--theme-primary-color);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    line-height: 1.3;
}

.search-filter-toggle-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.search-filter-mobile-toggle[aria-expanded="true"] .search-filter-toggle-arrow {
    transform: rotate(180deg);
}

/* --- Search Layout Responsive --- */
@media (max-width: 991px) {
    .search-layout {
        grid-template-columns: 220px 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .search-layout {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding-top: 1rem;
    }

    .search-filter-sidebar {
        position: static;
        border-right: none;
        padding-right: 0;
        padding-bottom: 0;
        margin-bottom: 1.25rem;
        border-bottom: none;
        overflow: hidden;
    }

    .search-filter-sidebar .search-filter-group {
        margin-bottom: 1.25rem;
    }

    .search-filter-sidebar .search-filter-group:last-child {
        margin-bottom: 0;
    }

    /* Mobile toggle button */
    .search-filter-mobile-toggle {
        display: flex !important;
        min-height: 48px;
        border-radius: 8px;
    }

    .search-filter-content {
        display: none;
        padding: 1.25rem;
        margin-top: 0.75rem;
        background: #f8f9fa;
        border-radius: 10px;
        border: 1px solid rgba(136, 136, 136, 0.55);
        max-height: 65vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    [data-theme="dark"] .search-filter-content {
        background: #1a1a1a;
        border-color: rgba(136, 136, 136, 0.55);
    }

    .search-filter-content.active {
        display: block;
    }

    /* Horizontal pill layout for filter options on mobile */
    .search-filter-content .search-filter-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .search-filter-content .search-filter-list li {
        margin: 0;
    }

    .search-filter-content .search-filter-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 8px 14px;
        min-height: 38px;
        border-radius: 20px;
        font-size: 0.813rem;
        background: #fff;
        border: 1px solid rgba(136, 136, 136, 0.55);
        margin: 0;
    }

    [data-theme="dark"] .search-filter-content .search-filter-link {
        background: #252525;
        border-color: rgba(136, 136, 136, 0.55);
    }

    .search-filter-content .search-filter-link.active {
        background: var(--theme-primary-color);
        color: #fff;
        border-color: var(--theme-primary-color);
    }

    .search-filter-content .search-filter-count {
        display: none;
    }

    .search-filter-content .search-filter-title {
        font-size: 0.75rem;
        margin-bottom: 0.6rem;
        padding-bottom: 0.4rem;
        border-bottom: 1px solid rgba(136, 136, 136, 0.55);
    }

    [data-theme="dark"] .search-filter-content .search-filter-title {
        border-bottom-color: rgba(136, 136, 136, 0.55);
    }

    .search-filter-content .search-filter-dates {
        margin-top: 0.75rem;
    }

    .search-filter-content .search-date-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .search-filter-content .search-date-form input[type="date"] {
        width: 100%;
        padding: 8px 10px;
        font-size: 0.813rem;
        border-radius: 8px;
        min-height: 40px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        line-height: 1.4;
        box-sizing: border-box;
    }

    .search-filter-content .search-date-apply {
        grid-column: 1 / -1;
        padding: 10px 14px;
        font-size: 0.813rem;
        border-radius: 8px;
        min-height: 40px;
    }

    .search-clear-all {
        margin-bottom: 1rem;
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        font-size: 0.813rem;
        padding: 7px 14px;
        min-height: 36px;
        border-radius: 20px;
        background: rgba(220, 38, 38, 0.08);
        color: #dc2626;
        border: 1px solid rgba(220, 38, 38, 0.15);
    }

    [data-theme="dark"] .search-clear-all {
        background: rgba(220, 38, 38, 0.15);
        border-color: rgba(220, 38, 38, 0.25);
    }

    .search-results-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .search-sort-tabs {
        width: 100%;
    }

    .search-sort-tab {
        flex: 1;
        text-align: center;
    }
}

/* ============================================
   SEARCH AUTHOR RESULTS
   ============================================ */

.search-authors-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .search-authors-section {
    border-color: rgba(136, 136, 136, 0.55);
}

/* Authors Section Toggle */
.search-authors-section {
    margin-bottom: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

[data-theme="dark"] .search-authors-section {
    background: #1a1a1a;
}

.search-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.875rem 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
}

.search-section-toggle:hover {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .search-section-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-section-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--theme-light-header);
    margin: 0;
}

.search-section-heading i {
    color: var(--theme-primary-color);
}

.search-section-heading .author-count {
    font-weight: 400;
    color: var(--theme-light-text);
    font-size: 0.9rem;
}

[data-theme="dark"] .search-section-heading {
    color: #fff;
}

[data-theme="dark"] .search-section-heading .author-count {
    color: rgba(255, 255, 255, 0.6);
}

.toggle-icon {
    color: var(--theme-light-text);
    transition: transform 0.2s ease;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

[data-theme="dark"] .toggle-icon {
    color: rgba(255, 255, 255, 0.6);
}

.search-articles-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--theme-light-header);
    margin: 1.5rem 0 1rem;
}

.search-articles-heading i {
    color: var(--theme-primary-color);
}

[data-theme="dark"] .search-articles-heading {
    color: #fff;
}

/* Authors Grid */
.search-authors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0 1rem 1rem;
    transition: all 0.2s ease;
}

.search-authors-grid.collapsed {
    display: none;
}

/* Compact Author Cards */
.search-author-card {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.875rem 0.5rem 0.5rem;
    background: #fff;
    border-radius: 50px;
    border: 1px solid rgba(136, 136, 136, 0.55);
    text-decoration: none;
    transition: all 0.2s ease;
}

.search-author-card:hover {
    border-color: var(--theme-primary-color);
    background: rgba(1, 99, 47, 0.04);
}

[data-theme="dark"] .search-author-card {
    background: #2a2a2a;
    border-color: rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .search-author-card:hover {
    background: #333;
}

.author-card-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.author-card-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.author-card-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--theme-light-header);
    margin: 0;
    line-height: 1.2;
}

[data-theme="dark"] .author-card-name {
    color: #fff;
}

.author-card-posts {
    font-size: 0.75rem;
    color: var(--theme-light-text);
}

[data-theme="dark"] .author-card-posts {
    color: rgba(255, 255, 255, 0.6);
}

/* Author Search Responsive */
@media (max-width: 768px) {
    .search-authors-grid {
        gap: 0.5rem;
    }

    .search-author-card {
        padding: 0.375rem 0.75rem 0.375rem 0.375rem;
    }

    .author-card-avatar img {
        width: 32px;
        height: 32px;
    }

    .author-card-name {
        font-size: 0.8rem;
    }
}

/* Search Form */
.search-form {
    max-width: 600px;
    margin: 0 auto;
}

.search-form-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-form .search-field {
    width: 100%;
    padding: 0.875rem 3.5rem 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid rgba(136, 136, 136, 0.55);
    border-radius: 8px;
    background: #fff;
    color: var(--theme-light-header);
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

[data-theme="dark"] .search-form .search-field {
    background: #1e1e1e;
    border-color: rgba(136, 136, 136, 0.55);
    color: #fff;
}

.search-form .search-field:focus {
    outline: none;
    border-color: var(--theme-primary-color);
    box-shadow: 0 0 0 3px rgba(0, 132, 61, 0.1);
}

.search-form .search-submit {
    position: absolute;
    right: 0.3rem;
    top: 1.8em;
    transform: translateY(-50%);
    background: var(--theme-primary-color);
    border: none;
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-form .search-submit:hover {
    background: var(--theme-primary-hover-color);
}

.search-form .search-submit i {
    font-size: 1rem;
}

/* Search Autocomplete Dropdown */
.search-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    margin-top: 4px;
    background: #fff;
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

[data-theme="dark"] .search-autocomplete-dropdown {
    background: #1e1e1e;
    border-color: rgba(136, 136, 136, 0.55);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.autocomplete-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--theme-light-header);
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
    transition: background 0.15s ease;
}

[data-theme="dark"] .autocomplete-item {
    color: #e0e0e0;
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.autocomplete-item:hover,
.autocomplete-item.focused {
    background: rgba(0, 132, 61, 0.06);
}

[data-theme="dark"] .autocomplete-item:hover,
[data-theme="dark"] .autocomplete-item.focused {
    background: rgba(0, 132, 61, 0.15);
}

.autocomplete-title {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.autocomplete-date {
    font-size: 0.75rem;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
}

[data-theme="dark"] .autocomplete-date {
    color: #999;
}

.autocomplete-no-results {
    padding: 12px 14px;
    font-size: 0.85rem;
    color: #888;
    text-align: center;
}

.autocomplete-view-all {
    display: block;
    padding: 10px 14px;
    text-align: center;
    font-size: 0.813rem;
    font-weight: 600;
    color: var(--theme-primary-color);
    text-decoration: none;
    transition: background 0.15s ease;
}

.autocomplete-view-all:hover,
.autocomplete-view-all.focused {
    background: rgba(0, 132, 61, 0.06);
}

[data-theme="dark"] .autocomplete-view-all:hover,
[data-theme="dark"] .autocomplete-view-all.focused {
    background: rgba(0, 132, 61, 0.15);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   11. UTILITY CLASSES
   ============================================ */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-15 {
    margin-bottom: 15px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-15 {
    margin-top: 15px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

/* No-Thumbnail Placeholder */
.no-thumbnail {
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.no-thumbnail a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.no-thumbnail::after {
    content: '\f03e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 2rem;
    color: #bbb;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

[data-theme="dark"] .no-thumbnail {
    background: #2a2a2a;
}

[data-theme="dark"] .no-thumbnail::after {
    color: #555;
}

/* Ensure placeholder maintains aspect ratio in different contexts */
.post-featured .no-thumbnail {
    aspect-ratio: 16 / 9;
    min-height: 200px;
}

.post-secondary .no-thumbnail {
    aspect-ratio: 16 / 9;
    min-height: 120px;
}

.sidebar-post .no-thumbnail {
    aspect-ratio: 3 / 2;
}

.archive-grid-image.no-thumbnail {
    aspect-ratio: 16 / 9;
    min-height: 150px;
    border-radius: var(--theme-border-radius);
    overflow: hidden;
}

.archive-grid-image--lead.no-thumbnail {
    aspect-ratio: 16 / 9;
    min-height: 200px;
}

.archive-post-item .no-thumbnail {
    min-height: 180px;
}

.hero-small-thumbnail.no-thumbnail {
    aspect-ratio: 3 / 2;
}

.hero-below-image.no-thumbnail {
    min-height: 100%;
}

.strip-card-thumb.no-thumbnail {
    min-height: 120px;
}

/* ============================================
   THUMBNAIL BLUR BACKDROP
   Ambient image fill for letterboxed thumbnails.
   The same image blurs and scales behind itself, filling any
   empty space when object-fit:contain shows bars.
   --thumb-url is injected by JS (main.js) after each img loads.
   ============================================ */

/* Backdrop layer — only visible when --thumb-url is set */
.sidebar-posts-list .post-thumbnail::before,
.strip-card-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--thumb-url, transparent) center / cover no-repeat;
    filter: blur(14px) saturate(1.2);
    transform: scale(1.15); /* bleed past edges to hide blur fringe */
    z-index: 0;
    transition: opacity 0.3s ease;
}

/* Actual image — sits above the backdrop */
.sidebar-posts-list .post-thumbnail img {
    position: relative;
    z-index: 1;
    object-fit: contain; /* show full image; backdrop fills any letterbox bars */
}

.strip-card-thumb img {
    position: relative;
    z-index: 1;
    object-fit: contain;
}

/* Badge stays above backdrop */
.strip-card-badge {
    z-index: 2;
}

/* No-thumbnail containers: backdrop is already suppressed (--thumb-url not set),
   but ensure the ::before placeholder icon layer is not obscured */
.sidebar-posts-list .no-thumbnail::before,
.strip-card-thumb.no-thumbnail::before {
    display: none;
}

/* Recommended Post Shortcode Styles */
.recommended-section {
    margin: 20px 0;
}

.recommended-section .section-header {
    margin-bottom: 30px;
}

.recommended-section .section-title {
    background-color: rgba(0, 88, 40, 255);
    color: #fff;
    padding: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    border-radius: var(--theme-border-radius);
}

.recommended-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.recommended-main .posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.recommended-main .post-featured {
    grid-column: 1 / -1;
}

/* Featured post thumbnail - larger display */
.recommended-main .post-featured .post-thumbnail {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--theme-border-radius);
    background: #e0e0e0;
}

.recommended-main .post-featured .post-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.recommended-main .post-featured .post-thumbnail img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

.recommended-main .post-featured .post-title {
    font-size: 1.5rem;
    line-height: 1.2;
    margin: 0.5rem 0 0.25rem;
}

.recommended-main .post-featured .post-excerpt {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--theme-light-text);
    margin-bottom: 0.25rem;
}

[data-theme="dark"] .recommended-main .post-featured .post-excerpt {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .recommended-main .post-featured .post-thumbnail,
[data-theme="dark"] .recommended-main .post-secondary .post-thumbnail {
    background: #2a2a2a;
}

/* Secondary posts - smaller grid items */
.recommended-main .post-secondary {
    display: flex;
    flex-direction: column;
}

.recommended-main .post-secondary .post-thumbnail {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--theme-border-radius);
    background: #e0e0e0;
}

.recommended-main .post-secondary .post-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.recommended-main .post-secondary .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.recommended-main .post-secondary .post-title {
    font-size: 1.125rem;
    line-height: 1.25;
    margin: 0.375rem 0 0.25rem;
}

.recommended-main .post-meta {
    font-size: 0.75rem;
    color: var(--theme-light-text);
}

[data-theme="dark"] .recommended-main .post-meta {
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-posts-list .sidebar-post {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

.sidebar-posts-list .sidebar-post:first-child {
    padding-top: 0;
}

[data-theme="dark"] .sidebar-posts-list .sidebar-post {
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.sidebar-posts-list .sidebar-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Desktop: show 5 sidebar posts for better alignment with the 3-post main area.
   Tablet and mobile: all 6 posts are visible (grid / stacked layouts fill evenly). */
@media (min-width: 992px) {
    .sidebar-posts-list .sidebar-post:nth-child(n+6) { display: none; }
}

.sidebar-posts-list .post-thumbnail {
    position: relative;
    flex-shrink: 0;
    width: 132px;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: var(--theme-border-radius);
    background: #e0e0e0;
}

[data-theme="dark"] .sidebar-posts-list .post-thumbnail {
    background: #2a2a2a;
}

.sidebar-posts-list .post-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.sidebar-posts-list .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sidebar-posts-list .post-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.sidebar-posts-list .post-title {
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.3;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-posts-list .category-badge {
    font-size: 0.6875rem;
    padding: 2px 8px;
}

.sidebar-posts-list .post-meta {
    font-size: 0.75rem;
    gap: 8px;
    margin: 0;
}

/* Flip layout */
.recommended-layout .order-1 {
    order: 1;
}

.recommended-layout .order-2 {
    order: 2;
}

/* ============================================
   TABLET FOOTER LAYOUT (768px - 991px)
   Show mobile footer with 2x2 grid
   ============================================ */
@media (min-width: 768px) and (max-width: 991px) {
    /* .site-footer {
        margin-top: 2.5rem;
    } */

    /* Hide desktop footer, show mobile */
    .footer-desktop {
        display: none !important;
    }

    .footer-mobile {
        display: block !important;
    }

    /* Tablet adjustments for mobile footer */
    .footer-mobile-logo {
        padding: 2.5rem 2rem 1.5rem;
    }

    .footer-mobile-logo img {
        max-width: 200px !important;
        height: auto !important;
    }

    .footer-mobile-columns {
        gap: 2rem 3rem;
        padding: 0 2rem 2rem;
    }

    .footer-mobile-column h3 {
        font-size: 1rem;
    }

    .footer-mobile-column ul li a {
        font-size: 0.85rem;
    }

    .footer-mobile-social {
        padding: 1.5rem 2rem;
    }

    .footer-mobile-social-icons .social-icon {
        width: 44px;
        height: 44px;
    }

    .footer-mobile-legal {
        padding: 0;
    }

    .footer-mobile-legal-links {
        padding: 0 2rem 1.5rem;
    }

    .footer-mobile-copyright {
        padding: 1rem 2rem;
    }

    /* Hide shared copyright on tablet/mobile - use mobile copyright */
    .footer-copyright {
        display: none;
    }
}

/* Tablet layout for category sections (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .recommended-section {
        margin-bottom: 2.5rem;
    }

    .recommended-section .section-header {
        margin-bottom: 1.25rem;
    }

    .recommended-section .section-title {
        font-size: 1.75rem;
    }

    /* Stack to single column on tablet (like multimedia section) */
    .recommended-layout {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    /* Main area - featured post full width, secondary posts side by side */
    .recommended-main .posts-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .recommended-main .post-featured {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    .recommended-main .post-featured .post-thumbnail {
        aspect-ratio: 16 / 9;
        border-radius: var(--theme-border-radius);
    }

    .recommended-main .post-featured .post-title {
        font-size: 1.375rem;
        line-height: 1.2;
        margin: 0.5rem 0 0.25rem;
    }

    .recommended-main .post-featured .post-excerpt {
        font-size: 0.875rem;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        color: var(--text-secondary);
    }

    /* Secondary posts - vertical cards side by side */
    .recommended-main .post-secondary {
        display: flex;
        flex-direction: column;
    }

    .recommended-main .post-secondary .post-thumbnail {
        aspect-ratio: 16 / 9;
        border-radius: var(--theme-border-radius);
    }

    .recommended-main .post-secondary .post-title {
        font-size: 1rem;
        line-height: 1.25;
        margin: 0.375rem 0 0.25rem;
    }

    .recommended-main .post-secondary .post-meta {
        font-size: 0.75rem;
    }

    /* Sidebar - 3-column grid of vertical cards (thumbnail on top) */
    .recommended-sidebar {
        padding-top: 0;
    }

    .sidebar-posts-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }

    .sidebar-posts-list .sidebar-post {
        padding: 0;
        margin-bottom: 0;
        border-bottom: none;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .sidebar-posts-list .post-thumbnail {
        flex: none;
        width: 100%;
        aspect-ratio: 16 / 9;
        border-radius: var(--theme-border-radius);
    }

    .sidebar-posts-list .post-content {
        padding: 0.5rem 0 0;
    }

    .sidebar-posts-list .post-title {
        font-size: 0.875rem;
        line-height: 1.3;
        margin: 0.25rem 0;
    }

    .sidebar-posts-list .post-meta {
        font-size: 0.75rem;
    }

    /* Reset order on tablet (stacked layout) */
    .recommended-layout .order-1,
    .recommended-layout .order-2 {
        order: 0;
    }
}

/* Mobile layout for category sections (below 768px) */
@media (max-width: 767px) {
    .recommended-section {
        margin-bottom: 2rem;
        padding: 0;
    }

    .recommended-section .section-header {
        margin-bottom: 1rem;
    }

    .recommended-section .section-title {
        font-size: 1.375rem;
        font-weight: 700;
        letter-spacing: -0.01em;
    }

    .recommended-layout {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    /* Main content area - single column */
    .recommended-main .posts-grid {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    /* Featured post - full width vertical card */
    .recommended-main .post-featured {
        margin-bottom: 0;
    }

    .recommended-main .post-featured .post-thumbnail {
        aspect-ratio: 16 / 9;
        border-radius: var(--theme-border-radius);
        overflow: hidden;
    }

    .recommended-main .post-featured .post-content {
        padding: 0.75rem 0 0;
    }

    .recommended-main .post-featured .post-title {
        font-size: 1.25rem;
        line-height: 1.3;
        margin: 0 0 0.375rem;
        font-weight: 700;
    }

    .recommended-main .post-featured .post-excerpt {
        font-size: 0.875rem;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        color: var(--text-secondary);
        margin-bottom: 0.25rem;
    }

    .recommended-main .post-featured .post-meta {
        font-size: 0.75rem;
        color: var(--text-tertiary);
    }

    /* Secondary posts - full width vertical cards (thumbnail on top, text below) */
    .recommended-main .post-secondary {
        display: flex;
        flex-direction: column;
    }

    .recommended-main .post-secondary .post-thumbnail {
        aspect-ratio: 16 / 9;
        border-radius: var(--theme-border-radius);
        overflow: hidden;
    }

    .recommended-main .post-secondary .post-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .recommended-main .post-secondary .post-content {
        padding: 0.625rem 0 0;
    }

    .recommended-main .post-secondary .post-title {
        font-size: 1rem;
        line-height: 1.25;
        margin: 0 0 0.25rem;
        font-weight: 600;
    }

    .recommended-main .post-secondary .post-meta {
        font-size: 0.75rem;
        color: var(--text-tertiary);
    }

    /* Sidebar posts: compact horizontal list on mobile (small thumb left, content right) */
    .recommended-sidebar {
        margin-top: 0;
    }

    .sidebar-posts-list .sidebar-post {
        display: flex;
        flex-direction: row;
        gap: 0.625rem;
        align-items: flex-start;
        padding: 0.75rem 0;
        margin-bottom: 0;
        border-bottom: 1px solid rgba(136, 136, 136, 0.55);
        background: transparent;
    }

    [data-theme="dark"] .sidebar-posts-list .sidebar-post {
        background: transparent;
        border-bottom-color: rgba(136, 136, 136, 0.55);
    }

    .sidebar-posts-list .sidebar-post:first-child {
        padding-top: 0;
    }

    .sidebar-posts-list .sidebar-post:last-child {
        margin-bottom: 0;
        border-bottom: none;
        padding-bottom: 0;
    }

    .sidebar-posts-list .post-thumbnail {
        /* flex: 0 0 90px;
        width: 90px; */
        aspect-ratio: 3 / 2;
        border-radius: var(--theme-border-radius);
        overflow: hidden;
    }

    .sidebar-posts-list .post-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .sidebar-posts-list .post-content {
        flex: 1;
        min-width: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
    }

    .sidebar-posts-list .post-title {
        font-size: 0.875rem;
        line-height: 1.3;
        margin: 0 0 0.125rem;
        font-weight: 600;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .sidebar-posts-list .post-meta {
        font-size: 0.6875rem;
        color: var(--text-tertiary);
    }

    /* Category badges smaller on mobile */
    .sidebar-posts-list .category-badge,
    .recommended-main .post-secondary .category-badge {
        font-size: 0.6875rem;
        padding: 2px 8px;
        letter-spacing: 0.3px;
    }

    /* Always: 3 feature stories first, listed stories second — regardless of flip_layout */
    .recommended-layout .recommended-main {
        order: 1;
    }

    .recommended-layout .recommended-sidebar {
        order: 2;
    }
}

/* Multimedia Section - Large Tablet / Small Desktop */
@media (max-width: 1100px) {
    .multimedia-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .multimedia-grid--many-podcasts {
        grid-template-columns: 1fr 1fr;
    }

    .multimedia-section .section-title {
        font-size: 1.5rem;
    }

    .strip-card {
        flex: 0 0 180px;
    }
}

/* Multimedia Section - Mid Tablet (stack many-podcasts layout sooner) */
@media (max-width: 960px) {
    .multimedia-grid--many-podcasts {
        grid-template-columns: 1fr;
    }
}

/* Multimedia Section - Tablet */
@media (max-width: 768px) {
    .multimedia-section {
        padding: 2rem 0;
    }

    .multimedia-section .section-header {
        margin-bottom: 1.25rem;
    }

    .multimedia-section .section-title {
        font-size: 1.35rem;
        padding: 12px 16px;
    }

    .multimedia-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .multimedia-podcasts {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .multimedia-podcasts.podcast-count-3,
    .multimedia-podcasts.podcast-count-4 {
        grid-template-columns: 1fr 1fr;
    }

    .podcast-card iframe {
        /* min-height: 140px; */
        overflow: hidden;
    }

    .podcast-card {
        overflow: hidden;
    }

    .strip-card {
        flex: 0 0 170px;
    }
}

/* Multimedia Section - Mobile */
@media (max-width: 540px) {
    .multimedia-section {
        padding: 1.5rem 0;
    }

    .multimedia-section .section-title {
        font-size: 1.15rem;
        padding: 10px 14px;
    }

    .multimedia-podcasts,
    .multimedia-podcasts.podcast-count-3,
    .multimedia-podcasts.podcast-count-4 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .podcast-card-header {
        font-size: 0.8rem;
        padding: 0.6rem 0.75rem;
    }

    .podcast-card iframe {
        /* min-height: 140px; */
        overflow: hidden;
    }

    .multimedia-placeholder {
        min-height: 180px;
        padding: 1.5rem;
    }

    .multimedia-placeholder i {
        font-size: 2.5rem;
    }

    .strip-card {
        flex: 0 0 150px;
    }

    .strip-card-info {
        padding: 0.5rem 0.6rem;
    }

    .strip-card-title {
        font-size: 0.75rem;
    }

    .strip-card-date {
        font-size: 0.65rem;
    }

    .multimedia-strip-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .multimedia-strip-tabs::-webkit-scrollbar {
        display: none;
    }

    .multimedia-tab {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}

/* ============================================
   Custom Widgets
   ============================================ */

/* --- Popular Reads Widget --- */

.widget-popular-reads {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-popular-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .widget-popular-item {
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.widget-popular-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.popular-rank {
    flex: 0 0 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-primary-color, #00843D);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 50%;
    line-height: 1;
}

.popular-content {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.popular-thumb {
    flex: 0 0 84px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    display: block;
}

.popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.popular-thumb:hover img {
    transform: scale(1.05);
}

.popular-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.popular-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.popular-title:hover {
    color: var(--theme-primary-color, #00843D);
}

[data-theme="dark"] .popular-title {
    color: #e0e0e0;
}

[data-theme="dark"] .popular-title:hover {
    color: var(--theme-primary-color, #00843D);
}

.popular-date {
    font-size: 0.75rem;
    color: #888;
}

[data-theme="dark"] .popular-date {
    color: #777;
}

/* --- Trending Authors Widget --- */

.widget-trending-authors {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-author-item {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .widget-author-item {
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.widget-author-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.widget-author-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.widget-author-link:hover {
    opacity: 0.85;
}

.widget-author-avatar {
    flex: 0 0 40px;
}

.widget-author-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.widget-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.widget-author-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
}

[data-theme="dark"] .widget-author-name {
    color: #e0e0e0;
}

.widget-author-count {
    font-size: 0.75rem;
    color: #888;
}

[data-theme="dark"] .widget-author-count {
    color: #777;
}

/* --- Recommended Stories Widget --- */

.widget-recommended {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-recommended-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .widget-recommended-item {
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.widget-recommended-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recommended-thumb {
    flex: 0 0 70px;
    height: 52px;
    border-radius: 6px;
    overflow: hidden;
    display: block;
}

.recommended-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recommended-thumb:hover img {
    transform: scale(1.05);
}

.recommended-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.recommended-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.recommended-title:hover {
    color: var(--theme-primary-color, #00843D);
}

[data-theme="dark"] .recommended-title {
    color: #e0e0e0;
}

[data-theme="dark"] .recommended-title:hover {
    color: var(--theme-primary-color, #00843D);
}

.recommended-date {
    font-size: 0.75rem;
    color: #888;
}

[data-theme="dark"] .recommended-date {
    color: #777;
}

/* --- Daily Trivia Widget --- */

.widget-trivia {
    padding: 5px 0;
}

/* Progress indicator — circles connected by lines */
.trivia-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 20px;
    padding: 0 10px;
}

.trivia-step {
    flex-shrink: 0;
}

.trivia-step-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(136, 136, 136, 0.55);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #999;
    background: #fff;
    transition: all 0.3s ease;
}

[data-theme="dark"] .trivia-step-circle {
    border-color: rgba(136, 136, 136, 0.55);
    color: #888;
    background: #1a1a1a;
}

.trivia-step.active .trivia-step-circle {
    border-color: var(--theme-primary-color, #00843D);
    color: var(--theme-primary-color, #00843D);
    box-shadow: 0 0 0 3px rgba(0, 132, 61, 0.15);
}

[data-theme="dark"] .trivia-step.active .trivia-step-circle {
    box-shadow: 0 0 0 3px rgba(0, 132, 61, 0.25);
}

.trivia-step.correct .trivia-step-circle {
    border-color: #28a745;
    background: #28a745;
    color: #fff;
}

.trivia-step.incorrect .trivia-step-circle {
    border-color: #dc3545;
    background: #dc3545;
    color: #fff;
}

.trivia-step-line {
    flex: 0 0 24px;
    height: 2px;
    background: #ddd;
    transition: background 0.3s ease;
}

[data-theme="dark"] .trivia-step-line {
    background: #555;
}

.trivia-step-line.filled-correct {
    background: #28a745;
}

.trivia-step-line.filled-incorrect {
    background: #dc3545;
}

/* Question area */
.trivia-question-area {
    min-height: 200px;
}

.trivia-question {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #222;
    line-height: 1.5;
    margin: 0 0 15px;
}

[data-theme="dark"] .trivia-question {
    color: #e0e0e0;
}

.trivia-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trivia-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: left;
    color: #333;
    background: #f5f5f5;
    border: 2px solid rgba(136, 136, 136, 0.55);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.trivia-choice-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e0e0e0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #555;
    transition: all 0.2s ease;
}

[data-theme="dark"] .trivia-choice-letter {
    background: #444;
    color: #aaa;
}

.trivia-choice:hover:not(:disabled):not(.selected):not(.correct):not(.incorrect) {
    border-color: var(--theme-primary-color, #00843D);
    background: #eef7f1;
}

.trivia-choice:hover:not(:disabled):not(.selected):not(.correct):not(.incorrect) .trivia-choice-letter {
    background: var(--theme-primary-color, #00843D);
    color: #fff;
}

[data-theme="dark"] .trivia-choice {
    color: #ddd;
    background: #2a2a2a;
    border-color: rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .trivia-choice:hover:not(:disabled):not(.selected):not(.correct):not(.incorrect) {
    border-color: var(--theme-primary-color, #00843D);
    background: #1a2e22;
}

/* Selected (before submit) */
.trivia-choice.selected {
    border-color: var(--theme-primary-color, #00843D);
    background: #eef7f1;
}

.trivia-choice.selected .trivia-choice-letter {
    background: var(--theme-primary-color, #00843D);
    color: #fff;
}

[data-theme="dark"] .trivia-choice.selected {
    border-color: var(--theme-primary-color, #00843D);
    background: #1a2e22;
}

.trivia-choice:disabled {
    cursor: default;
    opacity: 0.6;
}

.trivia-choice.correct {
    border-color: #28a745;
    background: #d4edda;
    color: #155724;
    opacity: 1;
}

.trivia-choice.correct .trivia-choice-letter {
    background: #28a745;
    color: #fff;
}

[data-theme="dark"] .trivia-choice.correct {
    border-color: #28a745;
    background: #1a3a24;
    color: #7ddf93;
}

.trivia-choice.incorrect {
    border-color: #dc3545;
    background: #f8d7da;
    color: #721c24;
    opacity: 1;
}

.trivia-choice.incorrect .trivia-choice-letter {
    background: #dc3545;
    color: #fff;
}

[data-theme="dark"] .trivia-choice.incorrect {
    border-color: #dc3545;
    background: #3a1a1e;
    color: #e88891;
}

/* Submit button */
.trivia-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.trivia-prev {
    flex: 0 0 auto;
    padding: 10px 14px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--theme-light-text, #555);
    background: transparent;
    border: 2px solid rgba(136, 136, 136, 0.55);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trivia-prev:hover {
    border-color: rgba(136, 136, 136, 0.55);
    color: var(--theme-light-header, #222);
}

[data-theme="dark"] .trivia-prev {
    color: #aaa;
    border-color: rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .trivia-prev:hover {
    border-color: rgba(136, 136, 136, 0.55);
    color: #ddd;
}

.trivia-submit {
    display: block;
    flex: 1;
    margin-top: 0;
    padding: 10px 14px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: var(--theme-primary-color, #00843D);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trivia-submit:hover:not(:disabled) {
    background: var(--theme-primary-hover-color, #006b32);
}

.trivia-submit:disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
}

[data-theme="dark"] .trivia-submit:disabled {
    background: #444;
    color: #777;
}

/* Feedback message */
.trivia-feedback {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
}

.trivia-feedback.correct {
    background: #d4edda;
    color: #155724;
    border-left: 3px solid #28a745;
}

[data-theme="dark"] .trivia-feedback.correct {
    background: #1a3a24;
    color: #7ddf93;
    border-left-color: #28a745;
}

.trivia-feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
    border-left: 3px solid #dc3545;
}

[data-theme="dark"] .trivia-feedback.incorrect {
    background: #3a1a1e;
    color: #e88891;
    border-left-color: #dc3545;
}

/* Next button */
.trivia-next {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px 14px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--theme-primary-color, #00843D);
    background: transparent;
    border: 2px solid var(--theme-primary-color, #00843D);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trivia-next:hover {
    background: var(--theme-primary-color, #00843D);
    color: #fff;
}

[data-theme="dark"] .trivia-next {
    color: #5cb87a;
    border-color: #5cb87a;
}

[data-theme="dark"] .trivia-next:hover {
    background: #5cb87a;
    color: #111;
}

/* Summary screen */
.trivia-summary {
    text-align: center;
    padding: 20px 10px;
}

.trivia-score-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--theme-primary-color, #00843D);
    margin: 0 auto 16px;
}

.trivia-score-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--theme-primary-color, #00843D);
    line-height: 1;
}

.trivia-score-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: #999;
    line-height: 1;
}

[data-theme="dark"] .trivia-score-label {
    color: #777;
}

.trivia-summary-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 4px;
}

[data-theme="dark"] .trivia-summary-text {
    color: #e0e0e0;
}

.trivia-summary-sub {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: #888;
    margin: 0;
}

[data-theme="dark"] .trivia-summary-sub {
    color: #777;
}

/* --- Campus Events Calendar Widget --- */

.widget-calendar {
    font-family: 'Montserrat', sans-serif;
}

/* Calendar header */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.calendar-month-year {
    font-size: 1rem;
    font-weight: 700;
    color: #222;
    letter-spacing: 0.3px;
}

[data-theme="dark"] .calendar-month-year {
    color: #e0e0e0;
}

/* Weekday headers */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 4px;
}

.calendar-weekdays span {
    font-size: 0.7rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    padding: 4px 0;
}

[data-theme="dark"] .calendar-weekdays span {
    color: #666;
}

/* Day grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    font-size: 0.8rem;
    font-weight: 500;
    color: #444;
    border-radius: 50%;
    cursor: default;
    position: relative;
}

[data-theme="dark"] .calendar-day {
    color: #bbb;
}

.calendar-day.other-month {
    visibility: hidden;
}

.calendar-day.today {
    background: var(--theme-primary-color, #00843D);
    color: #fff;
    font-weight: 700;
}

.calendar-day.has-events::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--theme-primary-color, #00843D);
}

.calendar-day.today.has-events::after {
    background: #fff;
}

[data-theme="dark"] .calendar-day.has-events::after {
    background: var(--theme-primary-color, #00843D);
}

/* Upcoming events list */
.calendar-upcoming {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .calendar-upcoming {
    border-top-color: rgba(136, 136, 136, 0.55);
}

.calendar-upcoming-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin: 0 0 0.5rem;
}

[data-theme="dark"] .calendar-upcoming-title {
    color: #666;
}

.calendar-event {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .calendar-event {
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.calendar-event:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.calendar-event-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--theme-primary-color, #00843D);
    margin-top: 5px;
}

.calendar-event-deadline .calendar-event-dot {
    background: #d9534f;
}

.calendar-event-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calendar-event-date {
    font-size: 0.7rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

[data-theme="dark"] .calendar-event-date {
    color: #777;
}

.calendar-deadline-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    color: #fff;
    background: #d9534f;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
}

.calendar-event-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .calendar-event-title {
    color: #e0e0e0;
}

.calendar-event-location {
    font-size: 0.75rem;
    color: #888;
}

.calendar-event-location i {
    margin-right: 4px;
    color: var(--theme-primary-color, #00843D);
}

[data-theme="dark"] .calendar-event-location {
    color: #777;
}

/* View full calendar link */
.calendar-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 0.75rem;
    padding: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--theme-primary-color, #00843D);
    text-decoration: none;
    border: 1px solid var(--theme-primary-color, #00843D);
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

.calendar-view-all:hover {
    background: var(--theme-primary-color, #00843D);
    color: #fff;
}

.calendar-view-all i {
    font-size: 0.7rem;
}

/* --- Widget responsive --- */
@media (max-width: 480px) {
    .popular-thumb,
    .recommended-thumb {
        flex: 0 0 60px;
        height: 45px;
    }

    .popular-rank {
        flex: 0 0 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .trivia-choice {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* ============================================
   LANDING PAGE SHARED HERO STYLES
   (About, Contact, Advertising pages)
   ============================================ */

.about-page .hero-banner,
.contact-page .hero-banner,
.advertising-page .hero-banner,
.games-page .hero-banner,
.staff-application-page .hero-banner {
    width: 100vw;
    height: 400px;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)) no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    color: white;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    background-size: cover;
    background-position: center;
}

.about-page .hero-container,
.contact-page .hero-container,
.advertising-page .hero-container,
.games-page .hero-container,
.staff-application-page .hero-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.about-page .hero-content,
.contact-page .hero-content,
.advertising-page .hero-content,
.games-page .hero-content,
.staff-application-page .hero-content {
    max-width: 700px;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.about-page .hero-title,
.contact-page .hero-title,
.advertising-page .hero-title,
.games-page .hero-title,
.staff-application-page .hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.1;
}

.about-page .hero-subtitle,
.contact-page .hero-subtitle,
.advertising-page .hero-subtitle,
.games-page .hero-subtitle,
.staff-page .hero-subtitle,
.staff-application-page .hero-subtitle {
    margin-bottom: 1.5rem;
    font-family: "Open Sans", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: #00843d;
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9375rem;
    line-height: 1;
    text-decoration: none !important;
    font-weight: 600;
    transition: background-color 0.3s ease;
    border: none;
}

.hero-cta i {
    font-size: 0.875em;
    line-height: 1;
}

.hero-cta:hover {
    background-color: #275D38;
    text-decoration: none;
    color: white;
}

.hero-cta.secondary {
    background-color: transparent;
    border: 2px solid white;
    color: white !important;
}

.hero-cta.secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Landing page main-content wrapper */
.about-page .main-content,
.contact-page .main-content,
.advertising-page .main-content,
.games-page .main-content,
.staff-application-page .main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
}

/* ============================================
   STAFF PAGE STYLES
   ============================================ */

.staff-page {
    padding-bottom: 0;
}

/* Staff Hero Banner */
.staff-page .hero-banner {
    width: 100vw;
    height: 400px;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)) no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    color: white;
    background-size: cover;
    background-position: center;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.staff-page .hero-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

.staff-page .hero-content {
    max-width: 700px;
    position: relative;
    z-index: 2;
}

.staff-page .hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Navigation Buttons */
.nav-buttons-container {
    width: 100%;
    position: relative;
    margin-top: -50px;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #209456;
    color: #fff;
    font-weight: bold;
    text-align: center;
    padding: 1rem 0.5rem;
    text-decoration: none !important;
    font-family: Montserrat, sans-serif;
    transition: background-color 0.3s ease;
    width: 100%;
    max-width: 120px;
    height: 100px;
    border-radius: 8px;
    margin: 0 5px;
}

.nav-button:hover {
    background-color: #007436;
    color: white;
    text-decoration: none;
}

.nav-button-icon {
    margin-bottom: 0.5rem;
    font-size: 24px;
    color: white;
}

.nav-button-text {
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}

/* Mission and History Section */
.info-section {
    max-width: 1200px;
    width: calc(100% - 40px);
    margin: 4rem auto;
    padding: 0 8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.info-column {
    flex: 1;
    min-width: 300px;
}

.info-heading {
    font-family: Montserrat, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.info-text {
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

[data-theme="dark"] .info-heading { color: #e0e0e0; }
[data-theme="dark"] .info-text { color: #d1d5db; }

/* Full-width container */
html { scroll-padding-top: 160px; scroll-behavior: smooth; }

.full-width-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Staff Banner */
.staff-banner {
    background-color: #275D38;
    padding: 15px 0;
    margin-bottom: 25px;
}

.staff-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: left;
}

.staff-banner-title {
    font-size: 30px;
    font-weight: 700;
    color: white;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .staff-banner { background-color: #1a3823; }

/* Staff Sections */
.staff-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: sans-serif;
    margin-bottom: 40px;
}

.staff-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
    transition: color 0.3s ease;
    color: #333;
}

[data-theme="dark"] .staff-title { color: #e0e0e0; }

/* Staff Grid */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    justify-content: center;
}

/* Staff Card */
.staff-card {
    text-align: center;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: staffFadeIn 0.5s ease forwards;
    cursor: pointer;
    width: 100%;
}

@keyframes staffFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.staff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .staff-card {
    background-color: #2a2a2a;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .staff-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

/* Staff Image */
.staff-image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.staff-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    transition: all 0.3s ease;
}

.staff-card:hover .staff-image {
    filter: brightness(1.05);
    transform: scale(1.03);
}

.staff-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #9ca3af;
    font-size: 3rem;
}

[data-theme="dark"] .staff-image-container { background-color: #222; }
[data-theme="dark"] .staff-image-placeholder { background: #333; color: #666; }

/* Staff Info */
.staff-info {
    padding: 15px;
}

.staff-name {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 8px;
    color: #333;
    transition: color 0.3s ease;
}

.staff-position {
    display: block;
    color: #275D38;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.staff-beat {
    display: block;
    color: #666;
    font-size: 13px;
    font-style: italic;
    margin-bottom: 5px;
}

[data-theme="dark"] .staff-name { color: #e0e0e0; }
[data-theme="dark"] .staff-position { color: #4caf50; }
[data-theme="dark"] .staff-beat { color: #aaa; }

/* Staff Notification/Toast */
.staff-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #275D38;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.staff-notification.show { opacity: 1; }

[data-theme="dark"] .staff-notification {
    background-color: #333333;
    border: 1px solid #275D38;
}

/* Staff Year Navigation */
.staff-year-nav {
    padding: 2rem 0 3rem;
    text-align: center;
    border-top: 1px solid rgba(136, 136, 136, 0.55);
    margin-top: 2rem;
}

[data-theme="dark"] .staff-year-nav { border-top-color: rgba(136, 136, 136, 0.55); }

.staff-year-nav h3 {
    font-size: 1.4rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

[data-theme="dark"] .staff-year-nav h3 { color: #9ca3af; }

.staff-year-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.staff-year-link {
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1.25rem;
    text-decoration: none;
    background: #f3f4f6;
    color: #374151;
    transition: background 0.2s, color 0.2s;
}

.staff-year-link:hover,
.staff-year-link.current {
    background: #00843d;
    color: #fff;
}

[data-theme="dark"] .staff-year-link { background: #2a2a28; color: #d1d5db; }
[data-theme="dark"] .staff-year-link:hover,
[data-theme="dark"] .staff-year-link.current { background: #22c55e; color: #fff; }

/* Scroll animation delay for cards */
.staff-card:nth-child(1) { animation-delay: 0.1s; }
.staff-card:nth-child(2) { animation-delay: 0.2s; }
.staff-card:nth-child(3) { animation-delay: 0.3s; }
.staff-card:nth-child(4) { animation-delay: 0.4s; }
.staff-card:nth-child(5) { animation-delay: 0.5s; }
.staff-card:nth-child(6) { animation-delay: 0.6s; }
.staff-card:nth-child(7) { animation-delay: 0.7s; }
.staff-card:nth-child(8) { animation-delay: 0.8s; }
.staff-card:nth-child(9) { animation-delay: 0.9s; }
.staff-card:nth-child(10) { animation-delay: 1.0s; }
.staff-card:nth-child(n+11) { animation-delay: 1.1s; }

/* Staff Grid Responsive */
@media (min-width: 1200px) {
    .staff-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 1199px) and (min-width: 992px) {
    .staff-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 991px) and (min-width: 768px) {
    .staff-grid { grid-template-columns: repeat(3, 1fr); }
    .staff-banner-title { font-size: 28px; }
    .staff-title { font-size: 26px; }
}
@media (max-width: 992px) {
    .staff-page .hero-banner { height: auto; min-height: 300px; }
    .nav-buttons { flex-wrap: wrap; justify-content: center; }
    .nav-button { margin-bottom: 10px; }
}
@media (max-width: 768px) {
    .staff-page .hero-banner { min-height: 300px; }
    .staff-page .hero-title { font-size: 1.5rem; }
    .staff-page .hero-subtitle { font-size: 0.9375rem; }
    .nav-buttons-container { margin-top: 1rem; }
    .nav-buttons { flex-wrap: wrap; justify-content: center; }
    .nav-button { flex: 0 0 calc(33.333% - 10px); max-width: calc(33.333% - 10px); margin-bottom: 10px; height: 90px; padding: 0.75rem 0.5rem; }
    .nav-button-icon { font-size: 20px; }
    .nav-button-text { font-size: 0.7rem; }
    .info-section { flex-direction: column; gap: 1.5rem; padding: 0; }
}
@media (max-width: 767px) and (min-width: 576px) {
    .staff-grid { grid-template-columns: repeat(2, 1fr); }
    .staff-banner-title { font-size: 26px; }
}
@media (max-width: 576px) {
    .staff-page .hero-banner { min-height: 280px; }
    .staff-page .hero-title { font-size: 1.375rem; }
    .staff-page .hero-container { padding: 0 1rem; }
    .staff-page .hero-content { padding: 1rem 0; }
    .nav-buttons { padding: 0 1rem; }
    .nav-button { flex: 0 0 calc(50% - 10px); max-width: calc(50% - 10px); }
}
@media (max-width: 575px) {
    .staff-grid { grid-template-columns: repeat(1, 1fr); max-width: 280px; margin: 0 auto; }
    .staff-banner-title { font-size: 24px; }
}


/* ============================================
   ABOUT US PAGE STYLES
   (from about-us.html original)
   ============================================ */

/* Stats Section */
.stats-section {
    padding: 4rem 0;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .stats-section {
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 0.25rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1;
    font-family: 'Montserrat', sans-serif;
}

.stat-number.counting {
    animation: pulse 0.05s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

[data-theme="dark"] .stat-number {
    color: #22c55e;
}

.stat-label {
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .stat-label {
    color: #9ca3af;
}

/* Story Section */
.story-section {
    padding: 3rem 0;
}

.story-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.story-title, .staff-years-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: #1f2937;
}

[data-theme="dark"] .story-title,
[data-theme="dark"] .staff-years-title {
    color: #f9fafb;
}

.story-subtitle, .staff-years-subtitle {
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
    color: #6b7280;
    line-height: 1.6;
}

[data-theme="dark"] .story-subtitle,
[data-theme="dark"] .staff-years-subtitle {
    color: #9ca3af;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 4rem;
}

.story-card {
    padding: 2rem;
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.story-card:hover {
    border-color: rgba(136, 136, 136, 0.55);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .story-card {
    background: #1e1e1d;
    border-color: rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .story-card:hover {
    border-color: rgba(136, 136, 136, 0.55);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.story-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.story-card-icon {
    width: 36px;
    height: 36px;
    background: #f3f4f6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

[data-theme="dark"] .story-card-icon {
    background: #2a2a28;
    color: #d1d5db;
}

.story-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

[data-theme="dark"] .story-card-title {
    color: #f9fafb;
}

.story-card-text {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #374151;
}

[data-theme="dark"] .story-card-text {
    color: #d1d5db;
}

/* Timeline Section */
.timeline-section {
    padding: 4rem 0;
    background: #f8fafc;
    border-top: 1px solid rgba(136, 136, 136, 0.55);
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

@media (min-width: 1025px) {
    .timeline-section {
        width: auto;
        margin: 0 -100vw;
        padding-left: 100vw;
        padding-right: 100vw;
    }
}

[data-theme="dark"] .timeline-section {
    background: #1a1a19;
    border-top-color: rgba(136, 136, 136, 0.55);
    border-bottom-color: rgba(136, 136, 136, 0.55);
}

.timeline-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.timeline-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.timeline-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
    color: #1f2937;
}

[data-theme="dark"] .timeline-title {
    color: #f9fafb;
}

.timeline-subtitle {
    font-size: 1rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

[data-theme="dark"] .timeline-subtitle {
    color: #9ca3af;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    --tl-progress: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #00843d;
    transform: translateX(-50%);
    clip-path: inset(0 0 calc((1 - var(--tl-progress)) * 100%) 0);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-content {
    background: white;
    padding: 2rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    width: calc(50% - 30px);
    position: relative;
    border: 1px solid rgba(136, 136, 136, 0.55);
    max-width: 420px;
}

[data-theme="dark"] .timeline-content {
    background: #1e1e1d;
    border-color: rgba(136, 136, 136, 0.55);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    transform: translateY(-50%);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -16px;
    border-left-color: white;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -16px;
    border-right-color: white;
}

[data-theme="dark"] .timeline-item:nth-child(odd) .timeline-content::before {
    border-left-color: #1e1e1d;
}

[data-theme="dark"] .timeline-item:nth-child(even) .timeline-content::before {
    border-right-color: rgba(136, 136, 136, 0.55);
}

.timeline-year {
    font-size: 1.125rem;
    font-weight: 700;
    color: #00843d;
    margin-bottom: 0.75rem;
    font-family: 'Montserrat', sans-serif;
}

[data-theme="dark"] .timeline-year {
    color: #22c55e;
}

.timeline-event {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

[data-theme="dark"] .timeline-event {
    color: #f9fafb;
}

.timeline-description {
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.6;
}

[data-theme="dark"] .timeline-description {
    color: #d1d5db;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    background: #00843d;
    border: 4px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 4px #00843d20;
    z-index: 1;
}

[data-theme="dark"] .timeline-dot {
    background: #22c55e;
    border-color: rgba(136, 136, 136, 0.55);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

/* Values Section */
.values-section {
    padding: 32vh 0;
    background: #275D38;
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

@media (min-width: 1025px) {
    .values-section {
        width: auto;
        margin: 0 -100vw;
        padding-left: 50vw;
        padding-right: 50vw;
    }
}

.values-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.values-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.values-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.values-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.value-card {
    text-align: center;
    color: white;
}

.value-icon {
    width: 64px;
    height: 64px;
    background: transparent;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin: 0 auto 2.5rem auto;
    transition: all 0.3s ease;
}

.value-card:hover .value-icon {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.value-heading {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.value-text {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    max-width: 350px;
    margin: 0 auto;
}

/* Staff Years Section (About page) */
.staff-years-section {
    padding: 3rem 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

@media (min-width: 1025px) {
    .staff-years-section {
        width: auto;
        margin: 0 -100vw;
        padding-left: 100vw;
        padding-right: 100vw;
    }
}

.staff-years-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.staff-years-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.staff-years-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.staff-years-subtitle {
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.years-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.year-card {
    background: white;
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none !important;
    color: inherit;
    display: block;
    cursor: pointer;
}

[data-theme="dark"] .year-card {
    background: #1e1e1d;
    border-color: rgba(136, 136, 136, 0.55);
    color: #d1d5db;
}

[data-theme="dark"] .year-card:hover {
    background: #2a2a28;
    border-color: rgba(136, 136, 136, 0.55);
}

.year-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(136, 136, 136, 0.55);
    text-decoration: none;
}

.year-number {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    color: #1f2937;
}

[data-theme="dark"] .year-number {
    color: #f9fafb;
}

.year-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .year-label {
    color: #9ca3af;
}

.year-card.current {
    position: relative;
    border-width: 2px;
}

.year-card.current::after {
    content: 'Current';
    position: absolute;
    top: -10px;
    right: 10px;
    background: #00843d;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 132, 61, 0.3);
}

[data-theme="dark"] .year-card.current::after {
    background: #22c55e;
    color: #1a1a19;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.year-card.current:hover {
    border-color: #00843d;
    background: #f0fdf4;
}

.year-card.current:hover .year-number {
    color: #00843d;
}

.year-card.current:hover .year-label {
    color: #00843d;
}

[data-theme="dark"] .year-card.current:hover {
    background: #0d3025;
    border-color: #22c55e;
}

[data-theme="dark"] .year-card.current:hover .year-number,
[data-theme="dark"] .year-card.current:hover .year-label {
    color: #22c55e;
}

.year-card:hover .year-number,
.year-card:hover .year-label {
    text-decoration: none;
}

/* About page responsive */
@media (max-width: 1024px) {
    .values-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        flex-direction: row !important;
    }

    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px !important;
        margin-right: 0 !important;
        max-width: none;
    }

    .timeline-content::before {
        left: -16px !important;
        right: auto !important;
        border-right-color: white !important;
        border-left-color: transparent !important;
    }

    [data-theme="dark"] .timeline-content::before {
        border-right-color: rgba(136, 136, 136, 0.55) !important;
        border-left-color: transparent !important;
    }

    .timeline-dot {
        left: 30px;
    }

    .timeline-title {
        font-size: 1.5rem;
    }

    .timeline-subtitle {
        font-size: 0.9375rem;
    }

    .values-title {
        font-size: 1.5rem;
    }

    .values-subtitle {
        font-size: 0.9375rem;
    }
}

@media (max-width: 768px) {
    .about-page .hero-banner {
        height: auto;
        min-height: 300px;
    }

    .about-page .hero-title {
        font-size: 1.5rem;
    }

    .about-page .hero-subtitle {
        font-size: 0.9375rem;
    }

    .about-page .main-content {
        padding: 2rem 1rem 3rem;
    }

    .story-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .values-title, .story-title, .staff-years-title, .timeline-title {
        font-size: 1.5rem;
    }

    .timeline-subtitle, .values-subtitle, .story-subtitle, .staff-years-subtitle {
        font-size: 0.9375rem;
    }

    .values-section {
        padding: 5rem 0;
    }

    .value-heading {
        font-size: 1rem;
    }

    .value-icon {
        width: 52px;
        height: 52px;
        font-size: 1.125rem;
    }

    .value-text {
        font-size: 0.875rem;
        max-width: 100%;
    }

    .years-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .about-page .main-content {
        padding: 0 1rem;
    }

    .values-container, .staff-years-container, .timeline-container {
        padding: 0 1rem;
    }

    .timeline-content {
        padding: 1.5rem 2rem;
    }

    .timeline-year {
        font-size: 1rem;
    }

    .timeline-event {
        font-size: 0.9375rem;
    }

    .timeline-description {
        font-size: 0.875rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
    }

    .timeline-dot {
        left: 20px;
    }
}

@media (max-width: 576px) {
    .about-page .hero-banner {
        min-height: 280px;
    }

    .about-page .hero-container {
        padding: 0 1rem;
    }

    .about-page .hero-content {
        padding: 1rem 0;
    }

    .about-page .hero-title {
        font-size: 1.375rem;
    }

    .story-card {
        padding: 1.5rem;
    }

    .values-section {
        padding: 3.5rem 0;
    }

    .values-grid {
        gap: 2rem;
    }

    .timeline-section {
        padding: 3rem 0;
    }

    .timeline-title {
        font-size: 1.375rem;
    }

    .timeline-content {
        padding: 1.25rem 1.5rem;
    }

    .values-title, .story-title, .staff-years-title {
        font-size: 1.375rem;
    }
}


/* ============================================
   SCROLL ANIMATIONS (about.js + forms.js)
   ============================================ */

/* Timeline item slide-in */
.tl-anim {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.tl-anim.tl-from-left  { transform: translateX(-50px); }
.tl-anim.tl-from-right { transform: translateX(50px); }
.tl-anim.tl-visible {
    opacity: 1;
    transform: translateX(0);
}

/* General scroll reveal (story/value/year cards + landing page cards) */
.sr-anim {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.sr-anim.sr-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion: skip all scroll animations */
@media (prefers-reduced-motion: reduce) {
    .tl-anim,
    .sr-anim {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .timeline::before {
        clip-path: none !important;
    }
}

/* ============================================
   CONTACT & ADVERTISING SHARED STYLES
   (from contact-us.html & advertising.html originals)
   ============================================ */

/* Section Header (advertising page only — do NOT make global, leaks into home page) */
.advertising-page .section-header { text-align: center; margin-bottom: 2.5rem; }
.advertising-page .section-title { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; color: #1f2937; }
.advertising-page .section-sub { font-size: inherit; color: #9ca3af; max-width: 800px; margin: 0.5rem auto 0; }

[data-theme="dark"] .advertising-page .section-title { color: #f9fafb; }
[data-theme="dark"] .advertising-page .section-sub { color: #9ca3af; }

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid rgba(136, 136, 136, 0.55);
    justify-content: center;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1.1rem 2.5rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    flex: 1;
    min-width: 200px;
}

.tab-btn:hover {
    color: #00843d;
    background: transparent;
}

.tab-btn.active {
    color: #00843d;
    border-bottom-color: #00843d;
    background: transparent;
}

.tab-btn i {
    margin-right: 0.6rem;
}

[data-theme="dark"] .tab-nav { border-bottom-color: rgba(136, 136, 136, 0.55); }
[data-theme="dark"] .tab-btn { color: #9ca3af; }
[data-theme="dark"] .tab-btn:hover { color: #22c55e; background: transparent; }
[data-theme="dark"] .tab-btn.active { color: #22c55e; border-bottom-color: #22c55e; background: transparent; }

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: tabFadeIn 0.3s ease;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Two Column Layout */
.form-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .form-section {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.contact-page .card,
.advertising-page .card,
.staff-application-page .card {
    padding: 2.5rem;
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 16px;
    background: #fff;
    transition: .25s ease;
}

.contact-page .card:hover,
.advertising-page .card:hover,
.staff-application-page .card:hover {
    border-color: rgba(136, 136, 136, 0.55);
    box-shadow: 0 4px 20px rgba(0,0,0,.05);
}

[data-theme="dark"] .contact-page .card,
[data-theme="dark"] .advertising-page .card,
[data-theme="dark"] .staff-application-page .card {
    background: #1e1e1d;
    border-color: rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .contact-page .card:hover,
[data-theme="dark"] .advertising-page .card:hover,
[data-theme="dark"] .staff-application-page .card:hover {
    border-color: rgba(136, 136, 136, 0.55);
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}

.card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    color: #00843d;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

[data-theme="dark"] .card-icon {
    background: #2a2a28;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 800;
    margin: 0;
    color: #1f2937;
}

[data-theme="dark"] .card-title {
    color: #f9fafb;
}

.card-subtitle {
    color: #6b7280;
    font-size: inherit;
    margin-top: 0.25rem;
}

[data-theme="dark"] .card-subtitle {
    color: #9ca3af;
}

.contact-page .card p,
.advertising-page .card p,
.staff-application-page .card p {
    color: #374151;
    font-size: inherit;
    line-height: 1.7;
}

[data-theme="dark"] .contact-page .card p,
[data-theme="dark"] .advertising-page .card p,
[data-theme="dark"] .staff-application-page .card p {
    color: #d1d5db;
}

/* Advertising card-grid */
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 900px) { .card-grid { grid-template-columns: 1fr; } }

/* Card title size (consistent across contact & advertising) */
.advertising-page .card-title { font-size: 1.125rem; }

/* Lists & meta */
.meta { margin: 0.75rem 0 0; font-size: 0.95em; color: #4b5563; }
[data-theme="dark"] .meta { color: #d1d5db; }
.bullets { margin: 0.5rem 0 0 1.25rem; }
.bullets li { margin: 0.25rem 0; }

/* Rates */
.rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.rate { border: 1px solid rgba(136, 136, 136, 0.55); border-radius: 12px; padding: 1rem 1.25rem; background: #f9fafb; }
.rate h4 { margin: 0 0 0.25rem; font-size: 1rem; font-weight: 800; }
.rate .price { font-weight: 700; color: #00843d; }

[data-theme="dark"] .rate { background: #111312; border-color: rgba(136, 136, 136, 0.55); }

/* CTA buttons */
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.btn {
    display: inline-block; background: #00843d; color: #fff !important;
    padding: 0.85rem 1.2rem; border-radius: 8px; font-weight: 700; text-decoration: none !important; border: none;
    cursor: pointer;
}
.btn:hover { background: #275D38; color: #fff !important; }
.btn.secondary { background: transparent; color: #00843d !important; border: 2px solid #00843d; }
.btn.secondary:hover { background: #f0fdf4; }

/* Contact Section Layout (advertising) */
.contact-section {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .contact-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Form Styles */
.form-card form {
    display: grid;
    gap: 1.25rem;
    max-width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field label {
    font-weight: 600;
    color: #1f2937;
    font-size: inherit;
}

[data-theme="dark"] .field label {
    color: #e5e7eb;
}

.field input,
.field select,
.field textarea {
    padding: 0.95rem 1.1rem;
    border: 2px solid rgba(136, 136, 136, 0.55);
    border-radius: 10px;
    font: inherit;
    color: #111;
    background: #fff;
    transition: all 0.25s ease;
    width: 100%;
    box-sizing: border-box;
    min-height: 50px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: #00843d;
    box-shadow: 0 0 0 4px rgba(0,132,61,0.12);
    transform: translateY(-1px);
}

.field textarea {
    min-height: 160px;
    resize: vertical;
}

.req {
    color: #c81e1e;
    font-weight: 600;
}

[data-theme="dark"] .field input,
[data-theme="dark"] .field select,
[data-theme="dark"] .field textarea {
    background: #111312;
    border-color: rgba(136, 136, 136, 0.55);
    color: #f3f4f6;
}

[data-theme="dark"] .field input:focus,
[data-theme="dark"] .field select:focus,
[data-theme="dark"] .field textarea:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34,197,94,0.15);
}

/* Checkbox field */
.checkbox-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1.1rem;
    background: #f9fafb;
    border-radius: 10px;
}

.checkbox-field input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    min-height: auto;
}

.checkbox-field label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
    font-size: 12px;
}

[data-theme="dark"] .checkbox-field { background: #111312; }
[data-theme="dark"] .checkbox-field label { color: #d1d5db; }

/* Submit Button */
.btn-full-width {
    width: 100%;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 54px;
    padding: 0.85rem 1.2rem;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #00843d 0%, #275D38 100%);
    color: white !important;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 132, 61, 0.2);
    font-family: inherit;
}

.btn-full-width i {
    font-size: 1.3rem;
}

.btn-full-width:hover {
    background: linear-gradient(135deg, #275D38 0%, #1a3d25 100%);
    box-shadow: 0 4px 16px rgba(0, 132, 61, 0.3);
    transform: translateY(-1px);
}

.btn-full-width:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 132, 61, 0.1);
}

/* Contact Info Card */
.contact-info-card {
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 16px;
    padding: 2.5rem;
    height: fit-content;
    background: #fff;
    transition: .25s ease;
}

.contact-info-card:hover {
    border-color: rgba(136, 136, 136, 0.55);
    box-shadow: 0 4px 20px rgba(0,0,0,.05);
}

[data-theme="dark"] .contact-info-card {
    background: #1e1e1d;
    border-color: rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .contact-info-card:hover {
    border-color: rgba(136, 136, 136, 0.55);
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}

[data-theme="dark"] .contact-info-card p {
    color: #d1d5db !important;
}

/* Contact Method */
.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

.contact-method:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

[data-theme="dark"] .contact-method {
    border-color: rgba(136, 136, 136, 0.55);
}

.contact-method-icon {
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    color: #00843d;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

[data-theme="dark"] .contact-method-icon {
    background: #2a2a28;
}

.contact-method-content h4 {
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 0.4rem 0;
    font-size: 1rem;
}

[data-theme="dark"] .contact-method-content h4 {
    color: #e5e7eb;
}

.contact-method-content p {
    color: #374151;
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.7;
}

[data-theme="dark"] .contact-method-content p {
    color: #d1d5db;
}

.contact-method-content a {
    color: #00843d;
    text-decoration: none;
    font-weight: 500;
}

.contact-method-content a:hover {
    text-decoration: underline;
}

[data-theme="dark"] .contact-method-content a {
    color: #22c55e;
}

[data-theme="dark"] .contact-method-content a:hover {
    color: #16a34a;
}

/* Info Box */
.info-box {
    background: #f0fdf4;
    border-left: 4px solid #00843d;
    border-radius: 8px;
    padding: 1.1rem 1.2rem;
    margin: 1.25rem 0;
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.info-box i {
    color: #00843d;
    margin-top: 0.2rem;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-box p {
    margin: 0;
    color: #374151;
    font-size: 12px;
    line-height: 1.6;
}

[data-theme="dark"] .info-box {
    background: #1a2e1a;
    border-left-color: #22c55e;
}

[data-theme="dark"] .info-box i {
    color: #22c55e;
}

[data-theme="dark"] .info-box p {
    color: #d1d5db;
}

/* reCAPTCHA Notice */
.recaptcha-notice {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.75rem 0;
    align-items: center;
    gap: 0.6rem;
    line-height: 1.5;
}

.recaptcha-notice i {
    margin-right: 1rem;
}

.recaptcha-notice a {
    color: #00843d;
    text-decoration: none;
}

.recaptcha-notice a:hover {
    text-decoration: underline;
}

[data-theme="dark"] .recaptcha-notice {
    color: #9ca3af;
}

[data-theme="dark"] .recaptcha-notice a {
    color: #22c55e;
}

[data-theme="dark"] .recaptcha-notice a:hover {
    color: #16a34a;
}

/* Dark mode extras for advertising */
[data-theme="dark"] .advertising-page .card p[style*="color"] { color: #d1d5db !important; }
[data-theme="dark"] .advertising-page .card div[style*="background:#f3f4f6"] { background: #2a2a28 !important; }
[data-theme="dark"] .advertising-page .card div[style*="background:#f3f4f6"] i { color: #00843d; }

/* ============================================
   STAFF APPLICATION PAGE
   ============================================ */

.staff-application-page .section-header { text-align: center; margin-bottom: 2.5rem; }
.staff-application-page .section-title  { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; color: #1f2937; }
.staff-application-page .section-sub    { font-size: inherit; color: #9ca3af; max-width: 800px; margin: 0.5rem auto 0; }
[data-theme="dark"] .staff-application-page .section-title { color: #f9fafb; }
[data-theme="dark"] .staff-application-page .section-sub   { color: #9ca3af; }

/* Full-width form card */
.staff-application-page .form-card { grid-column: 1 / -1; }

/* Two-column form row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

/* Checkbox group */
.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
    margin-top: 0.5rem;
}

@media (max-width: 600px) {
    .checkbox-group { grid-template-columns: 1fr; }
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: #374151;
    cursor: pointer;
    line-height: 1.4;
}

[data-theme="dark"] .checkbox-label { color: #d1d5db; }

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #00843d;
    flex-shrink: 0;
    cursor: pointer;
}

/* Info box wider variant */
.info-box--wide {
    max-width: 100%;
}

/* Dark mode for staff application inline styles */
[data-theme="dark"] .staff-application-page .card p[style*="color"] { color: #d1d5db !important; }

/* Contact & Advertising page responsive */
@media (max-width: 768px) {
    .contact-page .hero-banner,
    .advertising-page .hero-banner,
    .games-page .hero-banner,
    .staff-application-page .hero-banner {
        height: auto;
        min-height: 300px;
    }

    .contact-page .hero-title,
    .advertising-page .hero-title,
    .games-page .hero-title,
    .staff-application-page .hero-title {
        font-size: 1.5rem;
    }

    .contact-page .hero-subtitle,
    .advertising-page .hero-subtitle,
    .games-page .hero-subtitle,
    .staff-application-page .hero-subtitle {
        font-size: 0.9375rem;
    }

    .contact-page .main-content,
    .advertising-page .main-content,
    .games-page .main-content,
    .staff-application-page .main-content {
        padding: 2rem 1rem 3rem;
    }

    .tab-nav {
        gap: 0.5rem;
    }

    .tab-btn {
        padding: 0.85rem 1rem;
        font-size: 1rem;
        min-width: auto;
        flex: 1;
    }

    .contact-page .card,
    .advertising-page .card,
    .staff-application-page .card {
        padding: 1.75rem;
    }

    .contact-info-card {
        padding: 1.75rem;
    }

    .field input, .field select, .field textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .contact-page .section-header h2,
    .advertising-page .section-header h2,
    .staff-application-page .section-header h2 {
        font-size: 1.5rem;
    }

    .contact-page .hero-container,
    .advertising-page .hero-container,
    .games-page .hero-container,
    .staff-application-page .hero-container {
        padding: 0 1rem;
    }

    .contact-page .hero-content,
    .advertising-page .hero-content,
    .games-page .hero-content,
    .staff-application-page .hero-content {
        padding: 1rem 0;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-cta {
        width: 100%;
        text-align: center;
        justify-content: center;
        display: flex;
        align-items: center;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .contact-page .hero-banner,
    .advertising-page .hero-banner,
    .games-page .hero-banner {
        min-height: 280px;
    }

    .contact-page .hero-title,
    .advertising-page .hero-title,
    .games-page .hero-title {
        font-size: 1.375rem;
    }

    .contact-page .section-header h2,
    .advertising-page .section-header h2 {
        font-size: 1.125rem;
    }

    .contact-page .card,
    .advertising-page .card {
        padding: 1.5rem;
    }

    .contact-info-card {
        padding: 1.5rem;
    }

    .card-head {
        gap: 0.75rem;
    }

    .card-icon {
        width: 36px;
        height: 36px;
    }

    .tab-btn {
        padding: 0.75rem 0.8rem;
        font-size: 0.875rem;
    }

    .tab-btn i {
        margin-right: 0.4rem;
    }

    .contact-method {
        gap: 0.75rem;
    }

    .contact-method-icon {
        width: 32px;
        height: 32px;
    }

    .contact-method-content h4 {
        font-size: 0.9375rem;
    }

    .field input, .field select, .field textarea {
        font-size: 16px;
    }
}

/* ============================================
   GAMES PAGE
   ============================================ */

/* Grid layout */
.games-page .games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Game card */
.games-page .game-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(136, 136, 136, 0.55);
    display: block;
    text-decoration: none;
    color: inherit;
}

[data-theme="dark"] .games-page .game-card {
    background: #1e1e1d;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-color: rgba(136, 136, 136, 0.55);
    color: #f2f0eb;
}

.games-page .game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 132, 61, 0.15);
    border-color: #00843d;
    text-decoration: none;
    color: inherit;
}

[data-theme="dark"] .games-page .game-card:hover {
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.15);
    border-color: #22c55e;
    color: #f2f0eb;
}

.games-page .game-card.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.games-page .game-card.coming-soon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: rgba(136, 136, 136, 0.55);
}

/* Game icon container */
.games-page .game-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    position: relative;
}

/* --- Per-game accent colors --- */
.games-page .game-card[data-game="wordle"]     { --game-accent: #00843d; --game-accent-light: rgba(0, 132, 61, 0.12); }
.games-page .game-card[data-game="2048-2"]     { --game-accent: #d97706; --game-accent-light: rgba(217, 119, 6, 0.12); }
.games-page .game-card[data-game="sudoku"]     { --game-accent: #2563eb; --game-accent-light: rgba(37, 99, 235, 0.12); }
.games-page .game-card[data-game="flappy-bird"]{ --game-accent: #0891b2; --game-accent-light: rgba(8, 145, 178, 0.12); }
.games-page .game-card[data-game="crossword"]  { --game-accent: #7c3aed; --game-accent-light: rgba(124, 58, 237, 0.12); }

[data-theme="dark"] .games-page .game-card[data-game="wordle"]     { --game-accent: #22c55e; --game-accent-light: rgba(34, 197, 94, 0.15); }
[data-theme="dark"] .games-page .game-card[data-game="2048-2"]     { --game-accent: #f59e0b; --game-accent-light: rgba(245, 158, 11, 0.15); }
[data-theme="dark"] .games-page .game-card[data-game="sudoku"]     { --game-accent: #60a5fa; --game-accent-light: rgba(96, 165, 250, 0.15); }
[data-theme="dark"] .games-page .game-card[data-game="flappy-bird"]{ --game-accent: #22d3ee; --game-accent-light: rgba(34, 211, 238, 0.15); }
[data-theme="dark"] .games-page .game-card[data-game="crossword"]  { --game-accent: #a78bfa; --game-accent-light: rgba(167, 139, 250, 0.15); }

/* Apply accent colors to hover state */
.games-page .game-card:hover {
    box-shadow: 0 8px 25px var(--game-accent-light, rgba(0, 132, 61, 0.15));
    border-color: var(--game-accent, #00843d);
}

[data-theme="dark"] .games-page .game-card:hover {
    box-shadow: 0 8px 25px var(--game-accent-light, rgba(34, 197, 94, 0.15));
    border-color: var(--game-accent, #22c55e);
}

/* Subtle accent underline on game title */
.games-page .game-card:hover .game-title {
    color: var(--game-accent);
}

/* Game title & description */
.games-page .game-title {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

[data-theme="dark"] .games-page .game-title {
    color: #f9fafb;
}

.games-page .game-description {
    text-align: center;
    color: #374151;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
}

[data-theme="dark"] .games-page .game-description {
    color: #d1d5db;
}

/* Coming soon badge */
.games-page .coming-soon-badge {
    display: inline-block;
    background: rgba(0, 132, 61, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #00843d;
    border: 1px solid rgba(0, 132, 61, 0.2);
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .games-page .coming-soon-badge {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.2);
}

/* --- Wordle Animated Icon --- */
.games-page .wordle-tiles {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 3px;
    width: 135px;
    height: 90px;
    margin: 0 auto;
}

.games-page .wordle-tile {
    background: #787c7e;
    border: 2px solid #3a3a3c;
    border-radius: 0;
    transition: all 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    position: relative;
    width: 20px;
    height: 20px;
    padding: 2px;
}

.games-page .wordle-tile.correct { background: #00843d; border-color: #00843d; }
.games-page .wordle-tile.present { background: #d2ac5f; border-color: #d2ac5f; }
.games-page .wordle-tile.absent  { background: #787c7e; border-color: #787c7e; }

[data-theme="dark"] .games-page .wordle-tile        { background: #565758; border-color: #565758; }
[data-theme="dark"] .games-page .wordle-tile.correct { background: #22c55e; border-color: #22c55e; }
[data-theme="dark"] .games-page .wordle-tile.present { background: #d2ac5f; border-color: #d2ac5f; }

/* Idle: gentle sequential bounce */
.games-page .wordle-tile { animation: gamesBounce 3s ease-in-out infinite; }
.games-page .wordle-tile:nth-child(1) { animation-delay: 0s; }
.games-page .wordle-tile:nth-child(2) { animation-delay: 0.4s; }
.games-page .wordle-tile:nth-child(3) { animation-delay: 0.8s; }
.games-page .wordle-tile:nth-child(4) { animation-delay: 1.2s; }
.games-page .wordle-tile:nth-child(5) { animation-delay: 1.6s; }
.games-page .wordle-tile:nth-child(6) { animation-delay: 2.0s; }

/* Hover: flip reveal */
.games-page .game-card:hover .wordle-tile { animation: gamesFlipTile 0.8s ease-in-out; }
.games-page .game-card:hover .wordle-tile:nth-child(1) { animation-delay: 0.1s; }
.games-page .game-card:hover .wordle-tile:nth-child(2) { animation-delay: 0.2s; }
.games-page .game-card:hover .wordle-tile:nth-child(3) { animation-delay: 0.3s; }
.games-page .game-card:hover .wordle-tile:nth-child(4) { animation-delay: 0.4s; }
.games-page .game-card:hover .wordle-tile:nth-child(5) { animation-delay: 0.5s; }
.games-page .game-card:hover .wordle-tile:nth-child(6) { animation-delay: 0.6s; }

@keyframes gamesBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-3px); }
}

@keyframes gamesFlipTile {
    0%   { transform: rotateX(0deg); }
    50%  { transform: rotateX(90deg); }
    100% { transform: rotateX(0deg); }
}

/* --- 2048 Animated Icon --- */
.games-page .game-2048 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 3px;
    width: 84px;
    height: 84px;
    margin: 0 auto;
    background: #c4d6c1;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid #a8b5a5;
    box-sizing: border-box;
}

.games-page .tile-2048 {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: #2d4a22;
    transition: all 0.3s ease;
    transform-origin: center;
    box-sizing: border-box;
}

.games-page .tile-2048.tile-2  { background: #c5d97a; color: #2d4a22; }
.games-page .tile-2048.tile-4  { background: #a8c68a; color: #2d4a22; }
.games-page .tile-2048.tile-8  { background: #78be3f; color: white; }
.games-page .tile-2048.tile-16 { background: #87c7ba; color: white; }
.games-page .tile-2048.tile-32 { background: #d2ac5f; color: white; }
.games-page .tile-2048.tile-64 { background: #b45336; color: white; }

[data-theme="dark"] .games-page .game-2048         { background: #2a2a29; border-color: #3a3a39; }
[data-theme="dark"] .games-page .tile-2048          { background: rgba(255,255,255,0.03); color: #f2f0eb; border: 1px solid rgba(255,255,255,0.05); }
[data-theme="dark"] .games-page .tile-2048.tile-2   { background: #3a3a39; color: #d2ac5f; border: 1px solid #4a4a49; }
[data-theme="dark"] .games-page .tile-2048.tile-4   { background: #4a4a49; color: #e0c080; border: 1px solid #5a5a59; }
[data-theme="dark"] .games-page .tile-2048.tile-8   { background: #b45336; color: white; border: none; }
[data-theme="dark"] .games-page .tile-2048.tile-16  { background: #87c7ba; color: white; border: none; }
[data-theme="dark"] .games-page .tile-2048.tile-32  { background: #d2ac5f; color: #1a1a19; font-weight: 900; border: none; }
[data-theme="dark"] .games-page .tile-2048.tile-64  { background: #22c55e; color: white; border: none; }

/* Idle: gentle pulse on numbered tiles */
.games-page .tile-2048.tile-2  { animation: gamesPulse 4s ease-in-out infinite 0s; }
.games-page .tile-2048.tile-4  { animation: gamesPulse 4s ease-in-out infinite 0.6s; }
.games-page .tile-2048.tile-8  { animation: gamesPulse 4s ease-in-out infinite 1.2s; }
.games-page .tile-2048.tile-16 { animation: gamesPulse 4s ease-in-out infinite 1.8s; }
.games-page .tile-2048.tile-32 { animation: gamesPulse 4s ease-in-out infinite 2.4s; }
.games-page .tile-2048.tile-64 { animation: gamesPulse 4s ease-in-out infinite 3.0s; }

/* Hover: slide in */
.games-page .game-card:hover .tile-2048 { animation: gamesSlideIn 0.6s ease-in-out; }
.games-page .game-card:hover .tile-2048:nth-child(1) { animation-delay: 0.05s; }
.games-page .game-card:hover .tile-2048:nth-child(2) { animation-delay: 0.1s; }
.games-page .game-card:hover .tile-2048:nth-child(3) { animation-delay: 0.15s; }
.games-page .game-card:hover .tile-2048:nth-child(4) { animation-delay: 0.2s; }
.games-page .game-card:hover .tile-2048:nth-child(5) { animation-delay: 0.25s; }
.games-page .game-card:hover .tile-2048:nth-child(6) { animation-delay: 0.3s; }
.games-page .game-card:hover .tile-2048:nth-child(7) { animation-delay: 0.35s; }
.games-page .game-card:hover .tile-2048:nth-child(8) { animation-delay: 0.4s; }

@keyframes gamesPulse {
    0%, 80%, 100% { transform: scale(1); }
    40% { transform: scale(1.08); }
}

@keyframes gamesSlideIn {
    0%   { transform: scale(0) rotate(-180deg); opacity: 0; }
    50%  { transform: scale(1.2) rotate(-90deg); opacity: 0.8; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* --- Sudoku Animated Icon --- */
.games-page .sudoku-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    width: 96px;
    height: 96px;
    margin: 0 auto;
    background: #c4d6c1;
    padding: 5px;
    border-radius: 8px;
    border: 1px solid #a8b5a5;
    box-sizing: border-box;
}

.games-page .sudoku-cell {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    transition: all 0.3s ease;
    border-radius: 3px;
    padding: 0;
}

[data-theme="dark"] .games-page .sudoku-cell { background: #f9fafb; color: #1f2937; }

/* Idle: soft glow cycling through numbered cells */
.games-page .sudoku-cell:nth-child(1) { animation: gamesGlow 5s ease-in-out infinite 0s; }
.games-page .sudoku-cell:nth-child(3) { animation: gamesGlow 5s ease-in-out infinite 1s; }
.games-page .sudoku-cell:nth-child(5) { animation: gamesGlow 5s ease-in-out infinite 2s; }
.games-page .sudoku-cell:nth-child(7) { animation: gamesGlow 5s ease-in-out infinite 3s; }
.games-page .sudoku-cell:nth-child(9) { animation: gamesGlow 5s ease-in-out infinite 4s; }

/* Hover: bright light-up */
.games-page .game-card:hover .sudoku-cell:nth-child(1) { animation: gamesLightUp 0.8s ease-in-out 0.1s; }
.games-page .game-card:hover .sudoku-cell:nth-child(5) { animation: gamesLightUp 0.8s ease-in-out 0.2s; }
.games-page .game-card:hover .sudoku-cell:nth-child(9) { animation: gamesLightUp 0.8s ease-in-out 0.3s; }
.games-page .game-card:hover .sudoku-cell:nth-child(3) { animation: gamesLightUp 0.8s ease-in-out 0.4s; }
.games-page .game-card:hover .sudoku-cell:nth-child(7) { animation: gamesLightUp 0.8s ease-in-out 0.5s; }

@keyframes gamesGlow {
    0%, 70%, 100% { background: white; box-shadow: none; }
    35% { background: rgba(0, 132, 61, 0.08); box-shadow: 0 0 4px rgba(0, 132, 61, 0.15); }
}

@keyframes gamesLightUp {
    0%, 100% { background: white; transform: scale(1); }
    50%      { background: #00843d; transform: scale(1.1); color: white; }
}

/* --- Flappy Bird Animated Icon --- */
.games-page .flappy-container {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    position: relative;
    background: linear-gradient(to bottom, #87ceeb 0%, #87c7ba 50%, #78be3f 100%);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #6bb06b;
}

.games-page .cloud {
    position: absolute;
    background: white;
    border-radius: 50px;
    opacity: 0.8;
}

.games-page .cloud::before,
.games-page .cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50px;
}

.games-page .cloud1 { width: 18px; height: 6px; top: 12px; left: 15px; animation: gamesFloat 4s ease-in-out infinite; }
.games-page .cloud1::before { width: 9px; height: 9px; top: -4px; left: 3px; }
.games-page .cloud1::after  { width: 12px; height: 6px; top: -1px; right: 3px; }

.games-page .cloud2 { width: 12px; height: 4px; top: 22px; right: 12px; animation: gamesFloat 3s ease-in-out infinite 1s; }
.games-page .cloud2::before { width: 6px; height: 6px; top: -3px; left: 1px; }
.games-page .cloud2::after  { width: 7px; height: 4px; top: -1px; right: 1px; }

.games-page .bird {
    width: 27px;
    height: 21px;
    position: absolute;
    top: 40%;
    left: 30px;
    transform: translateY(-50%);
    transition: all 0.2s ease;
}

.games-page .bird-body {
    width: 27px;
    height: 21px;
    background: linear-gradient(45deg, #ffd700 0%, #ffed4e 50%, #f59e0b 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: relative;
    border: 1px solid #d97706;
}

.games-page .bird-beak {
    width: 6px;
    height: 3px;
    background: #f97316;
    position: absolute;
    top: 7px;
    right: -3px;
    border-radius: 50% 0 0 50%;
    border: 1px solid #ea580c;
}

.games-page .bird-eye {
    width: 4px;
    height: 4px;
    background: black;
    border-radius: 50%;
    position: absolute;
    top: 4px;
    right: 4px;
}

.games-page .pipe {
    position: absolute;
    background: linear-gradient(to right, #22c55e 0%, #16a34a 50%, #15803d 100%);
    border: 1px solid #166534;
}

.games-page .pipe-top { width: 18px; height: 37px; top: 0; right: 12px; border-radius: 0 0 3px 3px; }
.games-page .pipe-top::after {
    content: '';
    position: absolute;
    bottom: -4px; left: -3px;
    width: 24px; height: 6px;
    background: linear-gradient(to right, #22c55e 0%, #16a34a 50%, #15803d 100%);
    border: 1px solid #166534;
    border-radius: 3px;
}

.games-page .pipe-bottom { width: 18px; height: 37px; bottom: 0; right: 12px; border-radius: 3px 3px 0 0; }
.games-page .pipe-bottom::before {
    content: '';
    position: absolute;
    top: -4px; left: -3px;
    width: 24px; height: 6px;
    background: linear-gradient(to right, #22c55e 0%, #16a34a 50%, #15803d 100%);
    border: 1px solid #166534;
    border-radius: 3px;
}

.games-page .ground {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 12px;
    background: linear-gradient(to bottom, #92400e 0%, #78350f 100%);
    border-top: 1px solid #451a03;
}

.games-page .ground::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(to bottom, #22c55e 0%, #16a34a 100%);
}

.games-page .score {
    position: absolute;
    top: 7px; left: 7px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

/* Idle: bird bobs gently */
.games-page .bird { animation: gamesBob 2.5s ease-in-out infinite; }

/* Hover: full flight + pipes */
.games-page .game-card:hover .bird        { animation: gamesFly 0.8s ease-in-out infinite; }
.games-page .game-card:hover .pipe-top    { animation: gamesSlideLeft 2s linear infinite; }
.games-page .game-card:hover .pipe-bottom { animation: gamesSlideLeft 2s linear infinite; }

@keyframes gamesBob {
    0%, 100% { top: 40%; }
    50%      { top: 34%; }
}

@keyframes gamesFly {
    0%, 100% { top: 40%; }
    50%      { top: 25%; }
}

@keyframes gamesFloat {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(3px); }
}

@keyframes gamesSlideLeft {
    0%   { right: -22px; }
    100% { right: 107px; }
}

/* --- Crossword Animated Icon --- */
.games-page .crossword-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
    width: 96px;
    height: 96px;
    margin: 0 auto;
    background: #c4d6c1;
    padding: 5px;
    border-radius: 8px;
    border: 1px solid #a8b5a5;
}

.games-page .crossword-cell {
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.games-page .crossword-cell.filled { background: #1f2937; }

[data-theme="dark"] .games-page .crossword-cell        { background: #f9fafb; }
[data-theme="dark"] .games-page .crossword-cell.filled  { background: #374151; }

/* Idle: filled cells shimmer in sequence */
.games-page .crossword-cell.filled { animation: gamesShimmer 4s ease-in-out infinite; }
.games-page .crossword-cell.filled:nth-child(2)  { animation-delay: 0s; }
.games-page .crossword-cell.filled:nth-child(4)  { animation-delay: 0.5s; }
.games-page .crossword-cell.filled:nth-child(16) { animation-delay: 1.0s; }
.games-page .crossword-cell.filled:nth-child(20) { animation-delay: 1.5s; }
.games-page .crossword-cell.filled:nth-child(22) { animation-delay: 2.0s; }
.games-page .crossword-cell.filled:nth-child(24) { animation-delay: 2.5s; }

/* Hover: cells fill with color */
.games-page .game-card:hover .crossword-cell { animation: gamesFillIn 1.2s ease-in-out; }
.games-page .game-card:hover .crossword-cell:nth-child(1)  { animation-delay: 0.1s; }
.games-page .game-card:hover .crossword-cell:nth-child(6)  { animation-delay: 0.2s; }
.games-page .game-card:hover .crossword-cell:nth-child(11) { animation-delay: 0.3s; }
.games-page .game-card:hover .crossword-cell:nth-child(16) { animation-delay: 0.4s; }
.games-page .game-card:hover .crossword-cell:nth-child(21) { animation-delay: 0.5s; }

@keyframes gamesShimmer {
    0%, 70%, 100% { opacity: 1; }
    35% { opacity: 0.5; }
}

@keyframes gamesFillIn {
    0%, 100% { background: white; }
    50%      { background: #00843d; }
}

/* Dark mode idle animation overrides */
[data-theme="dark"] .games-page .sudoku-cell:nth-child(1),
[data-theme="dark"] .games-page .sudoku-cell:nth-child(3),
[data-theme="dark"] .games-page .sudoku-cell:nth-child(5),
[data-theme="dark"] .games-page .sudoku-cell:nth-child(7),
[data-theme="dark"] .games-page .sudoku-cell:nth-child(9) {
    animation-name: gamesGlowDark;
}

[data-theme="dark"] .games-page .game-card:hover .sudoku-cell {
    animation-name: gamesLightUpDark;
}

@keyframes gamesGlowDark {
    0%, 70%, 100% { background: #f9fafb; box-shadow: none; }
    35% { background: rgba(34, 197, 94, 0.12); box-shadow: 0 0 4px rgba(34, 197, 94, 0.2); }
}

@keyframes gamesLightUpDark {
    0%, 100% { background: #f9fafb; transform: scale(1); color: #1f2937; }
    50%      { background: #22c55e; transform: scale(1.1); color: white; }
}

[data-theme="dark"] .games-page .game-card:hover .crossword-cell {
    animation-name: gamesFillInDark;
}

@keyframes gamesFillInDark {
    0%, 100% { background: #f9fafb; }
    50%      { background: #22c55e; }
}

/* --- Games Page Responsive --- */
@media (max-width: 768px) {
    /* 2-column grid instead of 1-column — gives a clean app-store grid look */
    .games-page .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .games-page .game-card {
        padding: 1.25rem 1rem;
    }

    .games-page .game-title {
        font-size: 1rem;
    }

    .games-page .game-description {
        font-size: 0.8125rem;
    }

    .games-page .game-icon {
        width: 80px;
        height: 80px;
        margin: 0 auto 1rem;
        overflow: hidden; /* clip any animated icon that overflows its container */
    }

    /* Mobile Wordle — tiles sized to fit within 80px icon container */
    .games-page .wordle-tiles {
        width: 78px;
        height: 52px;
        gap: 2px;
    }

    .games-page .wordle-tile {
        width: 11px;
        height: 11px;
        font-size: 0.6rem;
        padding: 1px;
    }

    /* Mobile 2048 */
    .games-page .game-2048 {
        width: 60px;
        height: 60px;
        gap: 2px;
        padding: 4px;
    }

    .games-page .tile-2048 { font-size: 0.45rem; }

    /* Mobile Sudoku — clean 3x3 grid showing only 3 diagonal numbers */
    .games-page .sudoku-grid {
        width: 68px;
        height: 68px;
        gap: 2px;
        padding: 4px;
    }

    .games-page .sudoku-cell {
        font-size: 0;
        line-height: 1;
    }

    .games-page .sudoku-cell:nth-child(1),
    .games-page .sudoku-cell:nth-child(5),
    .games-page .sudoku-cell:nth-child(9) {
        font-size: 0.85rem;
    }

    /* Mobile Flappy Bird */
    .games-page .flappy-container {
        width: 80px;
        height: 80px;
    }

    .games-page .cloud1 { width: 12px; height: 4px; top: 8px; left: 10px; }
    .games-page .cloud1::before { width: 6px; height: 6px; top: -3px; left: 2px; }
    .games-page .cloud1::after  { width: 8px; height: 4px; top: -1px; right: 2px; }

    .games-page .cloud2 { width: 8px; height: 3px; top: 15px; right: 8px; }
    .games-page .cloud2::before { width: 4px; height: 4px; top: -2px; left: 1px; }
    .games-page .cloud2::after  { width: 5px; height: 3px; top: -1px; right: 1px; }

    .games-page .bird      { width: 18px; height: 14px; left: 25px; }
    .games-page .bird-body { width: 18px; height: 14px; }
    .games-page .bird-beak { width: 4px; height: 2px; top: 5px; right: -2px; }
    .games-page .bird-eye  { width: 3px; height: 3px; top: 3px; right: 3px; }

    .games-page .pipe-top          { width: 12px; height: 25px; right: 8px; }
    .games-page .pipe-top::after   { bottom: -3px; left: -2px; width: 16px; height: 4px; }
    .games-page .pipe-bottom       { width: 12px; height: 25px; right: 8px; }
    .games-page .pipe-bottom::before { top: -3px; left: -2px; width: 16px; height: 4px; }

    .games-page .ground         { height: 8px; }
    .games-page .ground::before { height: 2px; }
    .games-page .score          { top: 5px; left: 5px; font-size: 8px; }

    /* Mobile Crossword */
    .games-page .crossword-grid {
        width: 68px;
        height: 68px;
        gap: 2px;
        padding: 4px;
    }
}

@media (max-width: 480px) {
    /* Tighter cards for smaller phones — still 2 columns */
    .games-page .game-card {
        padding: 1rem 0.75rem;
    }

    .games-page .game-title {
        font-size: 0.9375rem;
    }

    .games-page .game-description {
        font-size: 0.75rem;
    }

    .games-page .game-icon {
        width: 68px;
        height: 68px;
        margin: 0 auto 0.75rem;
    }

    /* Wordle tiles sized for 68px container */
    .games-page .wordle-tiles { width: 66px; height: 44px; gap: 1px; }
    .games-page .wordle-tile  { width: 9px; height: 9px; font-size: 0.5rem; padding: 1px; }

    /* Other icons — scale down to fit 68px container */
    .games-page .game-2048   { width: 56px; height: 56px; }
    .games-page .flappy-container { width: 68px; height: 68px; }
    .games-page .crossword-grid   { width: 60px; height: 60px; }
    .games-page .tetris-icon      { width: 64px; height: 64px; }
    .games-page .tetris-icon-grid { gap: 1px; }
    .games-page .ti-cell          { border-radius: 1px; }
}

/* --- Tetris accent color --- */
.games-page .game-card[data-game="tetris"]      { --game-accent: #7c3aed; --game-accent-light: rgba(124, 58, 237, 0.12); }
[data-theme="dark"] .games-page .game-card[data-game="tetris"] { --game-accent: #a78bfa; --game-accent-light: rgba(167, 139, 250, 0.15); }

/* --- Tetris Animated Icon --- */
.games-page .tetris-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.games-page .tetris-icon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    width: 100%;
    height: 100%;
}

.games-page .ti-cell {
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.06);
    transition: background 0.3s ease;
}

[data-theme="dark"] .games-page .ti-cell {
    background: rgba(255, 255, 255, 0.05);
}

/* Piece colors */
.games-page .ti-I { background: #06b6d4; }
.games-page .ti-O { background: #facc15; }
.games-page .ti-T { background: #a855f7; }
.games-page .ti-S { background: #22c55e; }
.games-page .ti-Z { background: #ef4444; }
.games-page .ti-J { background: #3b82f6; }
.games-page .ti-L { background: #f97316; }

/* Idle: gentle pulse on the I-piece row */
.games-page .ti-I { animation: gamesTetrisPulse 2.4s ease-in-out infinite; }
.games-page .tetris-icon-grid .ti-I:nth-child(5)  { animation-delay: 0s; }
.games-page .tetris-icon-grid .ti-I:nth-child(6)  { animation-delay: 0.15s; }
.games-page .tetris-icon-grid .ti-I:nth-child(7)  { animation-delay: 0.3s; }
.games-page .tetris-icon-grid .ti-I:nth-child(8)  { animation-delay: 0.45s; }

@keyframes gamesTetrisPulse {
    0%, 100% { filter: brightness(1); }
    50%       { filter: brightness(1.35); }
}

/* Hover: whole grid brightens + slight scale */
.games-page .game-card:hover .tetris-icon-grid { transform: scale(1.06); transition: transform 0.3s ease; }
.games-page .game-card:hover .ti-I,
.games-page .game-card:hover .ti-O,
.games-page .game-card:hover .ti-T,
.games-page .game-card:hover .ti-S,
.games-page .game-card:hover .ti-J,
.games-page .game-card:hover .ti-L { filter: brightness(1.2); transition: filter 0.3s ease; }

/* Mobile Tetris icon */
@media (max-width: 600px) {
    .games-page .tetris-icon { width: 80px; height: 80px; }
}

/* --- 2048 touch-action fix (prevent page scroll while swiping) --- */
.game-2048-board-container {
    touch-action: none;
}

/* --- Games Hub leaderboard/stats sections --- */
.hub-leaderboards-section,
.hub-stats-section {
    margin-top: 3rem;
}

.hub-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
}

.hub-section-title i {
    color: var(--theme-primary-color);
}

.hub-leaderboards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.hub-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.hub-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: #fff;
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .hub-stat-card {
    background: #1e1e1e;
    border-color: rgba(136, 136, 136, 0.55);
}

.hub-stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

[data-theme="dark"] .hub-stat-icon {
    background: rgba(255, 255, 255, 0.05);
}

.hub-stat-icon i {
    font-size: 1.375rem;
    color: var(--theme-primary-color);
}

.hub-stat-card h4 {
    font-size: 0.9375rem;
    margin: 0 0 0.625rem;
}

.hub-stat-details {
    display: flex;
    gap: 1.25rem;
}

.hub-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hub-stat-value {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--theme-primary-color);
    line-height: 1.2;
}

.hub-stat-label {
    font-size: 0.6875rem;
    color: var(--text-secondary, #555);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.125rem;
}

.hub-no-stats {
    font-size: 0.875rem;
    color: var(--text-tertiary, #888);
    margin: 0;
}

/* ============================================================
   Games Hub Page (template-games.php) — NYT-style card grid
   ============================================================ */

.games-hub-page {
    padding: 2.5rem 0 5rem;
}

/* Header */
.hub-header {
    text-align: center;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
    margin-bottom: 2.5rem;
}

[data-theme="dark"] .hub-header {
    border-color: rgba(136, 136, 136, 0.55);
}

.hub-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 0.375rem;
}

.hub-subtitle {
    font-size: 1rem;
    color: var(--text-secondary, #555);
    margin: 0;
}

/* ── Game Cards Grid ── */
.hub-games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 3rem;
}

[data-theme="dark"] .hub-games-grid {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(136, 136, 136, 0.55);
}

.hub-game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.75rem 1.25rem 1.5rem;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
    position: relative;
    gap: 1rem;
    cursor: pointer;
}

[data-theme="dark"] .hub-game-card {
    background: #111;
}

.hub-game-card:hover {
    background: #fafafa;
}

[data-theme="dark"] .hub-game-card:hover {
    background: #1a1a1a;
}

/* Accent bar on hover (top edge) */
.hub-game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--game-accent, var(--theme-primary-color));
    transform: scaleX(0);
    transition: transform 0.2s ease;
    transform-origin: center;
}

.hub-game-card:hover::before {
    transform: scaleX(1);
}

.hub-game-card--soon {
    cursor: default;
    opacity: 0.6;
}

.hub-game-card--soon::before { display: none; }

/* Per-game accent colors */
.hub-game-card[data-game="wordle"]      { --game-accent: #00843d; }
.hub-game-card[data-game="2048-2"]      { --game-accent: #d97706; }
.hub-game-card[data-game="sudoku"]      { --game-accent: #2563eb; }
.hub-game-card[data-game="flappy-bird"] { --game-accent: #0891b2; }
.hub-game-card[data-game="tetris"]      { --game-accent: #7c3aed; }
.hub-game-card[data-game="crossword"]   { --game-accent: #0369a1; }

[data-theme="dark"] .hub-game-card[data-game="wordle"]      { --game-accent: #22c55e; }
[data-theme="dark"] .hub-game-card[data-game="2048-2"]      { --game-accent: #f59e0b; }
[data-theme="dark"] .hub-game-card[data-game="sudoku"]      { --game-accent: #60a5fa; }
[data-theme="dark"] .hub-game-card[data-game="flappy-bird"] { --game-accent: #22d3ee; }
[data-theme="dark"] .hub-game-card[data-game="tetris"]      { --game-accent: #a78bfa; }
[data-theme="dark"] .hub-game-card[data-game="crossword"]   { --game-accent: #38bdf8; }

/* ── Icon area ── */
.hub-game-icon {
    width: 80px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

/* ── Text block ── */
.hub-game-text { text-align: center; flex: 1; }

.hub-game-badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--game-accent, #00843d);
    background: color-mix(in srgb, var(--game-accent, #00843d) 12%, transparent);
    border-radius: 4px;
    padding: 0.15em 0.5em;
    margin-bottom: 0.4rem;
}

.hub-game-badge--soon { --game-accent: #888; }

.hub-game-name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.3rem;
    letter-spacing: -0.01em;
}

.hub-game-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary, #555);
    margin: 0;
    line-height: 1.45;
}

/* Arrow (hover reveal) */
.hub-game-arrow {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    color: var(--game-accent, var(--theme-primary-color));
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.hub-game-card:hover .hub-game-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ── Wordle icon ── */
.hgi-wordle { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.hw-row     { display: flex; gap: 3px; }

.hw-tile {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .hw-tile { background: rgba(255, 255, 255, 0.1); }

.hw-tile.hw-c { background: #6aaa64; }
.hw-tile.hw-p { background: #c9b458; }
.hw-tile.hw-a { background: #787c7e; }

[data-theme="dark"] .hw-tile.hw-c { background: #538d4e; }
[data-theme="dark"] .hw-tile.hw-p { background: #b59f3b; }
[data-theme="dark"] .hw-tile.hw-a { background: #3a3a3c; }

.hw-row--muted .hw-tile { opacity: 0.3; }

/* Hover: tiles flip */
.hub-game-card:hover .hw-tile.hw-c,
.hub-game-card:hover .hw-tile.hw-p,
.hub-game-card:hover .hw-tile.hw-a {
    animation: hubTileFlip 0.5s ease forwards;
}

.hub-game-card:hover .hw-row .hw-tile:nth-child(1) { animation-delay: 0s; }
.hub-game-card:hover .hw-row .hw-tile:nth-child(2) { animation-delay: 0.07s; }
.hub-game-card:hover .hw-row .hw-tile:nth-child(3) { animation-delay: 0.14s; }
.hub-game-card:hover .hw-row .hw-tile:nth-child(4) { animation-delay: 0.21s; }
.hub-game-card:hover .hw-row .hw-tile:nth-child(5) { animation-delay: 0.28s; }

@keyframes hubTileFlip {
    0%   { transform: scaleY(1); }
    40%  { transform: scaleY(0); }
    100% { transform: scaleY(1); }
}

/* ── 2048 icon ── */
.hgi-2048 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    width: 72px;
    height: 72px;
}

.ht-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.75rem;
    color: #fff;
    transition: transform 0.18s ease;
}

.ht-tile.ht-2    { background: #eee4da; color: #776e65; font-size: 0.875rem; }
.ht-tile.ht-4    { background: #ede0c8; color: #776e65; font-size: 0.875rem; }
.ht-tile.ht-8    { background: #f2b179; }
.ht-tile.ht-2048 { background: #edc22e; font-size: 0.5rem; letter-spacing: -0.02em; }

[data-theme="dark"] .ht-tile.ht-2    { background: #4a4540; color: #cdc1b4; }
[data-theme="dark"] .ht-tile.ht-4    { background: #4e4538; color: #cdc1b4; }

.hub-game-card:hover .ht-tile { transform: scale(1.07); }
.hub-game-card:hover .ht-tile:nth-child(2) { transition-delay: 0.04s; }
.hub-game-card:hover .ht-tile:nth-child(3) { transition-delay: 0.08s; }
.hub-game-card:hover .ht-tile:nth-child(4) { transition-delay: 0.12s; }

/* ── Sudoku icon ── */
.hgi-sudoku {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    width: 88px;
    height: 88px;
    border: 1.5px solid rgba(37, 99, 235, 0.25);
    border-radius: 4px;
    padding: 3px;
}

[data-theme="dark"] .hgi-sudoku { border-color: rgba(96, 165, 250, 0.25); }

.hs-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: transparent;
    background: rgba(0, 0, 0, 0.04);
    transition: color 0.15s ease, background 0.15s ease;
}

[data-theme="dark"] .hs-cell { background: rgba(255, 255, 255, 0.04); }

.hs-cell.hs-filled { color: #2563eb; }
[data-theme="dark"] .hs-cell.hs-filled { color: #60a5fa; }

.hub-game-card:hover .hs-cell.hs-filled {
    background: color-mix(in srgb, #2563eb 10%, transparent);
}

/* ── Flappy Bird icon ── */
.hgi-flappy {
    width: 80px;
    height: 56px;
    color: var(--game-accent, #0891b2);
}

.hgi-flappy svg { width: 100%; height: 100%; }

.hgi-wing { transform-origin: 25px 30px; animation: hubWingIdle 2.5s ease-in-out infinite; }

@keyframes hubWingIdle {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(2px); }
}

.hub-game-card:hover .hgi-wing {
    animation: hubWingFlap 0.35s ease-in-out infinite alternate;
}

@keyframes hubWingFlap {
    from { transform: translateY(2px) rotate(8deg); }
    to   { transform: translateY(-5px) rotate(-18deg); }
}

/* ── Tetris icon ── */
.hgi-tetris { width: 72px; height: 64px; }

.htet-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 2px;
    width: 100%;
    height: 100%;
}

.htet-block {
    border-radius: 2px;
    transition: filter 0.2s ease;
}

.htet-I { background: #06b6d4; }
.htet-O { background: #facc15; }
.htet-T { background: #a855f7; }
.htet-S { background: #22c55e; }
.htet-J { background: #3b82f6; }
.htet-L { background: #f97316; }

.hub-game-card:hover .htet-block { filter: brightness(1.12); }
.hub-game-card:hover .htet-I { animation: hubBlockDrop 0.35s ease forwards; }
.hub-game-card:hover .htet-I:nth-of-type(1) { animation-delay: 0s; }
.hub-game-card:hover .htet-I:nth-of-type(2) { animation-delay: 0.05s; }
.hub-game-card:hover .htet-I:nth-of-type(3) { animation-delay: 0.1s; }
.hub-game-card:hover .htet-I:nth-of-type(4) { animation-delay: 0.15s; }

@keyframes hubBlockDrop {
    from { transform: translateY(-6px); opacity: 0.6; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ── Crossword icon ── */
.hgi-crossword { width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; }

.hcw-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    width: 100%;
    height: 100%;
}

.hcw-cell {
    border-radius: 1px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(136, 136, 136, 0.55);
    transition: background 0.2s ease;
}

[data-theme="dark"] .hcw-cell { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.06); }

.hcw-cell.hcw-black {
    background: #1e293b;
    border-color: #1e293b;
}

[data-theme="dark"] .hcw-cell.hcw-black { background: #334155; border-color: #334155; }

.hub-game-card:hover .hcw-cell:not(.hcw-black) {
    background: color-mix(in srgb, #0369a1 10%, transparent);
}

/* ── Sections below cards ── */
.hub-section { margin-top: 3rem; }

.hub-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hub-section-title i { color: var(--theme-primary-color); font-size: 1rem; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .hub-games-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .hub-games-grid { grid-template-columns: 1fr; }
    .hub-game-card  { flex-direction: row; padding: 1.25rem; gap: 1rem; align-items: center; }
    .hub-game-text  { text-align: left; }
    .hub-game-icon  { width: 52px; height: 52px; flex-shrink: 0; }
    .hub-game-arrow { position: static; opacity: 1; transform: none; margin-left: auto; }
    /* Scale down all icons to fit 52px container */
    .hgi-2048       { width: 52px; height: 52px; }
    .hgi-sudoku     { width: 52px; height: 52px; }
    .hgi-crossword  { width: 50px; height: 50px; }
    .hgi-tetris     { width: 52px; height: 46px; }
    .hgi-flappy     { width: 52px; height: 36px; }
    .hw-tile        { width: 9px; height: 9px; }
    .hw-row         { gap: 2px; }
    .hgi-wordle     { gap: 3px; }
}

/* --- Trivia Stats Board (Games Hub) --- */

.trivia-stats-board {
    max-width: 1200px;
    margin: 2.5rem auto 0;
    padding: 0 2rem;
}

.trivia-stats-board .section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 1.5rem;
    text-align: center;
}

[data-theme="dark"] .trivia-stats-board .section-title {
    color: #e0e0e0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: #fff;
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: 12px;
    transition: box-shadow 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .stat-card {
    background: #1e1e1e;
    border-color: rgba(136, 136, 136, 0.55);
}

[data-theme="dark"] .stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stat-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--theme-primary-color, #00843D);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

[data-theme="dark"] .stat-label {
    color: #888;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trivia-stats-board {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .stat-number {
        font-size: 1.5rem;
    }

    .stat-card {
        padding: 1rem 0.75rem;
    }
}

/* ============================================
   LEGAL PAGES (Privacy Policy, T&C, Disclaimer, Privacy Choices)
   Template: page-legal.php
   ============================================ */

.legal-page {
    padding-bottom: 4rem;
}

/* Hero */
.legal-hero {
    background: var(--theme-card-bg, #f8f9fa);
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
    padding: 2.5rem 0 2rem;
    margin-bottom: 2.5rem;
}

[data-theme="dark"] .legal-hero {
    background: rgba(255, 255, 255, 0.04);
}

.legal-hero-inner {
    max-width: 720px;
}

.legal-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--theme-primary-color);
    margin: 0 0 0.5rem;
}

.legal-page-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.5rem;
    color: var(--theme-light-header);
}

.legal-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Two-column layout: TOC sidebar + content */
.legal-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 3rem;
    align-items: start;
}

/* TOC sidebar */
.legal-toc {
    position: sticky;
    top: calc(var(--header-height, 80px) + 1.5rem);
    max-height: calc(100vh - var(--header-height, 80px) - 3rem);
    overflow-y: auto;
    font-size: 0.8125rem;
    padding-right: 0.5rem;
}

.legal-toc-heading {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 0 0 0.75rem;
}

#legal-toc-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#legal-toc-nav a {
    display: block;
    padding: 0.375rem 0.625rem;
    border-radius: 4px;
    color: var(--theme-light-text);
    text-decoration: none;
    line-height: 1.35;
    transition: background 0.15s, color 0.15s;
}

#legal-toc-nav a:hover {
    background: rgba(0, 132, 61, 0.08);
    color: var(--theme-primary-color);
}

/* Sections */
.legal-content {
    min-width: 0;
    max-width: 720px;
}

.legal-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(136, 136, 136, 0.55);
}

.legal-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.legal-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.legal-section-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--theme-primary-color);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.legal-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    color: var(--theme-light-header);
}

.legal-section-body {
    color: var(--theme-light-text);
    line-height: 1.7;
    font-size: 0.9375rem;
}

.legal-section-body p { margin: 0 0 0.875rem; }
.legal-section-body p:last-child { margin-bottom: 0; }

.legal-section-body h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 1.25rem 0 0.5rem;
    color: var(--theme-light-header);
}

.legal-section-body ul,
.legal-section-body ol {
    margin: 0.25rem 0 0.875rem 1.25rem;
    padding: 0;
}

.legal-section-body li {
    margin-bottom: 0.375rem;
    line-height: 1.6;
}

.legal-section-body a {
    color: var(--theme-primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-section-body address {
    font-style: normal;
    background: var(--theme-card-bg, #f8f9fa);
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: var(--theme-border-radius);
    padding: 1rem 1.25rem;
    line-height: 1.8;
    margin-top: 0.75rem;
}

[data-theme="dark"] .legal-section-body address {
    background: rgba(255, 255, 255, 0.04);
}

/* Privacy Choices special blocks */
.legal-contact-box {
    background: var(--theme-card-bg, #f8f9fa);
    border: 1px solid rgba(136, 136, 136, 0.55);
    border-radius: var(--theme-border-radius);
    padding: 1rem 1.25rem;
    margin: 0.75rem 0;
    line-height: 1.8;
    font-size: 0.9rem;
}

[data-theme="dark"] .legal-contact-box {
    background: rgba(255, 255, 255, 0.04);
}

.legal-cookie-placeholder {
    background: rgba(0, 132, 61, 0.06);
    border: 1px solid rgba(0, 132, 61, 0.25);
    border-radius: var(--theme-border-radius);
    padding: 1rem 1.25rem;
    margin: 0.75rem 0;
    font-size: 0.875rem;
}

.legal-complianz-block {
    margin: 1rem 0;
}

/* Legal pages — custom (block editor) content mode */
.legal-content--custom {
    counter-reset: legal-custom-section;
}

.legal-content--custom h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--theme-light-header);
    margin: 2.5rem 0 1rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(136, 136, 136, 0.15);
    counter-increment: legal-custom-section;
}

.legal-content--custom h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.legal-content--custom h2::before {
    content: counter(legal-custom-section);
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--theme-primary-color);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.legal-content--custom p {
    margin: 0 0 0.875rem;
    line-height: 1.7;
    color: var(--theme-light-text);
}

.legal-content--custom p:last-child { margin-bottom: 0; }

.legal-content--custom h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 1rem 0 0.375rem;
    color: var(--theme-light-header);
}

.legal-content--custom ul,
.legal-content--custom ol {
    margin: 0.25rem 0 0.875rem 1.25rem;
    padding: 0;
    line-height: 1.7;
    color: var(--theme-light-text);
}

.legal-content--custom li { margin-bottom: 0.375rem; }

.legal-content--custom a {
    color: var(--theme-primary-color);
    text-decoration: underline;
}

[data-theme="dark"] .legal-content--custom h2 {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Tablet: collapse TOC above content */
@media (max-width: 900px) {
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .legal-toc {
        position: static;
        max-height: none;
        background: var(--theme-card-bg, #f8f9fa);
        border: 1px solid rgba(136, 136, 136, 0.55);
        border-radius: var(--theme-border-radius);
        padding: 1rem 1.25rem;
        margin-bottom: 2rem;
    }

    [data-theme="dark"] .legal-toc {
        background: rgba(255, 255, 255, 0.04);
    }

    #legal-toc-nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }

    #legal-toc-nav a {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .legal-hero {
        padding: 1.5rem 0 1.25rem;
        margin-bottom: 1.5rem;
    }

    .legal-page-title {
        font-size: 1.5rem;
    }

    .legal-section {
        margin-bottom: 1.75rem;
        padding-bottom: 1.75rem;
    }

    .legal-section-body {
        font-size: 0.9rem;
    }
}
