/* ==========================================================================
   Layout: 12-Spalten-Raster, Header/Navbar, Footer
   ========================================================================== */

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}

/* ---------------- Header / Navbar ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(243, 238, 226, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: none; /* fixed Mobile-Drawer-Falle: kein backdrop-filter auf Sticky-Header */
  transition: padding var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.site-header.is-condensed {
  box-shadow: 0 8px 24px -16px rgba(31, 58, 46, 0.35);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.35rem;
  transition: padding var(--dur-base) var(--ease-out);
}
.site-header.is-condensed .header-inner { padding-block: 0.75rem; }

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--primary);
}
.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.6vw + 0.6rem, 1.4rem);
  letter-spacing: -0.01em;
  color: var(--primary);
  white-space: nowrap;
}
.brand-sub {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: none;
}
@media (min-width: 560px) { .brand-sub { display: inline; } }

.primary-nav { display: none; }
@media (min-width: 900px) {
  .primary-nav {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 2vw, 2.25rem);
  }
  .primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 2vw, 2.25rem);
  }
  .primary-nav a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: clamp(0.88rem, 0.6vw + 0.7rem, 0.98rem);
    white-space: nowrap;
    padding: 0.4em 0.1em;
    position: relative;
  }
  .primary-nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 100%;
    bottom: -2px;
    height: 2px;
    background: var(--accent);
    transition: right var(--dur-base) var(--ease-out);
  }
  .primary-nav a:hover::after,
  .primary-nav a[aria-current="page"]::after { right: 0; }
}

.site-header .header-cta { display: none; }
@media (min-width: 900px) {
  .site-header .header-cta { display: inline-flex; white-space: nowrap; flex-shrink: 0; }
}

/* Squeeze-Zone 900–1180px: Navbar knapper, damit nichts umbricht/überläuft */
@media (min-width: 900px) and (max-width: 1180px) {
  .header-inner { gap: 0.85rem; }
  .primary-nav, .primary-nav ul { gap: 0.85rem; }
  .site-header .header-cta {
    padding: 0.55em 0.9em;
    font-size: 0.82rem;
  }
  .site-header .header-cta .icon { display: none; }
}

.burger { flex-shrink: 0; }

.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
}
@media (min-width: 900px) { .burger { display: none; } }
.burger-lines {
  width: 20px; height: 14px;
  position: relative;
}
.burger-lines span {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--primary);
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-fast) var(--ease-out), top var(--dur-base) var(--ease-out);
}
.burger-lines span:nth-child(1) { top: 0; }
.burger-lines span:nth-child(2) { top: 6px; }
.burger-lines span:nth-child(3) { top: 12px; }
.nav-open .burger-lines span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-open .burger-lines span:nth-child(2) { opacity: 0; }
.nav-open .burger-lines span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Mobile Drawer — Sibling vom header, NICHT verschachtelt (Klick-Falle vermeiden) */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 490;
  visibility: hidden;
}
.mobile-drawer-panel {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  width: min(84vw, 360px);
  background: var(--primary);
  transform: translateX(100%);
  transition: transform var(--dur-base) var(--ease-out);
  display: flex;
  flex-direction: column;
  padding: 6.5rem 2rem 2.5rem;
  overflow-y: auto;
}
.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 32, 26, 0.55);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.nav-open .mobile-drawer { visibility: visible; }
.nav-open .mobile-drawer-panel { transform: translateX(0); }
.nav-open .mobile-drawer-backdrop { opacity: 1; }

.mobile-drawer ul { list-style: none; margin: 0; padding: 0; display: contents; }
.mobile-drawer-panel > ul,
.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}
.mobile-drawer a {
  display: block;
  color: #EDE7DA;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.3rem;
  padding: 0.6em 0.1em;
  border-bottom: 1px solid rgba(237, 231, 218, 0.14);
  min-height: 44px;
}
.mobile-drawer .header-cta { display: inline-flex; }

@media (min-width: 900px) { .mobile-drawer { display: none; } }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--primary);
  color: #C9D2C5;
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(237, 231, 218, 0.14);
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2.25rem; }
}
.footer-grid h4 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.1em;
}
.footer-grid a { color: #C9D2C5; text-decoration: none; }
.footer-grid a:hover { color: #fff; }
.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.footer-brand-mark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 0.5rem;
}
.footer-contact-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75em;
}
.footer-contact-row .icon { color: var(--accent); flex-shrink: 0; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: #97A493;
}
.footer-bottom a { color: #97A493; }
.footer-legal-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ---------------- Page layout helpers ---------------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
}

.page-hero {
  padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--muted); }

.page-hero-image-wrap { margin-top: -0.5rem; }
.page-hero-image {
  border-radius: var(--radius);
  aspect-ratio: 21 / 9;
  object-fit: cover;
  margin-top: 1.5rem;
}

.entry-content > * { max-width: 68ch; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content ul { max-width: 62ch; }

@media (max-width: 900px) {
  .grid-12 { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 600px) {
  .grid-12 { grid-template-columns: 1fr; }
}
