/*
Theme Name: Kłos Budzyń
Theme URI: https://www.facebook.com/BksKlosbudzyn/
Author: Codex
Description: Nowoczesny, responsywny motyw WordPress dla Budzyńskiego Klubu Sportowego Kłos Budzyń.
Version: 2.0.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: klos-budzyn
*/

:root {
  --green-950: #03140d;
  --green-900: #07261a;
  --green-800: #0a3d27;
  --green-700: #0f5b36;
  --green-600: #147a45;
  --green-500: #1b9855;
  --gold: #d6a92e;
  --gold-light: #f3d878;
  --cream: #f5f3eb;
  --white: #ffffff;
  --ink: #101511;
  --muted: #566158;
  --line: #dce2dc;
  --danger: #b42318;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 22px 70px rgba(3, 20, 13, .12);
  --container: 1280px;
  --header-h: 92px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: Montserrat, "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.6; }
body.menu-open { overflow: hidden; }
body.menu-open .site-header { backdrop-filter: none; }
body.admin-bar .site-header { top: 32px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
button, a { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:active, a:active { opacity: .84; }
:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed !important; inset: 12px auto auto 12px; z-index: 60; width: auto; height: auto; clip: auto; padding: 12px 18px; border-radius: 8px; background: var(--white); color: var(--green-950); }
.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.section { padding: 104px 0; }
.section--white { background: var(--white); }
.section--dark { background: var(--green-950); color: var(--white); }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px; color: var(--green-600); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--gold); }
.section--dark .eyebrow { color: var(--gold-light); }
.section-title { max-width: 900px; margin: 0; font-family: Montserrat, "Segoe UI", Arial, sans-serif; font-size: clamp(2rem, 4vw, 40px); font-weight: 900; line-height: 1.08; letter-spacing: -.035em; text-transform: uppercase; text-wrap: balance; }
.section-intro { max-width: 550px; margin: 24px 0 0; color: var(--muted); font-size: 1.08rem; }
.section--dark .section-intro { color: #afbab2; }
.section-head { position: relative; display: flex; justify-content: space-between; align-items: end; gap: 60px; margin-bottom: 42px; padding-bottom: 28px; border-bottom: 1px solid rgba(16,21,17,.14); }
.section-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 72px; height: 3px; background: var(--gold); }
.section--dark .section-head { border-bottom-color: rgba(255,255,255,.15); }
.section-head__action { flex: 0 0 auto; }

.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 23px; border: 1px solid transparent; border-radius: 999px; background: var(--green-600); color: var(--white); font-size: .9rem; font-weight: 800; cursor: pointer; transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease; }
.button:hover { transform: translateY(-2px); background: var(--green-700); box-shadow: 0 10px 26px rgba(15, 91, 54, .22); }
.button--gold { background: var(--gold); color: var(--green-950); }
.button--gold:hover { background: var(--gold-light); }
.button--ghost { border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.06); color: var(--white); }
.button--ghost:hover { background: var(--white); color: var(--green-950); }
.text-link { display: inline-flex; align-items: center; gap: 9px; color: var(--green-700); font-weight: 800; }
.text-link .icon { transition: transform .2s ease; }
.text-link:hover .icon { transform: translateX(4px); }

.site-header { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h); background: rgba(3,20,13,.98); color: var(--white); border-bottom: 1px solid rgba(255,255,255,.08); transition: box-shadow .25s ease; }
.site-header.is-scrolled { box-shadow: 0 8px 35px rgba(0,0,0,.22); backdrop-filter: blur(12px); }
.header-inner { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; }
.header-navigation { position: relative; z-index: 4; min-width: 0; display: flex; align-items: center; gap: 28px; }
.site-logo { position: relative; z-index: 3; justify-self: center; align-self: start; display: grid; place-items: center; width: 118px; height: 132px; padding: 0; background: transparent; filter: drop-shadow(0 12px 15px rgba(0,0,0,.32)); }
.site-logo img, .site-logo .custom-logo { width: 118px; height: 132px; max-width: none; max-height: none; object-fit: contain; }
.primary-menu { display: flex; align-items: center; gap: 22px; margin: 0; padding: 0; list-style: none; }
.primary-menu a { position: relative; min-height: 44px; display: inline-flex; align-items: center; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.primary-menu a::after { content: ""; position: absolute; right: 0; bottom: 7px; left: 0; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .2s ease; }
.primary-menu a:hover::after { transform: scaleX(1); transform-origin: left; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 11px; }
.social-link, .menu-toggle { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.26); border-radius: 50%; background: transparent; color: var(--white); cursor: pointer; }
.social-link:hover { border-color: var(--gold); color: var(--gold-light); }
.menu-toggle { flex: 0 0 auto; display: grid; border: 0; border-radius: 8px; }
.menu-toggle:hover { background: rgba(255,255,255,.1); color: var(--gold-light); }
.menu-toggle .icon { width: 31px; height: 31px; stroke-width: 2; }
.header-phone { min-height: 46px; display: inline-flex; align-items: center; gap: 8px; padding: 0 17px; border-radius: 999px; background: var(--gold); color: var(--green-950); font-size: .84rem; font-weight: 900; }

