/* ===== VARIABLES ===== */
:root {
    /* Colors */
    --primary-blue: #1e4a8d;
    --primary-blue-dark: #163a6e;
    --primary-orange: #f26a4b;
    --primary-orange-dark: #d85a3d;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a2e;
    --white: #ffffff;
    --gradient-blue: linear-gradient(135deg, #1e4a8d 0%, #2d5aa0 100%);
    --gradient-orange: linear-gradient(135deg, #f26a4b 0%, #ff8a6b 100%);

    /* Z-index hierarchy */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-tooltip: 700;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ensure PNG transparency is preserved */
img {
    background: transparent !important;
    background-color: transparent !important;
}

/* Force transparent background for all table cells and rows */
.roster-table td,
.roster-table tr,
.roster-td-player,
.roster-player-row {
    background: transparent !important;
    background-color: transparent !important;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Responsive typography using clamp() for fluid scaling */
h1 {
    font-size: clamp(1.75rem, 5vw + 0.5rem, 3rem);
    line-height: 1.2;
}
h2 {
    font-size: clamp(1.5rem, 4vw + 0.5rem, 2.5rem);
    line-height: 1.3;
}
h3 {
    font-size: clamp(1.25rem, 3vw + 0.5rem, 1.75rem);
    line-height: 1.4;
}
h4 { font-size: 1.25rem; }

p, .lead {
    font-size: clamp(0.9rem, 2vw + 0.3rem, 1.1rem);
    max-width: 65ch; /* Optimal line length for readability */
}

/* Event article pages use explicit column widths; do not narrow paragraphs to 65ch. */
.events-articles .event-block-description p,
.events-articles .event-block-description .lead,
.events-articles .event-block-description blockquote p {
    max-width: none !important;
}

@media (max-width: 768px) {
    /* Typography now uses clamp() - h1/h2/h3 rules removed */

    /* Navigation enhancements for mobile */
    .navbar-nav {
        gap: 0.8rem;
        flex-wrap: wrap; /* Allow wrapping if needed */
        justify-content: flex-start;
    }

    .navbar-nav .nav-link {
        font-size: 0.875rem; /* Smaller than desktop */
        padding: 0.5rem 1rem;
        letter-spacing: 0.8px;
    }

    .navbar-nav .nav-link.active {
        padding: 0.5rem 1rem;
    }

    .nav-link-featured {
        font-size: 0.875rem;
        padding: 0.5rem 1.25rem;
    }

    /* Mobile Header Wrapper - contains status bar + navbar + subnav */
    .mobile-header-wrapper {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1060 !important;
        background: white !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        overflow: visible !important;
    }

    .mobile-header-wrapper > * {
        margin: 0 !important;
        border: none !important;
    }

    /* Mobile header - flexbox layout: [HAMBURGER] [LOGO] [LANG-SWITCHER] */
    .navbar.fixed-top {
        position: relative !important;
        top: auto !important;
        margin-top: 0 !important;
        z-index: 10 !important;
    }

    .navbar {
        padding: 0.1rem 0 !important;
        margin: 0 !important;
        background: white !important;
        border: none !important;
        border-top: none !important;
        border-bottom: none !important;
    }

    /* Remove pseudo-elements that add extra height on mobile */
    .navbar::before,
    .navbar::after {
        content: none !important;
        display: none !important;
    }

    .navbar .container {
        display: flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        padding: 0.1rem 1rem !important;
        padding-right: 1rem !important;
        background: white !important;
    }

    .navbar-toggler {
        order: 3 !important;
        position: static !important;
        margin: 0 !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
    }

    .navbar .oversized-logo {
        order: 1 !important;
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        margin: 0 auto 0 0 !important;
        padding: 0.35rem !important;
        background: #ffffff !important;
        border: 1px solid rgba(30, 74, 141, 0.16) !important;
        border-radius: 10px !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08) !important;
        z-index: 9999 !important; /* Always on top */
    }

    .navbar .oversized-logo img,
    .navbar .oversized-logo .nav-logo {
        height: 30px !important;
        width: auto !important;
        filter: none !important; /* Remove drop shadow on mobile */
    }

    .navbar-social {
        display: none !important;
    }

    .lang-switcher {
        order: 2 !important;
        font-size: 0.75rem !important;
        margin-left: 0 !important;
        margin-right: 0.5rem !important;
        padding: 0.25rem 0 !important;
        border-left: none !important;
        position: relative !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        display: inline-flex !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        min-width: 84px !important;
        flex-shrink: 0 !important;
        align-items: center !important;
        gap: 0.25rem !important;
        z-index: 10000 !important;
        pointer-events: auto !important;
    }

    .lang-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 2rem !important;
        flex-shrink: 0 !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important;
    }

    .lang-divider {
        display: inline-flex !important;
        align-items: center !important;
        flex-shrink: 0 !important;
    }

    .lang-btn.active {
        border: 1px solid var(--primary-blue, #2b6cb0) !important;
        border-radius: 4px !important;
        padding: 0.25rem 0.5rem !important;
    }

    /* Collapsed menu goes to next row when expanded */
    .navbar-collapse {
        order: 4 !important;
        flex-basis: 100% !important;
        background: white !important;
    }

    /* Override Bootstrap's default display for proper toggling */
    .navbar-collapse:not(.show):not(.collapsing) {
        display: none !important;
    }

    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        display: flex !important;
        flex-direction: column !important;
        background: white !important;
    }

    /* Status bar - now relative inside fixed mobile-header-wrapper */
    .site-status-bar {
        position: relative !important;
        width: 100% !important;
        background: #2c4a9e !important;
        color: white !important;
        text-align: center !important;
        padding: 6px 10px !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
        height: auto !important;
        min-height: 28px !important;
        overflow: hidden !important;
        margin: 0 !important;
        border: none !important;
        border-bottom: none !important;
        box-shadow: none !important;
        top: auto !important;
        z-index: auto !important;
    }

    .site-status-text {
        display: block;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Remove excessive top padding since navbar is now relative on mobile */
    .hero {
        padding-top: 1rem !important;
    }

    /* Section padding reduction for mobile */
    .section {
        padding: 1.5rem 0;
    }

    .section-title {
        margin-bottom: 1rem !important;
    }

    .section-title h2 {
        font-size: 1.75rem;
    }

    .section-title h2::after {
        width: min(240px, 80%); /* Make underline responsive */
    }

    /* Container padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Touch-friendly buttons */
    .btn-primary-custom,
    .btn-outline-custom {
        padding: 0.75rem 1.5rem; /* Reduced from 0.875rem 2rem */
        font-size: 0.9rem;
        min-height: 44px; /* Apple/Google tap target guideline */
        min-width: 44px;
    }

    /* Make button groups stack */
    .hero-buttons,
    .btn-group {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .hero-buttons .btn,
    .hero-buttons a {
        width: 100%;
    }

    /* Calendar and standings tabs */
    .calendar-tabs,
    .standings-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .calendar-tab,
    .standings-tab {
        flex: 1;
        min-width: 100px;
        font-size: 0.875rem;
        padding: 0.6rem 1rem;
    }

    .group-selector-wrapper {
        width: 100%;
        margin-top: 0.5rem;
    }

    .group-selector {
        width: 100%;
        font-size: 0.875rem;
        padding: 0.5rem;
    }

    /* Tournament subnav - Bar 3 with horizontal scroll + arrows */
    .tournament-subnav {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        background: white !important;
        border: none !important;
        border-top: none !important;
        border-bottom: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .subnav-scroll-btn {
        flex-shrink: 0 !important;
        width: 30px !important;
        height: 40px !important;
        background: white !important;
        border: none !important;
        font-size: 18px !important;
        color: #333 !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .subnav-scroll-btn:hover {
        background: rgba(0, 0, 0, 0.05) !important;
    }

    .subnav-scroll-container {
        flex: 1 !important;
        overflow-x: auto !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        background: white !important;
    }

    .subnav-scroll-container::-webkit-scrollbar {
        display: none !important;
    }

    .subnav-list {
        display: flex !important;
        flex-wrap: nowrap !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        background: white !important;
    }

    .subnav-item {
        flex-shrink: 0 !important;
    }

    .subnav-link {
        white-space: nowrap !important;
        padding: 10px 16px !important;
        font-size: 12px !important;
        text-transform: uppercase !important;
        display: block !important;
        color: var(--text-dark) !important;
        text-decoration: none !important;
        background: transparent !important;
        font-weight: 600 !important;
        letter-spacing: 0.5px !important;
        transition: all 0.3s ease !important;
        border-radius: 20px !important;
        margin: 5px 3px !important;
        box-shadow: none !important;
        position: relative !important;
        overflow: hidden !important;
    }

    .subnav-link::before,
    .subnav-link::after {
        display: none !important;
        content: none !important;
    }

    .subnav-link:hover {
        color: var(--white) !important;
        background: var(--primary-orange) !important;
        box-shadow: none !important;
    }

    .subnav-link.active {
        color: var(--white) !important;
        background: var(--primary-blue) !important;
        box-shadow: none !important;
    }

    /* Tournament page body padding to account for fixed header */
    body.tournament-page {
        padding-top: 135px !important;
    }
}

/* ===== NAVBAR ===== */
.site-status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1060;
    background: linear-gradient(90deg, #1e4a8d 0%, #2563b8 25%, #1e4a8d 50%, #2563b8 75%, #1e4a8d 100%);
    background-size: 200% 100%;
    animation: statusGradient 4s ease infinite;
    border-bottom: 2px solid rgba(37, 99, 184, 0.3);
    padding: 0.45rem 1rem 0.25rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(30, 74, 141, 0.15);
}

@keyframes statusGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.site-status-text {
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.navbar {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    position: relative;
}

@media (min-width: 769px) {
    .navbar {
        background: var(--white);
    }
}

.navbar.fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.navbar.scrolled {
    padding: 0.75rem 0;
}

.navbar-brand img {
    height: 60px;
    transition: height 0.3s ease;
}

.navbar.scrolled .navbar-brand img {
    height: 60px;
}

.navbar-nav .nav-link {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.35rem 0.52rem;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* add gap between items for browsers supporting flex gap */
.navbar-nav {
    gap: 0.35rem;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

.navbar-collapse {
    flex-wrap: nowrap;
    position: relative;
    order: 1;
    flex-grow: 1;
    justify-content: center;
}

.navbar-social {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    order: 2;
    margin-left: 1.25rem;
    padding-left: 1.25rem;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}
.navbar-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.95;
}
.navbar-social a:hover {
    transform: translateY(-1px);
    opacity: 1;
}
.navbar-social img {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(24%) sepia(35%) saturate(1732%) hue-rotate(190deg) brightness(94%) contrast(89%);
    opacity: 1;
}

.navbar-social a:hover img {
    filter: brightness(0) saturate(100%) invert(24%) sepia(35%) saturate(1732%) hue-rotate(190deg) brightness(94%) contrast(89%);
}

.navbar-nav .nav-link:hover {
    color: var(--primary-orange);
}

/* Active nav link (pill style with background) */
.navbar-nav .nav-link.active {
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-orange);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* Featured nav link (Tournament highlight) */
.navbar-nav .nav-link.nav-link-featured {
    background: linear-gradient(135deg, var(--primary-orange) 0%, #ff8a6b 100%);
    color: var(--white);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    box-shadow: 0 3px 10px rgba(242, 106, 75, 0.25);
    border: none;
    position: relative;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.navbar-nav .nav-link.nav-link-featured:hover {
    color: var(--white);
    box-shadow: 0 4px 15px rgba(242, 106, 75, 0.4);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.nav-link-featured::after {
    display: none;
}

.navbar-nav .nav-link.nav-link-featured.active {
    background: linear-gradient(135deg, var(--primary-orange) 0%, #ff8a6b 100%);
}

.social-link {
    color: var(--primary-blue);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--primary-orange);
}

.header-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 0.5rem;
    padding-left: 0.5rem;
    border-left: 1px solid rgba(30, 74, 141, 0.15);
}

.header-social .social-link {
    font-size: 1.35rem;
    line-height: 1;
    padding: 0;
}

.social-link.social-link-youtube {
    color: #ff0033;
}

.social-link.social-link-youtube:hover {
    color: #ff4d4d;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    order: 3;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 10;
    pointer-events: auto;
}

.lang-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0;
    width: 2rem;
    text-align: center;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease;
    text-transform: uppercase;
    border-radius: 4px;
    line-height: 1;
}

.lang-btn:hover {
    color: var(--primary-orange);
}

.lang-btn.active {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.lang-divider {
    color: var(--text-light);
    font-size: 0.8rem;
    opacity: 0.4;
    width: 0.8rem;
    text-align: center;
}

/* ===== OVERSIZED LOGO (HEADER) ===== */
.navbar .container {
    padding-left: 195px; /* logo-left(2rem≈32px) + logo-width(140px) + gap(23px) */
    padding-right: 1.5rem;
    max-width: none;
    width: 100%;
    align-items: center;
}

@media (max-width: 768px) {
    .navbar .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.navbar .oversized-logo {
    position: fixed;
    left: 2rem;
    top: 1.2rem;
    transform: scale(1);
    transform-origin: top left;
    transition: transform 0.75s ease;
    will-change: transform;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: #fff !important;
    border: 1px solid #fff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    z-index: calc(var(--z-fixed) + 100) !important;
    pointer-events: auto;
}

.navbar.scrolled .oversized-logo {
    transform: scale(0.6);
}

.navbar {
    --logo-left: 2rem;
    --logo-width: 160px;
}

.navbar::before,
.navbar::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.navbar::before {
    left: 0;
    width: calc(var(--logo-left) + var(--logo-width));
    background: var(--white);
}

.navbar::after {
    left: calc(var(--logo-left) + var(--logo-width));
    width: 120px;
    background: linear-gradient(90deg, var(--white) 0%, rgba(255, 255, 255, 0) 100%);
}

.navbar > .container {
    position: relative;
    z-index: 1;
}

.nav-logo {
    height: 200px;
    width: auto;
    transition: height 0.3s ease, transform 0.3s ease;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.15));
}

.navbar-brand img.nav-logo-footer {
    height: 130px;
    filter: none;
    transform-origin: top left;
    transform: scale(1);
    transition: transform 0.75s ease;
    will-change: transform;
}

.navbar.scrolled .navbar-brand img.nav-logo-footer {
    height: 130px;
    transform: scale(1);
}

@media (max-width: 992px) {
    .navbar-brand img.nav-logo-footer {
        height: 90px;
        transform: scale(1);
    }

    .navbar.scrolled .navbar-brand img.nav-logo-footer {
        height: 90px;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .navbar.scrolled .navbar-brand img.nav-logo-footer {
        transform: scale(1);
    }
}

.navbar.scrolled .nav-logo {
    height: 200px;
    transform: none;
}

/* ===== DESKTOP NAVBAR RESPONSIVE TIERS ===== */

/* Medium desktop (≥1200px) — slightly larger nav */
@media (min-width: 1200px) {
    .navbar-nav .nav-link { font-size: 0.9rem; padding: 0.42rem 0.72rem; letter-spacing: 0.65px; }
    .navbar-nav { gap: 0.55rem; }
    .navbar-nav .nav-link.active { padding: 0.55rem 1rem; }
    .navbar-nav .nav-link.nav-link-featured { padding: 0.55rem 1rem; }
    .navbar .oversized-logo { left: 2rem; }
    .navbar { --logo-left: 2rem; }
    .navbar .container { padding-left: 210px; }
    .nav-logo { height: 210px; }
    .navbar.scrolled .nav-logo { height: 210px; }
    .header-social { gap: 1rem; }
    .navbar-social { gap: 0.7rem; }
    .navbar-social img { width: 24px; height: 24px; }
}

/* Large desktop (≥1400px) */
@media (min-width: 1400px) {
    .navbar-nav .nav-link { font-size: 1rem; padding: 0.48rem 0.9rem; letter-spacing: 0.75px; }
    .navbar-nav { gap: 0.75rem; }
    .navbar-nav .nav-link.active { padding: 0.6rem 1.2rem; }
    .navbar-nav .nav-link.nav-link-featured { padding: 0.6rem 1.2rem; }
    .navbar .oversized-logo { left: 4vw; }
    .navbar { --logo-left: 4vw; }
    .navbar .container { padding-left: calc(4vw + 180px); }
    .nav-logo { height: 220px; }
    .navbar.scrolled .nav-logo { height: 220px; }
    .header-social { gap: 1.2rem; }
    .navbar-social { gap: 0.8rem; }
    .navbar-social img { width: 24px; height: 24px; }
}

/* Extra-large desktop (≥1700px) — generous spacing like original */
@media (min-width: 1700px) {
    .navbar-nav .nav-link { font-size: 1.12rem; padding: 0.5rem 1.25rem; letter-spacing: 0.95px; }
    .navbar-nav { gap: 1rem; }
    .navbar-nav .nav-link.active { padding: 0.6rem 1.6rem; }
    .navbar-nav .nav-link.nav-link-featured { padding: 0.6rem 1.6rem; }
    .navbar .oversized-logo { left: 10vw; }
    .navbar { --logo-left: 10vw; }
    .navbar .container { padding-left: calc(10vw + 180px); }
    .nav-logo { height: 240px; }
    .navbar.scrolled .nav-logo { height: 240px; }
    .header-social { gap: 1.7rem; }
    .navbar-social { gap: 1rem; }
    .navbar-social img { width: 26px; height: 26px; }
}

/* ===== TOURNAMENT SUBNAV (Desktop) ===== */
/* Mobile header wrapper - only active on mobile, transparent container on desktop */
.mobile-header-wrapper {
    position: static;
    background: none;
}

.tournament-subnav {
    border-bottom: 1px solid rgba(0,0,0,0.08);
    position: sticky;
    top: 84px;
    z-index: 1020;
}

/* ---- Desktop subnav: fit all items, no scroll ---- */
@media (min-width: 769px) {
    .tournament-subnav .subnav-item {
        flex: 0 1 auto;
        min-width: 0;
        text-align: center;
    }
    .tournament-subnav .subnav-link {
        white-space: nowrap;
        font-size: clamp(0.5rem, 0.78vw, 0.9rem);
        padding: 0.6rem clamp(0.15rem, 0.4vw, 1.5rem);
        letter-spacing: 0;
    }
}

/* ---- Mobile subnav: horizontal scroll allowed ---- */
.subnav-scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.subnav-scroll-container::-webkit-scrollbar {
    height: 3px;
}

.subnav-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.subnav-scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 3px;
}

.subnav-list {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.subnav-item {
    flex-shrink: 0;
}

.subnav-link {
    display: block;
    padding: 0.75rem 0.5rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.subnav-link:hover {
    color: var(--primary-orange);
}

.subnav-link.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

/* Hide scroll buttons on desktop */
.subnav-scroll-btn {
    display: none;
}

/* ===== HERO / TOURNAMENT MAGAZINE STYLES ===== */
.hero {
    padding-top: 18rem; /* increased to accommodate much larger fixed logo */
}

.hero-banner {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.hero-banner a {
    display: block;
    text-decoration: none;
}

.hero-banner-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-banner a:hover .hero-banner-image {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
}

.hero-banner-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hero {
        padding-top: 1rem;
    }
    
    .hero-banner-desktop {
        display: none;
    }
    
    .hero-banner-mobile {
        display: block;
    }
    
    .section {
        padding: 1.5rem 0;
    }
    
    .section-title {
        margin-bottom: 1rem;
    }
}

.hero-tournament {
    background: linear-gradient(180deg, rgba(30,74,141,0.95) 0%, rgba(29,52,106,0.9) 100%);
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(18,22,54,0.45);
}

.tournament-hero-title {
    color: var(--white);
    font-size: 4.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.4rem;
}

.tournament-hero-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.tournament-hero-title {
    font-family: 'Playfair Display', serif;
}

.tournament-badge {
    background: rgba(242,106,75,0.95);
    box-shadow: 0 8px 30px rgba(242,106,75,0.15);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.hero-tournament::after {
    content: '';
    position: absolute;
    right: -10%;
    bottom: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.03), transparent 40%);
    transform: rotate(-15deg);
    pointer-events: none;
}

.accent-tag {
    color: var(--primary-orange);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.format-card.small {
    padding: 1rem;
    border-radius: 12px;
}

@media (max-width: 992px) {
    .tournament-hero-title { font-size: 2.4rem; }
    .hero { padding-top: 12rem; }
}


/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    background: var(--gradient-blue);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 50px 50px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    color: var(--primary-orange);
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 2vw + 0.3rem, 1.25rem);
    margin-bottom: 2rem;
}

.hero-logo {
    max-width: 350px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@media (max-width: 992px) {
    /* Hero h1 now uses base clamp() */
    .hero-logo { max-width: 250px; margin-top: 2rem; }
}

/* ===== BUTTONS ===== */
.btn-primary-custom {
    background: var(--gradient-orange);
    border: none;
    color: var(--white);
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(242, 106, 75, 0.4);
    color: var(--white);
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-outline-custom:hover {
    background: var(--white);
    color: var(--primary-blue);
}

/* ===== SECTIONS ===== */
.section {
    padding: 6rem 0;
}

.section-light {
    background: var(--bg-light);
}

.section-dark {
    background: var(--bg-dark);
    color: var(--white);
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .section-title {
        margin-bottom: 2rem;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
}

.section-title h2 {
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 4px;
    background: var(--gradient-orange);
    border-radius: 2px;
}

/* Orange underline below article H1 on all event pages */
.article-shell h1 {
    position: relative;
}
.article-shell h1::after {
    content: '';
    display: block;
    width: 240px;
    max-width: 60%;
    height: 4px;
    background: var(--gradient-orange);
    border-radius: 2px;
    margin-top: 0.55rem;
}

/* Same orange underline for event-block titles on multi-event pages */
.event-block-header h3 {
    position: relative;
}
.event-block-header h3::after {
    content: '';
    display: block;
    width: 240px;
    max-width: 60%;
    height: 4px;
    background: var(--gradient-orange);
    border-radius: 2px;
    margin-top: 0.55rem;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

/* ===== ABOUT SECTION ===== */
.about-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    height: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-10px);
}

.about-card h4 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.about-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: justify;
    hyphens: auto;
}

.about-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.about-icon i {
    font-size: 1.75rem;
    color: var(--white);
}

.about-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-dark);
}

.about-text-large,
#project .lead {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 0;
    max-width: none;
    text-align: justify;
    text-justify: inter-word;
}

@media (max-width: 768px) {
    .about-text-large,
    #project .lead {
        font-size: 1rem;
        line-height: 1.7;
        text-align: center;
        margin-top: 1.5rem;
    }
    
    #project h3 {
        text-align: center;
    }
}

.about-video-wrapper {
    max-width: 95%;
}

@media (max-width: 768px) {
    .about-video-wrapper {
        max-width: 100%;
        margin-bottom: 0;
    }
    
    .row.mb-4 {
        margin-bottom: 2rem !important;
    }
}

.about-card-mini {
    background: var(--white);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}

.about-card-mini:hover {
    transform: translateY(-5px);
}

.about-card-mini h5 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text-dark);
}

.about-card-compact {
    padding: 1rem;
    border-radius: 12px;
    height: auto !important;
}

.about-card-compact h4 {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.about-card-compact p {
    font-size: 0.75rem;
    line-height: 1.4;
    margin-bottom: 0;
}

.about-icon-sm {
    width: 40px;
    height: 40px;
    margin-bottom: 0.75rem;
}

.about-icon-sm i {
    font-size: 1rem;
}

/* ===== TOURNAMENT SECTION ===== */
.tournament-banner {
    background: var(--gradient-blue);
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    max-width: 88%; /* slightly narrower so fixed logo doesn't cover content */
    margin-left: 6rem; /* nudge right away from the logo */
}

@media (max-width: 992px) {
    .tournament-banner { max-width: 100%; margin-left: 0; }
}

.tournament-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: var(--primary-orange);
    transform: rotate(15deg);
    opacity: 0.1;
}

.tournament-content {
    padding: 3rem;
    position: relative;
    z-index: 1;
}

.tournament-badge {
    background: var(--primary-orange);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.tournament-title {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tournament-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.tournament-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tournament-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--white);
}

.tournament-info-item i {
    font-size: 1.5rem;
    color: var(--primary-orange);
}

.tournament-info-item span {
    font-size: 1rem;
}

.tournament-info-item strong {
    display: block;
    font-size: 1.1rem;
}

/* ===== SCHEDULE ===== */
.schedule-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--primary-orange);
    transition: all 0.3s ease;
}

