/*
Theme Name: CricBook TDCA
Theme URI: https://cricbook.ai
Author: CricBook
Description: Native WordPress theme for TDCA using MatchStream/CricBook cricket data.
Version: 1.0.0
Text Domain: cricbook-tdca
*/

:root {
    --primary: #bd221b;
    --primary-dark: #991712;
    --primary-soft: #fce9e8;
    --text: #171717;
    --text-soft: #6b7280;
    --text-faint: #737b86;
    --line: #ececec;
    --surface: #ffffff;
    --surface-soft: #f8f8f8;
    --footer: #121821;
    --shadow-sm: 0 6px 20px rgba(0, 0, 0, .05);
    --shadow-md: 0 16px 40px rgba(0, 0, 0, .08);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --container: 1440px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text);
    background: #fff;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
}

/* Accessibility: Focus styles */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn:focus-visible,
.nav a:focus-visible {
    outline-offset: 3px;
    border-radius: 12px;
}

.container {
    width: min(calc(100% - 48px), var(--container));
    margin: 0 auto;
}

.section-space {
    padding: 24px 0;
}

/* Topbar */
.topbar {
    background: #f4f4f5;
    border-bottom: 1px solid #ececec;
    font-size: 13px;
    color: #4b5563;
}

.topbar-inner {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-left,
.topbar-center,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.socials {
    display: flex;
    align-items: center;
    gap: 14px;
}

.socials a,
.topbar-right a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.header-inner {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 280px;
}

.brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(180deg, #d93a33, #a51712);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 15px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.1;
}

.brand-title {
    font-size: 16px;
    font-weight: 700;
}

.brand-sub {
    font-size: 15px;
    font-weight: 600;
    color: #2d2d2d;
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    flex: 1;
}

.nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav > li {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.primary-navigation {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.nav a {
    position: relative;
    font-size: 14px;
    font-weight: 500;
    color: #3d3d3d;
    padding: 10px 0;
}

.nav a.active {
    color: var(--primary);
    font-weight: 700;
}

.nav li.current-menu-item > a,
.nav li.current-menu-ancestor > a,
.nav li.current_page_item > a,
.nav li.current_page_parent > a,
.nav li.current-page-ancestor > a {
    color: var(--primary);
    font-weight: 700;
}

.nav a.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -16px;
    height: 3px;
    border-radius: 999px;
    background: var(--primary);
}

.nav li.current-menu-item > a::after,
.nav li.current-menu-ancestor > a::after,
.nav li.current_page_item > a::after,
.nav li.current-page-ancestor > a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -16px;
    height: 3px;
    border-radius: 999px;
    background: var(--primary);
}

.nav .sub-menu {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    display: none;
    flex-direction: column;
    gap: 0;
    z-index: 60;
}

.nav .sub-menu li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav li:hover > .sub-menu,
.nav li:focus-within > .sub-menu {
    display: flex;
}

.nav .sub-menu a {
    display: block;
    padding: 10px 16px;
    white-space: nowrap;
}

.nav .sub-menu a::after {
    display: none !important;
}

.nav .sub-menu .sub-menu {
    top: -8px;
    left: calc(100% + 4px);
    margin-left: 0;
}

.mobile-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 12px;
    padding: 13px 20px;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid transparent;
    transition: .2s ease;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 24px rgba(189, 34, 27, .22);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline-dark {
    border-color: rgba(255, 255, 255, .25);
    color: #fff;
    background: rgba(255, 255, 255, .02);
}

.btn-outline-dark:hover {
    background: rgba(255, 255, 255, .08);
}

.btn-join {
    padding-inline: 18px;
    min-width: 148px;
}

/* Hero */
.hero-section {
    padding: 18px 0 28px;
    background: linear-gradient(180deg, #fff 0%, #fff 72%, #fafafa 100%);
}

.hero-card {
    position: relative;
    min-height: 460px;
    border-radius: 22px;
    overflow: visible;
    background: linear-gradient(125deg, #08111c 0%, #09131f 42%, #0f1b29 58%, #1b2636 100%);
    box-shadow: var(--shadow-md);
    display: grid;
    grid-template-columns: 40% 60%;
    border: 1px solid rgba(255, 255, 255, .06);
}

.hero-left {
    position: relative;
    padding: 40px 48px 80px;
    color: #fff;
    overflow: hidden;
}

.hero-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(189, 34, 27, .18), transparent 32%),
        repeating-linear-gradient(90deg, transparent 0 110px, rgba(255, 255, 255, .02) 110px 111px),
        repeating-linear-gradient(0deg, transparent 0 110px, rgba(255, 255, 255, .018) 110px 111px);
    pointer-events: none;
}

.hero-lines {
    position: absolute;
    inset: auto -120px 10px 40px;
    height: 220px;
    opacity: .16;
    pointer-events: none;
}

.hero-lines::before,
.hero-lines::after {
    content: '';
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    left: 0;
    right: 20%;
    bottom: 0;
    height: 180px;
    transform: skewX(-18deg);
}

.hero-lines::after {
    left: 80px;
    right: 35%;
    height: 120px;
    bottom: 26px;
}

.eyebrow {
    margin: 0 0 14px;
    font-size: 16px;
    letter-spacing: .08em;
    font-weight: 800;
    color: #ff4a43;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.hero-title {
    margin: 0;
    font-size: clamp(32px, 3.8vw, 52px);
    line-height: .98;
    font-weight: 800;
    max-width: 700px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.04em;
}

.hero-copy {
    margin: 14px 0 0;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .82);
    max-width: 590px;
    position: relative;
    z-index: 1;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.hero-right {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    border-radius: 0 22px 22px 0;
    background: #000;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    opacity: 0.85;
}

.hero-banner-slider {
    --hero-slides: 1;
    --hero-index: 0;
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
    min-height: 460px;
    overflow: hidden;
}

.hero-banner-track {
    display: flex;
    width: calc(var(--hero-slides) * 100%);
    height: 100%;
    min-height: 460px;
    transform: translateX(calc(var(--hero-index) * -100% / var(--hero-slides)));
    transition: transform 0.5s cubic-bezier(0.33, 1, 0.68, 1);
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    .hero-banner-track {
        transition: none;
    }
}

.hero-banner-slide {
    flex: 0 0 calc(100% / var(--hero-slides));
    width: calc(100% / var(--hero-slides));
    height: 100%;
    min-height: 460px;
}

.hero-banner-slide .hero-img {
    min-height: 460px;
}

.hero-banner-dots {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(8, 17, 28, 0.45);
    backdrop-filter: blur(6px);
}

.hero-banner-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.hero-banner-dot:hover,
.hero-banner-dot:focus-visible {
    background: rgba(255, 255, 255, 0.85);
    transform: scale(1.15);
    outline: none;
}

.hero-banner-dot.is-active {
    background: var(--primary);
    transform: scale(1.2);
}

.hero-right::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8,17,28,0.95) 0%, rgba(8,17,28,0) 30%);
}