.hero { position: relative; min-height: 880px; display: flex; align-items: end; overflow: hidden; background: var(--green-950); color: var(--white); }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3,20,13,.96) 0%, rgba(3,20,13,.72) 45%, rgba(3,20,13,.22) 78%), linear-gradient(0deg, rgba(3,20,13,.96) 0%, transparent 45%); }
.hero-noise { position: absolute; inset: 0; opacity: .07; background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 5px 5px; }
.hero-content { position: relative; z-index: 2; padding: 200px 0 150px; }
.hero-copy { max-width: 760px; }
.hero-label { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px; padding: 8px 14px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.06); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; backdrop-filter: blur(8px); }
.hero-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(214,169,46,.14); }
.hero h1 { max-width: 100%; margin: 0; font-family: Montserrat, "Segoe UI", Arial, sans-serif; font-size: 1rem; font-weight: 900; line-height: .92; letter-spacing: -.055em; text-transform: uppercase; }
.hero h1 span { display: block; }
.hero-title__club { color: var(--white); font-size: clamp(3.7rem, 6.3vw, 6.45rem); }
.hero-title__motto { margin-top: .12em; color: var(--gold-light); font-size: clamp(2.8rem, 4.7vw, 4.8rem); white-space: nowrap; }
.hero-title__custom { color: var(--gold-light); font-size: clamp(3.2rem, 5.7vw, 5.7rem); }
.hero-description { max-width: 590px; margin: 30px 0 0; color: #d2dad4; font-size: clamp(1rem, 1.5vw, 1.22rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.hero-side-label { position: absolute; z-index: 2; right: 28px; top: 50%; display: flex; align-items: center; gap: 14px; color: rgba(255,255,255,.72); font-size: .68rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; writing-mode: vertical-rl; }
.hero-side-label::before { content: ""; width: 1px; height: 70px; background: rgba(255,255,255,.38); }
.match-bar { position: absolute; z-index: 3; inset: auto 0 0; background: var(--white); color: var(--ink); box-shadow: 0 -14px 45px rgba(3,20,13,.16); }
.match-bar__inner { min-height: 98px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 36px; }
.match-kicker { display: flex; align-items: center; gap: 12px; color: var(--green-700); font-size: .76rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.match-kicker__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.match-copy { display: flex; justify-content: center; align-items: baseline; gap: 14px; }
.match-copy strong { font-family: Montserrat, "Segoe UI", Arial, sans-serif; font-size: 1.45rem; font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; }
.match-copy span { color: var(--muted); font-size: .88rem; }

.community-strip { background: var(--green-700); color: var(--white); }
.community-inner { min-height: 76px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; }
.community-item { min-height: 76px; display: flex; align-items: center; justify-content: center; gap: 12px; border-right: 1px solid rgba(255,255,255,.18); }
.community-item:last-child { border: 0; }
.community-item strong { font-size: 1.15rem; }
.community-item span { color: #d7e4da; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }

.section--news { background: var(--white); color: var(--ink); }
.section--news .section-intro { color: var(--muted); }
.carousel-shell { min-width: 0; }
.carousel-controls { display: flex; justify-content: flex-end; gap: 10px; margin: -4px 0 18px; }
.carousel-button { width: 48px; height: 48px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--green-800); transition: color .2s ease, background-color .2s ease, border-color .2s ease, opacity .2s ease; }
.carousel-button:hover:not(:disabled) { border-color: var(--green-700); background: var(--green-700); color: var(--white); }
.carousel-button:disabled { cursor: not-allowed; opacity: .35; }
.carousel-button--prev .icon { transform: rotate(180deg); }
.carousel-track { display: flex; gap: 28px; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 20px; scroll-behavior: smooth; scroll-snap-type: x mandatory; scroll-padding-inline: 2px; overscroll-behavior-inline: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline-offset: 3px; }
.news-grid { display: flex; }
.news-card { position: relative; flex: 0 0 calc((100% - 56px) / 3); min-height: 0; aspect-ratio: 169 / 104; display: flex; flex-direction: column; justify-content: end; overflow: hidden; border: 1px solid rgba(3,20,13,.1); border-radius: 10px; background: var(--green-950); color: var(--white); box-shadow: 0 14px 32px rgba(3,20,13,.12); scroll-snap-align: start; }
.news-card:first-child { min-height: 0; }
.news-card__media { position: absolute; inset: 0; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-card__media--crest { display: grid; place-items: center; padding: 40px; background: radial-gradient(circle, var(--green-700), var(--green-950) 68%); }
.news-card__media--crest img { width: min(72%, 280px); height: auto; object-fit: contain; }
.news-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(3,20,13,.98) 0%, rgba(3,20,13,.72) 38%, rgba(3,20,13,.04) 80%); }
.news-card:hover .news-card__media img { transform: scale(1.045); }
.news-card__body { position: relative; z-index: 2; padding: 24px 22px; }
.news-card:first-child .news-card__body { padding: 24px 22px; }
.news-card__meta { display: flex; gap: 11px; margin-bottom: 12px; color: var(--gold-light); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.news-card h3 { margin: 0; font-size: clamp(1.08rem, 1.45vw, 1.35rem); font-weight: 800; line-height: 1.26; letter-spacing: -.025em; }
.news-card:first-child h3 { font-size: clamp(1.08rem, 1.45vw, 1.35rem); }
.news-card p { margin: 12px 0 0; color: #cbd5ce; }
.news-card__category { display: inline-block; margin-top: 11px; color: var(--gold-light); font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }

.match-section { position: relative; overflow: hidden; }
.match-section::before { content: "KŁOS"; position: absolute; right: -2vw; top: 35px; color: rgba(255,255,255,.025); font-family: Impact, sans-serif; font-size: 26vw; line-height: 1; }
.match-panel { position: relative; display: grid; grid-template-columns: .65fr 1.35fr; gap: 60px; align-items: center; overflow: hidden; padding: 54px; border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.025)); box-shadow: 0 26px 70px rgba(0,0,0,.22); }
.match-panel::after { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--gold), var(--gold-light) 36%, transparent 72%); }
.match-panel__label { color: var(--gold-light); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.match-panel__date { max-width: 100%; margin: 14px 0 0; font-family: Montserrat, "Segoe UI", Arial, sans-serif; font-size: 40px; font-weight: 900; line-height: 1.05; letter-spacing: -.045em; white-space: nowrap; }
.match-panel__details { margin-top: 20px; color: #b9c5bc; }
.match-panel__round { margin-left: 7px; color: #b9c5bc; letter-spacing: .08em; }
.match-panel__status { min-height: 24px; margin: -8px 0 22px; color: #84968a; font-size: .78rem; }
.match-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.team { display: grid; justify-items: center; gap: 17px; text-align: center; }
.team-crest { width: 116px; height: 116px; display: grid; place-items: center; }
.team img { width: 116px; height: 116px; object-fit: contain; }
.team-placeholder { width: 104px; height: 104px; border-radius: 25px; background: var(--white); }
.team-placeholder { display: grid; place-items: center; color: var(--green-950); font-family: Impact, sans-serif; font-size: 2rem; }
.team strong { font-size: 1.1rem; text-transform: uppercase; }
.versus { min-width: 64px; min-height: 64px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; background: rgba(255,255,255,.06); color: var(--gold-light); font-family: Montserrat, "Segoe UI", Arial, sans-serif; font-size: 1.15rem; font-weight: 900; }

.scoreboard-section { background: var(--cream); }
.scoreboard-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow); }
.scoreboard-meta { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 28px; border-bottom: 1px solid var(--line); }
.scoreboard-meta strong { color: var(--green-900); font-size: 1.08rem; }
.scoreboard-meta span { color: var(--muted); font-size: .82rem; }
.scoreboard-scroll { overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-color: var(--green-600) #edf0ed; }
.scoreboard-scroll:focus-visible { outline-offset: -4px; }
.scoreboard-table { width: 100%; min-width: 720px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.scoreboard-table th, .scoreboard-table td { padding: 15px 18px; border-bottom: 1px solid #e8ece8; text-align: center; white-space: nowrap; }
.scoreboard-table th { background: var(--green-900); color: var(--white); font-size: .73rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.scoreboard-table th:nth-child(2), .scoreboard-table td:nth-child(2) { text-align: left; }
.scoreboard-table tbody tr { transition: background-color .18s ease; }
.scoreboard-table tbody tr:hover { background: #f4f8f5; }
.scoreboard-table tbody tr.is-klos { background: #e9f7ee; box-shadow: inset 5px 0 0 var(--gold); }
.score-position { color: var(--muted); font-weight: 800; }
.score-team { min-width: 250px; font-weight: 800; }
.score-points { color: var(--green-700); font-weight: 900; }
.score-goals { font-weight: 700; }
.score-team-badge { display: inline-flex; align-items: center; min-height: 24px; margin-left: 10px; padding: 2px 8px; border-radius: 999px; background: var(--green-700); color: var(--white); font-size: .62rem; letter-spacing: .07em; vertical-align: middle; }
.scoreboard-loading td, .scoreboard-error td { height: 148px; color: var(--muted); text-align: center !important; }
.scoreboard-error td { color: var(--danger); font-weight: 700; }
.scoreboard-spinner { width: 22px; height: 22px; display: inline-block; margin-right: 9px; border: 3px solid #cbd5cd; border-top-color: var(--green-600); border-radius: 50%; vertical-align: -5px; animation: scoreboard-spin .8s linear infinite; }
.scoreboard-footer { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 16px 28px; color: var(--muted); font-size: .82rem; }
.scoreboard-footer > span, .scoreboard-footer a { display: inline-flex; align-items: center; gap: 9px; }
.scoreboard-footer a { color: var(--green-700); font-weight: 800; }
.scoreboard-sources { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px 20px; }
.scoreboard-sources a { min-height: 44px; }
.scoreboard-footer .icon { width: 17px; height: 17px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green-500); box-shadow: 0 0 0 4px rgba(27,152,85,.13); }
.scoreboard-refresh:disabled { cursor: wait; opacity: .7; }
.scoreboard-refresh.is-loading .icon { animation: scoreboard-spin .8s linear infinite; }
.scoreboard-noscript { padding: 14px 18px; border-left: 4px solid var(--gold); background: var(--white); }
.scoreboard-noscript a { color: var(--green-700); font-weight: 800; text-decoration: underline; }
.scoreboard-card--sofa { max-width: 880px; margin-inline: auto; }
.sofa-standings-frame { padding: 24px; background: #f4f5f7; }
.sofa-standings-frame iframe { display: block; width: 100%; max-width: 768px; height: 1043px; margin-inline: auto; border: 0; background: var(--white); }
@keyframes scoreboard-spin { to { transform: rotate(360deg); } }

.calendar-section { background: var(--white); }
.calendar-tabs { display: inline-flex; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--cream); }
.calendar-tab { min-height: 44px; padding: 0 19px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 800; transition: background-color .2s ease, color .2s ease; }
.calendar-tab.is-active { background: var(--green-800); color: var(--white); }
.calendar-list { display: grid; gap: 10px; }
.calendar-loading, .calendar-empty { min-height: 160px; display: grid; place-items: center; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }
.fixture-card { min-height: 112px; display: grid; grid-template-columns: 170px minmax(0,1fr) 240px; align-items: center; gap: 30px; padding: 20px 28px; border: 1px solid var(--line); border-radius: 16px; background: #fbfcfb; transition: border-color .2s ease, box-shadow .2s ease; }
.fixture-card:hover { border-color: #b8c9bc; box-shadow: 0 10px 30px rgba(3,20,13,.07); }
.fixture-card__meta { display: grid; gap: 3px; }
.fixture-card__meta span { color: var(--green-600); font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.fixture-card__meta strong { font-size: 1rem; }
.fixture-card__matchup { display: grid; grid-template-columns: minmax(0,1fr) 150px minmax(0,1fr); align-items: center; gap: 18px; text-align: center; }
.fixture-card__matchup strong:first-child { text-align: right; }
.fixture-card__matchup strong:last-child { text-align: left; }
.fixture-card__matchup strong.is-klos { color: var(--green-700); }
.fixture-score { min-height: 43px; display: grid; place-items: center; padding: 6px 12px; border-radius: 9px; background: var(--cream); color: var(--muted); font-size: .76rem; font-weight: 900; text-transform: uppercase; }
.fixture-score.is-result { background: var(--green-900); color: var(--gold-light); font-family: Impact, sans-serif; font-size: 1.55rem; letter-spacing: .05em; }
.fixture-card__place { margin: 0; color: var(--muted); font-size: .8rem; text-align: right; }
.calendar-source { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 22px; color: var(--muted); font-size: .8rem; }
.calendar-source > span, .calendar-source a { display: inline-flex; align-items: center; gap: 9px; }
.calendar-source a { color: var(--green-700); font-weight: 800; }
.calendar-source .icon { width: 17px; height: 17px; }

.section--table { background: var(--green-950); color: var(--white); }
.section--table::before { content: "IV"; position: absolute; right: 0; color: rgba(255,255,255,.025); font-family: Impact, sans-serif; font-size: 33vw; line-height: .72; pointer-events: none; }
.section--table { position: relative; overflow: hidden; }
.section--table .container { position: relative; z-index: 1; }
.section--table .eyebrow { color: var(--gold-light); }
.section--table .section-intro { color: #aab8ae; }
.section--table .scoreboard-card { border-color: rgba(255,255,255,.15); border-radius: 10px; background: var(--green-900); box-shadow: none; }
.section--table .scoreboard-meta { border-color: rgba(255,255,255,.12); }
.section--table .scoreboard-meta strong { color: var(--white); }
.section--table .scoreboard-meta span, .section--table .scoreboard-footer { color: #aab8ae; }
.section--table .scoreboard-table th { background: var(--gold); color: var(--green-950); }
.section--table .scoreboard-table td { border-color: rgba(255,255,255,.09); color: #e9efea; }
.section--table .scoreboard-table tbody tr:nth-child(even) { background: rgba(255,255,255,.025); }
.section--table .scoreboard-table tbody tr:hover { background: rgba(255,255,255,.07); }
.section--table .scoreboard-table tbody tr.is-klos { background: var(--gold); box-shadow: inset 6px 0 0 var(--white); }
.section--table .scoreboard-table tbody tr.is-klos td { color: var(--green-950); border-color: rgba(3,20,13,.15); }
.section--table .score-position, .section--table .score-points { color: var(--gold-light); }
.section--table tr.is-klos .score-position, .section--table tr.is-klos .score-points { color: var(--green-950); }
.section--table .score-team-badge { background: var(--green-950); color: var(--gold-light); }
.section--table .scoreboard-footer a { color: var(--gold-light); }

.team-section { position: relative; overflow: hidden; background: radial-gradient(circle at 85% 18%, rgba(27,152,85,.18), transparent 30%), linear-gradient(150deg, #061d14, var(--green-950) 68%); color: var(--white); }
.team-section::before { content: ""; position: absolute; right: -8vw; bottom: -18vw; width: min(68vw, 860px); aspect-ratio: 1; background: url("assets/images/klos-crest-hd.png") center / contain no-repeat; opacity: .025; pointer-events: none; }
.team-section .section-head { border-bottom-color: rgba(255,255,255,.14); }
.team-section .eyebrow, .team-section .text-link { color: var(--gold-light); }
.team-section .section-intro { color: #b9c8bf; }
.team-section .carousel-button { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.05); color: var(--white); }
.team-section .carousel-button:hover:not(:disabled) { border-color: var(--gold); background: var(--gold); color: var(--green-950); }
.players-grid { display: flex; gap: 18px; }
.player-card { position: relative; flex: 0 0 calc((100% - 54px) / 4); overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: #04170f; color: var(--white); box-shadow: 0 18px 44px rgba(0,0,0,.24); scroll-snap-align: start; transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease; }
.player-card:hover { border-color: rgba(243,216,120,.6); transform: translateY(-4px); box-shadow: 0 24px 55px rgba(0,0,0,.32); }
.player-card__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: linear-gradient(155deg, #0a2d20, #03140d 72%); isolation: isolate; }
.player-card__media::after { content: ""; position: absolute; z-index: 3; inset: auto 0 0; height: 38%; background: linear-gradient(transparent, rgba(3,20,13,.95)); pointer-events: none; }
.player-card__watermark { position: absolute; z-index: 0; top: 9%; left: 50%; width: 82%; height: 72%; object-fit: contain; transform: translateX(-50%); opacity: .11; filter: grayscale(1) brightness(1.65); }
.player-card__photo { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; transition: transform .3s ease; }
.player-card:hover .player-card__photo { transform: scale(1.025); }
.player-card__placeholder { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.5); font-size: .72rem; font-weight: 800; letter-spacing: .12em; line-height: 1.5; text-align: center; text-transform: uppercase; }
.player-card__number { position: absolute; z-index: 4; left: 16px; bottom: 0; min-width: 76px; min-height: 76px; display: grid; place-items: center; padding: 8px 12px; border-radius: 6px 6px 0 0; background: var(--gold); color: var(--green-950); font-family: Montserrat, "Segoe UI", Arial, sans-serif; font-size: 2.35rem; font-weight: 900; line-height: 1; letter-spacing: -.06em; }
.player-card__body { position: relative; min-height: 126px; padding: 22px 16px 24px; border-top: 1px solid rgba(255,255,255,.08); }
.player-card__first-name { display: block; color: var(--gold-light); font-size: .72rem; font-weight: 900; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; }
.player-card__body h3 { margin: 4px 0 7px; font-size: 1.25rem; font-weight: 900; line-height: 1.06; letter-spacing: -.025em; overflow-wrap: anywhere; text-transform: uppercase; }
.player-card__position { display: block; color: #dce6df; font-size: .7rem; font-weight: 800; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; }
.empty-content { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 34px; padding: 36px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.empty-content img { width: 130px; height: 130px; object-fit: contain; }
.empty-content h3 { margin: 0; font-size: 1.4rem; }
.empty-content p { margin: 6px 0 20px; color: var(--muted); }

.club-section { border-top: 1px solid var(--line); }
.sponsors-section { background: #eef2ee; }
.sponsors-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; }
.sponsor-card { min-height: 126px; display: grid; place-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
a.sponsor-card:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 12px 30px rgba(3,20,13,.08); }
.sponsor-card img { width: 100%; max-width: 190px; max-height: 84px; object-fit: contain; }
.sponsor-card strong { color: var(--green-800); font-size: 1.15rem; text-align: center; }
.sponsor-invite { padding: 58px; border-radius: var(--radius-lg); background: var(--green-950); color: var(--white); text-align: center; }
.sponsor-invite .eyebrow { color: var(--gold-light); }
.sponsor-invite h3 { margin: 0; font-family: Montserrat, "Segoe UI", Arial, sans-serif; font-size: clamp(2rem, 4vw, 40px); font-weight: 900; line-height: 1.08; letter-spacing: -.035em; text-transform: uppercase; }
.sponsor-invite p:not(.eyebrow) { max-width: 600px; margin: 12px auto 25px; color: #b8c4bb; }

.story-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 90px; align-items: center; }
.story-image { position: relative; min-height: 620px; overflow: hidden; border-radius: var(--radius-lg); background: var(--green-900); }
.story-image img { width: 100%; height: 100%; object-fit: cover; }
.story-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(3,20,13,.45), transparent 55%); }
.story-badge { position: absolute; z-index: 2; right: 22px; bottom: 22px; width: 160px; height: 160px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--green-950); text-align: center; transform: rotate(-7deg); }
.story-badge strong { font-family: Montserrat, "Segoe UI", Arial, sans-serif; font-size: 1.35rem; font-weight: 900; line-height: 1.05; text-transform: uppercase; }
.story-copy h2 { margin: 0; font-family: Montserrat, "Segoe UI", Arial, sans-serif; font-size: clamp(2rem, 4vw, 40px); font-weight: 900; line-height: 1.08; letter-spacing: -.035em; text-transform: uppercase; }
.story-copy > p { max-width: 600px; color: var(--muted); font-size: 1.1rem; }
.achievement-list { display: grid; gap: 0; margin: 38px 0 0; padding: 0; list-style: none; }
.achievement-list li { display: grid; grid-template-columns: 74px 1fr; gap: 18px; padding: 19px 0; border-top: 1px solid var(--line); }
.achievement-list strong { color: var(--green-700); }
.achievement-list span { font-weight: 700; }

.contact-section { position: relative; overflow: hidden; background: var(--gold); color: var(--green-950); }
.contact-section::after { content: ""; position: absolute; right: -120px; bottom: -260px; width: 520px; height: 520px; border: 90px solid rgba(3,20,13,.07); border-radius: 50%; }
.contact-grid { position: relative; z-index: 2; display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; }
.contact-copy h2 { margin: 0; font-family: Montserrat, "Segoe UI", Arial, sans-serif; font-size: clamp(2rem, 4vw, 40px); font-weight: 900; line-height: 1.08; letter-spacing: -.035em; text-transform: uppercase; }
.contact-copy > p { max-width: 470px; font-size: 1.08rem; }
.contact-details { display: grid; gap: 14px; margin-top: 35px; }
.contact-item { display: flex; align-items: center; gap: 14px; font-weight: 800; }
.contact-item__icon { flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(3,20,13,.25); border-radius: 50%; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 34px; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { color: var(--green-900); font-size: .75rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.field input, .field textarea { width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: #fbfcfb; color: var(--ink); }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--green-600); outline: 3px solid rgba(27,152,85,.14); }
.contact-form .button { justify-self: start; }
.form-status { grid-column: 1 / -1; margin: 0; padding: 12px 14px; border-radius: 10px; background: #e9f8ef; color: var(--green-800); font-weight: 700; }
.form-status--error { background: #fff0ee; color: var(--danger); }

.site-footer { padding: 72px 0 28px; background: var(--green-950); color: var(--white); }
.footer-top { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 65px; padding-bottom: 55px; }
.footer-brand { display: flex; align-items: center; gap: 18px; }
.footer-brand img { width: 84px; height: 84px; object-fit: contain; }
.footer-brand strong { display: block; font-size: 1.25rem; }
.footer-brand span { color: #9daaa0; font-size: .85rem; }
.footer-col h3 { margin: 0 0 16px; color: var(--gold-light); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.footer-col ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; color: #bec8c0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; padding-top: 25px; border-top: 1px solid rgba(255,255,255,.12); color: #8e9b91; font-size: .78rem; }
.mobile-cta { display: none; }

.entry-wrap { min-height: 70vh; padding: 170px 0 90px; }
.entry { width: min(calc(100% - 40px), 880px); margin-inline: auto; }
.entry h1 { margin: 0 0 30px; font-family: Montserrat, "Segoe UI", Arial, sans-serif; font-size: clamp(2rem, 4vw, 40px); font-weight: 900; line-height: 1.08; letter-spacing: -.035em; text-transform: uppercase; }
.entry-content { font-size: 1.08rem; }
.entry-content > * + * { margin-top: 1.5em; }
body:not(.home) .site-header { background: var(--green-950); }

.motion-ready .reveal { opacity: 0; transform: translateY(12px); transition: opacity .38s ease, transform .38s ease; }
.motion-ready .reveal.is-visible { opacity: 1; transform: none; }

@media (min-width: 1051px) {
  .primary-menu.is-open { position: fixed; inset: 0; z-index: 60; min-height: 100vh; height: 100dvh; flex-direction: column; justify-content: center; gap: 8px; padding: 110px 24px; background: rgba(3,20,13,.985); }
  .primary-menu.is-open a { min-height: 58px; font-size: 1.6rem; }
  .menu-toggle { position: relative; z-index: 2; }
}

@media (max-width: 1050px) {
  :root { --header-h: 78px; }
  .container { width: min(calc(100% - 30px), var(--container)); }
  .header-inner { grid-template-columns: 1fr auto 1fr; }
  .site-logo { justify-self: center; width: 91px; height: 101px; }
  .site-logo img, .site-logo .custom-logo { width: 88px; height: 101px; }
  .primary-menu { position: fixed; inset: 0; z-index: 60; min-height: 100vh; height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 100px 24px; background: var(--green-950); opacity: 0; visibility: hidden; transform: translateY(-12px); transition: opacity .22s ease, visibility .22s ease, transform .22s ease; }
  .primary-menu.is-open { opacity: 1; visibility: visible; transform: none; }
  .primary-menu a { font-size: 1.45rem; }
  .header-actions { position: relative; z-index: 2; }
  .menu-toggle { display: grid; }
  .social-link { display: none; }
  .hero { min-height: 800px; }
  .hero-content { padding-top: 160px; }
  .hero-bg::after { background: linear-gradient(90deg, rgba(3,20,13,.94), rgba(3,20,13,.48)), linear-gradient(0deg, rgba(3,20,13,.97), transparent 55%); }
  .match-bar__inner { gap: 20px; }
  .news-card { flex-basis: calc((100% - 28px) / 2); }
  .player-card { flex-basis: calc((100% - 36px) / 3); }
  .story-grid, .contact-grid { grid-template-columns: 1fr; gap: 55px; }
  .fixture-card { grid-template-columns: 135px minmax(0,1fr); }
  .fixture-card__place { grid-column: 1 / -1; text-align: left; }
  .players-grid, .sponsors-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .story-image { min-height: 520px; }
}

@media (max-width: 760px) {
  body.admin-bar .site-header { top: 46px; }
  .section { padding: 78px 0; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 25px; }
  .header-phone { width: 46px; padding: 0; justify-content: center; }
  .header-phone span { display: none; }
  .hero { min-height: 760px; }
  .hero-title__club { font-size: clamp(3.6rem, 15.2vw, 5.8rem); }
  .hero-title__motto { font-size: clamp(2.45rem, 10.3vw, 4rem); }
  .hero-title__custom { font-size: clamp(3rem, 13vw, 5rem); }
  .hero-content { padding-bottom: 160px; }
  .hero-side-label { display: none; }
  .match-bar__inner { min-height: 112px; grid-template-columns: 1fr auto; gap: 8px; }
  .match-copy { grid-column: 1 / -1; grid-row: 1; justify-content: flex-start; align-self: end; }
  .match-copy strong { font-size: 1.5rem; }
  .match-kicker { grid-row: 2; align-self: start; }
  .match-bar .text-link { grid-row: 2; }
  .community-inner { grid-template-columns: 1fr 1fr; }
  .community-item { border-bottom: 1px solid rgba(255,255,255,.18); }
  .community-item:nth-child(2) { border-right: 0; }
  .carousel-controls { justify-content: flex-start; }
  .carousel-track { margin-right: -15px; gap: 16px; padding-right: 15px; }
  .news-card { flex-basis: min(84vw, 360px); }
  .player-card { flex-basis: min(72vw, 300px); }
  .news-card, .news-card:first-child, .news-card:not(:first-child) { grid-row: auto; min-height: 340px; }
  .match-panel { grid-template-columns: 1fr; gap: 45px; padding: 32px 22px; }
  .match-teams { gap: 12px; }
  .team-crest, .team img { width: 82px; height: 82px; }
  .team-placeholder { width: 76px; height: 76px; border-radius: 18px; }
  .team strong { font-size: .82rem; }
  .versus { min-width: 54px; min-height: 54px; font-size: .9rem; }
  .scoreboard-meta, .scoreboard-footer { align-items: flex-start; flex-direction: column; gap: 8px; padding: 18px; }
  .scoreboard-sources { width: 100%; align-items: flex-start; justify-content: flex-start; flex-direction: column; gap: 0; }
  .scoreboard-table th, .scoreboard-table td { padding: 13px 14px; }
  .sofa-standings-frame { padding: 8px; }
  .calendar-tabs { width: 100%; }
  .calendar-tab { flex: 1; }
  .fixture-card { grid-template-columns: 1fr; gap: 16px; padding: 20px; }
  .fixture-card__matchup { grid-template-columns: minmax(0,1fr) 105px minmax(0,1fr); gap: 10px; }
  .fixture-card__matchup strong { font-size: .88rem; }
  .fixture-card__place { grid-column: auto; }
  .calendar-source { align-items: flex-start; flex-direction: column; }
  .players-grid, .sponsors-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .empty-content { grid-template-columns: 1fr; padding: 26px; }
  .empty-content img { width: 100px; height: 100px; }
  .sponsor-invite { padding: 38px 22px; }
  .story-image { min-height: 430px; }
  .story-badge { width: 125px; height: 125px; }
  .contact-form { grid-template-columns: 1fr; padding: 24px; }
  .field--full { grid-column: auto; }
  .footer-top { grid-template-columns: 1fr; gap: 35px; }
  .footer-bottom { flex-direction: column; }
  .mobile-cta { position: fixed; z-index: 40; right: 12px; bottom: 12px; left: 12px; min-height: 56px; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border-radius: 999px; background: var(--green-950); box-shadow: 0 12px 34px rgba(0,0,0,.25); opacity: 0; visibility: hidden; transform: translateY(120%); transition: opacity .22s ease, visibility .22s ease, transform .22s ease; }
  .mobile-cta.is-visible { opacity: 1; visibility: visible; transform: none; }
  .mobile-cta a { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--white); font-size: .82rem; font-weight: 900; }
  .mobile-cta a:last-child { background: var(--gold); color: var(--green-950); }
  .site-footer { padding-bottom: 100px; }
}

@media (max-width: 460px) {
  .container { width: min(calc(100% - 22px), var(--container)); }
  .carousel-track { margin-right: -11px; padding-right: 11px; }
  .hero-description { font-size: .96rem; }
  .hero-actions .button { width: 100%; }
  .community-item { flex-direction: column; gap: 0; text-align: center; }
  .news-card:first-child .news-card__body { padding: 26px; }
  .player-card { flex-basis: 78vw; }
  .achievement-list li { grid-template-columns: 60px 1fr; }
  .site-logo, .site-logo img, .site-logo .custom-logo { width: 76px; height: 88px; }
  .players-grid { grid-template-columns: 1fr; }
  .sponsors-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .sponsor-card { min-height: 105px; padding: 10px; }
  .fixture-card__matchup { grid-template-columns: minmax(0,1fr) 78px minmax(0,1fr); }
  .fixture-score { padding-inline: 7px; font-size: .62rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .motion-ready .reveal { opacity: 1; transform: none; }
}