.schedule-card:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.schedule-date {
    color: var(--primary-orange);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.schedule-title {
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ===== FORMAT CARDS ===== */
.format-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.format-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.format-label {
    color: var(--primary-orange);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 1px;
}

.format-desc {
    color: var(--text-light);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* ===== VENUE SECTION ===== */
.venue-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.venue-img {
    height: 250px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 4rem;
}

.venue-content {
    padding: 2rem;
}

/* ===== PROJECT SECTION ===== */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-blue);
    transform: translateX(-50%);
}

@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.past-events-grid .col-md-4 {
    display: flex;
}

.past-events-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.past-events-viewport {
    overflow: hidden;
    width: 100%;
    background: var(--white);
}

.past-events-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.35s ease;
    will-change: transform;
    background: var(--white);
}

.past-events-item {
    flex: 0 0 calc((100% - 3rem) / 3);
}

.past-events-card {
    min-height: 100%;
    text-align: center;
}

.past-events-card .text-muted {
    width: 100%;
    max-width: none;
    align-self: stretch;
    text-align: justify;
    text-justify: inter-word;
    hyphens: manual;
    -webkit-hyphens: manual;
    -ms-hyphens: manual;
    overflow-wrap: normal;
    word-break: normal;
    font-size: 0.875rem;
    line-height: 1.4;
}

.past-events-card h4 {
    min-height: 3lh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 0.75rem;
}

.past-events-card .timeline-date {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    background: rgba(16, 44, 94, 0.88);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.32rem 0.75rem;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.03em;
    z-index: 2;
}

.past-events-card .past-event-image-frame,
.past-events-card .past-event-image {
    height: 220px;
}
.past-events-card .past-event-image-frame {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
}
.past-events-card .past-event-image {
    width: 100%;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 0.75rem;
}

.past-events-control {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    background: rgba(30, 74, 141, 0.9);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.2s, opacity 0.2s;
}

.past-events-control:hover {
    background: var(--primary-orange);
}

