/* =========================================
   1. CSS Variables (Dark Theme Default)
   ========================================= */
:root {
    /* Colors - Dark Theme applied as default */
    --color-primary: #3d7a52;
    --color-primary-light: #4a9463;
    --color-primary-dark: #2d5a3d;
    
    --color-accent: #e8c170;
    --color-accent-light: #f0d490;
    --color-accent-dark: #d4a84b;
    
    --color-success: #38a169;
    --color-warning: #dd6b20;
    
    --color-text: #e2e8f0;
    --color-text-muted: #a0aec0;
    --color-text-light: #718096;
    
    --color-bg: #0d1117;
    --color-bg-alt: #161b22;
    --color-bg-card: #1c2128;
    
    --color-border: #30363d;
    --color-border-light: #21262d;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 4px 20px rgba(232, 193, 112, 0.15);

    /* Radii */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Typography */
    --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-serif: Georgia, 'Times New Roman', serif;
    --font-mono: 'Consolas', 'Monaco', monospace;

    --line-height-tight: 1.25;
    --line-height-normal: 1.6;
    --line-height-relaxed: 1.75;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Layout Dimensions */
    --max-width-content: 1100px;
    --max-width-wide: 1200px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

/* =========================================
   2. Reset & Base Styles
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =========================================
   3. Layout Components (Header, Main, Footer)
   ========================================= */
header {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    min-height: 60px;
}

main {
    flex: 1;
    width: 100%;
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

@media (min-width: 768px) {
    main {
        padding: var(--spacing-3xl) var(--spacing-xl);
    }
}

footer {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    min-height: 80px;
}

footer .footer-content {
    max-width: var(--max-width-content);
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-md);
    text-align: center;
}

footer .disclaimer {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-accent); /* Updated to accent for dark theme consistency */
}

footer .copyright {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin: 0;
}

/* =========================================
   4. Typography & Article Styles
   ========================================= */
article {
    max-width: var(--max-width-content);
    margin: 0 auto;
}

h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
    font-weight: 700;
    line-height: var(--line-height-tight);
    color: var(--color-accent); /* Dark theme specific color */
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.02em;
}

h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
    font-weight: 600;
    line-height: var(--line-height-tight);
    color: var(--color-primary);
    margin-top: var(--spacing-3xl);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 3px solid var(--color-accent);
    position: relative;
}

h2::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 60px;
    height: 3px;
    background: var(--color-primary);
}

h3 {
    font-size: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    font-weight: 600;
    line-height: var(--line-height-tight);
    color: var(--color-text);
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-md);
}

h4 {
    font-size: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
    font-weight: 600;
    color: var(--color-text-muted);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-sm);
}

p {
    margin-bottom: var(--spacing-lg);
    line-height: var(--line-height-relaxed);
}

strong {
    font-weight: 600;
    color: var(--color-accent-light); /* Dark theme specific color */
}

em {
    font-style: italic;
    color: var(--color-text-muted);
}

a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-underline-offset: 3px;
    transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

a:hover {
    color: var(--color-accent-dark);
    text-decoration-color: var(--color-primary);
}

a:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Lists */
ul, ol {
    margin-bottom: var(--spacing-lg);
    padding-left: var(--spacing-xl);
}

li {
    margin-bottom: var(--spacing-sm);
    line-height: var(--line-height-relaxed);
}

li::marker {
    color: var(--color-accent);
    font-weight: 600;
}

ul li {
    list-style-type: disc;
}

ul li::marker {
    color: var(--color-primary);
}

ol li {
    list-style-type: decimal;
}

/* Blockquotes */
blockquote {
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-lg) var(--spacing-xl);
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-bg-card) 100%);
    border-left: 4px solid var(--color-accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--color-text-muted);
    box-shadow: var(--shadow-sm);
    position: relative;
}

blockquote::before {
    content: '\201C';
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 4rem;
    font-family: var(--font-serif);
    color: var(--color-accent);
    opacity: 0.3;
    line-height: 1;
}

blockquote p {
    margin-bottom: 0;
}

