/*
Theme Name: HAPO – Havlovický pohár
Description: Šablona webu turnajů v malém fotbale v Havlovicích. Oranžová, černá, bílá. Výsledky dodává plugin HAPO výsledky.
Version: 1.0.0
Author: TJ Sokol Havlovice
Text Domain: hapo
Requires PHP: 8.0
*/

/* Tokeny. --band* mění varianta hlavičky (Přizpůsobit → HAPO – vzhled). --hp-* čte plugin výsledků. */
:root {
	--bg: #faf9f7; --surface: #fff; --surface-2: #f3efeb; --ink: #141210; --muted: #5f5953; --rule: #e5dfd9;
	--band: #121110; --band-2: #1f1d1b; --on-band: #fff; --on-band-muted: #bdb6ae; --hl: #f26a1b; --hl-ink: #111; --card: rgba(18, 17, 16, .72);
	--orange: #f26a1b; --orange-text: #bf4a00; --orange-soft: #fde8d9; --q3: #f5a462; --live: #d92d20;
	--f-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
	--f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--wrap: 1200px; --gut: max(16px, env(safe-area-inset-left, 0px));
	--hp-orange: var(--orange); --hp-orange-text: var(--orange-text); --hp-q3: var(--q3); --hp-ink: var(--ink); --hp-muted: var(--muted);
	--hp-rule: var(--rule); --hp-surface: var(--surface); --hp-surface-2: var(--surface-2); --hp-band: var(--band); --hp-on-band: var(--on-band);
	--hp-on-band-muted: var(--on-band-muted); --hp-live: var(--live); --hp-font-display: var(--f-display);
}
body.hv-orange { --band: #f26a1b; --band-2: rgba(0, 0, 0, .16); --on-band: #111; --on-band-muted: #3b1c06; --hl: #111; --hl-ink: #fff; --card: rgba(242, 106, 27, .84); }
body.hv-white { --band: #fff; --band-2: #f3efeb; --on-band: #141210; --on-band-muted: #5f5953; --card: rgba(255, 255, 255, .88); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--orange-text); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; line-height: 1.1; text-wrap: balance; letter-spacing: .01em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gut); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.narrow, .page-w { max-width: 1000px; }
.eyebrow { display: block; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 0; background: var(--hl); color: var(--hl-ink); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- horní lišta ---------- */
.site-top { background: var(--band); color: var(--on-band); position: sticky; top: 0; z-index: 30; }
body.hv-white .site-top { border-bottom: 1px solid var(--rule); }
.admin-bar .site-top { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-top { top: 0; position: relative; } }
.site-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: var(--f-display); font-weight: 800; font-size: 1.55rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.logo b { background: var(--hl); color: var(--hl-ink); padding: 4px 9px 2px; border-radius: 4px; }
.logo small { display: block; font-size: .72rem; font-weight: 600; color: var(--on-band-muted); letter-spacing: .1em; margin-top: 3px; }
.logo img { max-height: 48px; width: auto; }
.nav-toggle { display: none; background: none; border: 1px solid color-mix(in srgb, var(--on-band) 35%, transparent); color: var(--on-band); font: 600 1rem var(--f-display); letter-spacing: .06em; text-transform: uppercase; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 4px; }
.main-nav a { display: block; color: var(--on-band-muted); text-decoration: none; font-family: var(--f-display); font-weight: 600; font-size: 1.08rem; letter-spacing: .04em; text-transform: uppercase; padding: 8px 10px; border-radius: 6px; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a, .main-nav .current_page_item > a { color: var(--on-band); }
.main-nav .menu-cta > a { background: var(--hl); color: var(--hl-ink); }
.main-nav li { position: relative; }
.main-nav .sub-menu { display: none; position: absolute; left: 0; top: 100%; min-width: 220px; background: var(--band); border: 1px solid var(--band-2); border-radius: 8px; padding: 6px; flex-direction: column; z-index: 5; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
@media (max-width: 960px) {
	.nav-toggle { display: inline-block; }
	.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--band); padding: 8px var(--gut) 16px; border-top: 1px solid var(--band-2); }
	.main-nav.open { display: block; }
	.main-nav ul { flex-direction: column; }
	.main-nav .sub-menu { display: flex; position: static; border: 0; padding: 0 0 0 14px; }
	.site-top .wrap { position: relative; }
}

/* ---------- hlavička úvodní stránky ---------- */
.hero { position: relative; isolation: isolate; background: var(--band) center 40% / cover no-repeat; color: var(--on-band); border-bottom: 4px solid var(--hl); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--band) 0%, color-mix(in srgb, var(--band) 82%, transparent) 40%, color-mix(in srgb, var(--band) 30%, transparent) 100%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px 40px; padding-top: 48px; padding-bottom: 40px; }
.hero .kick { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--hl); }
.hero .kick.live { color: var(--live); display: inline-flex; align-items: center; gap: 8px; }
.hero .kick.live::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--live); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .hero .kick.live::before { animation: none; } }
.hero h1 { font-size: clamp(2.8rem, 8vw, 5rem); text-transform: uppercase; margin: 6px 0 8px; line-height: .92; }
.hero .when { font-size: 1.1rem; }
.hero .when small { display: block; color: var(--on-band-muted); font-size: .88rem; }
.count { display: flex; gap: 10px; margin-top: 16px; }
.count div { background: var(--card); border-radius: 8px; padding: 6px 14px; text-align: center; min-width: 70px; }
.count b { display: block; font-family: var(--f-display); font-size: 2rem; line-height: 1; color: var(--hl); font-variant-numeric: tabular-nums; }
.count span { font-size: .7rem; color: var(--on-band-muted); text-transform: uppercase; letter-spacing: .08em; }
.acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn { display: inline-block; font-weight: 600; font-size: .95rem; padding: 10px 18px; border-radius: 8px; text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn.pri { background: var(--hl); color: var(--hl-ink); }
.btn.sec { border-color: color-mix(in srgb, var(--on-band) 45%, transparent); color: var(--on-band); }
.btn.dark { background: var(--ink); color: #fff; }
.hero .livewrap { background: var(--card); border-radius: 10px; padding: 12px 14px; margin-top: 14px; }
.winners h2 { margin: 0 0 10px; font: 600 .76rem var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--on-band); }
.wgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wc { position: relative; background: var(--card); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-radius: 8px; padding: 10px 12px; border-top: 3px solid var(--hl); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; color: inherit; text-decoration: none; }
.wc:hover, .wc:focus-within { z-index: 5; }
.wc .tn { font-family: var(--f-display); font-weight: 700; font-size: 1.02rem; letter-spacing: .04em; text-transform: uppercase; color: var(--hl); }
.wc .tn small { color: var(--on-band-muted); font-weight: 600; margin-left: 4px; }
.wc .wn { font-weight: 600; line-height: 1.25; margin-top: 2px; }
.wc .yr { font-size: .76rem; color: var(--on-band-muted); }
.wc .wn a { color: inherit; text-decoration: none; }
.wc .wn a:hover { text-decoration: underline; }
.cup { position: relative; width: 42px; height: 54px; padding: 0; border: 0; background: none; cursor: zoom-in; color: var(--hl); }
.cup > svg, .cup > img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cup .big { position: absolute; z-index: 20; right: -8px; top: -8px; width: 210px; padding: 14px 12px 10px; border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 14px 40px rgba(0, 0, 0, .35); border: 1px solid var(--rule); text-align: center; transform: scale(.25); transform-origin: top right; opacity: 0; pointer-events: none; transition: transform .18s ease, opacity .18s ease; }
.cup .big svg { height: 160px; width: auto; color: var(--orange); display: inline-block; }
.cup .big img { max-height: 240px; width: auto; display: inline-block; }
.cup .big b { display: block; font-family: var(--f-display); font-size: 1.05rem; text-transform: uppercase; letter-spacing: .04em; margin-top: 6px; }
.cup:hover .big, .cup:focus .big { transform: scale(1); opacity: 1; }
@media (prefers-reduced-motion: reduce) { .cup .big { transition: none; } }
@media (max-width: 900px) {
	.hero .wrap { grid-template-columns: 1fr; padding-top: 32px; }
	.hero::before { background: linear-gradient(180deg, color-mix(in srgb, var(--band) 90%, transparent) 0%, color-mix(in srgb, var(--band) 60%, transparent) 100%); }
}
@media (max-width: 420px) { .wgrid { grid-template-columns: 1fr; } }

.traits { background: var(--surface); border-bottom: 1px solid var(--rule); }
.traits .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; padding-top: 16px; padding-bottom: 16px; }
.traits .lbl { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.traits div { font-size: .92rem; color: var(--muted); }
.traits div b { font-family: var(--f-display); font-size: 1.35rem; font-weight: 700; color: var(--ink); margin-right: 4px; }

/* ---------- sekce úvodu ---------- */
.home-sections { padding-top: 40px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 48px; }
.shead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.shead h2 { margin: 0; font-size: 2rem; text-transform: uppercase; }
.shead a { font-weight: 600; text-decoration: none; }
.tcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tc { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; }
.tc:hover { border-color: var(--orange); }
.tc .nm { font-family: var(--f-display); font-weight: 700; font-size: 1.25rem; text-transform: uppercase; line-height: 1.1; }
.tc .ag { font-size: .8rem; color: var(--muted); }
.tc .dt { margin-top: 10px; font-weight: 600; }
.tc .dt.tbd { color: var(--muted); font-weight: 500; }
.tc .rc { font-size: .8rem; color: var(--orange-text); font-weight: 600; }
.tc .lv { color: var(--live); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.news { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.nc { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; text-decoration: none; color: inherit; }
.nc:hover { border-color: var(--orange); }
.nc-img { aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; background: var(--band); }
.nc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nc-ph { display: flex; align-items: flex-end; padding: 10px 14px; background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 14px, transparent 14px 28px); background-color: #121110; }
.nc-ph span { color: var(--orange); font-family: var(--f-display); font-weight: 800; font-size: 1.7rem; text-transform: uppercase; letter-spacing: .03em; line-height: 1; }
.nc .tx { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.nc time { font-size: .78rem; color: var(--muted); }
.nc h3 { margin: 0; font: 600 1.05rem/1.3 var(--f-body); }
.nc p { margin: 0; font-size: .9rem; color: var(--muted); }
@media (max-width: 900px) { .tcards { grid-template-columns: 1fr 1fr; } .news { grid-template-columns: 1fr; } }

/* ---------- podstránky ---------- */
.page-band { background: var(--band); color: var(--on-band); border-bottom: 4px solid var(--hl); }
body.hv-white .page-band { border-top: 1px solid var(--rule); }
.page-band .wrap { padding-top: 36px; padding-bottom: 28px; }
.page-band h1 { margin: 4px 0 0; font-size: clamp(2.2rem, 6vw, 3.4rem); text-transform: uppercase; }
.page-band .eyebrow { color: var(--on-band-muted); }
.page-band .meta { color: var(--on-band-muted); font-size: .9rem; margin-top: 6px; }
.content { padding-top: 32px; padding-bottom: 56px; }
.prose { font-size: 1.0625rem; line-height: 1.7; }
.prose > * { margin-top: 0; margin-bottom: 0; }
.prose > * + * { margin-top: 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .25em; }
.prose > h2 { font-size: 1.9rem; margin-top: 1.6em; text-transform: uppercase; }
.prose > h3 { font-size: 1.4rem; margin-top: 1.4em; }
.prose table { width: 100%; border-collapse: collapse; }
.prose td, .prose th { border-bottom: 1px solid var(--rule); padding: 6px 8px; text-align: left; }
.prose img { border-radius: 8px; }
.prose blockquote { border-left: 4px solid var(--orange); margin: 0; padding: 4px 0 4px 16px; color: var(--muted); }
.prose .wp-block-image, .prose figure { margin: 1.2em 0; }
.full { max-width: none; }

.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.pagination { margin-top: 32px; display: flex; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers { display: inline-block; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 6px; text-decoration: none; color: var(--ink); background: var(--surface); }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--rule); flex-wrap: wrap; }

.hist-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 32px 40px; }
.hist-grid h2 { font-size: 1.8rem; text-transform: uppercase; margin: 0 0 8px; }

/* ---------- patička ---------- */
.site-foot { background: var(--band); color: var(--on-band-muted); font-size: .9rem; }
body.hv-white .site-foot { border-top: 1px solid var(--rule); }
.site-foot .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 24px 40px; padding-top: 36px; padding-bottom: 28px; }
.site-foot h2 { font: 700 1.1rem var(--f-display); text-transform: uppercase; letter-spacing: .06em; color: var(--on-band); margin: 0 0 8px; }
.site-foot p { margin: 0 0 4px; }
.site-foot a { color: var(--on-band); }
.site-foot .copy { grid-column: 1 / -1; border-top: 1px solid var(--band-2); padding-top: 14px; font-size: .8rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