.past-events-control:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* 5-column grid for events on larger screens */
@media (min-width: 992px) {
    .past-events-grid .col-lg {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

.past-event-carousel,
.past-event-image {
    margin-bottom: 1rem;
}

.past-event-carousel .carousel-inner,
.past-event-image {
    height: 220px;
    overflow: hidden;
}

.past-event-image-frame {
    height: 220px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.past-event-carousel .carousel-item {
    height: 220px;
}

.past-event-carousel .carousel-item img,
.past-event-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left top;
}

.past-event-image.past-event-image-novopolotsk,
.past-event-image.past-event-image-pinsk,
.past-event-image.past-event-image-techpark {
    object-position: center center;
}

.past-event-press-link {
    padding-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-blue);
    text-decoration: none;
    align-self: flex-start;
    text-align: left;
}

.past-event-press-link::before {
    content: '\2197';
    font-size: 0.8rem;
}

.past-event-press-link:hover {
    color: var(--primary-orange);
}

.past-event-links {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(30, 74, 141, 0.14);
    display: flex;
    justify-content: flex-start;
    gap: 1.25rem;
}

.past-event-placeholder {
    background: rgba(30, 74, 141, 0.04);
    border: 2px dashed rgba(30, 74, 141, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.past-events-grid .timeline-date {
    background: rgba(30, 74, 141, 0.08);
    color: var(--primary-blue);
    border: 1px solid rgba(30, 74, 141, 0.16);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    align-self: flex-start;
    margin-bottom: 0.75rem;
}

@media (max-width: 992px) {
    .past-events-item {
        flex: 0 0 calc((100% - 1.5rem) / 2);
    }

    .past-events-card .past-event-image-frame,
    .past-events-card .past-event-image {
        height: 220px;
    }

    .past-event-carousel .carousel-inner,
    .past-event-carousel .carousel-item,
    .past-event-image-frame,
    .past-event-image {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .past-events-carousel {
        gap: 0.4rem;
    }

    .past-events-item {
        flex: 0 0 100%;
    }

    .past-events-control {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .past-events-card .past-event-image-frame,
    .past-events-card .past-event-image {
        height: 200px;
    }

    .past-event-carousel .carousel-inner,
    .past-event-carousel .carousel-item,
    .past-event-image-frame,
    .past-event-image {
        height: 180px;
    }
}

.timeline-card .text-muted {
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

.timeline-date {
    background: var(--gradient-orange);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-block;
    margin-bottom: 1rem;
}

/* ===== MEDIA SECTION ===== */
.media-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.media-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.media-icon {
    height: 120px;
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-icon i {
    font-size: 3rem;
    color: var(--white);
}

.media-content {
    padding: 1.5rem;
}

.media-source {
    color: var(--primary-orange);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.media-title {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.media-date {
    color: var(--text-light);
    font-size: 0.875rem;
}

.media-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    transition: color 0.3s ease;
}

.media-link:hover {
    color: var(--primary-orange);
}

/* ===== PRICING ===== */
.price-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.price-card.featured {
    border: 3px solid var(--primary-orange);
}

.price-card.featured::before {
    content: 'Рекомендуем';
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--primary-orange);
    color: var(--white);
    padding: 0.25rem 2.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    transform: rotate(45deg);
}

.price-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.price-value span {
    font-size: 1.25rem;
    color: var(--text-light);
}

.price-label {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.price-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
}

.price-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--bg-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.price-features li i {
    color: var(--primary-orange);
}

/* ===== CONTACT SECTION ===== */
.contact-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.contact-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.contact-icon i {
    font-size: 2rem;
    color: var(--white);
}

.contact-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--primary-orange);
}

.contacts-section {
    padding-top: 3.2rem;
}

.contacts-block {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

.contacts-block-title {
    font-size: 1.05rem;
    margin-bottom: 0.9rem;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.contacts-doc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.contacts-doc-card {
    border: 1px solid rgba(30, 74, 141, 0.14);
    border-radius: 12px;
    padding: 0.9rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.contacts-doc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(30, 74, 141, 0.12);
}

.contacts-doc-label {
    font-weight: 600;
    font-size: 0.92rem;
}

.contacts-doc-preview {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.contacts-doc-hint {
    font-size: 0.76rem;
    color: var(--text-light);
}

.contacts-doc-card-placeholder {
    cursor: default;
    background: rgba(30, 74, 141, 0.03);
}

.contacts-doc-placeholder {
    min-height: 170px;
    border: 1px dashed rgba(30, 74, 141, 0.25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.86rem;
    color: var(--text-light);
    padding: 0.75rem;
}

.contacts-requisites p {
    margin-bottom: 0.4rem;
    line-height: 1.45;
}

.contacts-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.contacts-list li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.contacts-list i {
    color: var(--primary-blue);
}

.contacts-list a {
    color: var(--text-dark);
    text-decoration: none;
}

.contacts-list a:hover {
    color: var(--primary-orange);
}

.contacts-form .form-label {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.contacts-form-note {
    margin: 0.7rem 0 0;
    font-size: 0.82rem;
    color: var(--text-light);
}

/* ===== FOOTER ===== */
.footer {
    background: #1e4a8d;
    color: var(--white);
    padding: 0.625rem 0 0.1rem;
    position: relative;
    overflow: visible;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(242, 106, 75, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.footer .container {
    position: relative;
    z-index: 1;
}

.footer .row {
    align-items: center;
}

/* Footer main row layout */
.footer-main-row {
    display: grid;
    grid-template-columns: 1fr 1.3fr 0.8fr minmax(140px, 180px);
    align-items: center;
    gap: 0.45rem;
    padding-bottom: 0.1rem;
    overflow: visible;
}

.footer-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.footer-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.footer-logo {
    height: 120px;
    width: auto;
}

@media (max-width: 992px) {
    .footer-main-row {
        grid-template-columns: 1fr 1fr;
        gap: 1rem 2rem;
    }

    .footer-left {
    width: 100%;
    text-align: center;
        width: 100%;
        align-items: center;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .footer-right {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .footer-logo {
        height: 100px;
    }
}

@media (max-width: 768px) {
    .footer-main-row {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.5rem;
    }

    .footer-left {
        margin-bottom: 0.5rem;
    }

    .footer-logo {
        height: 100px !important;
    }

    .footer-links {
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .footer-links h5 {
        margin-bottom: 0.5rem;
        font-size: 0.75rem;
    }

    /* Quick Links in ONE horizontal row with separators */
    .footer-links.footer-nav ul {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(110px, auto)) !important;
        justify-content: center !important;
        align-items: start !important;
        gap: 0.35rem 1rem !important;
        overflow-x: visible !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0.25rem 0 !important;
        margin: 0 auto !important;
        scrollbar-width: none !important;
    }

    .footer-links.footer-nav ul::-webkit-scrollbar {
        display: none !important;
    }

    .footer-links.footer-nav li {
        white-space: normal !important;
        flex-shrink: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        border-right: none !important;
        font-size: 0.8rem !important;
        display: block !important;
        list-style: none !important;
        text-align: center !important;
    }

    .footer-links.footer-nav li:first-child {
        padding-left: 0 !important;
    }

    .footer-links.footer-nav li:last-child {
        border-right: none !important;
        padding-right: 0 !important;
    }

    /* Contact section - icons inline with text */
    .footer-links.footer-contact ul {
        padding: 0 !important;
        margin: 0 !important;
    }

    .footer-links.footer-contact li {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.2rem !important;
        margin-bottom: 0.6rem !important;
        flex-wrap: nowrap !important;
        list-style: none !important;
    }

    .footer-links.footer-contact li i {
        flex-shrink: 0 !important;
        margin-right: 0.4rem !important;
        margin-bottom: 0 !important;
        margin-left: 0 !important;
        margin-top: 0 !important;
        display: inline-block !important;
        font-size: 0.9rem !important;
    }

    .footer-links.footer-contact li a,
    .footer-links.footer-contact li span {
        display: inline !important;
        line-height: 1.3 !important;
        margin: 0 !important;
    }

    /* Hide phone number with icon on mobile */
    .footer-links.footer-contact li:has(.bi-telephone) {
        display: none !important;
    }

    .footer-links.footer-contact .footer-contact-desc {
        display: inline !important;
        margin-left: 0.3rem !important;
        font-size: 0.58rem !important;
        opacity: 0.65 !important;
        white-space: nowrap !important;
    }

    .footer-social {
        justify-content: center;
    }

    /* Make footer more compact vertically */
    .footer {
        padding: 1rem 0 0.8rem 0;
    }
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
    margin-top: 0.25rem;
}

.footer-social-inline {
    margin-top: 0.4rem;
    margin-bottom: 0.25rem;
}

.footer-social-block .footer-social {
    justify-content: flex-start;
}

.footer-social a {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.footer-social a:hover {
    background: var(--primary-orange);
    transform: translateY(-2px);
}

.footer-social a.social-link-youtube {
    background: rgba(255, 255, 255, 0.2);
}

.footer-social a.social-link-youtube:hover {
    background: #ff0033;
}

.footer-social .social-icon-disabled {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1rem;
    cursor: default;
}

.footer-links h5 {
    color: var(--primary-orange);
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links {
    align-self: start;
}

.footer-links.footer-social-block {
    align-self: start;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links.footer-nav ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, auto));
    gap: 0.2rem 1.2rem;
}

.footer-links li {
    margin-bottom: 0.2rem;
    font-size: 0.8rem;
}

.footer-links.footer-nav li {
    margin-bottom: 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-orange);
}

.footer-contact-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.footer-contact-link:hover {
    color: var(--primary-orange);
}

.footer-contact-link:active {
    transform: scale(0.98);
}

.footer-contact-desc {
    display: inline;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.45);
    margin-left: 0.3rem;
}

.footer-email-desktop {
    display: flex;
}

.footer-link-featured {
    display: inline-block;
    margin-top: 0.2rem;
    margin-left: -0.6rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--primary-orange) 0%, #ff8a6b 100%);
    color: var(--white) !important;
    font-weight: 700;
    letter-spacing: 0.6px;
}

.footer-link-featured:hover {
    color: var(--white) !important;
    box-shadow: 0 4px 12px rgba(242, 106, 75, 0.35);
}

/* Footer Partner (ASOPS) */
.footer-partner-link {
    display: block;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-partner-link:hover {
    opacity: 0.8;
}

.footer-partner-logo {
    height: 56px;
    width: auto;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 50%;
    margin: 0.2rem auto 0;
    padding-top: 0.2rem;
    padding-bottom: 0.1rem;
    text-align: center !important;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.6rem;
}

.footer-bottom p {
    margin: 0 auto !important;
    font-size: 0.6rem;
    line-height: 1.4;
    width: max-content;
    max-width: 100%;
    display: block;
    text-align: center !important;
}

@media (max-width: 992px) {
    .footer-bottom {
        width: 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 1rem 1rem 0.5rem !important;
    }

    .footer-main-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.75rem !important;
        text-align: center !important;
    }

    .footer-left {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        order: 1 !important;
    }

    .footer-logo {
        height: 80px !important;
        width: auto !important;
        margin: 0 auto !important;
    }

    .footer-links {
        width: 100% !important;
        text-align: center !important;
        order: 2 !important;
    }

    .footer-links h5 {
        margin-bottom: 0.45rem !important;
    }

    .footer-links:not(.footer-nav) ul {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.4rem !important;
    }

    .footer-links.footer-nav ul {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(120px, auto)) !important;
        justify-content: center !important;
        gap: 0.35rem 1rem !important;
    }

    .footer-links:not(.footer-nav) li {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .footer-contact-desc {
        display: block !important;
        margin-left: 0 !important;
        margin-top: 0.15rem !important;
    }

    .footer-social-block {
        order: 3 !important;
    }

    .footer-social {
        justify-content: center !important;
    }

    .footer-right {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        order: 4 !important;
    }

    .footer-partner-logo {
        height: 55px !important;
        width: auto !important;
        max-width: 160px !important;
        margin: 0 auto !important;
    }

    .footer-bottom {
        position: relative !important;
        left: auto !important;
        transform: none !important;
        bottom: auto !important;
        max-width: 100% !important;
        padding: 0.5rem 0 0 !important;
        margin-top: 0.75rem !important;
        text-align: center !important;
    }
}

.footer-bottom p {
    margin: 0;
}

@media (max-width: 992px) {
    .contacts-doc-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .contacts-block {
        padding: 1.1rem;
    }

    .contacts-doc-preview,
    .contacts-doc-placeholder {
        min-height: 0;
        height: 140px;
    }

    .contacts-block-title {
        font-size: 0.95rem;
    }

    .footer {
        padding: 0.7rem 0.8rem 0.4rem !important;
    }

    .footer-main-row {
        gap: 0.45rem !important;
    }

    .footer-links.footer-nav {
        display: none !important;
    }

    .footer-links {
        margin-bottom: 0.15rem !important;
    }

    .footer-links h5 {
        margin-bottom: 0.3rem !important;
        font-size: 0.7rem !important;
    }

    .footer-links.footer-contact ul {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        flex-wrap: nowrap !important;
        gap: 0.8rem !important;
    }

    .footer-links.footer-contact li {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.3rem !important;
        white-space: nowrap !important;
        margin-bottom: 0 !important;
    }

    .footer-links.footer-contact li i {
        margin: 0 !important;
        font-size: 0.85rem !important;
    }

    .footer-links.footer-contact li a,
    .footer-links.footer-contact li span {
        display: inline !important;
        line-height: 1.2 !important;
        margin: 0 !important;
    }

    .footer-contact-desc {
        display: none !important;
    }

    .footer-email-desktop {
        display: none !important;
    }

    .footer-social a,
    .footer-social .social-icon-disabled {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .footer-logo {
        height: 72px !important;
    }

    .footer-partner-logo {
        height: 46px !important;
        max-width: 150px !important;
    }

    .footer-bottom {
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 0.45rem !important;
        padding-top: 0.35rem !important;
    }

    .footer-bottom p {
        width: 100% !important;
        max-width: 100% !important;
        white-space: nowrap !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

    /* Make event article copy denser on mobile, similar to editorial/news layouts. */
    .event-article-section .article-shell p {
        line-height: 1.55 !important;
        text-align: justify !important;
        text-justify: inter-word !important;
        margin-bottom: 0.9rem !important;
    }
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(242, 106, 75, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    color: var(--white);
}

/* ===== DECORATIVE DOTS ===== */
.dots-pattern {
    position: absolute;
    width: 150px;
    height: 150px;
    background-image: radial-gradient(var(--primary-orange) 2px, transparent 2px);
    background-size: 15px 15px;
    opacity: 0.3;
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== HOTELS TABLE ===== */
.hotels-table {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.hotels-table table {
    width: 100%;
    margin: 0;
}

.hotels-table th {
    background: var(--primary-blue);
    color: var(--white);
    padding: 1rem;
    font-weight: 600;
}

.hotels-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--bg-light);
    vertical-align: middle;
}

.hotels-table tr:last-child td {
    border-bottom: none;
}

.hotels-table a {
    color: var(--primary-blue);
    text-decoration: none;
}

.hotels-table a:hover {
    color: var(--primary-orange);
}

/* ===== PARTNERS ===== */
.partners {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    padding: 2rem 0;
}

/* ===== STANDINGS TABS & TABLES ===== */
.standings-header {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.standings-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border: none;
    margin-bottom: -2px;
}

.group-selector-wrapper {
    padding-bottom: 0.5rem;
}

.group-selector {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    background: var(--primary-blue);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    min-width: 140px;
}

.group-selector:hover {
    background-color: var(--primary-blue-dark);
}

.group-selector:focus {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

.group-selector option {
    background: var(--white);
    color: var(--text-dark);
    padding: 0.5rem;
}

@media (max-width: 576px) {
    .standings-header {
        flex-direction: column;
        align-items: stretch;
    }

    .standings-tabs {
        order: 2;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .group-selector-wrapper {
        order: 1;
        padding-bottom: 0;
        margin-bottom: 0.5rem;
    }

    .group-selector {
        width: 100%;
    }
}

/* Standings (table) styles aligned with crosstable */
.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: var(--white);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 1px #ffffff, 0 1px 3px rgba(0, 0, 0, 0.08);
}

.standings-table thead th {
    background: #f8fafc;
    color: var(--text-light);
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    vertical-align: middle;
    font-size: 0.85rem;
}

.standings-table thead th.col-team {
    text-align: left;
}

.standings-table tbody td {
    padding: 0.75rem 0.5rem;
    border: 1px solid #e2e8f0;
    vertical-align: middle;
    text-align: center;
    font-weight: 500;
    color: var(--text-dark);
}

.standings-table tbody tr:hover {
    background-color: #f8fafc;
}

.standings-table .col-rank {
    width: 44px;
}

.standings-table .col-team {
    text-align: left;
    min-width: 260px;
}

.standings-table .col-stat {
    width: 60px;
}

.standings-table .col-goals {
    width: 90px;
}

.standings-table .col-points {
    width: 60px;
    font-weight: 700;
}

.team-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 22px;
    min-width: 0;
}

.team-name-cell {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    max-width: 100%;
}

/* Responsive team names in standings */
.team-name-cell.team-name-short {
    display: none;
}

.team-name-cell.team-name-full {
    display: inline-block;
}

.team-cell.force-short-name .team-name-cell.team-name-short {
    display: inline-block !important;
}

.team-cell.force-short-name .team-name-cell.team-name-full {
    display: none !important;
}

@media (max-width: 768px) {
    .team-name-cell.team-name-short {
        display: inline-block;
    }
    
    .team-name-cell.team-name-full {
        display: none;
    }
}

.team-mini-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 3px;
    background: var(--white);
    flex: 0 0 auto;
}

.team-mini-logo.placeholder {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    background: #e9ecef;
    border: 1px solid #dee2e6;
}

.team-mini-logo--head {
    width: 20px;
    height: 20px;
}

.standings-tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s ease;
    border: none;
    background: none;
}

.standings-tab:hover {
    color: var(--primary-blue);
}

.standings-tab.active {
    color: var(--primary-blue);
}

.standings-content {
    display: none;
    max-width: 1400px;
    margin: 0 auto;
}

.standings-content.active {
    display: block;
}

.standings-groups-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.standings-group-block {
    min-width: 0;
}

.standings-group-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.standings-group-block .standings-table .col-team {
    min-width: 130px;
    width: 1%;
}

#standings-table .standings-table .col-progress {
    width: 96px;
    min-width: 96px;
}

#standings-table .standings-table th.col-progress,
#standings-table .standings-table td.col-progress {
    padding-left: 0.3rem;
    padding-right: 0.3rem;
}

#standings-table .standings-table .progress-cells {
    gap: 0.2rem;
}

#standings-table .standings-table .progress-cell {
    width: 20px;
    height: 20px;
    font-size: 0.68rem;
}

#standings-table .standings-table th,
#standings-table .standings-table td,
#standings-crosstable .crosstable th,
#standings-crosstable .crosstable td,
#standings-crosstable .crosstable .score-pill,
#standings-table .team-name-cell,
#standings-crosstable .team-name-cell {
    white-space: nowrap;
}

#standings-crosstable .crosstable thead th:nth-child(2),
#standings-crosstable .crosstable tbody th.crosstable-team {
    width: clamp(118px, 24vw, 170px);
    min-width: 118px;
    max-width: 170px;
}

#standings-crosstable .crosstable thead th:nth-child(2) {
    padding-left: 0.5rem;
    padding-right: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#standings-crosstable .crosstable tbody th.crosstable-team {
    padding-left: 0.5rem;
    padding-right: 0.35rem;
}

@media (max-width: 768px) {
    #standings-table .team-name-cell.team-name-short,
    #standings-crosstable .team-name-cell.team-name-short {
        display: none;
    }

    #standings-table .team-name-cell.team-name-full,
    #standings-crosstable .team-name-cell.team-name-full {
        display: inline-block;
    }
}

@media (max-width: 680px) {
    #standings-table .team-name-cell.team-name-short,
    #standings-crosstable .team-name-cell.team-name-short {
        display: inline-block;
    }

    #standings-table .team-name-cell.team-name-full,
    #standings-crosstable .team-name-cell.team-name-full {
        display: none;
    }
}

/* GRID tab: use 3-letter team codes in the left TEAM column on medium screens */
@media (max-width: 1100px) {
    #standings-crosstable .team-name-cell.team-name-short {
        display: inline-block;
    }

    #standings-crosstable .team-name-cell.team-name-full {
        display: none;
    }
}

@media (max-width: 1100px) {
    .standings-groups-grid {
        grid-template-columns: 1fr;
    }

    /* Keep both crosstables side-by-side at this width */
    #standings-crosstable .standings-groups-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* GRID tab: stack only on smaller screens */
@media (max-width: 820px) {
    #standings-crosstable .standings-groups-grid {
        grid-template-columns: 1fr;
    }
}

#standings-bracket .playoff-container {
    max-width: 1020px;
    margin: 0 auto;
    padding: 8px 8px 0;
}

#standings-bracket .playoff-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 22px;
    text-align: center;
    margin-bottom: 18px;
    color: #1A3055;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#standings-bracket .bracket-section {
    margin-bottom: 12px;
}

#standings-bracket .bracket-section:last-child {
    margin-bottom: 0;
}

#standings-bracket .bracket-row {
    display: flex;
    align-items: stretch;
    justify-content: center;
    min-height: 210px;
    position: relative;
}

#standings-bracket .bracket-col {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    z-index: 1;
}