/* =========================================
   5. Media & Images
   ========================================= */
figure {
    margin: var(--spacing-2xl) 0;
}

figcaption {
    margin-top: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--color-text-light);
    text-align: center;
    font-style: italic;
}

/* Hero Image Wrapper */
.hero-image {
    width: 100%;
    margin: 0 0 2.5rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg); /* Dark shadow by default */
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Article Image Wrapper */
.article-image {
    margin: 2rem 0 2.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md); /* Dark shadow by default */
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.article-image:hover img {
    transform: scale(1.02);
}

/* =========================================
   6. UI Elements (Code, Tables, HR)
   ========================================= */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), var(--color-accent), var(--color-border), transparent);
    margin: var(--spacing-3xl) 0;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--color-bg-alt);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

pre {
    background: var(--color-bg-alt);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--color-border);
}

pre code {
    background: none;
    padding: 0;
    border: none;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-xl) 0;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
}

thead {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #ffffff;
}

th {
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.02em;
}

td {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--color-border-light);
}

tbody tr {
    background: var(--color-bg-card);
    transition: background var(--transition-fast);
}

tbody tr:hover {
    background: var(--color-bg-alt);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* =========================================
   7. Navigation & Interactive Elements
   ========================================= */

/* Table of Contents */
nav[aria-label="Indice"] {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin: var(--spacing-2xl) 0;
    box-shadow: var(--shadow-md);
}

nav[aria-label="Indice"] ol {
    list-style: none;
    padding-left: 0;
    counter-reset: toc-counter;
}

nav[aria-label="Indice"] li {
    counter-increment: toc-counter;
    margin-bottom: var(--spacing-sm);
}

nav[aria-label="Indice"] li::before {
    content: counter(toc-counter) ".";
    color: var(--color-accent);
    font-weight: 600;
    margin-right: var(--spacing-sm);
}

nav[aria-label="Indice"] a {
    text-decoration: none;
    color: var(--color-text);
    transition: color var(--transition-fast), padding-left var(--transition-fast);
    display: inline-block;
}

nav[aria-label="Indice"] a:hover {
    color: var(--color-primary);
    padding-left: var(--spacing-sm);
}

/* FAQ / Details Sections */
section[itemtype="https://schema.org/FAQPage"] {
    background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    margin-top: var(--spacing-3xl);
}

details {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-normal);
}

details:hover {
    box-shadow: var(--shadow-md);
}

details[open] {
    box-shadow: var(--shadow-accent);
    border-color: var(--color-accent);
}

summary {
    padding: var(--spacing-lg);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: background var(--transition-fast), color var(--transition-fast);
}

summary:hover {
    background: var(--color-bg-alt);
    color: var(--color-primary);
}

summary:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: -2px;
}

summary::marker {
    color: var(--color-accent);
}

details > div {
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    color: var(--color-text-muted);
}

