/* Pfälzischer Schachkongress 2027 – Branding nach ESV 1927 Ludwigshafen
   Farben & Schriften übernommen von eisenbahner-sportverein.meinideenkind.com */

/* Schriften: Archivo / Archivo Narrow (SIL Open Font License).
   Für DSGVO-konformes Self-Hosting die woff2-Dateien in assets/fonts/ ablegen. */
@font-face { font-family: "Archivo"; font-weight: 400; font-display: swap;
  src: local("Archivo"), url("../fonts/archivo-v25-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "Archivo Narrow"; font-weight: 700; font-display: swap;
  src: local("Archivo Narrow Bold"), local("Archivo Narrow"), url("../fonts/archivo-narrow-v35-latin-700.woff2") format("woff2"); }

:root {
  --blue: #2f4ba0;
  --blue-dark: #233a80;
  --yellow: #fff670;
  --bg: #ecf1f4;
  --text: #121112;
  --muted: #666666;
  --white: #ffffff;
  --radius-btn: 24px;
  --font-base: "Archivo", "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Archivo Narrow", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  --maxw: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-base);
  font-size: 18px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); }
a:hover { color: var(--blue); }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; color: var(--blue); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 2.95rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--yellow); color: var(--blue); padding: .5rem 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Header ---------- */
.site-header { background: var(--blue); color: var(--yellow); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 96px; }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--yellow); }
.brand img { width: 84px; height: auto; flex: 0 0 auto; }
.brand-text { font-family: var(--font-head); font-weight: 700; line-height: 1.05; }
.brand-text .t1 { display: block; font-size: 1.4rem; color: var(--yellow); white-space: nowrap; }
.brand-text .t2 { display: block; white-space: nowrap; font-size: .9rem; color: var(--bg); font-family: var(--font-base); font-weight: 400; letter-spacing: .02em; }

.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 30px; height: 3px; background: var(--bg); margin: 6px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; gap: .15rem; justify-content: flex-end; }
.main-nav a { display: block; padding: .45rem .55rem; color: var(--bg); text-decoration: none; font-size: .98rem; border-radius: 4px; }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--yellow); }
.main-nav a[aria-current="page"] { color: var(--yellow); box-shadow: inset 0 -3px 0 var(--yellow); border-radius: 0; }

@media (max-width: 1240px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--blue); max-height: 0; overflow: hidden; transition: max-height .3s ease; }
  .main-nav.open { max-height: 80vh; overflow-y: auto; }
  .main-nav ul { flex-direction: column; padding: .5rem 1.5rem 1.25rem; }
  .main-nav a { padding: .7rem 0; font-size: 1.15rem; border-bottom: 1px solid rgba(236,241,244,.15); }
  .main-nav a[aria-current="page"] { box-shadow: none; }
  .brand img { width: 72px; }
  .brand-text .t1 { font-size: 1.25rem; white-space: normal; }
  .brand-text .t2 { white-space: normal; }
  .header-inner { min-height: 80px; }
}

@media (max-width: 480px) { .brand-text .t2 { display: none; } .brand img { width: 60px; } }

/* ---------- Breadcrumb (gelbe Leiste wie ESV) ---------- */
.breadcrumb { background: var(--yellow); font-size: .9rem; }
.breadcrumb ol { list-style: none; margin: 0; padding: .9rem 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; color: var(--muted); }
.breadcrumb a { color: var(--text); }

/* ---------- Bereiche ---------- */
main { display: block; }
.section { padding: 3.5rem 0; }
.section-tight { padding: 2rem 0; }
.page-head { padding: 3rem 0 1rem; }
.page-head .lead { font-family: var(--font-head); font-weight: 700; color: var(--blue); font-size: 1.3rem; }

/* Hero: Bild/Motiv links, blaue Karte rechts (wie ESV-Startseite) */
.hero { padding: 3rem 0; position: relative; overflow: hidden; }
.hero::before { /* dezentes Schachbrett im Hintergrund */
  content: ""; position: absolute; inset: 0; opacity: .05; pointer-events: none;
  background-image: conic-gradient(var(--blue) 25%, transparent 0 50%, var(--blue) 0 75%, transparent 0);
  background-size: 80px 80px;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 10px 30px rgba(47,75,160,.18); }