.stadium-blur {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 28%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .07) 0 8px, transparent 8px 20px),
        linear-gradient(180deg, transparent 0 56%, rgba(34, 52, 68, .55) 56% 72%, #b9a57a 72% 100%);
    opacity: .25;
}

.hero-divider {
    position: absolute;
    left: -72px;
    top: -30px;
    width: 145px;
    height: calc(100% + 60px);
    background: linear-gradient(180deg, #d9261f, #b41b15);
    transform: skewX(-16deg);
    box-shadow: -18px 0 40px rgba(189, 34, 27, .25);
    z-index: 2;
}

.pitch-glow {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 40%;
    background:
        radial-gradient(circle at 26% 90%, rgba(243, 207, 146, .78), transparent 20%),
        radial-gradient(circle at 44% 91%, rgba(245, 216, 163, .45), transparent 28%),
        linear-gradient(180deg, transparent, rgba(210, 173, 114, .18));
    z-index: 2;
}

.stumps {
    position: absolute;
    left: 34%;
    bottom: 68px;
    display: flex;
    gap: 12px;
    z-index: 4;
}

.stump {
    width: 12px;
    height: 118px;
    border-radius: 6px;
    background: linear-gradient(180deg, #fc4f48 0%, #b71712 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
    position: relative;
}

.stump::before {
    content: '';
    position: absolute;
    top: -9px;
    left: -2px;
    width: 16px;
    height: 10px;
    border-radius: 10px;
    background: linear-gradient(180deg, #f7d5b8, #d7b18e);
}

.ball {
    position: absolute;
    left: 27%;
    top: 40%;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff8d85 0%, #d22a24 34%, #9a1712 80%);
    box-shadow: 0 0 30px rgba(255, 82, 72, .32);
    z-index: 5;
}

.ball::before {
    content: '';
    position: absolute;
    inset: 2px 12px;
    background: rgba(255, 255, 255, .45);
    border-radius: 999px;
    opacity: .65;
}

.batter {
    position: absolute;
    right: 30px;
    bottom: 10px;
    width: 72%;
    height: 96%;
    z-index: 5;
    transform: translateX(2%);
}

.batter svg {
    width: 100%;
    height: 100%;
}

.hero-stats {
    position: absolute;
    left: 50%;
    bottom: -28px;
    transform: translateX(-50%);
    width: min(720px, calc(100% - 64px));
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .12);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
    z-index: 10;
    border: 1px solid rgba(0, 0, 0, .04);
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    min-height: 102px;
    background: #fff;
}

.hero-stat+.hero-stat {
    border-left: 1px solid var(--line);
}

.stat-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--primary-soft);
    display: grid;
    place-items: center;
    color: var(--primary);
    font-size: 24px;
    flex: 0 0 auto;
}