/* Warning / Note Box */
aside[role="note"] {
    background: linear-gradient(135deg, rgba(232, 193, 112, 0.1) 0%, rgba(232, 193, 112, 0.05) 100%); /* Adjusted color for dark theme */
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin: var(--spacing-2xl) 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

aside[role="note"]::before {
    content: 'Avviso';
    display: block;
    font-weight: 600;
    color: var(--color-accent-dark);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}

/* =========================================
   8. Accessibility & Responsiveness
   ========================================= */

/* Focus Styles */
*:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Text Selection */
::selection {
    background: var(--color-accent);
    color: var(--color-primary-dark);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Mobile Adjustments */
@media (max-width: 767px) {
    .hero-image {
        margin: 0 calc(-1 * var(--spacing-md)) 2rem;
        border-radius: 0;
        width: calc(100% + 2 * var(--spacing-md));
    }
    
    .article-image {
        margin: 1.5rem 0 2rem;
    }
    
    footer .footer-content {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    footer .disclaimer {
        font-size: 0.8rem;
        padding: var(--spacing-md);
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }

    header, footer {
        display: none;
    }

    main {
        max-width: 100%;
        padding: 0;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    h1, h2, h3 {
        color: black;
        page-break-after: avoid;
    }
    
    .hero-image,
    .article-image {
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .hero-image img,
    .article-image img {
        max-width: 100%;
    }

    table {
        page-break-inside: avoid;
    }
}

/* =========================================
   3. Layout Components (Header, Main, Footer)
   ========================================= */

/* Header - Sleek, minimal, semi-transparent */
header {
    background-color: rgba(13, 17, 23, 0.95);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
    backdrop-filter: blur(10px);
}

/* Nav Container */
nav {
    width: 100%;
    max-width: var(--max-width-wide);
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

/* Menu List - Removing Dots Forcefully */
nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    
    /* RESET LIST STYLES */
    list-style: none !important;       /* Force remove standard bullets */
    list-style-type: none !important;  /* Double check */
    margin: 0 !important;              /* Remove default browser margin */
    padding: 0 !important;             /* Remove default browser padding */
    
    align-items: center;
    height: 70px;
}

/* Menu Items - Removing Markers */
nav li {
    /* Ensure list items themselves don't have markers */
    list-style: none !important; 
    margin: 0;
    padding: 0;
}

/* Target the specific marker pseudo-element causing the issue in your screenshot */
nav li::marker {
    display: none !important;
    content: "" !important;
    color: transparent !important;
}

/* Menu Links - Typography focused */
nav a {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color var(--transition-normal);
    padding: 0 var(--spacing-xs);
}

/* The Animated Underline Effect */
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent-dark), var(--color-accent), var(--color-accent-dark));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition-normal);
    box-shadow: 0 -2px 10px rgba(232, 193, 112, 0.5);
}

/* Hover States */
nav a:hover,
nav a:focus {
    color: var(--color-text);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

nav a:hover::after,
nav a:focus::after {
    transform: scaleX(1);
}

/* Active State (WordPress Standard) */
nav li.current-menu-item a,
nav li.current_page_item a {
    color: var(--color-accent);
    text-shadow: 0 0 15px rgba(232, 193, 112, 0.4);
}

nav li.current-menu-item a::after,
nav li.current_page_item a::after {
    transform: scaleX(1);
    background: var(--color-accent);
}


/* =========================================
   Mobile Navigation
   ========================================= */
@media (max-width: 768px) {
    nav ul {
        height: 60px;
        gap: var(--spacing-md);
        padding: 0 var(--spacing-md) !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        width: 100%;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    nav ul::-webkit-scrollbar {
        display: none;
    }
    
    nav a {
        font-size: 0.85rem;
        white-space: nowrap;
        letter-spacing: 0.05em;
    }
}

/* Active State (WordPress Standard) */
nav li.current-menu-item a,
nav li.current_page_item a {
    color: var(--color-accent); 
    text-shadow: 0 0 15px rgba(232, 193, 112, 0.4);
}

nav li.current-menu-item a,
nav li.current_page_item a {
    color: var(--color-text-muted) !important; 
    text-shadow: none !important;
}

nav li.current-menu-item a::after,
nav li.current_page_item a::after {
    transform: scaleX(0) !important; 
    background: transparent !important;
}

nav li.current-menu-item a:hover,
nav li.current_page_item a:hover {
    color: var(--color-text) !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3) !important;
}

nav li.current-menu-item a:hover::after,
nav li.current_page_item a:hover::after {
    transform: scaleX(1) !important;
    background: linear-gradient(90deg, var(--color-accent-dark), var(--color-accent), var(--color-accent-dark)) !important;
}


nav li.current-menu-item a,
nav li.current_page_item a {
    color: var(--color-accent) !important;
    text-shadow: 0 0 12px rgba(232, 193, 112, 0.6) !important; 
}

nav li.current-menu-item a::after,
nav li.current_page_item a::after {
    transform: scaleX(1) !important;
    background: var(--color-accent) !important;
    box-shadow: 0 -2px 10px rgba(232, 193, 112, 0.5) !important;
}

/* =========================================
   MOBILE BURGER MENU STYLE
   ========================================= */
@media (max-width: 991px) { 

    .site-nav--desktop,
    .site-nav.site-nav--desktop {
        display: none !important;
    }

    .mobile-controls {
        display: block !important;
        position: absolute;
        right: 20px;
        top: 20px; 
        z-index: 2000;
    }

    .burger {
        display: block !important;
        width: 30px;
        height: 24px;
        background: transparent;
        border: none;
        cursor: pointer;
        position: relative;
        padding: 0;
        z-index: 2001;
    }

    .burger::before,
    .burger::after {
        content: '';
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: #fff; 
        transition: all 0.3s ease;
    }

    .burger::before {
        top: 0;
        box-shadow: 0 11px 0 #fff; 
    }

    .burger::after {
        bottom: 0;
    }

    .burger.is-active::before {
        top: 11px;
        transform: rotate(45deg);
        box-shadow: none;
    }
    .burger.is-active::after {
        bottom: 11px;
        transform: rotate(-45deg);
    }

    #mobile-menu {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 85%; 
        max-width: 320px;
        height: 100vh;
        background-color: var(--color-bg-alt); 
        padding: 80px 20px 40px; 
        box-shadow: 5px 0 20px rgba(0,0,0,0.5);
        z-index: 1999;
        
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        visibility: hidden; 
    }

    #mobile-menu.is-open,
    #mobile-menu.open,
    #mobile-menu.active {
        transform: translateX(0);
        visibility: visible;
    }

    #mobile-menu ul {
        flex-direction: column !important;
        align-items: flex-start !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #mobile-menu li {
        width: 100%;
        display: block;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    #mobile-menu a {
        display: block;
        padding: 15px 0;
        font-size: 16px;
        color: var(--color-text);
        text-align: left;
        width: 100%;
    }
    
    #mobile-menu a:hover {
        color: var(--color-accent);
        padding-left: 10px; 
    }

    .mobile-menu_close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        color: #fff;
        font-size: 24px;
        cursor: pointer;
    }
    
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.7);
        z-index: 1900;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s;
        pointer-events: none;
    }
    
    body.mobile-menu-open .mobile-menu-overlay,
    .mobile-menu-overlay.is-active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

