:root {
            /* Rugby-inspired color palette */
            --color-primary: #1a472a;
            --color-primary-light: #2d5a3d;
            --color-primary-dark: #0f2d1a;
            --color-accent: #c9a227;
            --color-accent-light: #dbb84a;
            --color-accent-dark: #a6841d;
            --color-surface: #fdfbf7;
            --color-surface-alt: #f5f2eb;
            --color-text: #1a1a1a;
            --color-text-muted: #5a5a5a;
            --color-text-inverse: #fdfbf7;
            --color-border: #e0dcd4;
            --color-shadow: rgba(26, 71, 42, 0.12);
            --color-overlay: rgba(26, 71, 42, 0.85);
            
            /* Typography */
            --font-heading: 'Georgia', 'Times New Roman', serif;
            --font-body: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
            --line-height-tight: 1.2;
            --line-height-normal: 1.7;
            --line-height-relaxed: 1.85;
            
            /* Spacing */
            --space-xs: 0.5rem;
            --space-sm: 1rem;
            --space-md: 1.5rem;
            --space-lg: 2.5rem;
            --space-xl: 4rem;
            --space-xxl: 6rem;
            
            /* Layout */
            --content-width: 72ch;
            --wide-width: 90ch;
            --max-width: 1400px;
            
            /* Transitions */
            --transition-fast: 150ms ease;
            --transition-normal: 250ms ease;
            --transition-slow: 400ms ease;
            
            /* Borders */
            --radius-sm: 4px;
            --radius-md: 8px;
            --radius-lg: 16px;
        }

        @media (prefers-color-scheme: dark) {
            :root {
                --color-primary: #3d8a5a;
                --color-primary-light: #4da36d;
                --color-primary-dark: #2d6b45;
                --color-accent: #dbb84a;
                --color-accent-light: #e8ca6d;
                --color-accent-dark: #c9a227;
                --color-surface: #121212;
                --color-surface-alt: #1e1e1e;
                --color-text: #e8e6e1;
                --color-text-muted: #a0a0a0;
                --color-text-inverse: #121212;
                --color-border: #333333;
                --color-shadow: rgba(0, 0, 0, 0.4);
                --color-overlay: rgba(18, 18, 18, 0.9);
            }
        }

        *, *::before, *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

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

        body {
            font-family: var(--font-body);
            font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
            line-height: var(--line-height-normal);
            color: var(--color-text);
            background-color: var(--color-surface);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* Focus styles for accessibility */
        :focus-visible {
            outline: 3px solid var(--color-accent);
            outline-offset: 3px;
        }

        ::selection {
            background-color: var(--color-primary);
            color: var(--color-text-inverse);
        }

        /* Header */
        .site-header {
            position: sticky;
            top: 0;
            z-index: 100;
            background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
            box-shadow: 0 2px 20px var(--color-shadow);
        }

        /* Navigation */
        nav {
            max-width: var(--max-width);
            margin: 0 auto;
            padding: var(--space-sm) var(--space-md);
        }

        nav a {
            color: var(--color-text-inverse);
            text-decoration: none;
            font-weight: 600;
            padding: var(--space-xs) var(--space-sm);
            border-radius: var(--radius-sm);
            transition: background-color var(--transition-fast), transform var(--transition-fast);
        }

        nav a:hover {
            background-color: rgba(255, 255, 255, 0.15);
            transform: translateY(-1px);
        }

        /* Main content area */
        main {
            max-width: var(--content-width);
            margin: 0 auto;
            padding: var(--space-xl) var(--space-md) var(--space-xxl);
        }

        /* Typography styles for article content */
        main h1 {
            font-family: var(--font-heading);
            font-size: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
            font-weight: 700;
            line-height: var(--line-height-tight);
            color: var(--color-primary-dark);
            margin-bottom: var(--space-lg);
            letter-spacing: -0.02em;
        }

        @media (prefers-color-scheme: dark) {
            main h1 {
                color: var(--color-primary-light);
            }
        }

        main h2 {
            font-family: var(--font-heading);
            font-size: clamp(1.5rem, 1.25rem + 1.25vw, 2.25rem);
            font-weight: 700;
            line-height: var(--line-height-tight);
            color: var(--color-primary);
            margin: var(--space-xl) 0 var(--space-md);
            padding-bottom: var(--space-sm);
            border-bottom: 3px solid var(--color-accent);
            letter-spacing: -0.01em;
        }

        main h3 {
            font-family: var(--font-heading);
            font-size: clamp(1.25rem, 1.1rem + 0.75vw, 1.625rem);
            font-weight: 600;
            line-height: var(--line-height-tight);
            color: var(--color-text);
            margin: var(--space-lg) 0 var(--space-sm);
        }

        main h3::before {
            content: '';
            display: inline-block;
            width: 4px;
            height: 1em;
            background-color: var(--color-accent);
            margin-right: var(--space-sm);
            vertical-align: middle;
            border-radius: 2px;
        }

        main p {
            margin-bottom: var(--space-md);
            line-height: var(--line-height-relaxed);
        }

        main strong {
            font-weight: 700;
            color: var(--color-primary-dark);
        }

        @media (prefers-color-scheme: dark) {
            main strong {
                color: var(--color-primary-light);
            }
        }

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

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

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

        /* Lists */
        main ul, main ol {
            margin: var(--space-md) 0 var(--space-lg);
            padding-left: var(--space-lg);
        }

        main li {
            margin-bottom: var(--space-xs);
            line-height: var(--line-height-relaxed);
            padding-left: var(--space-xs);
        }

        main ul li::marker {
            color: var(--color-accent);
            font-size: 1.2em;
        }

        main ol li::marker {
            color: var(--color-primary);
            font-weight: 700;
        }

        /* Blockquote */
        main blockquote {
            position: relative;
            margin: var(--space-lg) 0;
            padding: var(--space-md) var(--space-lg);
            background: linear-gradient(135deg, var(--color-surface-alt) 0%, var(--color-surface) 100%);
            border-left: 5px solid var(--color-accent);
            border-radius: 0 var(--radius-md) var(--radius-md) 0;
            font-style: italic;
            color: var(--color-text-muted);
        }

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

        main blockquote p:last-child {
            margin-bottom: 0;
        }

        /* Images */
        main figure {
            margin: var(--space-lg) 0;
        }

        main .hero-image {
            width: calc(100% + var(--space-xl));
            margin-left: calc(-1 * var(--space-md));
            margin-right: calc(-1 * var(--space-md));
            aspect-ratio: 21 / 9;
            object-fit: cover;
            border-radius: 0;
            box-shadow: 0 10px 40px var(--color-shadow);
        }

        @media (min-width: 768px) {
            main .hero-image {
                width: calc(100% + var(--space-xxl));
                margin-left: calc(-1 * var(--space-xl));
                margin-right: calc(-1 * var(--space-xl));
                border-radius: var(--radius-lg);
            }
        }

        main .article-image {
            width: 100%;
            height: auto;
            border-radius: var(--radius-md);
            box-shadow: 0 8px 30px var(--color-shadow);
            transition: transform var(--transition-slow), box-shadow var(--transition-slow);
        }

        main .article-image:hover {
            transform: scale(1.02);
            box-shadow: 0 12px 50px var(--color-shadow);
        }

        main figcaption {
            margin-top: var(--space-sm);
            font-size: 0.9em;
            color: var(--color-text-muted);
            text-align: center;
            font-style: italic;
        }

        /* Table of contents styling */
        main nav[aria-label="Table des matieres"] {
            background-color: var(--color-surface-alt);
            padding: var(--space-lg);
            border-radius: var(--radius-lg);
            margin: var(--space-lg) 0;
            border: 1px solid var(--color-border);
        }

        main nav[aria-label="Table des matieres"] ol {
            counter-reset: toc;
            list-style: none;
            padding-left: 0;
            margin: 0;
        }

        main nav[aria-label="Table des matieres"] li {
            counter-increment: toc;
            padding: var(--space-xs) 0;
            border-bottom: 1px solid var(--color-border);
        }

        main nav[aria-label="Table des matieres"] li:last-child {
            border-bottom: none;
        }

        main nav[aria-label="Table des matieres"] li::before {
            content: counter(toc) ".";
            color: var(--color-accent);
            font-weight: 700;
            margin-right: var(--space-sm);
        }

        main nav[aria-label="Table des matieres"] a {
            text-decoration: none;
            color: var(--color-text);
            transition: color var(--transition-fast), padding-left var(--transition-fast);
        }

        main nav[aria-label="Table des matieres"] a:hover {
            color: var(--color-primary);
            padding-left: var(--space-xs);
        }

        /* Horizontal rule */
        main hr {
            border: none;
            height: 3px;
            background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
            margin: var(--space-xl) 0;
            border-radius: 2px;
        }

        /* Code and preformatted text */
        main code {
            font-family: 'Consolas', 'Monaco', monospace;
            font-size: 0.9em;
            background-color: var(--color-surface-alt);
            padding: 0.2em 0.5em;
            border-radius: var(--radius-sm);
            border: 1px solid var(--color-border);
        }

        main pre {
            background-color: var(--color-primary-dark);
            color: var(--color-text-inverse);
            padding: var(--space-md);
            border-radius: var(--radius-md);
            overflow-x: auto;
            margin: var(--space-md) 0;
        }

        main pre code {
            background: none;
            border: none;
            padding: 0;
            color: inherit;
        }

        /* FAQ section styling */
        main section[itemscope][itemtype="https://schema.org/FAQPage"] h3 {
            color: var(--color-primary);
            cursor: default;
        }

        /* Accent box for important information */
        main aside {
            background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
            color: var(--color-text-inverse);
            padding: var(--space-lg);
            border-radius: var(--radius-lg);
            margin: var(--space-lg) 0;
            box-shadow: 0 8px 30px var(--color-shadow);
        }

        main aside h4 {
            color: var(--color-accent-light);
            margin-bottom: var(--space-sm);
            font-size: 1.1em;
        }

        main aside p {
            margin-bottom: 0;
            opacity: 0.95;
        }

        main aside a {
            color: var(--color-accent-light);
        }

        /* Footer */
        footer {
            background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
            color: var(--color-text-inverse);
            padding: var(--space-xl) var(--space-md);
            margin-top: var(--space-xxl);
        }

        footer a {
            color: var(--color-accent-light);
            transition: opacity var(--transition-fast);
        }

        footer a:hover {
            opacity: 0.8;
        }

        .footer-content {
            max-width: 72ch;
            margin: 0 auto;
            text-align: center;
        }

        .footer-copyright {
            margin-top: 1rem;
            opacity: 0.8;
        }

        /* Utility: Decorative rugby ball pattern */
        main::before {
            content: '';
            position: fixed;
            top: 0;
            right: 0;
            width: 300px;
            height: 300px;
            background: radial-gradient(ellipse at center, var(--color-accent) 0%, transparent 70%);
            opacity: 0.03;
            pointer-events: none;
            z-index: -1;
        }

        /* Scroll progress indicator */
        body::after {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
            transform-origin: left;
            transform: scaleX(0);
            z-index: 1000;
            animation: none;
        }

        /* Print styles */
        @media print {
            header, footer, nav {
                display: none;
            }
            
            main {
                max-width: 100%;
                padding: 0;
            }
            
            main .hero-image, main .article-image {
                max-width: 100%;
                box-shadow: none;
            }
        }

        /* Responsive adjustments */
        @media (max-width: 600px) {
            main h2 {
                margin-top: var(--space-lg);
            }
            
            main blockquote {
                padding: var(--space-sm) var(--space-md);
            }
            
            main blockquote::before {
                font-size: 2.5rem;
                top: -5px;
                left: 10px;
            }
        }

        /* 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;
            }
        }

.top-navigation-bar {
    display: flex;
    justify-content: center; 
    align-items: center;
    padding: 0 20px;
    height: 80px; 
}

.site-nav--desktop .menu-desktop {
    display: flex;
    flex-wrap: wrap;
    list-style: none; 
    margin: 0;
    padding: 0;
    gap: 30px; 
}

.site-nav--desktop .menu-desktop a {
    text-decoration: none; 
    color: #ffffff; 
    font-family: 'Segoe UI', 'Helvetica Neue', sans-serif; 
    font-size: 16px;
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    transition: all 0.3s ease; 
    position: relative;
}

.site-nav--desktop .menu-desktop a:hover {
    opacity: 0.9;
    color: #e0e0e0; 
}

.site-nav--desktop .menu-desktop a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #ffffff;
    transition: width 0.3s;
}

.site-nav--desktop .menu-desktop a:hover::after {
    width: 100%;
}

/* Hide burger on desktop by default */
.mobile-controls {
    display: none;
}

/* Show only on mobile devices (screens smaller than 992px) */
@media (max-width: 991px) {
    .mobile-controls {
        display: block;
        margin-left: auto; /* Pushes the burger to the right */
    }

    .burger {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Равномерно распределяет полоски по высоте */
    width: 30px;  /* Ширина бургера */
    height: 22px; /* Общая высота бургера */
    padding: 0;   /* Убираем отступы, чтобы точно позиционировать полоски */
    z-index: 1001;
    position: relative; /* Нужно для анимации */
    }

    /* Стили для полосок */
    .burger span {
        display: block;
        width: 100%;
        height: 2px; /* Высота одной полоски (сделал чуть тоньше для аккуратности) */
        background-color: #ffffff; /* Белый цвет */
        border-radius: 2px; /* Скругление углов */
        transition: all 0.3s ease-in-out; /* Плавная анимация */
        transform-origin: center; /* Точка вращения по центру */
    }

    /* Анимация превращения в крестик */

    /* Верхняя полоска: опускается в центр и поворачивается */
    .burger.is-active span:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }

    /* Средняя полоска: исчезает */
    .burger.is-active span:nth-child(2) {
        opacity: 0;
        transform: scale(0); /* Дополнительно уменьшаем для плавности исчезновения */
    }

    /* Нижняя полоска: поднимается в центр и поворачивается в другую сторону */
    .burger.is-active span:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden behind the right edge */
    width: 300px; /* Sidebar width */
    max-width: 85%;
    height: 100vh; /* Full viewport height */
    background-color: #ffffff; /* White background */
    z-index: 2000; /* Highest z-index to stay on top */
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    padding: 60px 20px 20px; /* Top padding to avoid overlap with close button */
    display: flex;
    flex-direction: column;
}

