/* Bratislavská únia karate - public site */

:root {
	--ink: #1c2b45;          /* navy (návrh C) */
	--ink-2: #26385a;
	--paper: #f6f8fb;
	--card: #ffffff;
	--line: #e1e8f1;
	--muted: #5a6b85;
	--red: #c8102e;
	--red-dark: #9e0c24;
	--red-soft: #fbe9ec;
	--radius: 10px;
	--shadow: 0 1px 2px rgba(28, 43, 69, .06), 0 4px 16px rgba(28, 43, 69, .06);
	--navy-deep: #15213a;
	--navy-text: #c3d2e6;
	--navy-light: #9dbbe0;
	--head: 'Oswald', 'Arial Narrow', sans-serif;
	--body: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 17px/1.55 var(--body);
}

img { max-width: 100%; height: auto; }

a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--red-dark); }

h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.2; letter-spacing: .01em; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }

.sr, .skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; left: 8px; top: 8px; width: auto; height: auto; clip: auto; z-index: 100; background: #fff; padding: 8px 12px; }

/* ---------- Top bar ---------- */

.topbar { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
.topbar-inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }

.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; margin-right: auto; }
.brand:hover { color: #fff; }
.brand img { width: 40px; height: 53px; object-fit: contain; }
.brand strong { display: block; font-family: var(--head); font-weight: 600; font-size: 19px; letter-spacing: .03em; text-transform: uppercase; line-height: 1.1; }
.brand small { display: block; color: var(--navy-text); font-size: 13px; }

.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; gap: 2px; }
.nav a, .nav button {
	display: block; padding: 10px 12px; border-radius: 6px;
	color: #e4ebf5; text-decoration: none; font: 600 15px/1.2 var(--body);
	background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.nav a:hover, .nav button:hover, .nav button[aria-expanded="true"] { background: var(--ink-2); color: #fff; }
.nav .active > a, .nav .active > button, .nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--red); }
.nav .has-sub > button::after { content: ''; display: inline-block; margin-left: 6px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
.nav .has-sub { position: relative; }
.nav .has-sub > ul {
	display: none; position: absolute; top: 100%; left: 0; min-width: 260px; padding: 6px;
	background: #fff; border-radius: 8px; box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}
.nav .has-sub > ul a { color: var(--ink); white-space: normal; }
.nav .has-sub > ul a:hover { background: var(--paper); color: var(--ink); }
.nav .has-sub > ul a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--red); }
.nav .has-sub.open > ul { display: block; }
@media (hover: hover) and (min-width: 901px) {
	.nav .has-sub:hover > ul { display: block; }
}

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 24px; height: 2px; background: #fff; position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ''; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }

@media (max-width: 900px) {
	.nav-toggle { display: block; }
	.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); padding: 8px 16px 16px; border-top: 1px solid var(--ink-2); max-height: calc(100vh - 68px); overflow-y: auto; }
	.nav.open { display: block; }
	.nav > ul { flex-direction: column; }
	.nav a, .nav button { width: 100%; text-align: left; padding: 12px; font-size: 16px; }
	.nav .has-sub > ul { position: static; box-shadow: none; background: transparent; padding: 0 0 0 12px; min-width: 0; }
	.nav .has-sub > ul a { color: var(--navy-text); }
	.nav .has-sub > ul a:hover { background: var(--ink-2); color: #fff; }
	.nav .active > a, .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--red); }
	.brand small { display: none; }
	.brand strong { font-size: 17px; }
}

/* ---------- Hero / page head ---------- */

.hero {
	background: var(--ink) linear-gradient(115deg, transparent 0 62%, rgba(200, 16, 46, .9) 62% 64%, transparent 64% 67%, rgba(200, 16, 46, .35) 67% 68%, transparent 68%);
	color: #fff; padding: 28px 0 84px;
}
.hero-inner { display: flex; align-items: center; gap: 32px; }
.hero h1 { font-size: clamp(32px, 6vw, 56px); text-transform: uppercase; margin: 0; letter-spacing: .02em; }
.hero p { margin: 0; color: var(--navy-text); font-size: 19px; }
.hero-logo { margin-left: auto; width: 90px; height: 120px; object-fit: contain; flex: none; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .35)); }
@media (max-width: 640px) {
	.hero { padding: 32px 0 80px; }
	.hero-logo { display: none; }
}

.page-head { background: var(--ink); color: #fff; padding: 36px 0 40px; border-bottom: 4px solid var(--red); }
.page-head h1 { margin: 0; font-size: clamp(28px, 5vw, 42px); text-transform: uppercase; }
.page-head p { margin: 6px 0 0; color: var(--navy-text); }

main { padding-bottom: 56px; }

/* ---------- Highlights (3 boxes overlapping the hero) ---------- */

.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: -64px; position: relative; }
.highlight { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; border-top: 4px solid var(--ink); }
.highlight:last-child { border-top-color: var(--red); }
.highlight-head { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.highlight-head img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.highlight h2 { margin: 0; font-size: 26px; text-transform: uppercase; }
.highlight p { margin: 0 0 8px; }
.highlight p:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .highlights { grid-template-columns: 1fr; } }

/* ---------- Section titles + year tabs ---------- */

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 48px 0 16px; }
.section-title h2 { margin: 0; font-size: 32px; text-transform: uppercase; }

.years { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 24px; }
.years a {
	display: block; padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
	color: var(--ink); text-decoration: none; font-weight: 600; font-variant-numeric: tabular-nums;
}
.years a:hover { border-color: var(--ink); color: var(--ink); }
.years a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Article cards ---------- */