#standings-bracket .bracket-col-seeds { width: 280px; gap: 10px; padding: 4px 0; }
#standings-bracket .bracket-col-matches { width: 280px; gap: 10px; padding: 4px 0; }
#standings-bracket .bracket-col-results { width: 280px; gap: 10px; padding: 2px 0; }

#standings-bracket .bracket-col-line {
    flex: 0 0 80px;
    position: relative;
    min-width: 80px;
    max-width: 80px;
}

#standings-bracket .bracket-col-line svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#standings-bracket .bracket-col-line line {
    vector-effect: non-scaling-stroke;
    stroke-width: 2;
}

#standings-bracket .team-slot {
    background: #fff;
    border-radius: 8px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(26, 48, 85, 0.08);
    border-left: 3px solid #1A3055;
    min-height: 42px;
}

#standings-bracket .team-slot .team-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 50%;
    flex-shrink: 0;
    background: #fff;
}

#standings-bracket .team-slot.group-a { border-left-color: #3B82F6; }
#standings-bracket .team-slot.group-b { border-left-color: #E8652D; }

#standings-bracket .team-slot .seed {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 10px;
    color: #fff;
    background: #1A3055;
    border-radius: 5px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#standings-bracket .team-slot .team-name {
    font-weight: 600;
    font-size: 12px;
    color: #1A3055;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#standings-bracket .team-slot .score {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #2A4A75;
    min-width: 18px;
    text-align: center;
    display: inline-block;
}

/* Match box: groups two team-slots into a single bracket match */
#standings-bracket .match-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(26, 48, 85, 0.08);
    border-left: 3px solid #1A3055;
    overflow: hidden;
}

#standings-bracket .match-box .team-slot {
    box-shadow: none;
    border-left: none;
    border-radius: 0;
    min-height: 42px;
}

#standings-bracket .match-box .team-slot:first-child {
    border-bottom: 1px solid #E4E7ED;
}

/* WIN / LOSE flow labels on connector lines */
#standings-bracket .bracket-flow-label {
    position: absolute;
    z-index: 2;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 9px;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 3px;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

#standings-bracket .bracket-flow-label.win-label {
    top: 25%;
    background: #1A3055;
    color: #fff;
}

#standings-bracket .bracket-flow-label.lose-label {
    top: 75%;
    background: #E8652D;
    color: #fff;
}

/* Column headers: SEMI-FINALS | FINALS */
#standings-bracket .bracket-headers {
    display: grid;
    grid-template-columns: 260px 80px 260px 80px 260px;
    justify-content: center;
    margin-bottom: 4px;
}

#standings-bracket .bracket-col-header {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 11px;
    color: #E8652D;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    padding: 4px 0;
}

#standings-bracket .match-block {
    background: #fff;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 2px 10px rgba(26, 48, 85, 0.08);
    text-align: center;
    border-left: 3px solid #E8652D;
}

#standings-bracket .match-block .match-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: #E8652D;
    min-height: 0;
    white-space: pre-line;
    line-height: 1.15;
}

#standings-bracket .place-slot {
    background: #fff;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(26, 48, 85, 0.08);
    min-height: 48px;
}

#standings-bracket .place-slot .team-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 50%;
    flex-shrink: 0;
    background: #fff;
}

#standings-bracket .place-slot .medal {
    font-size: 14px;
    width: 18px;
    text-align: center;
    line-height: 1;
    flex-shrink: 0;
}

#standings-bracket .place-slot .place-num {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 15px;
    color: #1A3055;
    min-width: 18px;
}

#standings-bracket .place-slot .place-team {
    font-weight: 700;
    font-size: 12px;
    color: #2A4A75;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#standings-bracket .place-slot .trophy {
    font-size: 16px;
    flex-shrink: 0;
}

#standings-bracket .place-slot.gold { border-left: 3px solid #FFD700; }
#standings-bracket .place-slot.silver { border-left: 3px solid #C0C0C0; }
#standings-bracket .place-slot.bronze { border-left: 3px solid #CD7F32; }
#standings-bracket .place-slot.other { border-left: 3px solid #E4E7ED; }

@media (min-width: 721px) {
    #standings-bracket .bracket-row {
        display: grid;
        grid-template-columns: 260px 80px 260px 80px 260px;
        align-items: stretch;
        justify-content: center;
        column-gap: 0;
    }

    #standings-bracket .bracket-col-seeds,
    #standings-bracket .bracket-col-matches,
    #standings-bracket .bracket-col-results {
        width: 260px;
        min-width: 260px;
        max-width: 260px;
    }

    #standings-bracket .bracket-col-line {
        min-width: 80px;
        max-width: 80px;
    }

    #standings-bracket .team-slot,
    #standings-bracket .place-slot {
        min-height: 44px;
        height: 44px;
        width: 100%;
        padding-top: 6px;
        padding-bottom: 6px;
        box-sizing: border-box;
    }

    #standings-bracket .match-box .team-slot {
        height: 44px;
        min-height: 44px;
    }

    #standings-bracket .match-block {
        min-height: 52px;
        height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        width: 100%;
        padding: 4px 10px;
    }

    #standings-bracket .place-slot {
        display: grid;
        grid-template-columns: 18px 18px 20px minmax(0, 1fr) 18px;
        align-items: center;
        gap: 10px;
    }

    #standings-bracket .place-slot .medal,
    #standings-bracket .place-slot .place-num,
    #standings-bracket .place-slot .team-logo,
    #standings-bracket .place-slot .trophy {
        justify-self: center;
    }

    #standings-bracket .place-slot .place-team {
        min-width: 0;
    }

    #standings-bracket .place-slot:not(.gold):not(.silver):not(.bronze)::after {
        content: '';
        width: 18px;
        height: 1px;
        justify-self: center;
    }
}

@media (max-width: 720px) {
    /* Hide column headers on mobile */
    #standings-bracket .bracket-headers {
        display: none;
    }

    #standings-bracket .bracket-section,
    #standings-bracket .bracket-row {
        width: 100%;
    }

    #standings-bracket .bracket-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
        grid-template-rows: auto;
        column-gap: 0;
        row-gap: 0;
        min-height: auto;
        align-items: stretch;
        justify-items: stretch;
        padding: 0;
        margin: 0;
    }

    #standings-bracket .bracket-col-seeds {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 4px 0;
        margin: 0;
        justify-self: stretch;
        align-self: stretch;
    }

    #standings-bracket .bracket-col-matches {
        grid-column: 3;
        grid-row: 1;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 4px 0;
        min-width: 0;
        justify-self: stretch;
    }

    #standings-bracket .match-box {
        width: 100%;
    }

    #standings-bracket .match-box .team-slot {
        min-height: 36px;
        height: 36px;
        padding: 2px 8px;
    }

    #standings-bracket .team-slot {
        min-height: 36px;
        height: 36px;
        padding: 2px 8px;
        margin-left: 0;
        width: 100%;
        justify-self: stretch;
    }

    /* Show ONLY the first line column (between semi-finals and finals) */
    #standings-bracket .bracket-row > .bracket-col-line:nth-child(2) {
        display: block;
        grid-column: 2;
        grid-row: 1;
        flex: 0 0 44px;
        min-width: 44px;
        max-width: 44px;
        margin: 4px 0;
        overflow: visible;
    }

    #standings-bracket .bracket-row > .bracket-col-line:nth-child(4) {
        display: none;
    }

    /* WIN/LOSE labels smaller on mobile */
    #standings-bracket .bracket-flow-label {
        font-size: 7px;
        padding: 1px 4px;
    }

    /* Results are moved into a single list at the bottom on mobile */
    #standings-bracket .bracket-col-results {
        display: none;
    }

    #standings-bracket .playoff-results-mobile {
        margin-top: 16px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 0;
        margin-left: 0;
        margin-right: 0;
    }

    #standings-bracket .playoff-results-mobile .place-slot {
        width: 100%;
        min-width: 0;
    }
}

/* Crosstable specific styles */
.crosstable {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: var(--white);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 1px #ffffff, 0 1px 3px rgba(0, 0, 0, 0.08);
}

.crosstable thead th {
    background: #f8fafc;
    color: var(--text-light);
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0;
    border: 1px solid #e2e8f0;
}

.crosstable thead th:first-child {
    background: #f8fafc;
    width: 44px;
}

.crosstable thead th:nth-child(2) {
    background: #f8fafc;
    text-align: left;
    padding-left: 0.75rem;
    width: clamp(140px, 20vw, 220px);
}

.crosstable tbody tr {
    transition: background-color 0.15s ease;
}

.crosstable tbody tr:hover {
    background-color: #f8fafc;
}

.crosstable tbody th {
    background: var(--white);
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    color: var(--text-dark);
}

.crosstable tbody th:first-child {
    text-align: center;
    font-weight: 600;
    color: var(--text-light);
    width: 44px;
    background: #f8fafc;
}

.crosstable tbody td {
    padding: 0.4rem 0.3rem;
    text-align: center;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-dark);
    vertical-align: middle;
    min-width: 54px;
}

.crosstable thead th.crosstable-colhead {
    padding: 0.4rem 0.2rem;
    min-width: 54px;
    vertical-align: middle;
}

.crosstable thead th.crosstable-colhead .colhead-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 0;
}

.crosstable thead th.crosstable-colhead .team-mini-logo {
    width: 32px;
    height: 32px;
    background: transparent;
}

.crosstable thead th.crosstable-colhead .colhead-name,
.crosstable thead th.crosstable-colhead .colhead-short-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    max-width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    #standings-crosstable .crosstable thead th.crosstable-colhead .colhead-content {
        flex-direction: column;
        gap: 0.15rem;
    }

    #standings-crosstable .crosstable thead th.crosstable-colhead .colhead-short-name {
        display: block;
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
        line-height: 1;
        font-size: 0.58rem;
        letter-spacing: 0.04em;
    }
}

.crosstable tbody th.crosstable-team {
    white-space: nowrap;
    padding-left: 0.75rem;
    padding-right: 0.5rem;
    width: clamp(140px, 20vw, 220px);
    overflow: hidden;
}

/* GRID tab: always show 3-letter team names and keep TEAM column compact */
#standings-crosstable .standings-groups-grid {
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: repeat(2, max-content);
    justify-content: space-between;
    column-gap: 2.25rem;
    row-gap: 1rem;
}

#standings-crosstable .standings-group-block {
    width: max-content;
}

#standings-crosstable .crosstable {
    table-layout: auto;
    width: fit-content;
    max-width: 100%;
}

#standings-crosstable .team-name-cell.team-name-short {
    display: inline-block !important;
}

#standings-crosstable .team-name-cell.team-name-full {
    display: none !important;
}

#standings-crosstable .crosstable thead th:nth-child(2),
#standings-crosstable .crosstable tbody th.crosstable-team {
    width: clamp(74px, 9vw, 98px);
    min-width: 74px;
    max-width: 98px;
}

#standings-crosstable .crosstable tbody th.crosstable-team {
    padding-left: 0.35rem;
    padding-right: 0.25rem;
}

#standings-crosstable .crosstable .team-cell {
    gap: 0.3rem;
}

#standings-crosstable .crosstable thead th:first-child,
#standings-crosstable .crosstable tbody th:first-child {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
}

#standings-crosstable .crosstable thead th.crosstable-colhead,
#standings-crosstable .crosstable tbody td {
    width: 56px;
    min-width: 56px;
    max-width: 56px;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
}

#standings-crosstable .crosstable thead th.crosstable-colhead {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

#standings-crosstable .crosstable thead th.crosstable-colhead .team-mini-logo {
    width: 20px;
    height: 20px;
}

#standings-crosstable .crosstable thead th.crosstable-colhead .colhead-short-name {
    font-size: 0.72rem;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    line-height: 1;
}

@media (max-width: 820px) {
    #standings-crosstable .standings-groups-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    #standings-crosstable .standings-group-block {
        width: 100%;
        max-width: 540px;
    }
}

.crosstable .self-cell {
    background: #f8fafc;
    color: transparent;
    position: relative;
}

.crosstable .self-cell::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 55%;
    height: 1px;
    background: #cbd5e1;
    transform: translate(-50%, -50%) rotate(-45deg);
}

.crosstable .result-cell {
    background: var(--white);
}

.crosstable .result-cell.no-match {
    color: #cbd5e1;
    font-weight: 400;
}

/* Score pill styling */
.crosstable .score-pill {
    display: inline-block;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 40px;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.crosstable .score-win {
    background: #dcfce7;
    color: #166534;
}

.crosstable .score-loss {
    background: #fee2e2;
    color: #991b1b;
}

.crosstable .score-draw {
    background: #fef9c3;
    color: #854d0e;
}

.crosstable .score-pill:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: default;
}

/* Asterisk for OT/SO games */
.crosstable .score-ot::after {
    content: '*';
    font-size: 0.7em;
    vertical-align: super;
    margin-left: 1px;
}

/* Progress table styles */
.progress-table {
    width: max-content;
    max-width: 100%;
    display: inline-table;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: auto;
    background: var(--white);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 1px #ffffff, 0 1px 3px rgba(0, 0, 0, 0.08);
}

.progress-table thead th {
    background: #f8fafc;
    color: var(--text-light);
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
}

.progress-table thead th.col-team {
    text-align: left;
}

.progress-table thead th.col-progress {
    text-align: left;
}

.progress-table tbody td {
    padding: 0.75rem 0.5rem;
    border: 1px solid #e2e8f0;
    vertical-align: middle;
    color: var(--text-dark);
}

.progress-table tbody tr:hover {
    background-color: #f8fafc;
}

.progress-table .col-rank {
    width: 44px;
    text-align: center;
}

.progress-table .col-team {
    width: auto;
    white-space: nowrap;
}

.progress-table .col-progress {
    width: auto;
    text-align: left;
}

.progress-cells {
    display: flex;
    gap: 0.25rem;
    flex-wrap: nowrap;
    justify-content: center;
}

.progress-table .progress-cells {
    justify-content: flex-start;
}

/* Calendar (grouped by date) */
.calendar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 0;
    border-bottom: 2px solid #e0e0e0;
}

.calendar-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: -2px;
}

.calendar-tab {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: color 0.2s ease;
}

.calendar-tab:hover,
.standings-tab:hover {
    color: var(--primary-orange);
}

.calendar-tab.active {
    color: var(--primary-orange);
    border-bottom-color: var(--primary-orange);
}

.calendar-group-selector {
    min-width: 180px;
}

.calendar-layout {
    display: block;
}

.calendar-main {
    min-width: 0;
}

#match-details {
    max-width: 720px;
    margin: 0 auto;
}