.mobile-menu__close {
    display: none !important;
}

/* =========================================
   FIX: MOBILE MENU LIST ITEMS
   ========================================= */
#mobile-menu ul {
    display: flex !important;
    flex-direction: column !important; 
    height: auto !important; 
    width: 100% !important;
    overflow-y: auto !important; 
    overflow-x: hidden !important; 
    padding-bottom: 50px !important; 
}

#mobile-menu li {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important; 
}

#mobile-menu a {
    display: block !important;
    width: 100% !important;
    padding: 15px 0 !important;
    color: #ffffff !important; 
    font-size: 18px !important;
    text-align: left !important;
    white-space: normal !important; 
}

#mobile-menu li.current-menu-item a {
    color: var(--color-accent) !important; 
    font-weight: bold !important;
    border-left: 3px solid var(--color-accent);
    padding-left: 10px !important;
}

/* =========================================
   FIX: UNSTICK ARTICLE HEADERS
   ========================================= */

article header,
.cl-header,
.entry-header,
.content-title {
    position: static !important; 
    top: auto !important;
    transform: none !important;
    z-index: 1 !important; 
}

header.site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
}

/* =========================================
   FIX: CLEAN ARTICLE HEADERS (No Green Box)
   ========================================= */

article header,
.cl-header,
.entry-header,
.page-header {
    background: transparent !important;
    background-color: transparent !important;
    
    padding: 0 !important;
    margin-bottom: var(--spacing-lg) !important;
    box-shadow: none !important;
    border: none !important;

    position: static !important;
    transform: none !important;
}

article h1,
.cl-header h1 {
    color: var(--color-accent) !important; 
}

/* =========================================
   PAGE 404 STYLES (FOOTBALL THEME)
   ========================================= */

body.error404 main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh; 
    text-align: center;
    background-image: radial-gradient(circle at center, rgba(61, 122, 82, 0.2) 0%, transparent 70%); /* Легкое зеленое свечение в центре */
}

