:root {
    /* Color Palette - Clean, Editorial, Independent Sports Focus */
    --bg-main: #f3f5f8;
    --bg-surface: #ffffff;
    --bg-header: #1e293b;
    --text-header: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent: #0284c7;
    --accent-hover: #0369a1;
    --border-color: #e2e8f0;
    --border-dark: #cbd5e1;
    --success: #16a34a;
    --focus-ring: rgba(2, 132, 199, 0.4);
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    
    /* Spacing */
    --container-max: 1200px;
    --container-narrow: 800px;
}

/* =========================================
   RESET & GLOBAL
========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover, a:focus {
    color: var(--accent-hover);
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* =========================================
   HEADER & NAVIGATION
========================================= */
.site-header {
    background-color: var(--bg-header);
    color: var(--text-header);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    color: var(--text-header);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    text-transform: lowercase;
}

.brand:hover {
    color: #bae6fd;
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-header);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-links {
    display: none; /* Hidden by default on mobile, handled by JS normally */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-header);
    flex-direction: column;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-md);
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Fallback for noscript/CSS-only basic toggle if JS adds .active to nav-links */
.nav-links.active {
    display: flex;
}

.nav-link {
    color: #e2e8f0;
    font-weight: 500;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-link:last-child {
    border-bottom: none;
}

.nav-link:hover, .nav-link:focus {
    color: #ffffff;
}

.nav-link.active {
    color: #7dd3fc;
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
    .nav-links {
        display: flex;
        flex-direction: row;
        position: static;
        width: auto;
        background-color: transparent;
        padding: 0;
        box-shadow: none;
        border-top: none;
        gap: 1.5rem;
    }
    .nav-link {
        padding: 0.5rem;
        border-bottom: none;
        font-size: 0.95rem;
    }
}

/* =========================================
   MAIN CONTENT AREA
========================================= */
.main-content {
    flex: 1;
    padding-bottom: 4rem;
}

/* Hero Section */
.hero-intro {
    background: var(--bg-surface);
    padding: 3rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.hero-intro.narrow .hero-inner {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.hero-inner {
    max-width: var(--container-max);
    margin: 0 auto;
}

.snapshot-badge {
    display: inline-block;
    background-color: #f1f5f9;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 700px;
}

@media (min-width: 768px) {
    .hero-intro {
        text-align: center;
        padding: 4rem 1.25rem;
    }
    .hero-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero-title {
        font-size: 2.75rem;
    }
}

/* =========================================
   SCHEDULE & FIXTURES
========================================= */
.schedule-section {
    padding: 2rem 1.25rem;
    max-width: var(--container-max);
    margin: 0 auto;
}

.date-header {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.date-header:first-child {
    margin-top: 0;
}

.fixtures-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .fixtures-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

.fixture-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fixture-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-dark);
}

.fixture-image-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.fixture-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.fixture-card:hover .fixture-img {
    transform: scale(1.05);
}

.team-area {
    padding: 1.25rem;
    flex: 1;
}

.group-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.team-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.team-row:last-child {
    margin-bottom: 0;
}

.flag-emoji {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    width: 24px;
    text-align: center;
}

.team-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.info-area {
    background-color: #f8fafc;
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.datetime {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.time {
    color: var(--text-primary);
    font-weight: 700;
}

.btn-preview {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(2, 132, 199, 0.2);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
}

.btn-preview:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

/* =========================================
   DECISION BOARD & MATCH PREVIEWS
========================================= */
.decision-board, .match-previews, .context-section {
    padding: 3rem 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.section-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.decision-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .decision-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.decision-item, .preview-block {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.dec-match {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.dec-group {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    background: #e0f2fe;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
}

.dec-stats {
    display: flex;
    gap: 1.5rem;
    background: var(--bg-main);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.dec-note, .preview-note {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Previews Specific */
.preview-block {
    margin-bottom: 1.5rem;
}

.preview-image-wrapper {
    width: 100%;
    height: auto;
    max-height: 400px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background-color: var(--border-color);
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-header {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.preview-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.preview-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.preview-context {
    font-size: 0.95rem;
    background: #f1f5f9;
    padding: 0.5rem 0.75rem;
    border-left: 3px solid var(--text-muted);
    margin-bottom: 1rem;
}

/* =========================================
   GROUP CONTEXT
========================================= */
.group-strip {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.group-strip-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.group-strip-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.group-strip-stats span {
    background: #f8fafc;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.group-strip-remaining {
    font-size: 0.95rem;
    color: var(--text-primary);
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

@media (min-width: 600px) {
    .group-strip-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================
   TEXT PAGES (About, Contact, Legal)
========================================= */
.text-page-section {
    padding: 3rem 0;
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.page-content p {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.page-content p strong {
    color: var(--text-primary);
}

.page-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.page-content ul {
    margin: 0 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

.page-content a {
    text-decoration: underline;
}

.editorial-image-wrapper {
    margin: 2.5rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.responsive-img {
    width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   CONTACT FORM
========================================= */
.contact-form {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.btn-submit {
    display: inline-block;
    width: 100%;
    background: var(--accent);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.875rem;
    border: none;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.btn-submit:hover, .btn-submit:focus {
    background: var(--accent-hover);
}

@media (min-width: 600px) {
    .btn-submit {
        width: auto;
        min-width: 200px;
    }
}

.form-success {
    background: #dcfce7;
    color: #166534;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid #bbf7d0;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* =========================================
   FOOTER
========================================= */
.site-footer {
    background: var(--bg-header);
    color: var(--text-muted);
    padding: 3rem 1.25rem 1.5rem;
    margin-top: auto;
}

.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: block;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.footer-domain {
    font-size: 0.85rem;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-decoration: none;
    font-size: 0.95rem;
}

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

.footer-disclaimer {
    max-width: var(--container-max);
    margin: 0 auto;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    font-size: 0.8rem;
    text-align: center;
    line-height: 1.5;
}

@media (min-width: 600px) {
    .footer-inner {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-disclaimer {
        text-align: left;
    }
}

/* =========================================
   COOKIE BANNER & MODAL
========================================= */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    padding: 1.25rem;
}

.cookie-banner-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-cookie {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid transparent;
}

.btn-cookie.primary {
    background: var(--accent);
    color: #fff;
}
.btn-cookie.primary:hover {
    background: var(--accent-hover);
}

.btn-cookie.secondary {
    background: #e2e8f0;
    color: var(--text-primary);
}
.btn-cookie.secondary:hover {
    background: #cbd5e1;
}

.btn-cookie.outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-dark);
}
.btn-cookie.outline:hover {
    background: #f1f5f9;
}

@media (min-width: 768px) {
    .cookie-banner-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .cookie-text {
        flex: 1;
        margin-right: 2rem;
    }
    .cookie-actions {
        flex-direction: row;
    }
}

.cookie-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 1rem;
}

.cookie-modal-content {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
}

.cookie-modal-content h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.pref-row {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.pref-row label {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    cursor: pointer;
}

.pref-row input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--accent);
}

.cookie-modal-content .btn-cookie.primary {
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
}