.match-placeholder {
    text-align: center;
    color: var(--text-light, #718096);
    font-weight: 600;
    padding: 3rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.match-placeholder a {
    color: var(--primary-blue, #1a3a5c);
    text-decoration: underline;
}

.match-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.match-card-meta {
    font-size: 0.9rem;
    color: var(--text-light);
}

.match-card-score {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
}

.match-card-team {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.match-card-team.home {
    justify-content: flex-end;
    text-align: right;
}

.match-card-team.away {
    justify-content: flex-start;
    text-align: left;
}

.match-card-team-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 50%;
}

.match-card-score-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
    min-width: 70px;
    text-align: center;
}

.match-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.match-tab {
    flex: 1;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    border-radius: 8px;
    cursor: pointer;
}

.match-tab.active {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.match-tab-content {
    display: none;
}

.match-tab-content.active {
    display: block;
}

/* Match Preview Styles */
.match-preview {
    padding: 0;
}

.match-preview-container {
    background: linear-gradient(135deg, #1a3a5c 0%, #2c5282 100%);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.match-preview-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.05) 30%, rgba(255,255,255,0.05) 35%, transparent 35%),
        linear-gradient(-45deg, transparent 30%, rgba(255,255,255,0.05) 30%, rgba(255,255,255,0.05) 35%, transparent 35%);
    background-size: 80px 80px;
    opacity: 0.3;
    pointer-events: none;
}

.match-preview-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 2.5rem 2rem;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.preview-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.preview-team-left,
.preview-team-right {
    align-items: center;
}

.preview-team-logo-wrapper {
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.preview-team-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.preview-team-name {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    max-width: 200px;
}

.preview-vs {
    font-size: 2rem;
    font-weight: 900;
    color: rgba(255,255,255,0.6);
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    letter-spacing: 0.1em;
}

.match-preview-stats {
    padding: 2.5rem 2rem;
    background: rgba(0,0,0,0.15);
    position: relative;
    z-index: 1;
}

.preview-stats-title {
    text-align: center;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.preview-stat-row {
    display: grid;
    grid-template-columns: 120px 1fr 120px;
    align-items: center;
    gap: 2rem;
    padding: 1.25rem 2rem;
    margin-bottom: 1rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
}

.preview-stat-row:last-child {
    margin-bottom: 0;
}

.preview-stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.preview-stat-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: rgba(255,255,255,0.95);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.preview-icon {
    color: rgba(255,255,255,0.8);
    flex-shrink: 0;
}

.preview-icon-wide {
    width: 32px;
}

.preview-emoji {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.preview-emoji-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
}

@media (max-width: 768px) {
    .match-preview-header {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 1rem;
    }

    .preview-team-left,
    .preview-team-right {
        align-items: center;
    }

    .preview-team-logo-wrapper {
        width: 100px;
        height: 100px;
    }

    .preview-vs {
        font-size: 1.5rem;
    }

    .preview-stat-row {
        grid-template-columns: 80px 1fr 80px;
        gap: 1rem;
        padding: 1rem;
    }

    .preview-stat-value {
        font-size: 2rem;
    }

    .preview-stat-label {
        font-size: 0.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .match-event-row {
        grid-template-columns: 50px 32px 1fr;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    .event-team-logo-img {
        width: 28px;
        height: 28px;
    }

    .match-event-text {
        font-size: 0.85rem;
    }
}

.match-section {
    margin-bottom: 1rem;
}

.match-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.match-player-list {
    display: grid;
    gap: 0.35rem;
}

.match-player-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.match-player-number {
    font-weight: 700;
    color: var(--primary-blue);
}

.match-events-empty {
    color: var(--text-light);
    font-weight: 600;
    text-align: center;
    padding: 1rem 0;
}

.match-event-period-header {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 0 0.25rem;
    border-bottom: 2px solid var(--primary-blue);
    margin-bottom: 0.25rem;
    margin-top: 0.5rem;
}

.match-event-period-header:first-child {
    margin-top: 0;
}

.match-event-row {
    display: grid;
    grid-template-columns: 55px 28px 36px 1fr auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.match-event-time {
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 0.9rem;
    white-space: nowrap;
}

.match-event-icon-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.puck-svg {
    opacity: 0.7;
}

.match-event-team-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-team-logo-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.match-event-text {
    color: var(--text-dark);
    font-size: 0.9rem;
    min-width: 0;
}

.match-event-player {
    font-weight: 600;
    color: var(--text-dark);
}

.match-event-assists {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-top: 2px;
}

.match-event-additional {
    color: var(--text-light);
    font-size: 0.75rem;
    font-style: italic;
    margin-top: 2px;
}

.match-event-score {
    font-weight: 800;
    font-size: 0.95rem;
    color: #fff;
    background: var(--primary-blue);
    border-radius: 4px;
    padding: 0.2rem 0.6rem;
    white-space: nowrap;
    text-align: center;
    min-width: 45px;
}

/* Protocol two-column layout */
.protocol-wrapper {
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.protocol-with-stats {
    max-width: 1600px;
    margin: 0 auto;
}

.protocol-team-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-bottom: 2px solid var(--primary-blue, #1a3a5c);
}

.protocol-team-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-dark, #1a202c);
}

.protocol-team-name.home {
    justify-content: flex-start;
}

.protocol-team-name.away {
    justify-content: flex-end;
}

.protocol-team-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 50%;
    flex-shrink: 0;
}

.protocol-title {
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-light, #718096);
    text-align: center;
    white-space: nowrap;
}

.protocol-pos-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--primary-blue, #1a3a5c);
}

.protocol-pos-header > span {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
    padding: 0.45rem 0.75rem;
    text-align: center;
}

.protocol-pos-header > span:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.protocol-player-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid #e2e8f0;
}

.protocol-player-row:last-child {
    border-bottom: none;
}

.protocol-player {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.5rem;
    min-height: 46px;
}

.protocol-player.home {
    justify-content: flex-start;
    border-right: 1px solid #e2e8f0;
}

.protocol-player.away {
    justify-content: flex-end;
}

.protocol-num {
    width: 26px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary-blue, #1a3a5c);
    flex-shrink: 0;
}

.protocol-photo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #e2e8f0;
    border: 2px solid #e2e8f0;
}

.protocol-photo.no-photo {
    background: #dfe4ea;
    border-color: #cbd5e0;
}

.protocol-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark, #1a202c);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.protocol-captain {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-blue, #1a3a5c);
}

/* Referees panel */
.referees-panel {
    margin-top: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.referees-title {
    background: var(--primary-blue, #1a3a5c);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    text-align: center;
}

.referees-row {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    align-items: baseline;
}

.referees-row:last-child {
    border-bottom: none;
}

.referees-pos {
    font-size: 0.85rem;
    color: var(--text-light, #718096);
    white-space: nowrap;
    min-width: 160px;
}

.referees-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark, #1a202c);
}

/* Print protocol button */
.print-protocol-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem auto 0;
    padding: 0.6rem 1.5rem;
    background: none;
    border: 1px solid var(--primary-blue, #1a3a5c);
    border-radius: 6px;
    color: var(--primary-blue, #1a3a5c);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.print-protocol-btn:hover {
    background: var(--primary-blue, #1a3a5c);
    color: #fff;
}

/* Protocol with statistics */
.protocol-with-stats .protocol-stats-header {
    display: grid;
    grid-template-columns: 2.5fr 1.4fr 0.5fr 1.4fr 2.5fr;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    text-align: center;
}

.protocol-stats-header > div:nth-child(1),
.protocol-stats-header > div:nth-child(2) {
    background: var(--primary-blue, #1a3a5c);
    padding: 0.5rem 0;
}

.protocol-stats-header > div:nth-child(4),
.protocol-stats-header > div:nth-child(5) {
    background: var(--primary-blue, #1a3a5c);
    padding: 0.5rem 0;
}

.stats-divider {
    background: transparent;
    width: 100%;
    height: 100%;
}

.protocol-stats-header .stats-left,
.protocol-stats-header .stats-right {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
}

.protocol-stats-header .stats-left {
    justify-content: flex-start;
    gap: 0.5rem;
}

.protocol-stats-header .stats-left span:first-child {
    width: 26px;
}

.protocol-stats-header .stats-right {
    justify-content: flex-end;
    gap: 0.5rem;
}

.protocol-stats-header .stats-right span:last-child {
    width: 26px;
}

.protocol-stats-header .stats-player-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 0.75rem;
    gap: 0.5rem;
}

.protocol-stats-header .stats-player-right span:last-child {
    width: 26px;
    text-align: center;
}

.protocol-stats-header .stats-center {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.protocol-stats-header .stats-center span {
    width: 25%;
}

.protocol-stats-row {
    display: grid;
    grid-template-columns: 2.5fr 1.4fr 0.5fr 1.4fr 2.5fr;
    border-bottom: 1px solid #e2e8f0;
    min-height: 42px;
}

.protocol-stats-row > div:nth-child(3) {
    background: transparent;
}

.protocol-stats-row:last-child {
    border-bottom: none;
}

.protocol-stats-row:hover {
    background: #f8fafc;
}

.stats-player-left,
.stats-player-right {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

.stats-player-left {
    justify-content: flex-start;
    gap: 0.5rem;
}

.stats-player-right {
    justify-content: flex-end;
    gap: 0.5rem;
}

.stats-player-left .player-num,
.stats-player-right .player-num {
    width: 26px;
    text-align: center;
    font-weight: 700;
    color: var(--primary-blue, #1a3a5c);
    flex-shrink: 0;
}

.stats-player-left .player-name,
.stats-player-right .player-name {
    font-weight: 600;
    color: var(--text-dark, #1a202c);
    flex: 1;
    min-width: 0;
}

.stats-player-right .player-name {
    text-align: right;
}

.stats-values-left,
.stats-values-right {
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 0.8rem;
    padding: 0.4rem 0.25rem;
}

.stats-values-left span,
.stats-values-right span {
    width: 25%;
    text-align: center;
    color: var(--text-dark, #1a202c);
    font-weight: 600;
}

.stats-values-left span:not(:contains('—')),
.stats-values-right span:not(:contains('—')) {
    color: var(--primary-blue, #1a3a5c);
    font-weight: 700;
}

/* Position group headers */
.protocol-position-header {
    display: grid;
    grid-template-columns: 3.7fr 0.5fr 3.7fr;
    background: #f0f4f8;
    border-top: 2px solid #cbd5e0;
    border-bottom: 1px solid #cbd5e0;
    padding: 0.6rem 0.75rem;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-dark, #1a202c);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.position-name-left {
    text-align: left;
    padding-left: 0.75rem;
}

.position-name-right {
    text-align: right;
    padding-right: 0.75rem;
}

.position-spacer {
    background: transparent;
}

@media (max-width: 600px) {
    .referees-pos {
        min-width: auto;
        font-size: 0.75rem;
    }
    .referees-name {
        font-size: 0.75rem;
    }
    
    .protocol-stats-header,
    .protocol-stats-row {
        font-size: 0.7rem;
    }
    
    .stats-player-left .player-name,
    .stats-player-right .player-name {
        font-size: 0.75rem;
    }
}

/* Team Roster View */
.roster-container {
    min-height: 300px;
}

.roster-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    color: var(--primary-blue, #1a3a5c);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.4rem 0;
    margin-bottom: 1rem;
    transition: opacity 0.2s;
}

.roster-back-btn:hover {
    opacity: 0.7;
}

.roster-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.roster-header-info {
    flex: 1;
}

.roster-team-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.roster-team-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark, #1a202c);
    margin: 0 0 0.5rem 0;
}

.roster-counts {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.roster-count-item {
    font-size: 0.9rem;
    color: var(--text-light, #718096);
}

/* Team description */
.roster-description {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: #f7fafc;
    border-left: 4px solid var(--primary-blue, #2b6cb0);
    border-radius: 4px;
}

.roster-description p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-dark, #2d3748);
}

/* Roster tabs */
.roster-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.roster-tab {
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-light, #718096);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.roster-tab:hover {
    color: var(--primary-blue, #1a3a5c);
}

.roster-tab.active {
    color: var(--primary-blue, #1a3a5c);
    border-bottom-color: var(--primary-blue, #1a3a5c);
}

.roster-tab-content {
    display: none;
}

.roster-tab-content.active {
    display: block;
}

/* Roster table */
.roster-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    min-width: 860px;
}

.roster-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.roster-table thead {
    background: var(--primary-blue, #1a3a5c);
}

.roster-table th {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.6rem 0.75rem;
    text-align: center;
    white-space: nowrap;
    border: none;
}

.roster-th-num { width: 40px; }
.roster-th-pos { width: 70px; }
.roster-th-player { min-width: 220px; text-align: left; }
.roster-th-stat { text-align: center; }
.roster-th-date { min-width: 100px; }
.roster-th-age { min-width: 80px; }

.roster-table td {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    background: #fff !important;
    background-color: #fff !important;
}

.roster-table tbody {
    background: #fff !important;
    background-color: #fff !important;
}

.roster-table tbody tr {
    background: #fff !important;
    background-color: #fff !important;
}

.roster-table tbody tr:last-child td {
    border-bottom: none;
}

.roster-table tbody tr:hover {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
}

.roster-table tbody tr:hover td {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
}

.roster-td-num {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-blue, #1a3a5c);
    text-align: center;
}

.roster-td-pos {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--primary-blue, #1a3a5c);
    text-align: center;
}

.roster-td-player {
    text-align: left;
}

.roster-td-stat {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-dark, #1a202c);
}

.roster-player-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.roster-player-photo-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: transparent !important;
    background-color: transparent !important;
    border: 2px solid #e2e8f0;
}

.roster-player-photo-wrap.no-photo {
    background: #f0f4f8 !important;
    background-color: #f0f4f8 !important;
}

.roster-player-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: white !important;
    background-color: white !important;
    mix-blend-mode: multiply;
}

.roster-player-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark, #1a202c);
}

.roster-empty {
    text-align: center;
    color: var(--text-light, #718096);
    padding: 2rem;
}

/* Roster staff grid */
.roster-staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.roster-staff-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.roster-staff-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.roster-staff-photo-wrap {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    background: transparent !important;
    background-color: transparent !important;
    border: 3px solid #e2e8f0;
}

.roster-staff-photo-wrap.no-photo {
    background: #f0f4f8 !important;
    background-color: #f0f4f8 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.roster-staff-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: white !important;
    background-color: white !important;
    mix-blend-mode: multiply;
}

.roster-staff-photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
}

.roster-staff-info {
    margin-top: 1rem;
}

.roster-staff-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark, #1a202c);
    margin-bottom: 0.25rem;
}

.roster-staff-role {
    font-size: 0.85rem;
    color: var(--text-light, #718096);
}

.team-card[data-team-id] {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.team-card[data-team-id]:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

.team-card[data-team-id] .team-info::after {
    content: '→';
    display: block;
    font-size: 1.1rem;
    color: var(--primary-blue, #1a3a5c);
    opacity: 0.45;
    margin-top: 0.4rem;
    transition: opacity 0.15s, transform 0.15s;
}

.team-card[data-team-id]:hover .team-info::after {
    opacity: 0.9;
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .team-card[data-team-id] .team-info::after {
        display: none;
    }
}

@media (max-width: 600px) {
    .roster-table th,
    .roster-table td {
        padding: 0.3rem 0.4rem;
    }
    .roster-player-photo-wrap {
        width: 40px;
        height: 40px;
    }
    .roster-player-name {
        font-size: 0.8rem;
    }
    .roster-team-logo {
        width: 48px;
        height: 48px;
    }
    .roster-team-name {
        font-size: 1rem;
    }
    .roster-th-num { width: 30px; }
    .roster-th-pos { width: 50px; }
}

@media (max-width: 600px) {
    .protocol-team-header {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    .protocol-title {
        display: none;
    }
    .protocol-team-name {
        font-size: 0.75rem;
    }
    .protocol-player {
        gap: 0.2rem;
        padding: 0.3rem 0.25rem;
        min-height: 38px;
    }
    .protocol-photo {
        width: 26px;
        height: 26px;
    }
    .protocol-name {
        font-size: 0.75rem;
    }
    .protocol-num {
        width: 20px;
        font-size: 0.75rem;
    }
}

#joinsport-cup-calendar {
    max-width: 860px;
    margin: 0 auto;
}

#joinsport-cup-calendar.calendar-loading {
    position: relative;
    min-height: 180px;
}

.calendar-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    border: 1px dashed #e2e8f0;
    border-radius: 8px;
    color: var(--text-light);
    background: var(--white);
}

.calendar-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(30, 58, 138, 0.15);
    border-top-color: var(--primary-blue);
    animation: calendarSpin 0.9s linear infinite;
}

.calendar-loader-text {
    font-weight: 600;
    color: var(--text-dark);
}

@keyframes calendarSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.table-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 0.5rem;
    color: var(--text-light);
}

.calendar-group {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: visible;
    margin-bottom: 1rem;
    position: relative;
}

.calendar-date {
    background: #f1f5f9;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.65rem 1rem;
    text-transform: uppercase;
}

/* Wrapper holds row + stream links */
.calendar-row-wrapper {
    display: flex;
    flex-direction: column;
    border-top: 1px solid #e2e8f0;
    position: relative;
}

.calendar-row-wrapper:hover .calendar-row {
    background: #f8fafc;
}

.calendar-row {
    display: grid;
    grid-template-columns: 72px minmax(150px, 1fr) 26px 64px 26px minmax(150px, 1fr) 150px;
    align-items: center;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
    gap: 0.65rem;
    width: 100%;
}

.calendar-row:hover {
    background: #f8fafc;
}

.calendar-row.is-active {
    background: #eef2ff;
    border-left: 3px solid var(--primary-blue);
}

.calendar-row--tours .calendar-left {
    width: 110px;
}

.calendar-row--tours .calendar-round {
    display: none;
}

.calendar-left {
    display: flex;
    align-items: center;
    min-width: 0;
}

.calendar-time {
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.calendar-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.calendar-teams {
    display: grid;
    grid-template-columns: 26px 1fr auto 1fr 26px;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 280px;
}

.calendar-team {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-weight: 600;
    color: var(--text-dark);
    text-align: left;
    min-width: 0;
}

.calendar-team--home {
    justify-content: flex-end;
    text-align: right;
}

.calendar-team--away {
    justify-content: flex-start;
    text-align: left;
}

/* Responsive team names */
.calendar-team-name {
    display: inline-block;
    white-space: nowrap;
}

.team-name-full {
    display: inline;
}

.team-name-abbr {
    display: none;
}

/* Show abbreviations on mobile/small screens */
@media (max-width: 768px) {
    .team-name-full {
        display: none;
    }
    
    .team-name-abbr {
        display: inline;
    }
}

/* Also use abbreviations on medium screens if needed */
@media (min-width: 769px) and (max-width: 992px) {
    .calendar-teams {
        min-width: 240px;
    }
    
    /* Optionally switch to abbreviations on medium screens too */
    .team-name-full {
        font-size: 0.9rem;
    }
}

.calendar-team-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    border-radius: 50%;
    background: transparent;
    display: block;
}

.calendar-team-logo-placeholder {
    width: 26px;
    height: 26px;
    display: block;
}

.calendar-score {
    font-weight: 700;
    color: var(--text-dark);
    min-width: 54px;
    text-align: center;
}

.calendar-stream-links {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    background: transparent;
    border-top: 0;
}

.calendar-stream-links:empty {
    display: none;
}

.stream-link {
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
    padding: 0.16rem 0.34rem;
    border-radius: 3px;
    font-size: 0.56rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s ease;
    border: none;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.stream-link--youtube {
    background: #FF0000;
    color: white;
}

.stream-link--youtube:hover {
    background: #CC0000;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

.stream-link--vk {
    background: #0077FF;
    color: white;
}

.stream-link--vk:hover {
    background: #0066DD;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 119, 255, 0.3);
}

.stream-icon {
    display: inline-flex;
    align-items: center;
}

.stream-live {
    display: inline-block;
    padding: 2px 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    font-weight: 700;
    letter-spacing: 0.5px;
    animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.stream-lang {
    font-size: 0.62rem;
    opacity: 0.9;
}

.calendar-round {
    display: none;
}

.calendar-empty {
    padding: 0.75rem 1rem;
    border: 1px dashed #e2e8f0;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .match-card-team.home,
    .match-card-team.away {
        justify-content: center;
        text-align: center;
    }

    .calendar-row {
        grid-template-columns: minmax(0, 1fr) 20px 46px 20px minmax(0, 1fr);
        gap: 0.45rem;
        padding: 0.65rem 0.75rem;
    }

    .calendar-left {
        display: none;
    }

    .calendar-score {
        justify-self: center;
        text-align: center;
    }

    .calendar-stream-links {
        grid-column: 1 / -1;
        justify-content: center;
        margin-top: 0.35rem;
    }

    .calendar-team-name {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .calendar-round {
        text-align: left;
    }

    .back-to-top {
        width: 44px;
        height: 44px;
        right: 14px;
        bottom: 14px;
        z-index: 1100;
    }
}

.progress-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--white);
}

.progress-win {
    background: #28a745;
}

.progress-loss {
    background: #dc3545;
}

.progress-draw {
    background: #ffc107;
    color: #333;
}

/* ===== TOURNAMENT GALLERY ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.gallery-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(22, 58, 110, 0.10);
    border: 1px solid rgba(30, 74, 141, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(22, 58, 110, 0.16);
}

.gallery-thumb {
    width: 100%;
    height: 160px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .gallery-thumb {
        height: 260px;
    }
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(1.1) contrast(1.05);
}

.gallery-card:not([data-gallery-images]) .gallery-thumb img {
    object-fit: cover;
    padding: 0;
    filter: none;
}

.gallery-info {
    padding: 0.5rem 0.75rem 0.6rem;
}

.gallery-match {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.15rem;
    text-align: center;
    line-height: 1.3;
}

.gallery-divider {
    color: var(--text-light);
}

.gallery-date {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.gallery-card[data-gallery-images] .gallery-thumb {
    position: relative;
}

.gallery-card[data-gallery-images] .gallery-thumb::after {
    content: '\F1C5';
    font-family: 'bootstrap-icons';
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.gallery-card[data-gallery-images]:hover .gallery-thumb::after {
    opacity: 1;
}

/* lightGallery: raise above fixed header and hide site chrome */
.lg-backdrop {
    z-index: 10010 !important;
}
.lg-outer {
    z-index: 10020 !important;
}
body.lg-on .site-status-bar,
body.lg-on .mobile-header-wrapper,
body.lg-on #mainNav,
body.lg-on #tournamentSubnav {
    display: none !important;
}

@media (min-width: 769px) {
    html.lg-lock-scroll,
    body.lg-lock-scroll,
    body.lg-on {
        overflow: hidden !important;
        overflow-y: hidden !important;
        height: 100% !important;
    }

    body.lg-lock-scroll .lg-outer {
        overflow-y: hidden !important;
        scrollbar-width: none !important;
    }

    body.lg-lock-scroll .lg-outer::-webkit-scrollbar,
    html.lg-lock-scroll::-webkit-scrollbar,
    body.lg-lock-scroll::-webkit-scrollbar {
        width: 0 !important;
        height: 0 !important;
    }
}

/* Keep full image proportions in LightGallery on desktop and mobile. */
.lg-outer .lg-item .lg-img-wrap,
.lg-outer .lg-thumb-item {
    background: #000 !important;
}

.lg-outer .lg-thumb-item {
    width: 126px !important;
    height: 82px !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.lg-outer .lg-thumb-item.active,
.lg-outer .lg-thumb-item.lg-thumb-active {
    border-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5) !important;
}

.lg-outer .lg-thumb-item.lg-thumb-portrait {
    width: 62px !important;
    height: 82px !important;
}

.lg-outer .lg-thumb-item.lg-thumb-square {
    width: 82px !important;
    height: 82px !important;
}

.lg-outer .lg-item .lg-object,
.lg-outer .lg-item .lg-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
}

.lg-outer .lg-thumb-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #000 !important;
}

@media (max-width: 768px) {
    .lg-outer .lg-thumb-item {
        width: 98px !important;
        height: 64px !important;
    }

    .lg-outer .lg-thumb-item.lg-thumb-portrait {
        width: 48px !important;
        height: 64px !important;
    }

    .lg-outer .lg-thumb-item.lg-thumb-square {
        width: 64px !important;
        height: 64px !important;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .crosstable {
        font-size: 0.7rem;
        border-radius: 6px;
    }

    .crosstable th,
    .crosstable td {
        padding: 0.4rem 0.2rem;
    }

    .crosstable thead th.crosstable-colhead .team-mini-logo {
        width: 16px;
        height: 16px;
    }

    .crosstable thead th.crosstable-colhead .colhead-name {
        font-size: 0.55rem;
        max-width: 40px;
    }

    .crosstable tbody td {
        padding: 0.25rem 0.1rem;
    }

    .crosstable .score-pill {
        padding: 0.2rem 0.3rem;
        font-size: 0.65rem;
        min-width: 32px;
    }

    .crosstable tbody th.crosstable-team {
        font-size: 0.7rem;
        padding-left: 0.3rem;
        padding-right: 0.3rem;
        min-width: 118px;
    }

    .standings-table {
        font-size: 0.8rem;
    }

    .standings-table thead th,
    .standings-table tbody td {
        padding: 0.5rem 0.25rem;
    }

    .standings-table .col-team {
        min-width: 180px;
    }

    #standings-table .table-responsive {
        overflow-x: hidden;
    }

    #standings-table .standings-table {
        table-layout: fixed;
        width: 100%;
        font-size: 0.74rem;
    }

    #standings-table .standings-table thead th,
    #standings-table .standings-table tbody td {
        padding: 0.42rem 0.18rem;
    }

    #standings-table .standings-table .col-rank {
        width: 26px;
        min-width: 26px;
    }

    #standings-table .standings-table .col-team {
        width: 34%;
        min-width: 84px;
        max-width: 104px;
    }

    #standings-table .standings-table .col-stat {
        width: 28px;
        min-width: 28px;
    }

    #standings-table .standings-table .col-goals {
        width: 46px;
        min-width: 46px;
    }

    #standings-table .standings-table .col-points {
        width: 34px;
        min-width: 34px;
    }

    #standings-table .standings-table .col-progress {
        width: 62px;
        min-width: 62px;
    }

    #standings-table .standings-table .team-cell {
        gap: 0.3rem;
    }

    #standings-table .standings-table .team-mini-logo {
        width: 14px;
        height: 14px;
    }

    #standings-table .standings-table .progress-cells {
        gap: 0.12rem;
    }

    #standings-table .standings-table .progress-cell {
        width: 16px;
        height: 16px;
        font-size: 0.58rem;
        border-radius: 3px;
    }

    /* Table responsive wrapper with scroll indicator */
    .table-responsive {
        position: relative;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Sticky first column for tables */
    .standings-table th:first-child,
    .standings-table td:first-child {
        position: sticky;
        left: 0;
        background: inherit;
        z-index: 1;
        box-shadow: 2px 0 4px rgba(0,0,0,0.1);
    }

    .standings-table tbody tr:nth-child(even) td:first-child {
        background: var(--bg-light);
    }

    /* The standings TABLE (not the grid) doesn't scroll horizontally on mobile,
       so a sticky first column creates an unnecessary shadow overlay and can
       visually "break" the TEAM header/cells. */
    #standings-table .standings-table th:first-child,
    #standings-table .standings-table td:first-child {
        position: static;
        left: auto;
        z-index: auto;
        box-shadow: none;
    }

    .standings-table tbody tr:nth-child(odd) td:first-child {
        background: var(--white);
    }

    .standings-tab {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .progress-cell {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }

    .progress-table {
        font-size: 0.8rem;
    }

    .progress-table thead th,
    .progress-table tbody td {
        padding: 0.5rem 0.25rem;
    }

    .progress-table .col-team {
        min-width: 200px;
    }
}

@media (max-width: 680px) {
    /* On phones we render 3-letter team codes: keep TEAM column content-sized */
    #standings-table .standings-table .col-team {
        /* Let TEAM take the remaining width after fixed columns to avoid
           collapsing the header/cells (which visually "breaks" the column). */
        width: calc(100% - 26px - 28px - 28px - 28px - 46px - 34px - 62px);
        min-width: 92px;
        max-width: none;
    }
}

/* Tournament Info Box Styling */
.tournament-info-box {
    position: relative;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(30, 74, 141, 0.03) 0%, rgba(242, 106, 75, 0.03) 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary-orange);
}