.error-404-number {
    font-family: var(--font-serif); 
    font-size: clamp(6rem, 15vw, 12rem); 
    font-weight: 800;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px var(--color-accent);
    position: relative;
    margin-bottom: var(--spacing-md);
    opacity: 0.8;
}

.error-404-number::before {
    content: '404';
    position: absolute;
    left: 4px;
    top: 4px;
    color: var(--color-accent);
    opacity: 0.1;
    filter: blur(5px);
    z-index: -1;
}

body.error404 h1.page-title,
.error-title {
    font-family: var(--font-sans);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body.error404 .page-content p,
.error-description {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
    line-height: 1.6;
}

.btn-home-404 {
    display: inline-block;
    background-color: var(--color-primary);
    color: #ffffff;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--color-primary-light);
    box-shadow: 0 4px 15px rgba(61, 122, 82, 0.4);
}

.btn-home-404:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-bg); 
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(232, 193, 112, 0.4);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.error-404-number {
    animation: float 4s ease-in-out infinite;
}

/* --- Footer Design (Dark & Gold) --- */

.site-footer {
    background-color: #121212; /* Deep dark background */
    color: #b3b3b3; /* Soft grey text */
    padding: 60px 20px 30px;
    font-family: Helvetica, Arial, sans-serif;
    border-top: 3px solid #d4af37; /* Gold top border */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 4 Column Grid Layout */
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 45px;
}

/* Headings */
.footer-heading {
    color: #ffcc00; /* Gold color */
    font-size: 19px;
    margin-bottom: 25px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Links & Lists */
.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Support both direct lists and WP menu output */
.footer-list li,
.footer-nav-container ul li {
    list-style: none;
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
}

.footer-list a {
    color: #b3b3b3;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-list a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Red Bullet Points */
.bullet-red {
    color: #e63946; /* Vibrant Red */
    margin-right: 10px;
    font-weight: bold;
}

/* Bottom Section */
.footer-divider {
    height: 1px;
    background-color: #2a2a2a;
    margin-bottom: 25px;
    width: 100%;
}

.copyright-text {
    text-align: center;
    font-size: 13px;
    color: #777;
    line-height: 1.6;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }
}

@media (max-width: 600px) {
    .footer-widgets {
        grid-template-columns: 1fr; /* 1 column on mobile */
        gap: 35px;
    }
    
    .footer-col {
        text-align: left;
    }
}
/* Исправление для мобильной версии меню */
.footer-col.menu-col ul.footer-list {
    display: block; /* Убеждаемся, что это блок, а не флекс или грид */
    width: 100%;
}

.footer-col.menu-col ul.footer-list li {
    display: block; /* Каждый пункт как блок */
    width: 100%;
    white-space: normal; /* Запрещаем перенос в одну строку */
    word-wrap: break-word; /* Переносим длинные слова */
    margin-right: 0; /* Убираем возможные отступы */
    float: none; /* Убираем возможные float */
}

/* Переопределяем возможные стили WordPress меню */
.footer-nav-container ul {
    display: block !important;
    flex-direction: column !important;
    width: 100% !important;
}

.footer-nav-container ul li {
    display: block !important;
    width: 100% !important;
    margin-right: 0 !important;
    white-space: normal !important;
}

/* Убеждаемся, что на мобильных устройствах меню вертикальное */
@media (max-width: 600px) {
    .footer-col.menu-col ul.footer-list,
    .footer-col.menu-col .footer-nav-container ul {
        display: block !important;
        flex-direction: column !important;
    }
    
    .footer-col.menu-col ul.footer-list li,
    .footer-col.menu-col .footer-nav-container ul li {
        display: block !important;
        width: 100% !important;
        white-space: normal !important;
    }
}

#crumbs {
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    text-align: center; 
}

#crumbs a {
    text-decoration: none;
    color: #0073aa; 
}

#crumbs a:hover {
    text-decoration: underline;
}

#crumbs .current {
    font-weight: bold;
    color: rgb(255, 255, 255);
}
