/* ===================================================
   Vier-Abende-Marsch – Custom Properties & Reset
   =================================================== */

@font-face {
  font-family: 'GoodDog';
  src: url('../fonts/GoodDog-webfont.woff') format('woff'),
       url('../fonts/GoodDog-webfont.ttf') format('truetype');
  font-display: swap;
}

:root {
  --brand:        #a53742;
  --brand-light:  #bf4f5c;
  --text:         #1a1a1a;
  --text-muted:   #666;
  --bg:           #fff;
  --bg-alt:       #f8f5f3;
  --border:       #e0d9d5;
  --font-body:    system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --max-width:    1080px;
  --pad:          clamp(1rem, 4vw, 2rem);
  --radius:       6px;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }

h1, h2, h3 {
  line-height: 1.2;
  margin-top: 0;
}

ul { padding-left: 1.4em; }

/* ===================================================
   Layout helpers
   =================================================== */

.site-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--pad);
}

main > section {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}

main > .slider {
  padding: 0;
}

.section--alt {
  background: var(--bg-alt);
}

/* ===================================================
   Header & Navigation
   =================================================== */

.site-header {
  border-bottom: 3px solid var(--brand);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 1100;
  /* Establishes containing block for the mobile nav dropdown */
  isolation: isolate;
}

.site-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo */
.site-nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.site-nav__logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.site-nav__title {
  display: block;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand);
  line-height: 1.15;
}

.site-nav__subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* Nav links */
.site-nav__links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links > li > a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
}

.site-nav__links > li > a:hover { color: var(--brand); }

/* Dropdown */
.dropdown { position: relative; }

.dropdown__toggle {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.dropdown__toggle:hover { color: var(--brand); }

.dropdown__toggle::after {
  content: '▾';
  font-size: 0.75em;
  opacity: 0.6;
}

.dropdown__menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  list-style: none;
  margin: 0;
  /* padding-top bridges the gap so cursor stays within .dropdown */
  padding: 0.5rem 0 0.35rem;
  min-width: 200px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.dropdown__menu li a {
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.875rem;
  white-space: nowrap;
}

.dropdown__menu li a:hover {
  background: var(--bg-alt);
  color: var(--brand);
}

.dropdown:hover .dropdown__menu,
.dropdown:focus-within .dropdown__menu {
  display: block;
}

/* Burger button */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}

.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
@media (max-width: 640px) {
  .nav-burger { display: flex; }

  .site-nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    gap: 0;
    z-index: 150;
  }

  .site-nav__links.is-open { display: flex; }

  .site-nav__links > li { width: 100%; }

  .site-nav__links > li > a {
    display: block;
    padding: 0.75rem var(--pad);
    font-size: 1rem;
  }

  .dropdown__toggle {
    width: 100%;
    text-align: left;
    padding: 0.75rem var(--pad);
    font-size: 1rem;
  }

  /* Static dropdown in mobile */
  .dropdown__menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: var(--bg-alt);
    padding: 0.25rem 0;
    min-width: 0;
  }

  .dropdown__menu li a {
    padding-left: calc(var(--pad) + 1rem);
    font-size: 0.925rem;
  }

  /* Disable hover on mobile, use JS-toggled class */
  .dropdown:hover .dropdown__menu { display: none; }
  .dropdown:focus-within .dropdown__menu { display: none; }
  .dropdown.is-open .dropdown__menu { display: block; }
}

/* ===================================================
   Slider
   =================================================== */

.slider {
  position: relative;
  overflow: hidden;
}

.slider__track {
  display: flex;
  height: clamp(220px, 44vw, 350px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.slider__track::-webkit-scrollbar { display: none; }

.slider__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  scroll-snap-align: start;
}

.slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.slider__btn:hover { background: rgba(0, 0, 0, 0.6); }
.slider__btn--prev { left: 1rem; }
.slider__btn--next { right: 1rem; }

/* ===================================================
   Teaser / Callout
   =================================================== */

.callout {
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--brand);
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.callout--warning {
  border-left-color: #c47d22;
  background: #fdf6ec;
}

.callout p:last-child { margin-bottom: 0; }

/* ===================================================
   Info Boxes
   =================================================== */

.boxes__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.box {
  padding: 1.75rem;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

.box h3 {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: 1.5rem;
  color: var(--brand);
  margin-bottom: 0.75rem;
}

/* ===================================================
   Maps
   =================================================== */

.map {
  height: 480px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.maps__item + .maps__item {
  margin-top: 3rem;
}

.map__downloads {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.maps h2 {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--brand);
  margin-bottom: 1.5rem;
}

.maps h3 { margin-bottom: 0.75rem; }

/* ===================================================
   FAQ
   =================================================== */

.faq h2 {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--brand);
  margin-bottom: 1rem;
}

/* ===================================================
   Sponsors
   =================================================== */

.sponsors h2 {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--brand);
  margin-bottom: 1.5rem;
}

.sponsors__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1.25rem;
}

.sponsor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 1rem;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  gap: 0.75rem;
}

.sponsor-card img {
  max-height: 72px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  margin: 0 auto;
}

.sponsor-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ===================================================
   Footer
   =================================================== */

footer {
  background: var(--bg-alt);
  text-align: center;
  padding: 1.5rem var(--pad);
}

footer p {
  margin: 0;
  font-size: 0.825rem;
  color: var(--text-muted);
}

footer a {
  color: var(--text-muted);
  text-decoration: underline;
}

footer a:hover { color: var(--brand); }

/* ===================================================
   Impressum page
   =================================================== */

.prose {
  max-width: 720px;
}

.prose h2 {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: 1.9rem;
  color: var(--brand);
  margin-bottom: 0.5rem;
}

.prose h3 {
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.25rem;
}

.prose h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.25rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prose p { margin-top: 0; }