.stat-value {
    font-size: 25px;
    line-height: 1;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.stat-label {
    font-size: 15px;
    color: var(--text-soft);
    font-weight: 500;
}

/* Quick actions */
.quick-actions {
    padding-top: 58px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.quick-card,
.panel,
.tour-card,
.impact-card,
.gallery-item,
.sponsor-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.quick-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 22px;
    min-height: 140px;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
}

.quick-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.quick-card-primary-blue {
    background: #2563eb;
    border-color: #1d4ed8;
    color: #fff;
}

.quick-card-primary-blue .quick-icon {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.quick-card-primary-blue .quick-text {
    color: rgba(255, 255, 255, 0.92);
}

.quick-card-primary-blue .quick-arrow {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.quick-card-primary-blue:hover {
    background: #1d4ed8;
    border-color: #1e40af;
}

.quick-card-primary-blue:hover .quick-arrow {
    background: #fff;
    color: #1d4ed8;
    border-color: #fff;
}

.quick-card-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.quick-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #f1d0cf;
    display: grid;
    place-items: center;
    color: var(--primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
    font-weight: 700;
}

.quick-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 7px;
}

.quick-text {
    margin: 0;
    font-size: 15px;
    color: var(--text-soft);
    line-height: 1.5;
}

.quick-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    color: var(--primary);
    flex: 0 0 auto;
    transition: background .25s ease, color .25s ease, border-color .25s ease;
}

.quick-card:hover .quick-arrow {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Shared section */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.section-title {
    margin: 0;
    font-size: 32px;
    line-height: 1.05;
    letter-spacing: -.03em;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

/* News / fixtures */
.news-fixtures-grid,
.tournaments-impact-grid {
    display: grid;
    grid-template-columns: 1.58fr .92fr;
    gap: 24px;
    align-items: stretch;
}

.news-fixtures-grid-single {
    grid-template-columns: 1fr;
}

.news-fixtures-grid > div,
.tournaments-impact-grid > div {
    display: flex;
    flex-direction: column;
}

.news-fixtures-grid > div > .panel,
.tournaments-impact-grid > div > .panel,
.tournaments-impact-grid > div > .impact-card,
.tournaments-impact-grid > div > .tour-grid {
    flex: 1;
}

.panel {
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.latest-news-inner {
    display: grid;
    grid-template-columns: 1.14fr .86fr;
    gap: 18px;
}

.featured-card {
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
}

.thumb {
    position: relative;
    overflow: hidden;
    background: #10151d;
    aspect-ratio: 1.35 / .82;
}

.thumb-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .4s ease;
}

/* Homepage news cards: preserve odd image ratios without stretching/cropping */
.latest-news-inner .thumb,
.latest-news-inner .news-thumb {
    background: linear-gradient(135deg, #0b0f14 0%, #2a1015 52%, #8b1a1a 100%);
    border: 1px solid transparent;
    padding: 6px;
    box-sizing: border-box;
}

.latest-news-inner .thumb-img {
    object-fit: contain;
    background: linear-gradient(135deg, #0b0f14 0%, #2a1015 52%, #8b1a1a 100%);
    border: 1px solid transparent;
    border-radius: 10px;
}

.featured-card:hover .thumb-img,
.news-item:hover .thumb-img {
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .03em;
    border-radius: 999px;
    padding: 8px 12px;
    z-index: 2;
}

.featured-body {
    padding: 18px 18px 20px;
}

.meta {
    font-size: 13px;
    color: var(--text-faint);
    margin-bottom: 12px;
    font-weight: 500;
}

.card-title {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.28;
    letter-spacing: -.02em;
    font-weight: 800;
}

.card-text {
    margin: 0 0 18px;
    font-size: 15px;
    color: var(--text-soft);
    line-height: 1.65;
}

.read-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-weight: 700;
    font-size: 15px;
}

.news-list {
    display: grid;
    gap: 14px;
}

.news-item {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 14px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--line);
    transition: .2s ease;
}

.news-item:hover {
    transform: translateY(-2px);
}

.news-thumb {
    aspect-ratio: 1 / .88;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.news-item-title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
}

.fixture-tabs {
    display: flex;
    border-bottom: 1px solid var(--line);
    margin-bottom: 18px;
}

.fixture-tab {
    padding: 12px 18px 14px;
    font-size: 14px;
    font-weight: 800;
    color: var(--text-faint);
    position: relative;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: transparent;
    border: 0;
}

.fixture-tab.active {
    color: var(--primary);
}

.fixture-tab.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    background: var(--primary);
    border-radius: 999px;
}

.fixture-pane {
    display: none;
}

.fixture-pane.active {
    display: block;
    animation: fadeSlideIn .35s ease;
}

.fixture-list {
    display: grid;
    gap: 14px;
}

.fixture-item {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.fixture-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.fixture-date {
    border-radius: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    text-align: center;
    padding: 10px 8px;
}

.fixture-date .month {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-faint);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.fixture-date .day {
    font-size: 36px;
    line-height: 1;
    font-weight: 800;
    margin-top: 4px;
}

.fixture-league {
    font-size: 13px;
    color: var(--text-faint);
    margin-bottom: 10px;
    font-weight: 600;
}

.match-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 10px;
}

.team {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.team.right {
    justify-content: flex-end;
    text-align: right;
}

.team-badge {
    width: 22px;
    height: 26px;
    clip-path: polygon(50% 0%, 100% 20%, 100% 66%, 50% 100%, 0% 66%, 0% 20%);
    background: linear-gradient(180deg, #e94942, #b81c17);
    flex: 0 0 auto;
}

.team-badge.blue {
    background: linear-gradient(180deg, #4471c8, #21479a);
}

.team-badge.green {
    background: linear-gradient(180deg, #229b58, #0f6a36);
}

.team-badge.navy {
    background: linear-gradient(180deg, #314b74, #152645);
}

.vs {
    font-size: 13px;
    color: var(--text-faint);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fixture-meta {
    font-size: 14px;
    color: var(--text-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Tournaments + impact */
.tour-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.tour-card {
    padding: 18px;
    box-shadow: var(--shadow-sm);
    min-height: 168px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform .25s ease, box-shadow .25s ease;
}

a.tour-card {
    text-decoration: none;
    color: inherit;
}

.tour-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.tour-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.tour-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--primary-soft);
    display: grid;
    place-items: center;
    color: var(--primary);
}

.pill {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-radius: 999px;
    padding: 6px 10px;
    white-space: nowrap;
}

.pill-red {
    background: #ffe3e1;
    color: var(--primary);
}

.pill-orange {
    background: #fff0d8;
    color: #d88212;
}

.tour-title {
    margin: 12px 0 6px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
}

.tour-cat,
.tour-date {
    font-size: 14px;
    color: var(--text-soft);
    font-weight: 500;
}

.impact-card {
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.impact-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.impact-item {
    text-align: center;
    padding: 28px 18px;
}

.impact-item+.impact-item {
    border-left: 1px solid var(--line);
}

.impact-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    font-size: 24px;
}

.impact-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.impact-label {
    font-size: 15px;
    color: var(--text-soft);
    line-height: 1.5;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.gallery-item {
    overflow: hidden;
    aspect-ratio: 1 / .66;
    box-shadow: var(--shadow-sm);
    position: relative;
    background: linear-gradient(135deg, #0b0f14 0%, #2a1015 52%, #8b1a1a 100%);
    border: 1px solid transparent;
    padding: 6px;
    box-sizing: border-box;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: linear-gradient(135deg, #0b0f14 0%, #2a1015 52%, #8b1a1a 100%);
    border: 1px solid transparent;
    border-radius: 10px;
    transition: transform .5s ease;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 24px 18px 18px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .8));
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    opacity: 0;
    transition: .3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Sponsors */
.sponsor-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
    align-items: center;
}

.sponsor-item {
    min-height: 88px;
    display: grid;
    place-items: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
    padding: 18px;
}

.sponsor-img {
    max-width: 100%;
    max-height: 44px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: filter .3s ease;
}

.sponsor-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.sponsor-item:hover .sponsor-img {
    filter: grayscale(0%) opacity(1);
}

/* Footer */
.footer {
    background: linear-gradient(180deg, #1a2029 0%, #10161e 100%);
    color: rgba(255, 255, 255, .88);
    margin-top: 34px;
}

.footer-main {
    padding: 60px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1.05fr;
    gap: 34px;
    align-items: start;
}

.footer-brand {
    display: grid;
    gap: 18px;
}

.footer-brand-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-brand p {
    margin: 0;
    color: rgba(255, 255, 255, .66);
    line-height: 1.7;
    font-size: 15px;
    max-width: 340px;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .12);
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .8);
}

.footer-col h4 {
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
}

.footer-links {
    display: grid;
    gap: 12px;
}

.footer .footer-links a,
.footer .footer-contact-item {
    font-size: 15px;
    color: rgba(255, 255, 255, .68);
    line-height: 1.5;
}

.footer-contact {
    display: grid;
    gap: 14px;
}

.footer-contact-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: var(--primary);
    color: rgba(255, 255, 255, .92);
    font-size: 14px;
}

.footer-bottom-inner {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

/* Animations */
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .7s cubic-bezier(.22, 1, .36, 1), transform .7s cubic-bezier(.22, 1, .36, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-children > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .5s cubic-bezier(.22, 1, .36, 1), transform .5s cubic-bezier(.22, 1, .36, 1);
}

.reveal-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

.reveal-children.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-children.visible > *:nth-child(2) { transition-delay: .08s; }
.reveal-children.visible > *:nth-child(3) { transition-delay: .08s; }
.reveal-children.visible > *:nth-child(4) { transition-delay: .16s; }
.reveal-children.visible > *:nth-child(5) { transition-delay: .24s; }
.reveal-children.visible > *:nth-child(6) { transition-delay: .32s; }
.reveal-children.visible > *:nth-child(7) { transition-delay: .40s; }

.stat-value.counting {
    transition: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-children > * {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .fixture-pane.active {
        animation: none;
    }
}

/* Responsive */
@media (max-width: 1440px) {
    .hero-title {
        font-size: clamp(40px, 4.1vw, 64px);
    }

    .hero-copy {
        font-size: 20px;
    }

    .section-title {
        font-size: 30px;
    }
}

@media (max-width: 1200px) {
    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-wrap {
        position: absolute;
        top: 100%;
        right: 24px;
        left: 24px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 16px;
        box-shadow: var(--shadow-md);
        display: none;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-wrap.open {
        display: flex;
    }

    .primary-navigation {
        width: 100%;
    }

    .nav {
        display: grid;
        gap: 8px;
    }

    .nav a.active::after,
    .nav li.current-menu-item > a::after,
    .nav li.current-menu-ancestor > a::after,
    .nav li.current_page_item > a::after,
    .nav li.current-page-ancestor > a::after {
        display: none;
    }

    .nav .sub-menu {
        position: static;
        display: flex !important;
        flex-direction: column;
        border: none;
        box-shadow: none;
        padding: 4px 0 10px 14px;
        margin: 4px 0 0;
        background: rgba(0, 0, 0, 0.04);
        border-radius: 10px;
        min-width: 0;
    }

    .nav .sub-menu .sub-menu {
        top: auto;
        left: auto;
        margin: 4px 0 0;
        padding-left: 12px;
    }

    .hero-card,
    .news-fixtures-grid,
    .tournaments-impact-grid,
    .latest-news-inner {
        grid-template-columns: 1fr;
    }

    .hero-card {
        min-height: auto;
    }

    .hero-left {
        padding-bottom: 44px;
    }

    .hero-right {
        min-height: 360px;
        border-radius: 0 0 22px 22px;
    }

    .hero-banner-slider,
    .hero-banner-track,
    .hero-banner-slide,
    .hero-banner-slide .hero-img {
        min-height: 360px;
    }

    .hero-divider {
        left: 52%;
        top: -50px;
        width: 120px;
        height: calc(100% + 100px);
    }

    .quick-grid,
    .tour-grid,
    .gallery-grid,
    .sponsor-row,
    .impact-list,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        width: min(calc(100% - 32px), var(--container));
    }

    .topbar-inner,
    .topbar-left,
    .topbar-center,
    .topbar-right,
    .header-inner,
    .hero-actions,
    .footer-bottom-inner {
        flex-wrap: wrap;
    }

    .topbar-inner,
    .header-inner {
        justify-content: center;
    }

    .brand {
        min-width: auto;
        justify-content: center;
    }

    .hero-left {
        padding: 34px 22px 30px;
    }

    .hero-title {
        font-size: 34px;
        line-height: 1.08;
    }

    .hero-copy {
        font-size: 16px;
        line-height: 1.55;
    }

    .hero-right {
        min-height: 250px;
    }

    .hero-divider {
        display: none;
    }

    .hero-banner-slider,
    .hero-banner-track,
    .hero-banner-slide,
    .hero-banner-slide .hero-img {
        min-height: 250px;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-banner-dots {
        bottom: 10px;
        padding: 6px 10px;
    }

    .hero-stats {
        width: calc(100% - 28px);
        bottom: -64px;
        grid-template-columns: 1fr;
    }

    .hero-stat+.hero-stat {
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .quick-actions {
        padding-top: 36px;
    }

    .quick-grid,
    .tour-grid,
    .gallery-grid,
    .sponsor-row,
    .impact-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    /* Keep homepage quick actions in a compact 2x2 layout on mobile */
    .quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .quick-card {
        min-width: 0;
        min-height: 116px;
        padding: 14px 12px;
        gap: 10px;
        overflow: hidden;
    }

    .quick-card-main {
        min-width: 0;
        gap: 10px;
    }

    .quick-card-main > div {
        min-width: 0;
    }

    .quick-icon {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
    }

    .quick-title {
        font-size: 15px;
        line-height: 1.2;
        margin-bottom: 4px;
        word-break: break-word;
    }

    .quick-text {
        font-size: 13px;
        line-height: 1.35;
        word-break: break-word;
    }

    .quick-arrow {
        width: 30px;
        height: 30px;
    }

    .news-item {
        grid-template-columns: 90px 1fr;
    }

    .section-title {
        font-size: 26px;
    }

    .match-row {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .team,
    .team.right {
        justify-content: center;
        text-align: center;
    }

    .fixture-item {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-card {
        border-radius: 16px;
    }

    .hero-left {
        padding: 26px 18px 24px;
    }

    .hero-title {
        font-size: 30px;
    }

    .hero-copy {
        font-size: 15px;
    }

    .hero-right,
    .hero-banner-slider,
    .hero-banner-track,
    .hero-banner-slide,
    .hero-banner-slide .hero-img {
        min-height: 210px;
    }
}
