:root {
    --blue-950: #071b3c;
    --blue-900: #0a2654;
    --blue-800: #123d7a;
    --blue-700: #1854a1;
    --yellow-500: #ffd21f;
    --yellow-400: #ffe15d;
    --white: #ffffff;
    --ink: #12213a;
    --muted: #64748b;
    --surface: #f3f6fb;
    --border: #dce4f0;
    --success: #147d4a;
    --danger: #b42318;
    --radius: 18px;
    --shadow: 0 18px 45px rgba(7, 27, 60, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--surface);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.narrow { width: min(780px, calc(100% - 40px)); margin-inline: auto; }
.muted { color: var(--muted); }
.text-center { text-align: center; }

.score-stripe {
    height: 6px;
    background: linear-gradient(90deg, var(--yellow-500) 0 34%, var(--blue-700) 34% 66%, var(--yellow-500) 66%);
}

.site-header {
    position: sticky;
    z-index: 20;
    top: 0;
    color: var(--white);
    background: rgba(7, 27, 60, 0.97);
    box-shadow: 0 8px 30px rgba(7, 27, 60, 0.22);
}

.header-inner { min-height: 84px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-width: max-content; }
.brand-mark {
    display: grid;
    width: 50px;
    aspect-ratio: 1;
    place-items: center;
    color: var(--blue-950);
    background: var(--yellow-500);
    border: 3px solid var(--white);
    border-radius: 50% 50% 48% 48%;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}
.brand-logo { display: grid; width: 54px; height: 54px; place-items: center; }
.brand-logo img { width: 54px; height: 54px; object-fit: contain; }
.brand strong { display: block; font-size: 1.05rem; letter-spacing: 0.01em; }
.brand small { display: block; color: #bed0ee; font-size: 0.75rem; }
.main-nav { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-left: auto; }
.main-nav a { padding: 10px 11px; border-radius: 10px; color: #dbe8ff; text-decoration: none; font-size: 0.9rem; font-weight: 700; }
.main-nav a:hover, .main-nav a:focus-visible, .main-nav a.active { color: var(--blue-950); background: var(--yellow-500); }
.main-nav > ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.main-nav li { position: relative; }
.main-nav .menu-parent { display: flex; align-items: center; }
.main-nav .menu-parent > a { text-transform: uppercase; }
.submenu-toggle { width: 28px; min-height: 38px; margin-left: -8px; padding: 0; color: #dbe8ff; background: transparent; border: 0; cursor: pointer; }
.submenu-toggle::after { content: "▾"; }
.sub-menu { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; display: none; min-width: 220px; margin: 0; padding: 9px; background: var(--blue-950); border: 1px solid #36577f; border-radius: 12px; box-shadow: var(--shadow); list-style: none; }
.sub-menu::before { position: absolute; inset: -10px 0 auto; height: 10px; content: ""; }
.sub-menu a { display: block; min-width: max-content; }
.menu-parent:hover > .sub-menu, .menu-parent:focus-within > .sub-menu, .menu-parent.submenu-open > .sub-menu { display: block; }
.current-menu > a { color: var(--blue-950); background: var(--yellow-500); }
.menu-toggle { display: none; margin-left: auto; color: var(--white); background: transparent; border: 1px solid #58749d; border-radius: 10px; padding: 8px 12px; }

.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(115deg, var(--blue-950), var(--blue-700));
}
.hero::after {
    position: absolute;
    inset: -50% -10% auto auto;
    width: 680px;
    aspect-ratio: 1;
    border: 120px solid rgba(255, 210, 31, 0.12);
    border-radius: 50%;
    content: "";
}
.hero-inner { position: relative; z-index: 1; display: grid; min-height: 430px; grid-template-columns: 1.35fr 0.65fr; align-items: center; gap: 60px; padding-block: 64px; }
.eyebrow { display: inline-block; margin: 0 0 12px; color: var(--yellow-500); font-size: 0.8rem; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; }
.hero h1 { max-width: 760px; margin: 0; font-size: clamp(2.6rem, 6vw, 5.5rem); line-height: 0.94; letter-spacing: -0.055em; }
.hero h1 span { color: var(--yellow-500); }
.hero-copy { max-width: 650px; margin: 24px 0 0; color: #dbe8ff; font-size: 1.1rem; }
.hero-badge {
    display: grid;
    width: min(280px, 100%);
    aspect-ratio: 0.88;
    place-items: center;
    justify-self: end;
    color: var(--blue-950);
    background: var(--yellow-500);
    border: 12px solid var(--white);
    border-radius: 50% 50% 46% 46%;
    box-shadow: 0 20px 70px rgba(0,0,0,.24);
    font-size: 3.8rem;
    font-weight: 1000;
    letter-spacing: -0.08em;
    transform: rotate(3deg);
}

.section { padding-block: 72px; }
.section-tight { padding-block: 42px; }
.section-white { background: var(--white); }
.section-blue { color: var(--white); background: var(--blue-950); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h1, .section-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -0.04em; }
.section-heading p { max-width: 620px; margin: 8px 0 0; color: var(--muted); }
.section-blue .section-heading p { color: #b8cae5; }
.page-banner { color: var(--white); background: linear-gradient(120deg, var(--blue-950), var(--blue-800)); padding-block: 54px; }
.page-banner h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1; letter-spacing: -0.05em; }
.page-banner p { max-width: 650px; margin: 12px 0 0; color: #cbd9ee; }

.btn { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 0; border-radius: 11px; color: var(--white); background: var(--blue-700); text-decoration: none; font-weight: 800; cursor: pointer; }
.btn:hover, .btn:focus-visible { background: var(--blue-800); transform: translateY(-1px); }
.btn-yellow { color: var(--blue-950); background: var(--yellow-500); }
.btn-yellow:hover, .btn-yellow:focus-visible { background: var(--yellow-400); }
.btn-light { color: var(--blue-900); background: var(--white); border: 1px solid var(--border); }
.btn-danger { background: var(--danger); }
.btn-small { min-height: 36px; padding: 7px 12px; font-size: 0.86rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { overflow: hidden; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(7, 27, 60, 0.06); }
.card-body { padding: 24px; }
.card h2, .card h3 { margin: 0 0 10px; line-height: 1.2; }
.card p { margin: 0 0 16px; color: var(--muted); }
.card-link { color: var(--blue-700); font-weight: 800; text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.card-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #dce8f8; }
.card-image-placeholder { display: grid; place-items: center; color: var(--blue-800); background: linear-gradient(135deg, #dce8f8, #fff3b0); font-size: 2.5rem; font-weight: 900; }
.meta { margin-bottom: 10px; color: var(--blue-700); font-size: 0.8rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }

.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.match-card { position: relative; overflow: hidden; padding: 26px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); }
.match-card::before { position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--yellow-500); content: ""; }
.match-top { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 18px; color: var(--muted); font-size: 0.86rem; font-weight: 700; }
.match-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; font-size: 1.1rem; font-weight: 900; }
.match-teams span:last-child { text-align: right; }
.score { min-width: 74px; padding: 7px 12px; color: var(--white); background: var(--blue-950); border-radius: 10px; text-align: center; font-size: 1.2rem; }

.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { color: var(--blue-900); background: #edf3fb; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.sort-button { display: inline-flex; align-items: center; gap: 7px; width: auto; min-height: 0; padding: 0; color: inherit; background: transparent; border: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.sort-button:hover, .sort-button:focus-visible { color: var(--blue-700); }
.sort-button span { min-width: 1em; font-size: 1rem; }
.calendar-heading { margin-top: 48px; }
.forfeit-badge { display: inline-block; padding: 4px 8px; color: #8d1a12; background: #fee4e2; border-radius: 7px; font-size: .78rem; font-weight: 800; }

.form-card { padding: clamp(22px, 4vw, 38px); background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: grid; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
label { color: var(--blue-950); font-weight: 800; }
input, textarea, select { width: 100%; min-height: 46px; padding: 10px 12px; color: var(--ink); background: var(--white); border: 1px solid #bdcadc; border-radius: 10px; }
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(255, 210, 31, .4); border-color: var(--blue-700); }
.help { color: var(--muted); font-size: 0.85rem; }
.checkbox { display: flex; align-items: center; gap: 10px; }
.checkbox input { width: 18px; min-height: 18px; }

.flash { margin-top: 22px; padding: 14px 18px; border-radius: 12px; font-weight: 700; }
.flash-success { color: #075a34; background: #d8f5e7; border: 1px solid #8ed8b4; }
.flash-error { color: #8d1a12; background: #fee4e2; border: 1px solid #f4a49d; }
.empty { padding: 40px; color: var(--muted); background: var(--white); border: 1px dashed #aebdd1; border-radius: var(--radius); text-align: center; }
.article-content { font-size: 1.08rem; }
.article-content p { margin: 0 0 1.2em; }
.article-content > *:first-child { margin-top: 0; }
.article-content > *:last-child { margin-bottom: 0; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.wp-block-image img { border-radius: var(--radius); }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 36px; }
.pagination .page-numbers { display: grid; min-width: 42px; min-height: 42px; place-items: center; padding: 6px 10px; color: var(--blue-900); background: #fff; border: 1px solid var(--border); border-radius: 9px; text-decoration: none; font-weight: 800; }
.pagination .current { color: var(--blue-950); background: var(--yellow-500); }
.team-results-grid { display: grid; gap: 22px; }
.team-results-row { padding: 25px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.team-results-row h3 { margin: 0 0 18px; font-size: 1.4rem; }
.team-results-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.result-block { padding: 18px; background: var(--surface); border-radius: 14px; }
.result-block .label { display: block; margin-bottom: 8px; color: var(--blue-700); font-size: .75rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.standings-position { width: 70px; font-size: 1.15rem; font-weight: 900; }
.contact-status { margin-bottom: 20px; }
.article-cover { width: 100%; max-height: 500px; margin-bottom: 32px; object-fit: cover; border-radius: var(--radius); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-item { position: relative; overflow: hidden; min-height: 240px; border-radius: var(--radius); background: #dce8f8; }
.gallery-item img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-caption { position: absolute; inset: auto 0 0; padding: 28px 16px 14px; color: var(--white); background: linear-gradient(transparent, rgba(7, 27, 60, .92)); font-weight: 800; }
.sponsor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.sponsor { display: grid; min-height: 150px; place-items: center; padding: 24px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; font-weight: 900; }
.sponsor img { max-width: 170px; max-height: 90px; object-fit: contain; }
.team-header { display: flex; align-items: center; gap: 22px; }
.team-symbol { display: grid; width: 80px; aspect-ratio: 1; place-items: center; color: var(--blue-950); background: var(--yellow-500); border-radius: 18px; font-size: 1.5rem; font-weight: 1000; }

.site-footer { padding-block: 48px; color: #d7e4f7; background: var(--blue-950); border-top: 6px solid var(--yellow-500); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.site-footer strong { color: var(--white); }
.site-footer p { margin: 8px 0 0; color: #aebfda; }
.site-footer a { color: var(--yellow-500); }

.admin-shell { min-height: 100vh; background: #edf2f8; }
.admin-header { color: var(--white); background: var(--blue-950); border-bottom: 5px solid var(--yellow-500); }
.admin-bar { min-height: 72px; display: flex; align-items: center; gap: 18px; }
.admin-brand { margin-right: auto; text-decoration: none; font-weight: 900; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.admin-nav a { padding: 8px 10px; border-radius: 8px; color: #dbe8ff; text-decoration: none; font-size: .88rem; font-weight: 700; }
.admin-nav a:hover, .admin-nav a.active { color: var(--blue-950); background: var(--yellow-500); }
.admin-main { padding-block: 36px 70px; }
.admin-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.admin-title h1 { margin: 0; line-height: 1.1; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { padding: 24px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); }
.stat strong { display: block; color: var(--blue-900); font-size: 2.2rem; line-height: 1; }
.stat span { color: var(--muted); }
.login-page { display: grid; min-height: 100vh; place-items: center; padding: 30px; background: linear-gradient(135deg, var(--blue-950), var(--blue-700)); }
.login-box { width: min(460px, 100%); }
.login-brand { margin-bottom: 20px; color: var(--white); text-align: center; }
.login-brand .brand-mark { margin: 0 auto 12px; }

@media (max-width: 980px) {
    .menu-toggle { display: block; }
    .main-nav { display: none; position: absolute; inset: calc(100% - 1px) 20px auto; flex-direction: column; align-items: stretch; max-height: calc(100vh - 90px); overflow-y: auto; padding: 12px; background: var(--blue-950); border: 1px solid #36577f; border-radius: 0 0 14px 14px; }
    .main-nav.is-open { display: flex; }
    .main-nav > ul { display: block; }
    .main-nav .menu-parent { display: grid; grid-template-columns: 1fr auto; }
    .main-nav .menu-parent > a { display: block; }
    .submenu-toggle { margin: 0; }
    .sub-menu { position: static; grid-column: 1 / -1; margin: 4px 0 8px 12px; background: #0d2d60; border: 0; box-shadow: none; }
    .menu-parent:hover > .sub-menu { display: none; }
    .menu-parent.submenu-open > .sub-menu, .menu-parent:focus-within > .sub-menu { display: block; }
    .hero-inner { min-height: 390px; grid-template-columns: 1fr; }
    .hero-badge { display: none; }
    .cards, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .sponsor-grid, .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-bar { padding-block: 14px; flex-wrap: wrap; }
    .admin-brand { width: 100%; }
}

@media (max-width: 680px) {
    .container, .narrow { width: min(100% - 28px, 1180px); }
    .header-inner { min-height: 74px; }
    .brand small { display: none; }
    .hero-inner { min-height: 360px; padding-block: 50px; }
    .hero h1 { font-size: clamp(2.55rem, 14vw, 4.1rem); }
    .section { padding-block: 52px; }
    .section-heading, .admin-title { align-items: flex-start; flex-direction: column; }
    .cards, .match-grid, .gallery-grid, .sponsor-grid, .form-grid, .stat-grid, .footer-grid { grid-template-columns: 1fr; }
    .team-results-pair { grid-template-columns: 1fr; }
    .match-teams { grid-template-columns: 1fr auto 1fr; font-size: .95rem; }
    .form-group.full { grid-column: auto; }
    .page-banner { padding-block: 40px; }
    .admin-nav { overflow-x: auto; flex-wrap: nowrap; width: 100%; padding-bottom: 4px; }
    .admin-nav a { min-width: max-content; }
}