/* "Open" state (toggled by JS) */
.mobile-menu.is-open {
    right: 0;
}

/* Inner links styling */
.mobile-menu__inner ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu__inner ul li {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee; /* Light separator line */
}

.mobile-menu__inner ul li a {
    display: block;
    font-size: 18px;
    color: #333;
    text-decoration: none;
    padding-bottom: 10px;
    font-weight: 500;
}
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 1500; /* Below the menu, but above the site content */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* "Active" state */
.mobile-menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #333;
    line-height: 1;
}

/* =========================================
   FOOTER STYLES
   ========================================= */

.site-footer {
    /* Use dark background to match the reference style */
    background-color: #0f1210; /* Very dark green/black */
    color: #e0e0e0;
    padding: 60px 0 30px;
    font-size: 0.9rem;
    margin-top: auto; /* Pushes footer to bottom if content is short */
}

/* Center container */
.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Grid System: 4 Columns on Desktop */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 equal columns */
    gap: 40px;
    margin-bottom: 40px;
}

/* Headings Styling (Yellow/Gold) */
.footer-heading {
    color: var(--color-accent, #c9a227); /* Uses your theme variable or fallback gold */
    font-family: var(--font-heading, serif);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* List Reset */
.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: 12px;
    line-height: 1.6;
    position: relative;
    padding-left: 15px; /* Space for the custom bullet */
    color: #cccccc;
}

/* Links Styling */
.footer-list a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-list a:hover {
    color: var(--color-accent, #c9a227);
    text-decoration: underline;
}

/* Custom Red Bullets for Warning/Legal/Resources lists */
.footer-list.list-warning li::before,
.footer-list.list-danger li::before,
.footer-list.list-links li::before {
    content: "•";
    color: #d32f2f; /* Red bullet color like in reference */
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0px;
}

/* Divider Line */
.footer-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 30px 0;
}

/* Copyright Section */
.footer-bottom {
    text-align: center;
    opacity: 0.6;
    font-size: 0.85rem;
}

/* Responsive: Stack columns on Mobile */
@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr; /* 2 columns on tablets */
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr; /* 1 column on phones */
        gap: 30px;
    }
    
    .footer-heading {
        margin-bottom: 1rem;
    }
}


.mobile-controls {
    position: relative;
    z-index: 2002; 
}

.burger {
    position: relative;
    z-index: 2002;
}

.burger.is-active span {
    background-color: #0f2d1a; 
}

.mobile-menu__close {
    display: none;
}