/* ==========================================================================
   Drachen- und Gleitschirmflugverein Baiersbronn e.V. — Design System
   ========================================================================== */

/* Self-hosted fonts (DSGVO: keine Anfragen an Google-Server) */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --color-primary: #123B6A;
  --color-primary-dark: #0c2847;
  --color-secondary: #4FA9E8;
  --color-accent: #F59E0B;
  --color-bg: #FFFFFF;
  --color-section-bg: #F5F7FA;
  --color-ink: #10192b;
  --color-ink-soft: #4b5768;
  --color-muted: #7b8794;
  --color-border: #e4e9ef;
  --color-white: #ffffff;

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1240px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 12px rgba(18, 59, 106, 0.08);
  --shadow-md: 0 12px 40px rgba(18, 59, 106, 0.12);
  --shadow-lg: 0 24px 70px rgba(18, 59, 106, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--color-primary);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
p { margin: 0 0 1em; color: var(--color-ink-soft); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: var(--color-section-bg); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--color-accent);
  display: inline-block;
}

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(245, 158, 11, 0.45); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.55);
  color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); transform: translateY(-3px); border-color: #fff; }
.btn-ghost {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-border);
}
.btn-ghost:hover { border-color: var(--color-primary); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }

/* ---------- Navigation ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header.is-scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(18,59,106,0.08);
  padding: 12px 0;
}
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: #fff; transition: color 0.4s; }
.site-header.is-scrolled .brand { color: var(--color-primary); }
.brand img { height: 44px; width: auto; transition: height 0.4s; }
.site-header.is-scrolled .brand img { height: 38px; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  transition: background 0.3s, color 0.3s;
}
.site-header.is-scrolled .nav-links a { color: var(--color-ink-soft); }
.nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,0.16); color: #fff; }
.site-header.is-scrolled .nav-links a:hover,
.site-header.is-scrolled .nav-links a.active { background: var(--color-section-bg); color: var(--color-primary); }

.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none;
  background: none; border: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  align-items: center; justify-content: center;
  position: relative;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: "";
  position: absolute;
  width: 22px; height: 2px;
  background: #fff;
  transition: transform 0.3s, opacity 0.3s, background 0.3s;
}
.site-header.is-scrolled .nav-toggle span,
.site-header.is-scrolled .nav-toggle::before,
.site-header.is-scrolled .nav-toggle::after { background: var(--color-primary); }
.nav-toggle::before { transform: translateY(-7px); }
.nav-toggle::after { transform: translateY(7px); }
.nav-toggle.is-open::before { transform: rotate(45deg); }
.nav-toggle.is-open::after { transform: rotate(-45deg); }
.nav-toggle.is-open span { opacity: 0; }

@media (max-width: 980px) {
  .nav-links { position: fixed; top: 0; right: -100%; height: 100vh; width: min(85vw, 360px);
    background: var(--color-primary); flex-direction: column; align-items: stretch;
    padding: 110px 28px 40px; gap: 4px; transition: right 0.45s var(--ease); box-shadow: -20px 0 60px rgba(0,0,0,0.25); }
  .nav-links.is-open { right: 0; }
  .nav-links a { color: #fff !important; padding: 14px 18px; font-size: 1.05rem; }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn-outline, .nav-cta .btn-ghost { display: none; }

  /* While the mobile menu is open, keep the top bar looking the same as at
     the very top of the page instead of the opaque "scrolled" style. */
  .site-header.is-scrolled.nav-is-open {
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    padding: 20px 0;
  }
  .site-header.is-scrolled.nav-is-open .brand { color: #fff; }
  .site-header.is-scrolled.nav-is-open .brand img { height: 44px; }
  .site-header.is-scrolled.nav-is-open .nav-toggle span,
  .site-header.is-scrolled.nav-is-open .nav-toggle::before,
  .site-header.is-scrolled.nav-is-open .nav-toggle::after { background: #fff; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-primary-dark);
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.6s ease-in-out;
}
.hero-slide.is-active { opacity: 1; }
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,25,46,0.55) 0%, rgba(10,25,46,0.45) 40%, rgba(10,25,46,0.85) 100%);
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; color: #fff; max-width: 760px; padding-top: 90px; }
.hero-content .eyebrow { color: #ffd699; }
.hero-content .eyebrow::before { background: var(--color-accent); }
.hero h1 { color: #fff; margin-bottom: 22px; }
.hero p.lead { color: rgba(255,255,255,0.88); font-size: 1.15rem; max-width: 560px; }
.hero-actions { display: flex; gap: 16px; margin-top: 36px; flex-wrap: wrap; }

.scroll-cue {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.75); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.scroll-cue .dot-track { width: 2px; height: 40px; background: rgba(255,255,255,0.3); position: relative; overflow: hidden; border-radius: 2px; }
.scroll-cue .dot-track::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 40%;
  background: var(--color-accent); animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot { 0% { top: -40%; } 100% { top: 100%; } }

/* ---------- Cards ---------- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card-img { aspect-ratio: 4/3; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.card:hover .card-img img { transform: scale(1.08); }
.card-body { padding: 26px; }

.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- News / Post cards ---------- */
.news-card .meta { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; color: var(--color-muted); margin-bottom: 10px; }
.date-badge {
  background: var(--color-section-bg); color: var(--color-primary);
  border-radius: 10px; padding: 4px 10px; font-weight: 700; display: inline-block;
}
.news-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.news-card .excerpt { font-size: 0.94rem; }
.news-card .read-more { color: var(--color-secondary); font-weight: 700; font-size: 0.88rem; display: inline-flex; align-items: center; gap: 6px; }
.news-card .read-more svg { transition: transform 0.3s; }
.news-card:hover .read-more svg { transform: translateX(4px); }

/* ---------- Icon chip ---------- */
.icon-chip {
  width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
  display: flex; align-items: center; justify-content: center; color: #fff; margin-bottom: 18px;
}

/* ---------- Tabs (flight areas) ---------- */
.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.tab-btn {
  padding: 12px 22px; border-radius: 999px; border: 2px solid var(--color-border);
  background: var(--color-white); font-weight: 600; font-size: 0.9rem; color: var(--color-ink-soft);
  transition: all 0.3s;
}
.tab-btn.is-active, .tab-btn:hover { border-color: var(--color-secondary); color: var(--color-primary); background: #eef7ff; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeUp 0.5s var(--ease); }

.flug-photos { display: grid; gap: 18px; }
.flug-photo { display: block; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 4/3; }
.flug-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.flug-photo:hover img { transform: scale(1.04); }
.flug-photo--placeholder { display: flex; align-items: center; justify-content: center; background: var(--color-section-bg); color: var(--color-muted); text-align: center; padding: 24px; }
@media (max-width: 860px) { .fluggebiet-grid { grid-template-columns: 1fr !important; } }

.info-list { display: grid; gap: 14px; }
.info-row { display: flex; gap: 14px; padding: 16px 20px; background: var(--color-section-bg); border-radius: var(--radius-sm); }
.info-row strong { color: var(--color-primary); min-width: 130px; display: inline-block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-primary-dark); color: rgba(255,255,255,0.78); padding-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-grid h4 { color: #fff; font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 20px; }
.footer-grid a { color: rgba(255,255,255,0.72); display: block; padding: 6px 0; transition: color 0.25s, transform 0.25s; font-size: 0.94rem; }
.footer-grid a:hover { color: #fff; transform: translateX(4px); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 26px 0; font-size: 0.82rem; color: rgba(255,255,255,0.55); flex-wrap: wrap; gap: 12px; }
.footer-bottom a { color: rgba(255,255,255,0.7); }
.footer-bottom a:hover { color: #fff; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Utilities / animations ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.page-hero {
  position: relative;
  min-height: 46vh;
  display: flex; align-items: flex-end;
  background-size: cover; background-position: center;
  padding-bottom: 56px; padding-top: 140px;
  color: #fff;
}
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,25,46,0.45), rgba(10,25,46,0.82)); }
.page-hero .container { position: relative; z-index: 2; }
.breadcrumb { font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-bottom: 14px; }
.breadcrumb a { color: rgba(255,255,255,0.7); }
.breadcrumb a:hover { color: #fff; }
.page-hero h1 { color: #fff; margin-bottom: 0; }

/* ---------- Gallery / Lightbox ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 980px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1/1; cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-item::after { content: "\2b1c"; }
.lightbox { position: fixed; inset: 0; background: rgba(6,14,26,0.94); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 40px; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25); color: #fff; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.25s; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.25); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ---------- Gallery listing cards ---------- */
.gallery-card { position: relative; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow-sm); }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.gallery-card:hover img { transform: scale(1.08); }
.gallery-card .overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(8,20,38,0.88) 100%); display: flex; align-items: flex-end; padding: 22px; }
.gallery-card .overlay h3 { color: #fff; margin: 0; font-size: 1.15rem; }
.gallery-card .overlay span { color: rgba(255,255,255,0.7); font-size: 0.82rem; }

.weather-card { background: var(--color-white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 32px; }

/* ---------- Contact ---------- */
.contact-tile { display: flex; gap: 16px; align-items: flex-start; padding: 22px; background: var(--color-white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.contact-tile .icon-chip { margin-bottom: 0; flex-shrink: 0; }

/* ---------- Misc content sections ---------- */
.board-list { display: grid; gap: 12px; }
.board-list li { display: flex; justify-content: space-between; padding: 14px 20px; background: var(--color-white); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.board-list b { color: var(--color-primary); }
.board-list span { color: var(--color-muted); font-size: 0.9rem; }

.link-list a { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--color-border); }
.link-list a:hover { color: var(--color-secondary); }

.pill { display: inline-block; padding: 5px 14px; border-radius: 999px; background: rgba(79,169,232,0.12); color: var(--color-primary); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; }

hr.rule { border: none; border-top: 1px solid var(--color-border); margin: 40px 0; }

.prose h2, .prose h3, .prose h4 { margin-top: 1.4em; }
.prose img { border-radius: var(--radius-sm); margin: 18px 0; }
.prose a { color: var(--color-secondary); text-decoration: underline; }

.post-hero-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); margin-bottom: 40px; }

.notice-box { background: linear-gradient(135deg, #eef7ff, #f5f7fa); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 26px 30px; }

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
