/* Taekwondo Desant e.V. — site styles
   Palette taken from the club logo: taeguk red + blue. */
:root {
  --red: #c8102e;
  --red-dark: #a30d25;
  --blue: #1f4596;
  --blue-dark: #15306b;
  --navy: #0e1f45;
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #1d2433;
  --muted: #5a6478;
  --line: #dde3ee;
  --radius: 8px;
  --r-img: 6px;
  --shadow: 0 1px 3px rgba(14, 31, 69, .08), 0 4px 14px rgba(14, 31, 69, .06);
  --wrap: 1320px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:hover { color: var(--red); }
h1, h2, h3, h4, h5 { line-height: 1.25; color: var(--navy); margin: 1.4em 0 .6em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: 0; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.2rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip, .form .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip: auto; left: 10px; top: 10px; z-index: 1000; background: #fff; padding: 8px 12px; }

/* ---------- top bar ---------- */
.topbar { background: var(--navy); color: #cfd8ea; font-size: .86rem; }
.topbar .wrap { display: flex; align-items: center; gap: 22px; min-height: 38px; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: #ffb3bf; }
.topbar .ti { display: inline-flex; align-items: center; gap: 6px; }
.topbar svg { width: 15px; height: 15px; fill: currentColor; opacity: .85; }
.langs { margin-inline-start: auto; display: flex; gap: 4px; }
.langs a { padding: 3px 8px; border-radius: 4px; font-weight: 600; letter-spacing: .03em; }
.langs a.on { background: var(--red); }

/* ---------- header / navigation ---------- */
.site-header { background: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(14, 31, 69, .08); }
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 76px; }
.brand { min-width: 0; }
.brand small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); flex-shrink: 0; }
.brand img { width: 56px; height: 56px; }
.brand b { display: block; font-size: 1.15rem; letter-spacing: .02em; }
.brand small { display: block; color: var(--muted); font-size: .78rem; }
.brand .kr { color: var(--red); }

.main-nav { margin-inline-start: auto; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; }
.main-nav li { position: relative; }
.main-nav > ul > li > a { display: block; white-space: nowrap; padding: 26px 10px; font-weight: 600; font-size: .9rem; color: var(--navy); text-decoration: none; text-transform: uppercase; letter-spacing: .02em; border-bottom: 3px solid transparent; }
.main-nav > ul > li > a:hover, .main-nav > ul > li.on > a { color: var(--red); border-bottom-color: var(--red); }
.main-nav .has-sub > a::after { content: ""; display: inline-block; margin-inline-start: 6px; border: 4px solid transparent; border-top-color: currentColor; vertical-align: 1px; }
.main-nav .sub { display: none; position: absolute; top: 100%; inset-inline-start: 0; min-width: 250px; background: #fff; list-style: none; margin: 0; padding: 8px 0; border-top: 3px solid var(--red); box-shadow: var(--shadow); border-radius: 0 0 var(--radius) var(--radius); }
.main-nav li:hover > .sub, .main-nav li:focus-within > .sub { display: block; }
.main-nav .sub a { display: block; padding: 8px 18px; color: var(--text); text-decoration: none; font-size: .92rem; }
.main-nav .sub a:hover, .main-nav .sub a.on { background: var(--bg); color: var(--red); }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 6px; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: .95rem; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); color: #fff; }
.btn-line { border-color: #fff; color: #fff; }
.btn-line:hover { background: #fff; color: var(--blue); }
.header-cta { flex-shrink: 0; }
.burger { display: none; margin-inline-start: auto; background: none; border: 0; padding: 10px; cursor: pointer; }
.burger span { display: block; width: 26px; height: 3px; background: var(--navy); margin: 5px 0; border-radius: 2px; }
.stripe { height: 5px; background: linear-gradient(90deg, var(--red) 0 50%, var(--blue) 50% 100%); }

/* ---------- mobile drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 100; display: none; }
.drawer.open { display: block; }
.drawer-bg { position: absolute; inset: 0; background: rgba(14, 31, 69, .55); }
.drawer-panel { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(360px, 88vw); background: #fff; overflow-y: auto; padding: 16px 0 40px; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 0 18px 12px; border-bottom: 1px solid var(--line); }
.drawer-close { background: none; border: 0; font-size: 2rem; line-height: 1; cursor: pointer; color: var(--navy); }
.drawer ul { list-style: none; margin: 0; padding: 0; }
.drawer li { border-bottom: 1px solid var(--line); }
.drawer .row { display: flex; }
.drawer .row a { flex: 1; padding: 13px 18px; color: var(--navy); font-weight: 600; text-decoration: none; }
.drawer .row a.on { color: var(--red); }
.drawer .tog { width: 52px; background: var(--bg); border: 0; cursor: pointer; font-size: 1.2rem; color: var(--navy); }
.drawer .sub { display: none; background: var(--bg); }
.drawer li.open > .sub { display: block; }
.drawer li.open > .row .tog { transform: rotate(180deg); }
.drawer .sub a { display: block; padding: 10px 18px 10px 32px; color: var(--text); text-decoration: none; font-size: .95rem; }
.drawer .sub a.on { color: var(--red); font-weight: 600; }
.drawer .drawer-cta { padding: 18px; display: grid; gap: 10px; }

/* ---------- page layout ---------- */
.crumbs { font-size: .85rem; color: var(--muted); margin: 22px auto 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.crumbs span.sep { margin: 0 6px; opacity: .6; }
.page { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 26px; align-items: start; padding-bottom: 50px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.content { padding: 32px 36px; min-width: 0; overflow-wrap: anywhere; }
.content h1 { padding-bottom: 14px; border-bottom: 3px solid var(--line); position: relative; }
.content h1::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 70px; height: 3px; background: var(--red); }
[dir=rtl] .content h1::after { left: auto; right: 0; }

.sidebar { display: grid; gap: 20px; position: sticky; top: 100px; }
.side-nav { padding: 8px 0; overflow: hidden; }
.side-nav h3 { margin: 0; padding: 12px 18px; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; background: var(--blue); color: #fff; }
.side-nav h3 a { color: #fff; text-decoration: none; }
.side-nav ul { list-style: none; margin: 0; padding: 6px 0; }
.side-nav li a { display: block; padding: 8px 18px; color: var(--text); text-decoration: none; font-size: .93rem; border-inline-start: 3px solid transparent; }
.side-nav li a:hover { background: var(--bg); color: var(--red); }
.side-nav li a.on { border-inline-start-color: var(--red); color: var(--red); font-weight: 600; background: var(--bg); }
.side-box { padding: 20px; }
.side-box h3 { margin: 0 0 10px; font-size: 1.05rem; }
.side-box p { margin: 0 0 12px; font-size: .93rem; }
.side-cta { background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff; }
.side-cta h3, .side-cta p { color: #fff; }
.side-cta .btn { background: #fff; color: var(--red); }
.times { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.times li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.times li small { display: block; opacity: .8; }
.times li:last-child { border: 0; }
.times b { color: var(--navy); white-space: nowrap; }

/* ---------- content typography (converted old articles) ---------- */
.content p { margin: 0 0 1em; }
.content ul, .content ol { padding-inline-start: 1.4em; }
.content li { margin-bottom: .35em; }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.content img { border-radius: var(--r-img); }
.content .fl-left { float: left; margin: 4px 18px 12px 0; }
.content .fl-right { float: right; margin: 4px 0 12px 18px; }
.content .tc { text-align: center; }
.content .tr { text-align: right; }
.content .tj { text-align: left; }
.content .hl { color: var(--red); }
.content::after { content: ""; display: block; clear: both; }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; }
.content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.content td, .content th { padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.content tr:nth-child(even) td { background: #f8f9fc; }
.content table.layout td, .content table.layout tr td { border: 0; background: none; }
.content caption { font-weight: 700; font-size: 1.15rem; color: var(--navy); padding-bottom: 8px; }
.pdf-link { display: inline-flex; align-items: center; gap: 8px; }
.pdf-link::before { content: "PDF"; font-size: .7rem; font-weight: 700; background: var(--red); color: #fff; padding: 2px 6px; border-radius: 3px; }

/* ---------- gallery + lightbox ---------- */
.gallery { columns: 4 200px; column-gap: 10px; margin: 1.2em 0 1.8em; }
.gallery a { display: block; margin: 0 0 10px; break-inside: avoid; overflow: hidden; border-radius: var(--r-img); background: #e4e8f0; box-shadow: 0 1px 3px rgba(14, 31, 69, .12); }
.gallery img { display: block; width: 100%; height: auto; border-radius: 0; transition: transform .25s, opacity .25s; }
.gallery a:hover img { transform: scale(1.03); opacity: .92; }
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(5, 10, 25, .94); display: none; align-items: center; justify-content: center; }
.lb.open { display: flex; }
.lb img { max-width: 94vw; max-height: 86vh; border-radius: 4px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lb button { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 1.8rem; cursor: pointer; }
.lb button:hover { background: var(--red); }
.lb .lb-x { top: 16px; right: 16px; }
.lb .lb-p { left: 16px; top: 50%; margin-top: -26px; }
.lb .lb-n { right: 16px; top: 50%; margin-top: -26px; }
.lb .lb-c { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #cfd8ea; font-size: .9rem; }

/* ---------- video (click to load, no cookies before click) ---------- */
.video { position: relative; aspect-ratio: 16 / 9; background: #0e1f45 center / cover no-repeat; border-radius: var(--r-img); overflow: hidden; margin: 0 0 1.2em; max-width: 800px; cursor: pointer; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; background: rgba(14, 31, 69, .35); border: 0; width: 100%; cursor: pointer; font: inherit; }
.video .play::before { content: ""; width: 70px; height: 70px; border-radius: 50%; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 34px no-repeat; box-shadow: 0 4px 18px rgba(0, 0, 0, .4); transition: transform .2s; }
.video:hover .play::before { transform: scale(1.08); }
.video .play small { font-size: .75rem; opacity: .85; max-width: 90%; text-align: center; text-shadow: 0 1px 3px #000; }
.content .video { margin-inline: auto; }
.video.map { background: #e6ebf4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23c3cde0' d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7z'/%3E%3C/svg%3E") center / 120px no-repeat; }
.video.map .play { background: rgba(14, 31, 69, .15); }
.video.map .play small { color: var(--navy); text-shadow: none; }

/* ---------- home ---------- */
.hero { background: var(--navy); }
.slider { position: relative; max-width: 1400px; margin: 0 auto; aspect-ratio: 2.84 / 1; overflow: hidden; }
.slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 1s; }
.slider img.on { opacity: 1; }
.dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.dots button { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; background: transparent; padding: 0; cursor: pointer; }
.dots button.on { background: var(--red); border-color: var(--red); }
.welcome { background: linear-gradient(135deg, var(--blue-dark), var(--blue)); color: #fff; padding: 46px 0; }
.welcome .wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: center; }
.welcome h1 { color: #fff; margin-bottom: 12px; }
.welcome p { color: #dfe6f5; margin: 0 0 12px; font-size: 1.05rem; }
.welcome .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.welcome .times-card { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--radius); padding: 22px 24px; }
.welcome .times-card h2 { color: #fff; margin: 0 0 10px; font-size: 1.15rem; }
.welcome .times li { border-color: rgba(255, 255, 255, .2); color: #dfe6f5; }
.welcome .times b { color: #fff; }
.welcome .addr { margin-top: 14px; font-size: .92rem; color: #dfe6f5; }
.section { padding: 46px 0; }
.section h2.sec { text-align: center; margin: 0 0 28px; font-size: 1.6rem; }
.section h2.sec::after { content: ""; display: block; width: 60px; height: 4px; margin: 12px auto 0; background: linear-gradient(90deg, var(--red) 50%, var(--blue) 50%); border-radius: 2px; }
.groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.group { padding: 26px; border-top: 5px solid var(--blue); }
.group:nth-child(2) { border-top-color: var(--red); }
.group:nth-child(3) { border-top-color: var(--navy); }
.group h3 { margin: 0 0 4px; }
.group .when { color: var(--red); font-weight: 700; margin-bottom: 10px; }
.group p { margin: 0; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.tile { position: relative; display: block; border-radius: var(--r-img); overflow: hidden; aspect-ratio: 3 / 2; box-shadow: var(--shadow); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.tile:hover img { transform: scale(1.05); }
.tile span { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 12px; color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; background: linear-gradient(transparent, rgba(14, 31, 69, .9)); }
.news { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 18px; }
.news a, .news div { display: block; border-radius: var(--r-img); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.news img { display: block; width: 100%; }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.videos .video { margin: 0; }
.bg-white { background: #fff; }
.partners { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 30px; }
.partners a { display: block; }
.partners img { max-height: 70px; width: auto; filter: grayscale(.2); }
.partners img:hover { filter: none; }
.intro-text { max-width: 860px; margin: 0 auto; text-align: center; color: var(--muted); }

/* club section with the DESANT flag */
.club { background: linear-gradient(180deg, #fff 0, #fff 60%, var(--bg) 100%); }
.club-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: center; }
.club-flag { margin: 0; position: relative; }
.club-flag img { display: block; width: 100%; border-radius: var(--r-img); box-shadow: 0 14px 34px rgba(14, 31, 69, .22), 0 2px 6px rgba(14, 31, 69, .12); }
.club-flag::after { content: ""; position: absolute; inset: auto 0 -14px 0; height: 5px; border-radius: 0; background: linear-gradient(90deg, var(--red) 50%, var(--blue) 50%); }
.club h2 { margin-top: 0; font-size: 1.6rem; }
.club p { color: var(--muted); font-size: 1.05rem; margin: 0 0 20px; }
@media (max-width: 760px) { .club-grid { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 1em 0 2em; }
.contact-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.contact-card h3 { margin-top: 0; }
.form label { display: block; font-weight: 600; margin: 0 0 4px; font-size: .92rem; }
.form input, .form textarea, .form select { width: 100%; padding: 10px 12px; border: 1px solid #c8d0de; border-radius: 6px; font: inherit; margin-bottom: 14px; background: #fff; }
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.form textarea { min-height: 140px; }
.form-msg { padding: 12px 14px; border-radius: 6px; margin-bottom: 14px; display: none; }
.form-msg.ok { display: block; background: #e6f4ea; color: #1e6b34; }
.form-msg.err { display: block; background: #fdecee; color: var(--red-dark); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #b9c4da; font-size: .93rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 30px; padding: 44px 20px 30px; }
.site-footer h4 { color: #fff; margin: 0 0 14px; font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; }
.site-footer a { color: #dfe6f5; text-decoration: none; }
.site-footer a:hover { color: #ff9aaa; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer .times li { border-color: rgba(255, 255, 255, .12); }
.site-footer .times b { color: #fff; }
.foot-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.foot-brand img { width: 60px; height: 60px; border-radius: 50%; background: #fff; }
.foot-brand b { color: #fff; font-size: 1.1rem; }
.social { display: flex; gap: 10px; margin-top: 14px; }
.social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .1); display: flex; align-items: center; justify-content: center; }
.social a:hover { background: var(--red); }
.social svg { width: 18px; height: 18px; fill: #fff; }
.copy { border-top: 1px solid rgba(255, 255, 255, .1); padding: 16px 20px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .85rem; }
.to-top { position: fixed; bottom: 20px; inset-inline-end: 20px; width: 46px; height: 46px; border-radius: 50%; background: var(--red); color: #fff; border: 0; font-size: 1.3rem; cursor: pointer; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 40; }
.to-top.show { opacity: 1; pointer-events: auto; }

/* ---------- responsive ---------- */
/* header adapts to the length of the menu labels (set by main.js: fitHeader) */
.site-header.no-tag .brand small { display: none; }
.site-header.no-cta .header-cta { display: none; }
.site-header.tight .main-nav > ul > li > a { padding-inline: 7px; font-size: .82rem; }
.site-header.compact .main-nav, .site-header.compact .header-cta, .site-header.compact .brand small { display: none; }
.site-header.compact .burger { display: block; }
.main-nav .sub { z-index: 60; }
@media (max-width: 1180px) {
  .main-nav, .header-cta, .brand small { display: none; }
  .burger { display: block; }
  .page { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .topbar .hide-sm { display: none; }
  .site-header .wrap { min-height: 64px; }
  .brand img { width: 46px; height: 46px; }
  .content { padding: 22px 18px; }
  .welcome .wrap, .groups, .contact-grid { grid-template-columns: 1fr; }
  .welcome { padding: 32px 0; }
  .section { padding: 34px 0; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .content .fl-left, .content .fl-right { float: none; display: block; margin: 0 auto 12px; }
  .content table.layout, .content table.layout tbody, .content table.layout tr, .content table.layout td { display: block; width: 100% !important; }
  .gallery { columns: 2 140px; column-gap: 6px; }
  .gallery a { margin-bottom: 6px; }
}
@media (max-width: 400px) {
  .site-header .wrap { gap: 10px; padding: 0 12px; }
  .brand { gap: 8px; }
  .brand img { width: 40px; height: 40px; }
  .brand b { font-size: 1rem; }
  .topbar .wrap { gap: 10px; padding: 0 12px; }
}
@media print {
  .topbar, .site-header, .stripe, .sidebar, .site-footer, .to-top, .crumbs { display: none !important; }
  .page { display: block; }
  .card { box-shadow: none; }
}