.hero-media { background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 2rem; border: 1px solid rgba(47,75,160,.12); border-right: 0; }
.hero-media img { width: 100%; max-width: 520px; }
.hero-card { background: var(--blue); color: var(--bg); padding: 3rem 2.5rem; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.hero-card h1 { color: var(--bg); margin-bottom: .3em; }
.hero-card .kicker { font-family: var(--font-head); color: var(--yellow); font-size: 1.35rem; margin-bottom: .4rem; }
.hero-card .date { font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; color: var(--yellow); margin: .4rem 0 .2rem; }
.hero-card .place { margin-bottom: 1.6rem; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { border-right: 1px solid rgba(47,75,160,.12); border-bottom: 0; }
  .hero-card { padding: 2.25rem 1.5rem; }
}

/* Buttons wie ESV: blau, gelbe Schrift, gelber Rand, 24px Radius */
.btn { display: inline-block; font-family: var(--font-base); font-weight: 700; font-size: 1rem; text-decoration: none;
  padding: .7rem 1.5rem; border-radius: var(--radius-btn); border: 1px solid var(--yellow);
  background: var(--blue); color: var(--yellow); transition: background .2s, color .2s, border-color .2s; cursor: pointer; }
.btn:hover, .btn:focus-visible { background: var(--yellow); color: var(--blue); border-color: var(--blue); }
.btn-light { border-color: var(--blue); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* Karten */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.card { background: var(--blue); color: var(--bg); padding: 2rem 1.75rem; display: flex; flex-direction: column; }
.card h2, .card h3 { color: var(--bg); }
.card .icon { font-size: 2.4rem; line-height: 1; color: var(--yellow); margin-bottom: .8rem; }
.card p { flex: 1; }
.card a:not(.btn) { color: var(--yellow); }
.card-yellow { background: var(--yellow); color: var(--text); }
.card-yellow h2, .card-yellow h3 { color: var(--text); }
.card-white { background: var(--white); color: var(--text); border-top: 4px solid var(--blue); }
.card-white h2, .card-white h3 { color: var(--blue); }
.card-white a:not(.btn) { color: var(--blue); }

/* Info-Box */
.notice { background: var(--white); border-left: 6px solid var(--yellow); padding: 1rem 1.25rem; margin: 0 0 2rem; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.notice strong { color: var(--blue); }
.placeholder { background: var(--white); border: 2px dashed rgba(47,75,160,.35); padding: 2.5rem 1.5rem; text-align: center; color: var(--muted); }
.placeholder .icon { font-size: 3rem; color: var(--blue); }

/* Zweispaltig: Text + Box */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Blaues Band (wie ESV "Engagement. Spaß. Vielfalt.") */
.band { background: var(--blue); color: var(--bg); text-align: center; padding: 3.5rem 0; }
.band h2 { color: var(--yellow); }
.band p { max-width: 720px; margin: 0 auto 1.5rem; }

/* ---------- Tabs (Ausschreibung) ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.tabs a { display: block; padding: .45rem 1rem; border-radius: var(--radius-btn); background: var(--white); color: var(--blue); text-decoration: none; font-weight: 700; font-size: .95rem; border: 1px solid rgba(47,75,160,.25); }
.tabs a:hover, .tabs a:focus-visible { background: var(--blue); color: var(--yellow); }

.tournament { background: var(--white); padding: 2rem 1.75rem; margin-bottom: 1.75rem; scroll-margin-top: 120px; border-top: 4px solid var(--blue); }
.tournament h2 { margin-bottom: .35em; }
dl.facts { display: grid; grid-template-columns: 180px 1fr; gap: .55rem 1.25rem; margin: 1.25rem 0 0; }
dl.facts dt { font-weight: 700; color: var(--blue); }
dl.facts dd { margin: 0; }
dl.facts ul, dl.facts ol { margin: .25rem 0; padding-left: 1.2rem; }
@media (max-width: 640px) { dl.facts { grid-template-columns: 1fr; } dl.facts dt { margin-top: .6rem; } }
table.prizes { border-collapse: collapse; }
table.prizes td { padding: .1rem 1.25rem .1rem 0; vertical-align: top; }
.to-top { font-size: .9rem; }
.legal h2 { margin-top: 2rem; } .legal h2:first-child { margin-top: 0; } .legal h3 { margin-top: 1.5rem; } .legal h4 { font-size: 1.1rem; color: var(--text); margin-top: 1rem; } .legal a { color: var(--blue); word-break: break-word; }

/* ---------- Terminplan ---------- */
.legend { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.legend li { padding: .35rem .85rem; border-radius: var(--radius-btn); font-size: .95rem; font-weight: 700; }
.ev-mt { background: #fff670; color: #121112; }
.ev-ht { background: #2f4ba0; color: #ecf1f4; }
.ev-st { background: #c9d4ee; color: #121112; }
.ev-jo { background: #8fb1e3; color: #121112; }
.ev-bs { background: #ffd84a; color: #121112; }
.ev-ps { background: #dcdfe6; color: #121112; }
.ev-gen { background: #ffffff; color: #121112; border: 1px solid #c9d4ee; }
.ev-free { background: #e2e6ea; color: #666; }

.calendar-wrap { overflow-x: auto; }
table.calendar { width: 100%; min-width: 820px; border-collapse: separate; border-spacing: 6px; table-layout: fixed; }
table.calendar th { font-family: var(--font-head); color: var(--bg); background: var(--blue); padding: .55rem .4rem; text-align: left; font-size: 1.05rem; }
table.calendar th small { display: block; font-family: var(--font-base); font-weight: 400; color: var(--yellow); font-size: .85rem; }
table.calendar td { vertical-align: top; background: var(--white); padding: .4rem; height: 8rem; }
table.calendar td.empty { background: rgba(255,255,255,.45); }
.ev { display: block; border-radius: 6px; padding: .35rem .5rem; margin-bottom: .35rem; font-size: .88rem; line-height: 1.3; }
.ev b { display: block; font-size: .8rem; }
.holiday { font-size: .8rem; color: var(--yellow); font-family: var(--font-base); font-weight: 400; }

/* Agenda-Liste (mobil & Druck) */
.agenda { display: none; }
.agenda h3 { margin-top: 1.25rem; }
.agenda ul { list-style: none; padding: 0; margin: 0; }
@media (max-width: 760px) {
  .calendar-wrap { display: none; }
  .agenda { display: block; }
}

/* ---------- Anfahrt ---------- */
.map-box { position: relative; background: #dfe6ee; aspect-ratio: 4 / 3; border: 1px solid rgba(47,75,160,.2); }
.map-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; gap: .9rem;
  background-image: conic-gradient(rgba(47,75,160,.08) 25%, transparent 0 50%, rgba(47,75,160,.08) 0 75%, transparent 0); background-size: 48px 48px; }
.map-consent p { max-width: 420px; font-size: .95rem; margin: 0; }
.address-card { background: var(--blue); color: var(--bg); padding: 1.75rem; }
.address-card h2, .address-card h3 { color: var(--yellow); }
.address-card a { color: var(--yellow); }
.route-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 760px) { .route-grid { grid-template-columns: 1fr; } }
.route { background: var(--white); padding: 1.75rem; border-top: 4px solid var(--blue); }
.route h3 { display: flex; align-items: center; gap: .6rem; }
.route h3 .ico { display: inline-flex; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--blue); color: var(--yellow); align-items: center; justify-content: center; font-size: 1.2rem; flex: 0 0 auto; }
.route h4 { color: var(--text); font-size: 1.1rem; margin-top: 1rem; }
.lines { display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.line { display: inline-block; min-width: 2rem; text-align: center; font-weight: 700; font-size: .85rem; padding: .1rem .45rem; border-radius: 4px; background: var(--yellow); color: var(--blue); border: 1px solid var(--blue); }

/* ---------- Footer (wie ESV) ---------- */
.site-footer { background: var(--blue); color: var(--bg); padding: 3rem 0 1.5rem; margin-top: 3rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { color: var(--bg); font-size: 1.35rem; }
.site-footer a { color: var(--yellow); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35rem; }
.footer-logo { width: 170px; margin-top: .5rem; }
.footer-bottom { border-top: 1px solid rgba(236,241,244,.2); margin-top: 2rem; padding-top: 1rem; font-size: .85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }

.back-to-top { position: fixed; right: 1.25rem; bottom: 1.25rem; width: 44px; height: 44px; border-radius: 50%; background: var(--yellow); color: var(--blue); border: 1px solid var(--blue);
  display: flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.back-to-top.show { opacity: 1; pointer-events: auto; }

@media print {
  .site-header, .site-footer, .breadcrumb, .back-to-top, .tabs, .no-print { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .calendar-wrap { display: block !important; overflow: visible; }
  .agenda { display: none !important; }
  table.calendar { min-width: 0; }
  .ev, .legend li { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