.articles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 760px) { .articles { grid-template-columns: 1fr; } }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 90px; }
.card-cover { display: block; aspect-ratio: 450 / 220; background: var(--ink-2); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 18px 22px 20px; }
.card-head { display: flex; gap: 14px; align-items: flex-start; }
.card-thumb { width: 56px; height: 56px; object-fit: contain; flex: none; border-radius: 6px; background: #fff; border: 1px solid var(--line); padding: 3px; }
.card h3 { margin: 0; font-size: 22px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta svg { width: 15px; height: 15px; flex: none; }
.tag { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--red-soft); color: var(--red-dark); font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.card-text { margin-top: 12px; }
.card-text p { margin: 0 0 10px; }
.card-text p:last-child { margin-bottom: 0; }
.links { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
.links li { margin: 4px 0; }
.links a { display: inline-flex; gap: 8px; align-items: baseline; font-weight: 600; text-decoration: none; }
.links a:hover { text-decoration: underline; }
.links a::before { content: '→'; color: var(--red); font-weight: 700; }
.links a[href$=".pdf"]::before { content: 'PDF'; font-size: 11px; padding: 1px 4px; border-radius: 3px; background: var(--red); color: #fff; transform: translateY(-2px); }

.empty { background: var(--card); border-radius: var(--radius); padding: 32px; text-align: center; color: var(--muted); }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.btn {
	display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 8px;
	background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; border: 0; cursor: pointer; font-size: 16px;
}
.btn:hover { background: var(--ink-2); color: #fff; }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--card); color: var(--ink); border-color: var(--ink); }

/* ---------- Gallery ---------- */

.gallery { background: var(--ink); color: #fff; padding: 40px 0 48px; margin: 56px 0 -56px; }
.gallery h2 { margin: 0 0 20px; text-transform: uppercase; font-size: 28px; }
.gallery-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.gallery-grid a { display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 1; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; display: block; }
.gallery-grid a:hover img { transform: scale(1.05); }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox img { display: block; max-width: 94vw; max-height: 86vh; border-radius: 6px; }
.lightbox button { position: fixed; top: 12px; right: 16px; background: none; border: 0; color: #fff; font-size: 36px; cursor: pointer; line-height: 1; }

/* ---------- Calendar ---------- */

.cal-note { color: var(--muted); margin: 0 0 20px; }
.month { margin-bottom: 26px; }
.month h2 { font-size: 18px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; color: var(--muted); }
.events { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.event { display: grid; grid-template-columns: 120px 1fr minmax(120px, 220px); gap: 4px 18px; padding: 12px 18px; border-top: 1px solid var(--line); align-items: baseline; }
.event:first-child { border-top: 0; }
.event-date { font-weight: 700; font-variant-numeric: tabular-nums; }
.event-title a { font-weight: 600; }
.event-place { color: var(--muted); font-size: 15px; }
.event.past { color: var(--muted); }
.event.past .event-title a { color: var(--ink-2); }
.event.buk { box-shadow: inset 4px 0 0 var(--red); background: #fffafa; }
.event.next { background: #fff8e6; }
.badge { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 4px; font-size: 12px; font-weight: 700; vertical-align: 2px; background: var(--red); color: #fff; }
.badge-next { background: #e9a100; color: #1d1600; }
@media (max-width: 640px) {
	.event { grid-template-columns: 1fr; padding: 12px 14px; }
	.event-date { font-size: 15px; color: var(--red-dark); }
	.event.past .event-date { color: var(--muted); }
}

/* ---------- Content pages ---------- */

.content { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px; margin-top: 28px; }
.content > :first-child { margin-top: 0; }
.content h2 { font-size: 24px; margin: 28px 0 10px; }
.content h3 { font-size: 20px; margin: 22px 0 8px; }
.content ul, .content ol { padding-left: 22px; }
.content li { margin: 3px 0; }
.content .signature { text-align: right; font-style: italic; color: var(--muted); }
@media (max-width: 640px) { .content { padding: 20px 18px; } }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 28px; }
.person { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; border-top: 3px solid var(--ink); }
.person .role { font-size: 14px; font-weight: 700; color: var(--red-dark); text-transform: uppercase; letter-spacing: .03em; margin: 0 0 4px; }
.person h3 { margin: 0 0 6px; font-size: 21px; }
.person p { margin: 2px 0; color: var(--ink-2); font-size: 16px; }
.person .club-logo { float: right; width: 56px; height: 60px; object-fit: contain; margin: 0 0 8px 12px; }

.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 28px; }
.group { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.group h2 { margin: 0 0 8px; font-size: 20px; text-transform: uppercase; }
.group ul { list-style: none; margin: 0; padding: 0; }
.group li { padding: 6px 0; border-top: 1px solid var(--line); }
.group li:first-child { border-top: 0; }
.group small { display: block; color: var(--muted); font-size: 14px; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 16px; }
.photo-grid a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Footer ---------- */

.footer { background: var(--navy-deep); color: var(--navy-text); padding: 28px 0; font-size: 15px; border-top: 4px solid var(--red); }
.footer strong { color: #fff; }
.footer a { color: #e4ebf5; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; }

.list-title { font-size: 28px; text-transform: uppercase; margin: 40px 0 0; scroll-margin-top: 90px; }
.list-title + .groups, .list-title + .people { margin-top: 16px; }