.tournament-info-box::before {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 80px;
    height: 80px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23f26a4b" opacity="0.1"><circle cx="12" cy="12" r="10"/></svg>') no-repeat;
    background-size: contain;
    pointer-events: none;
}

.tournament-details {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.tournament-details p {
    color: var(--text-dark);
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.tournament-details i {
    color: var(--primary-orange);
    font-size: 1.2rem;
}

#tournament-main .row.g-3 > [class*="col-"] {
    display: flex;
}

#tournament-main .format-item-new {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 1rem 1rem 0.9rem;
    border-left: 3px solid var(--primary-blue);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(30, 74, 141, 0.03) 0%, rgba(242, 106, 75, 0.03) 100%);
    box-shadow: 0 2px 10px rgba(26, 48, 85, 0.08);
    transition: none;
}

#tournament-main .format-item-new .format-label-new {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    line-height: 1.2;
}

#tournament-main .format-item-new .format-value-new {
    line-height: 1.05;
    margin-bottom: 0.45rem;
}

#tournament-main .format-item-new .format-desc-new {
    font-size: 0.96rem;
    line-height: 1.35;
}

/* ===== PARTNERS SECTION ===== */
#tournament-partners {
    overflow: hidden;
}

.partners-list {
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Align by bottom of emblems */
    gap: 4rem;
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.partners-subsection {
    margin-bottom: 2rem;
}

.partners-subheader {
    text-align: center;
    color: var(--dark-blue);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.partners-divider {
    border: none;
    border-top: 2px solid var(--primary-orange);
    width: 80%;
    margin: 3rem auto;
    opacity: 0.3;
}

/* Tournament partners (second row) - balanced visual weight */
.partners-subsection:last-child .partners-list {
    align-items: center;
}

.partners-subsection:last-child .partner-item {
    align-items: center;
}

.partners-subsection:last-child .partner-logo {
    width: auto !important;
    height: 65px !important;
    max-width: 200px;
}

/* Individual partner logo adjustments for visual balance */
.partners-subsection:last-child .partner-logo.partner-logo--dnc {
    height: 120px !important;
}

.partners-subsection:last-child .partner-logo--dk {
    height: 154px !important;
    max-width: none;
}

.partners-subsection:last-child .partner-logo--asops {
    height: 94px !important;
}

.partners-subsection:last-child .partner-logo--mega {
    height: 42px !important;
}

.partners-subsection:last-child .partner-logo--graver {
    height: 50px !important;
}

.partner-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-item a {
    display: inline-block;
    line-height: 0;
    cursor: pointer;
    opacity: 1 !important;
    text-decoration: none;
}

.partner-item-with-text a {
    flex-direction: column;
    gap: 1rem;
}

.partner-item a:hover {
    opacity: 1 !important;
}

/* All logos use rem for consistent scaling */
.partner-logo {
    display: block;
    width: auto !important;
    max-width: 100%;
    margin: 0;
    padding: 0;
    object-fit: contain;
    filter: none !important;
    cursor: pointer;
    transition: none !important;
    pointer-events: auto;
    opacity: 1 !important;
    height: 6.6875rem !important;
}

/* Target emblem height adjustments for visual alignment
   Belarus: shield with text below needs more height
   Russia: compact eagle design
   Slovakia: shield with text to the side */

.partner-logo--belarus {
    height: 8.75rem !important;
    margin-bottom: -2.1875rem !important;
}

.partner-logo--russia {
    height: 6.5625rem !important;
    transform: translateY(-0.1875rem);
}

.partner-logo--slovakia {
    height: 6.55375rem !important;
    transform: translateY(0.125rem);
}

.partner-text {
    margin: 0;
    padding: 0.5rem 0 0 0;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.5;
    max-width: 500px;
}

@media (max-width: 1400px) {
    .partners-list {
        gap: 3rem;
        max-width: 1200px;
    }

    .partner-logo {
        height: 100px !important;
    }

    .partner-logo--belarus {
        height: 119px !important;
        margin-bottom: -30px !important;
    }

    .partner-logo--russia {
        height: 94px !important;
    }

    .partner-logo--slovakia {
        height: 97px !important;
    }

    .partner-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 1200px) {
    .partners-list {
        gap: 2.5rem;
    }

    .partner-logo {
        height: 88px !important;
    }

    .partner-logo--belarus {
        height: 105px !important;
        margin-bottom: -26px !important;
    }

    .partner-logo--russia {
        height: 83px !important;
    }

    .partner-logo--slovakia {
        height: 85px !important;
    }

    .partner-text {
        font-size: 1.05rem;
    }
}

@media (max-width: 992px) {
    .partners-list {
        gap: 2rem;
    }

    .partner-logo {
        height: 76px !important;
    }

    .partner-logo--belarus {
        height: 91px !important;
        margin-bottom: -23px !important;
    }

    .partner-logo--russia {
        height: 72px !important;
    }

    .partner-logo--slovakia {
        height: 74px !important;
    }

    .partner-text {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .partners-list {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
        padding: 2rem 1rem;
    }

    .partner-item {
        flex: 0 0 auto;
    }

    .partner-logo {
        height: 100px !important;
    }

    .partner-logo--belarus {
        height: 120px !important;
        margin-bottom: 0 !important;
    }

    .partner-logo--russia {
        height: 94px !important;
    }

    .partner-logo--slovakia {
        height: 98px !important;
    }

    .partner-text {
        font-size: 1.05rem;
        max-width: 420px;
    }
}


/* ===== SMALL MOBILE (480px and below) ===== */
@media (max-width: 480px) {
    /* Section spacing */
    .section {
        padding: 2rem 0;
    }

    /* Navigation */
    .navbar-nav {
        gap: 0.5rem;
    }

    .nav-link {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }

    .navbar .oversized-logo img,
    .navbar .oversized-logo .nav-logo {
        height: 28px !important; /* Slightly smaller for very small screens */
    }

    /* Container */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .about-card-mini {
        margin-bottom: 1rem;
    }

    .about-icon-sm {
        font-size: 2rem;
    }

    /* Format grid */
    .format-value-new {
        font-size: 1.75rem;
    }

    .format-label-new {
        font-size: 0.875rem;
    }

    /* Calendar tabs */
    .calendar-tab,
    .standings-tab {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
}

/* ===== EXTRA SMALL MOBILE (375px and below - iPhone SE, small devices) ===== */
@media (max-width: 375px) {
    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    /* Navigation */
    .navbar-nav { gap: 0.5rem; }
    
    .nav-link {
        padding: 0.5rem 0.8rem;
        font-size: 0.875rem;
    }

    /* Buttons */
    .btn-primary-custom,
    .btn-outline-custom {
        padding: 0.6rem 1.2rem;
        font-size: 0.875rem;
    }

    /* Section spacing */
    .section { padding: 2rem 0; }

    /* Container */
    .container { padding: 0 0.75rem; }

    /* Tables */
    .standings-table .col-team { min-width: 120px; }

    .standings-table th,
    .standings-table td {
        padding: 0.4rem;
        font-size: 0.65rem;
    }

    .crosstable {
        font-size: 0.6rem;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
/* Disable problematic hover transforms on touch devices, add active states */
@media (hover: none) and (pointer: coarse) {
    .media-card:hover,
    .about-card:hover,
    .about-card-mini:hover,
    .team-card:hover,
    .btn-primary-custom:hover,
    .btn-outline-custom:hover {
        transform: none; /* Disable hover lift on touch devices */
    }

    /* Keep active state for touch feedback */
    .media-card:active,
    .about-card:active,
    .about-card-mini:active,
    .team-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    .btn-primary-custom:active {
        transform: scale(0.97);
    }

    .btn-outline-custom:active {
        transform: scale(0.97);
    }
}

/* ===== MOBILE LANGUAGE SWITCHER FIX (end of file for highest precedence) ===== */
@media (max-width: 768px) {
    .lang-switcher,
    .navbar .lang-switcher,
    .navbar .container .lang-switcher,
    body .lang-switcher {
        position: relative !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        margin-left: auto !important;
        margin-right: 0.5rem !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.25rem !important;
        pointer-events: auto !important;
        z-index: 10000 !important;
        border-left: none !important;
        padding-left: 0 !important;
    }

    .lang-switcher .lang-btn,
    .navbar .lang-switcher .lang-btn {
        pointer-events: auto !important;
        cursor: pointer !important;
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important;
    }
}

/* ===== PLAYER STATISTICS SECTION ===== */
.statistics-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

/* ===== STATISTICS TABS (ROUNDS) ===== */
.statistics-tabs {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 0;
    list-style: none;
}

.statistics-tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s ease;
    border: none;
    background: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.statistics-tab:hover {
    color: var(--primary-blue);
}

.statistics-tab.active {
    color: var(--primary-blue);
}

/* ===== POSITION TABS ===== */
.position-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.position-tab {
    padding: 0.875rem 2rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.position-tab:hover {
    color: var(--text-dark);
    border-bottom-color: #dee2e6;
}

.position-tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-orange);
}

/* ===== ROSTER GRID ===== */
.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.player-stat-card {
    background: var(--gradient-blue);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.player-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.player-stat-header {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.player-number {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-blue);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.player-team-logo {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    padding: 4px;
}

.player-team-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.player-photo {
    width: 120px;
    height: 180px;
    object-fit: cover;
    object-position: center top;
}

.player-stat-info {
    padding: 1rem;
    background: var(--white);
    color: var(--text-dark);
}

.player-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    min-height: 2.4em;
    line-height: 1.2;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}

.player-stats-row {
    display: flex;
    justify-content: space-around;
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.statistics-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .statistics-grid,
    .roster-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .statistics-tabs {
        gap: 0.5rem;
        padding: 0.25rem;
    }

    .statistics-tab {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .position-tabs {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .position-tab {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }

    .player-stat-header {
        height: 180px;
    }

    .player-photo {
        width: 100px;
        height: 160px;
    }

    .player-name {
        font-size: 0.85rem;
    }

    .stat-value {
        font-size: 1.1rem;
    }
}

/* ========================================
   Statistics Split Layout - Awards & Scorers
   ======================================== */

.statistics-split-layout {
    display: flex;
    gap: 20px;
    margin-top: 2rem;
    align-items: stretch;
}

.awards-carousel-container {
    flex: 0 0 24%;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.scorers-table-container {
    flex: 1 1 auto;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.awards-carousel-container h3,
.scorers-table-container h3 {
    background: #f8fafc;
    color: var(--primary-blue);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem;
    margin: 0;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.awards-carousel-container h3::after,
.scorers-table-container h3::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -1px;
    transform: translateX(-50%);
    width: 72px;
    height: 3px;
    border-radius: 999px;
    background: #e85d3a;
}

@media (max-width: 900px) {
    .statistics-split-layout {
        flex-direction: column;
    }

    .awards-carousel-container,
    .scorers-table-container {
        flex: 1 1 auto;
    }

    .scorers-tables-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Carousel Navigation */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 1rem 0 1.25rem;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d4dce4;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: #1a3050;
    transform: scale(1.3);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(26, 48, 80, 0.7);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(26, 48, 80, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.carousel-prev {
    left: 10px;
}

.carousel-btn.carousel-next {
    right: 10px;
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
}

/* Awards Carousel */
.awards-carousel {
    position: relative;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #f8fafb;
}

.awards-carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
}

.award-slide {
    min-width: 100%;
    flex: 0 0 100%;
    padding: 1.75rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.award-photo-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 1.25rem;
}

.award-player-photo {
    width: 200px;
    height: 280px;
    object-fit: cover;
    object-position: center top;
    border-radius: 8px;
    border: 1px solid #d7dde6;
    box-shadow: 0 2px 8px rgba(26, 48, 80, 0.1);
}

.award-team-logo-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px;
    border: 1px solid #d7dde6;
    box-shadow: 0 2px 6px rgba(26, 48, 80, 0.14);
}

.award-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a3050;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.25;
}

.award-player-meta {
    font-size: 1.08rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.35;
}

/* Scorers Table */
.scorers-tables-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    flex: 1;
}

.scorers-table-wrap {
    overflow: visible;
    border-right: 1px solid #e2e8f0;
}

.scorers-table-wrap:last-child {
    border-right: none;
}

.scorers-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: var(--white);
    font-size: 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 0;
    overflow: hidden;
}

.scorers-table thead {
    background: #f8fafc;
    color: var(--text-light);
}

.scorers-table th {
    padding: 8px;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.66rem;
    letter-spacing: 0.3px;
    white-space: normal;
    line-height: 1.15;
    border-bottom: 1px solid #e2e8f0;
}

/* Column widths for proper distribution */
.scorers-table th:nth-child(1),
.scorers-table td:nth-child(1) {
    width: 8%;
}

.scorers-table th:nth-child(2),
.scorers-table td:nth-child(2) {
    width: 10%;
}

.scorers-table th:nth-child(3),
.scorers-table td:nth-child(3) {
    width: 40%;
}

.scorers-table th:nth-child(4),
.scorers-table td:nth-child(4) {
    width: 14%;
}

.scorers-table th:nth-child(5),
.scorers-table td:nth-child(5) {
    width: 8%;
}

.scorers-table th:nth-child(6),
.scorers-table td:nth-child(6) {
    width: 18%;
}

.scorers-table tbody tr {
    transition: background-color 0.15s ease;
    background-color: var(--white);
}

.scorers-table tbody tr:hover {
    background-color: #f8fafc;
}

.scorers-table td {
    padding: 8px;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
}

.scorers-table tbody tr:last-child td {
    border-bottom: none;
}

.scorer-rank {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.9rem;
    text-align: center;
    width: 30px;
}

/* Emphasise top 3 ranks */
.scorers-table tbody tr:nth-child(1) .scorer-rank,
.scorers-table tbody tr:nth-child(2) .scorer-rank,
.scorers-table tbody tr:nth-child(3) .scorer-rank {
    color: var(--primary-blue);
    font-weight: 800;
}

.scorer-photo-cell {
    width: 40px;
    text-align: center;
}

.scorer-photo {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 50%;
    display: inline-block;
}

.scorer-photo-placeholder {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: var(--primary-blue);
}

.scorer-name {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.85rem;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scorer-team-cell {
    text-align: center;
    width: 35px;
}

.scorer-team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
}

.scorer-games {
    text-align: center;
    font-size: 0.85rem;
    width: 30px;
    color: #495057;
}

.scorer-goals {
    text-align: center;
    font-weight: 400;
    color: #495057;
    font-size: 0.85rem;
    width: 35px;
    background: transparent;
}

/* Mobile responsiveness for table */
@media (max-width: 900px) {
    .scorers-table th,
    .scorers-table td {
        padding: 6px 4px;
        font-size: 0.75rem;
    }

    .scorer-rank {
        font-size: 0.8rem;
    }

    .scorer-photo,
    .scorer-photo-placeholder {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }

    .scorer-team-logo {
        width: 20px;
        height: 20px;
        height: 28px;
    }

    .award-player-photo {
        width: 160px;
        height: 224px;
    }

    .award-title {
        font-size: 1.25rem;
    }

    .award-player-name {
        font-size: 1.125rem;
    }
}

@media (max-width: 768px) {
    .scorers-tables-grid {
        grid-template-columns: 1fr;
    }

    .scorers-table-wrap:last-child {
        display: none;
    }

    .scorers-table-wrap {
        border-right: none;
    }
}

/* ========================================
   Tournament Bracket - Clean Grid Layout
   ======================================== */

.bracket-grid {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(200px, 260px) minmax(140px, 180px);
    gap: 30px;
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-radius: 12px;
    overflow-x: auto;
    position: relative;
}

/* Column Base Styles */
.bracket-col {
    display: flex;
    flex-direction: column;
    position: relative;
}

.bracket-col-header {
    font-size: 0.9rem;
    font-weight: 700;
    color: #FF6B35;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 0.65rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid #FF6B35;
}

/* Semi-finals Column */
.bracket-group {
    margin-bottom: 1.25rem;
}

.bracket-group--upper {
    margin-bottom: 1.75rem;
}

.bracket-pair {
    position: relative;
    margin-bottom: 1rem;
    padding-right: 30px; /* Space for right connector */
}

.bracket-slot {
    background: #fff;
    border: 2px solid #1e3a5f;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 2px;
    font-weight: 500;
    font-size: 0.85rem;
    color: #1e3a5f;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bracket-slot-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Horizontal line from slot going RIGHT to vertical bracket */
.bracket-slot::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 2px;
    background: #1e3a5f;
}

/* Vertical bracket line on the RIGHT side connecting both slots */
.bracket-pair::before {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: calc(100% - 6px);
    background: #1e3a5f;
}

/* Horizontal line from bracket midpoint going RIGHT toward finals */
.bracket-pair::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 2px;
    background: #1e3a5f;
}

/* Finals Column */
.bracket-finals-group--upper {
    margin-bottom: 1.75rem;
}

.bracket-final-box {
    background: #fff;
    border: 2px solid #1e3a5f;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    position: relative;
}

/* Horizontal connector from finals to places (right side) */
.bracket-final-box::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 2px;
    background: #1e3a5f;
}

.bracket-final-box--gold {
    border-color: #FFD700;
    border-width: 3px;
}

.bracket-final-box--gold::after {
    background: #FFD700;
}

.bracket-final-box--bronze {
    border-color: #CD7F32;
    border-width: 3px;
}

.bracket-final-box--bronze::after {
    background: #CD7F32;
}

.bracket-final-label {
    background: #1e3a5f;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    padding: 0.35rem 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bracket-final-box--gold .bracket-final-label {
    background: #FFD700;
    color: #1e3a5f;
}

.bracket-final-box--bronze .bracket-final-label {
    background: #CD7F32;
    color: #fff;
}

.bracket-final-teams {
    padding: 0.5rem;
}

.bracket-final-team {
    background: #f8fafc;
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: #1e3a5f;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bracket-final-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.bracket-final-vs {
    text-align: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #FF6B35;
    padding: 0.2rem 0;
    text-transform: uppercase;
}

/* Places Column */
.bracket-places-group--upper {
    margin-bottom: 1.25rem;
}

.bracket-place {
    background: #fff;
    border: 2px solid #1e3a5f;
    border-radius: 6px;
    padding: 0.4rem 0.65rem;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
}

/* Horizontal connector from finals to place (left side) */
.bracket-place::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 2px;
    background: #1e3a5f;
}

.bracket-place--1 {
    border-color: #FFD700;
    background: linear-gradient(135deg, #FFF9E6, #fff);
}

.bracket-place--1::before {
    background: #FFD700;
}

.bracket-place--2 {
    border-color: #C0C0C0;
    background: linear-gradient(135deg, #F5F5F5, #fff);
}

.bracket-place--2::before {
    background: #C0C0C0;
}

.bracket-place--3 {
    border-color: #CD7F32;
    background: linear-gradient(135deg, #FFF4E6, #fff);
}

.bracket-place--3::before {
    background: #CD7F32;
}

.bracket-place-icon {
    font-size: 1.2rem;
}

.bracket-place-num {
    font-weight: 700;
    font-size: 1rem;
    color: #1e3a5f;
    min-width: 20px;
}

.bracket-place-team {
    flex: 1;
    font-weight: 500;
    font-size: 0.85rem;
    color: #1e3a5f;
}

/* Responsive */
@media (max-width: 900px) {
    .bracket-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }
    
    .bracket-pair {
        padding-right: 0;
    }
    
    .bracket-slot::after,
    .bracket-pair::before,
    .bracket-pair::after,
    .bracket-final-box::after,
    .bracket-place::before {
        display: none;
    }
    
    .bracket-col {
        max-width: 400px;
        margin: 0 auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .bracket-grid {
        padding: 0.75rem;
    }
    
    .bracket-slot,
    .bracket-final-team,
    .bracket-place {
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem;
    }
    
    .bracket-col-header {
        font-size: 0.85rem;
    }
    
    .bracket-slot-logo,
    .bracket-final-logo {
        width: 20px;
        height: 20px;
    }
}

/* Keep old class names for JS compatibility - hidden */
.bracket-wrapper,
.bracket-column,
.bracket-column-title,
.bracket-team-box,
.bracket-matchup-box,
.bracket-place-box {
    display: none !important;
}

/* Hide header socials only on touch devices to preserve mobile header stability. */
@media (hover: none) and (pointer: coarse) {
    .navbar-social,
    .header-social {
        display: none !important;
    }
}

/* Fallback for desktop emulation/mobile-width browsers: hide header socials by viewport width. */
@media (max-width: 1024px) {
    .mobile-header-wrapper .navbar-social,
    .mobile-header-wrapper .header-social,
    .navbar-social,
    .header-social {
        display: none !important;
    }
}

/* Final hard override: keep header social icon blocks disabled in navbar layouts. */
html body .mobile-header-wrapper .navbar-social,
html body .mobile-header-wrapper .header-social,
html body nav .navbar-social,
html body nav .header-social {
    display: none !important;
}

/* Safari iPhone fallback: keep mobile header layout even with Desktop Website viewport */
@supports (-webkit-touch-callout: none) {
    @media (hover: none) and (pointer: coarse) and (max-width: 1024px) {
        .mobile-header-wrapper {
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            z-index: 1060 !important;
            background: #fff !important;
        }

        .mobile-header-wrapper .navbar-social,
        .mobile-header-wrapper .header-social {
            display: none !important;
        }

        .mobile-header-wrapper .navbar .container {
            display: flex !important;
            align-items: center !important;
            flex-wrap: wrap !important;
            gap: 4px !important;
            padding-left: 1rem !important;
            padding-right: 1rem !important;
            background: #fff !important;
        }

        .mobile-header-wrapper .navbar-toggler {
            order: 3 !important;
            margin: 0 !important;
            flex-shrink: 0 !important;
        }

        .mobile-header-wrapper .navbar .oversized-logo {
            order: 1 !important;
            position: relative !important;
            left: auto !important;
            top: auto !important;
            transform: none !important;
            margin: 0 auto 0 0 !important;
            padding: 0.35rem !important;
            background: #ffffff !important;
            border: 1px solid rgba(30, 74, 141, 0.16) !important;
            border-radius: 10px !important;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08) !important;
        }

        .mobile-header-wrapper .navbar .oversized-logo img,
        .mobile-header-wrapper .navbar .oversized-logo .nav-logo {
            height: 30px !important;
            width: auto !important;
            filter: none !important;
        }

        .mobile-header-wrapper .lang-switcher {
            order: 2 !important;
            margin-left: 0 !important;
            margin-right: 0.5rem !important;
            padding: 0.25rem 0 !important;
            border-left: none !important;
            display: inline-flex !important;
            flex-wrap: nowrap !important;
            white-space: nowrap !important;
            min-width: 84px !important;
            flex-shrink: 0 !important;
        }

        .mobile-header-wrapper .lang-switcher .lang-btn {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            min-width: 2rem !important;
            flex-shrink: 0 !important;
        }

        .mobile-header-wrapper .lang-switcher .lang-divider {
            display: inline-flex !important;
            align-items: center !important;
            flex-shrink: 0 !important;
        }
    }
}

/* Unified typography: use one font family site-wide. */
:root {
    --site-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
div,
a,
li,
dt,
dd,
td,
th,
button,
input,
select,
textarea,
label,
small,
strong,
em,
blockquote,
figcaption {
    font-family: var(--site-font-family) !important;
}

/* ===== CONTACTS PAGE (contacts.html) ===== */
.contacts-page-section {
    padding-top: 9rem;
    padding-bottom: 5rem;
}

.contacts-page-intro {
    max-width: 720px;
    margin: 0.6rem auto 2.6rem;
    text-align: center;
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.55;
}

.contacts-page-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 1.6rem;
    align-items: start;
}

.contacts-page-grid--equal {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
}

.contacts-page-grid + .contacts-page-grid {
    margin-top: 1.6rem;
    grid-template-columns: 0.95fr 1.05fr;
}

.contacts-page-docs-row {
    margin-top: 1.6rem;
}

.contacts-page-docs-grid--wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem;
}

.contacts-page-docs-grid--wide .contacts-page-doc {
    flex-direction: row;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
}

.contacts-page-docs-grid--wide .contacts-page-doc__preview {
    width: 140px;
    height: 180px;
    flex-shrink: 0;
}

.contacts-page-docs-grid--wide .contacts-page-doc-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
    gap: 0.6rem;
}

.contacts-page-subsection + .contacts-page-subsection {
    margin-top: 1.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(30, 74, 141, 0.08);
}

.contacts-page-subsection__title {
    margin: 0 0 0.9rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.contacts-page-subsection__title::before {
    content: '';
    width: 22px;
    height: 2px;
    background: var(--primary-orange);
    border-radius: 2px;
}

.contacts-page-card {
    position: relative;
    background: var(--white);
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(30, 74, 141, 0.08);
    padding: 1.8rem 1.8rem 1.7rem;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.contacts-page-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-orange) 100%);
    opacity: 0.9;
}

.contacts-page-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 50px rgba(30, 74, 141, 0.12);
}

.contacts-page-card__header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.2rem;
}

.contacts-page-card__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(30, 74, 141, 0.08);
    color: var(--primary-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.contacts-page-card__title {
    margin: 0;
    color: var(--primary-blue);
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

/* Info card (phones, email, address, socials) */
.contacts-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.contacts-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.contacts-info-item:hover {
    background: rgba(30, 74, 141, 0.04);
}

.contacts-info-item i {
    color: var(--primary-orange);
    font-size: 1.05rem;
    line-height: 1.4;
    flex-shrink: 0;
    margin-top: 2px;
}

.contacts-info-item__label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.15rem;
}

.contacts-info-item__value,
.contacts-info-item a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.contacts-info-item a:hover {
    color: var(--primary-orange);
}

.contacts-info-socials {
    margin-top: 1.2rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(30, 74, 141, 0.08);
}

.contacts-info-socials__label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.7rem;
}

.contacts-info-socials__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.contacts-info-socials__list a {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(30, 74, 141, 0.06);
    color: var(--primary-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.contacts-info-socials__list a:hover {
    background: var(--primary-orange);
    color: var(--white);
    transform: translateY(-2px);
}

/* Requisites card */
.contacts-requisites-list {
    display: grid;
    gap: 0.55rem;
}

.contacts-requisites-row {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 0.6rem;
    align-items: baseline;
    padding: 0.55rem 0;
    border-bottom: 1px dashed rgba(30, 74, 141, 0.1);
}

.contacts-requisites-row:last-child {
    border-bottom: none;
}

.contacts-requisites-row__label {
    font-size: 0.74rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contacts-requisites-row__value {
    color: var(--text-dark);
    line-height: 1.45;
    word-break: break-word;
}

.contacts-requisites-row__value code {
    font-family: 'Inter', sans-serif;
    background: rgba(30, 74, 141, 0.06);
    color: var(--primary-blue);
    padding: 0.1rem 0.45rem;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
}

/* Documents card */
.contacts-page-docs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.contacts-page-doc {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    border: 1px solid rgba(30, 74, 141, 0.14);
    border-radius: 14px;
    padding: 0.9rem;
    color: var(--text-dark);
    text-decoration: none;
    background: rgba(30, 74, 141, 0.015);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.contacts-page-doc:hover {
    transform: translateY(-2px);
    border-color: rgba(30, 74, 141, 0.28);
    box-shadow: 0 10px 24px rgba(30, 74, 141, 0.1);
    color: var(--text-dark);
}

.contacts-page-doc__label {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--primary-blue);
}

.contacts-page-doc__preview {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.contacts-page-doc__hint {
    font-size: 0.78rem;
    color: var(--primary-orange);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: auto;
}

.contacts-page-doc--placeholder {
    cursor: default;
    background: repeating-linear-gradient(135deg,
        rgba(30, 74, 141, 0.02) 0 10px,
        rgba(30, 74, 141, 0.05) 10px 20px);
}

.contacts-page-doc--placeholder:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(30, 74, 141, 0.14);
}

.contacts-page-doc__placeholder-box {
    flex: 1;
    min-height: 180px;
    border: 1px dashed rgba(30, 74, 141, 0.28);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 0.9rem;
}

/* Form card */
.contacts-page-form .form-label {
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.82rem;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contacts-page-form .form-control {
    border: 1px solid rgba(30, 74, 141, 0.15);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    background: #fafbfd;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.contacts-page-form .form-control:focus {
    border-color: var(--primary-orange);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(242, 106, 75, 0.12);
}

.contacts-page-form textarea.form-control {
    min-height: 130px;
    resize: vertical;
}

.contacts-page-form .btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border: none;
    padding: 0.7rem 1.8rem;
    font-weight: 600;
    border-radius: 10px;
    letter-spacing: 0.4px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.contacts-page-form .btn-primary:hover,
.contacts-page-form .btn-primary:focus {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(242, 106, 75, 0.25);
}

.contacts-page-form-note {
    margin: 1rem 0 0;
    font-size: 0.82rem;
    color: var(--text-light);
    display: inline-flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.contacts-page-form-note i {
    color: var(--primary-orange);
    margin-top: 3px;
}

@media (max-width: 992px) {
    .contacts-page-grid,
    .contacts-page-grid + .contacts-page-grid {
        grid-template-columns: 1fr;
    }

    .contacts-page-grid + .contacts-page-grid {
        margin-top: 1.4rem;
    }
}

@media (max-width: 768px) {
    .contacts-page-section {
        padding-top: 6.5rem;
        padding-bottom: 3rem;
    }

    .contacts-page-card {
        padding: 1.3rem 1.3rem 1.2rem;
    }

    .contacts-page-intro {
        font-size: 0.98rem;
        margin-bottom: 1.8rem;
    }

    .contacts-requisites-row {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    .contacts-page-docs-grid {
        grid-template-columns: 1fr;
    }

    .contacts-page-doc__preview,
    .contacts-page-doc__placeholder-box {
        height: 150px;
        min-height: 150px;
    }

    .contacts-page-docs-grid--wide .contacts-page-doc {
        flex-direction: column;
    }

    .contacts-page-docs-grid--wide .contacts-page-doc__preview {
        width: 100%;
        height: 160px;
    }
}

/* Final mobile header fix: deterministic layout without overflow */
@media (max-width: 1024px) {
    html,
    body {
        overflow-x: hidden !important;
    }

    html body .mobile-header-wrapper,
    html body .mobile-header-wrapper .navbar,
    html body .mobile-header-wrapper .navbar > .container {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: clip !important;
    }

    html body .mobile-header-wrapper .navbar > .container {
        display: flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        margin: 0 !important;
        padding: 4px 8px !important;
        min-height: 52px !important;
    }

    html body .mobile-header-wrapper .navbar-social,
    html body .mobile-header-wrapper .header-social {
        display: none !important;
    }

    html body .mobile-header-wrapper .navbar .oversized-logo {
        order: 1 !important;
        margin: 0 auto 0 0 !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        flex: 0 0 auto !important;
        background: #fff !important;
        border: 1px solid #fff !important;
    }

    html body .mobile-header-wrapper .lang-switcher {
        order: 2 !important;
        display: inline-flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        gap: 0.2rem !important;
        margin: 0 4px 0 0 !important;
        padding: 0 !important;
        min-width: 0 !important;
        border-left: none !important;
        flex: 0 0 auto !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    html body .mobile-header-wrapper .lang-switcher .lang-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        min-width: 0 !important;
        height: 1.6rem !important;
        line-height: 1 !important;
        padding: 0.2rem 0.42rem !important;
        color: var(--text-light) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    html body .mobile-header-wrapper .lang-switcher .lang-btn[data-lang="en"] {
        display: inline-flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    html body .mobile-header-wrapper .lang-switcher .lang-btn.active {
        color: var(--primary-blue) !important;
    }

    html body .mobile-header-wrapper .lang-switcher .lang-divider {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 0.75rem !important;
        height: 1.6rem !important;
        line-height: 1 !important;
        margin: 0 !important;
        transform: translateY(0) !important;
        opacity: 0.4 !important;
        visibility: visible !important;
    }

    html body .mobile-header-wrapper .navbar-toggler {
        order: 3 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 38px !important;
        width: 38px !important;
        height: 38px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 1px solid rgba(30, 74, 141, 0.28) !important;
        border-radius: 10px !important;
        background: #ffffff !important;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 10002 !important;
    }

    html body .mobile-header-wrapper .navbar-toggler:focus,
    html body .mobile-header-wrapper .navbar-toggler:active {
        box-shadow: 0 0 0 2px rgba(30, 74, 141, 0.15) !important;
        outline: none !important;
    }

    html body .mobile-header-wrapper .navbar-toggler .navbar-toggler-icon {
        display: none !important;
    }

    html body .mobile-header-wrapper .navbar-toggler::before {
        content: "";
        width: 16px;
        height: 12px;
        background:
            linear-gradient(rgba(30, 74, 141, 0.95), rgba(30, 74, 141, 0.95)) 0 0 / 100% 2px no-repeat,
            linear-gradient(rgba(30, 74, 141, 0.95), rgba(30, 74, 141, 0.95)) 0 50% / 100% 2px no-repeat,
            linear-gradient(rgba(30, 74, 141, 0.95), rgba(30, 74, 141, 0.95)) 0 100% / 100% 2px no-repeat;
    }

    html body .mobile-header-wrapper .navbar-collapse {
        order: 4 !important;
        width: 100% !important;
        min-width: 0 !important;
        flex-basis: 100% !important;
        margin-top: 4px !important;
    }

    html body .mobile-header-wrapper .navbar-collapse.collapsing {
        transition: none !important;
        height: auto !important;
        overflow: hidden !important;
    }

    html body .mobile-header-wrapper .navbar-collapse,
    html body .mobile-header-wrapper .navbar-collapse.show,
    html body .mobile-header-wrapper .navbar-collapse.collapsing {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Footer contact readability: keep icon spacing and place helper text below email. */
.footer-links.footer-contact li {
    align-items: flex-start !important;
}

.footer-links.footer-contact li i {
    margin-right: 0.55rem !important;
}

.footer-links.footer-contact li:has(.footer-contact-desc) {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    column-gap: 0.55rem !important;
    row-gap: 0.08rem !important;
    align-items: start !important;
}

.footer-links.footer-contact li:has(.footer-contact-desc) > i {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    margin-right: 0 !important;
    margin-top: 0.1rem !important;
}

.footer-links.footer-contact li:has(.footer-contact-desc) > .footer-contact-link {
    grid-column: 2 !important;
    grid-row: 1 !important;
}

.footer-links.footer-contact li:has(.footer-contact-desc) > .footer-contact-desc {
    grid-column: 2 !important;
    grid-row: 2 !important;
    display: block !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    line-height: 1.2 !important;
    white-space: normal !important;
}

/* Keep footer at viewport bottom on desktop pages with little content. */
@media (min-width: 992px) {
    html,
    body {
        min-height: 100%;
    }

    body {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    body > .footer {
        margin-top: auto;
    }
}

/* ===== LEGAL & PAYMENT SECTION ===== */
.legal-section {
    background: #f7f9fc;
    border-top: 1px solid rgba(30, 74, 141, 0.1);
    padding: 2rem 0 1.75rem;
}

.legal-payment-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.75rem;
    margin-bottom: 1.25rem;
}

.payment-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.legal-org-info {
    font-size: 0.72rem;
    color: #5a6478;
    line-height: 1.6;
    text-align: center;
}

.legal-org-info p {
    margin: 0 auto;
    width: fit-content;
    max-width: 100%;
    white-space: nowrap;
    text-align: center;
}

.legal-org-info p + p {
    margin-top: 0.1rem;
}

@media (max-width: 767px) {
    .payment-logo {
        height: 32px;
    }
    .legal-org-info p {
        white-space: normal;
        text-align: center;
    }
}

/* Bilingual text blocks for translation */
html[lang="en"] .lang-ru { display: none !important; }
html[lang="en"] .lang-en { display: block !important; }
html[lang="ru"] .lang-en { display: none !important; }
html[lang="ru"] .lang-ru { display: block !important; }
.lang-en { display: none; }
/ * 
 
 B i l i n g u a l 
 
 t e x t 
 
 b l o c k s 
 
 f o r 
 
 t r a n s l a t i o n 
 
 * / 
 
 h t m l [ l a n g = ^ e n ^ ] 
 
 . l a n g - r u 
 
   d i s p l a y :   n o n e   ! i m p o r t a n t ;   
 
 h t m l [ l a n g = ^ e n ^ ] 
 
 . l a n g - e n 
 
   d i s p l a y :   b l o c k   ! i m p o r t a n t ;   
 
 h t m l [ l a n g = ^ r u ^ ] 
 
 . l a n g - e n 
 
   d i s p l a y :   n o n e   ! i m p o r t a n t ;   
 
 h t m l [ l a n g = ^ r u ^ ] 
 
 . l a n g - r u 
 
   d i s p l a y :   b l o c k   ! i m p o r t a n t ;   
 
 . l a n g - e n 
 
   d i s p l a y :   n o n e ;   
 
 