/* =============================
   Dämmerblüte Rhetorikakademie
   Vintage Retro Theme – Flexbox Only
   ============================= */

/* -----------------------------
   CSS RESET & NORMALIZE
------------------------------ */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; line-height: 1.6; }
img, svg { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0 0 16px 24px; }
small { font-size: 0.875rem; }

/* -----------------------------
   THEME VARIABLES (with fallbacks)
------------------------------ */
:root {
  --color-primary: #1C2A44; /* deep vintage navy */
  --color-secondary: #8E3F71; /* plum */
  --color-accent: #F3EDE2; /* warm cream */
  --color-ink: #2B2B2B; /* body text dark */
  --color-muted: #7A6E66; /* muted brownish gray */
  --color-mustard: #C8A24A; /* vintage mustard accent */
  --color-fern: #2E6F64; /* retro green */
  --color-burnt: #BF6B3F; /* burnt orange */

  --radius-s: 6px;
  --radius-m: 10px;
  --shadow-s: 0 1px 0 rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-m: 0 2px 0 rgba(0,0,0,0.06), 0 6px 16px rgba(0,0,0,0.10);

  --ff-display: Georgia, "Times New Roman", Times, serif;
  --ff-body: Verdana, Geneva, Tahoma, sans-serif;
}

/* -----------------------------
   BASE TYPOGRAPHY
------------------------------ */
body {
  font-family: var(--ff-body);
  color: var(--color-ink);
  background: var(--color-accent);
  letter-spacing: 0.01em;
}

h1, h2, h3, h4, h5 { font-family: var(--ff-display); color: var(--color-primary); line-height: 1.25; margin: 0 0 12px; }

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p { margin: 0 0 14px; }
strong { color: var(--color-primary); }

/* Decorative vintage underline for headings */
h1, h2 { position: relative; padding-bottom: 6px; }
h1::after, h2::after {
  content: "";
  position: absolute; left: 0; bottom: 0; height: 3px; width: 64px;
  background: var(--color-mustard);
}

/* Links & Focus */
a { color: var(--color-secondary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--color-burnt); text-decoration: underline; }
:focus-visible { outline: 3px solid var(--color-mustard); outline-offset: 2px; }

/* -----------------------------
   LAYOUT WRAPPERS (Flexbox only)
------------------------------ */
.container {
  width: 100%;
  display: flex; /* flexbox only */
  justify-content: center;
  padding-left: 16px; padding-right: 16px;
}
.content-wrapper {
  width: 100%; max-width: 1100px;
  display: flex; /* flexbox only */
  flex-direction: column; gap: 20px;
}
.text-section { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }

/* Mandatory spacing classes */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Ensure spacing for plain <section> blocks */
main > section { margin-bottom: 60px; }

/* -----------------------------
   RETRO SURFACE STYLES
------------------------------ */
.section, main > section {
  background: #FFFFFF;
  border: 1px solid rgba(28,42,68,0.15);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-s);
}

/* Subtle vintage border accent */
.section::before, main > section::before {
  content: "";
  display: block; height: 6px; width: 100%;
  background: repeating-linear-gradient(90deg, var(--color-mustard), var(--color-mustard) 12px, transparent 12px, transparent 20px);
  border-top-left-radius: var(--radius-m);
  border-top-right-radius: var(--radius-m);
}

/* -----------------------------
   HEADER & NAVIGATION
------------------------------ */
header { position: sticky; top: 0; z-index: 1000; background: #FFF; border-bottom: 4px double var(--color-primary); }
header .container { padding-top: 10px; padding-bottom: 10px; }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }

.logo { display: flex; align-items: center; }
.logo img { height: 40px; width: auto; }

.main-nav { display: none; gap: 16px; align-items: center; }
.main-nav a {
  font-family: var(--ff-display); font-size: 0.95rem; letter-spacing: 0.04em;
  padding: 8px 10px; border-radius: var(--radius-s);
}
.main-nav a:hover { background: var(--color-accent); text-decoration: none; }

.cta-nav { display: none; gap: 10px; }
.cta-nav a { 
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--radius-s);
  border: 2px solid var(--color-secondary);
  color: #FFF; background: var(--color-secondary);
  font-weight: bold; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.85rem;
  box-shadow: var(--shadow-s);
  transition: transform 150ms ease, background-color 150ms ease, color 150ms ease;
}
.cta-nav a:hover { transform: translateY(-1px); background: var(--color-burnt); border-color: var(--color-burnt); }

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--color-primary);
  background: #FFF; color: var(--color-primary);
  box-shadow: var(--shadow-s);
}
.mobile-menu-toggle:hover { background: var(--color-accent); }

/* Mobile slide-in menu */
.mobile-menu {
  position: fixed; inset: 0 0 0 0; display: flex; flex-direction: column; gap: 16px;
  background: var(--color-accent); color: var(--color-primary);
  transform: translateX(100%);
  transition: transform 250ms ease-in-out; z-index: 1500; padding: 20px;
  border-left: 6px solid var(--color-primary);
}
.mobile-menu[aria-hidden="false"] { transform: translateX(0%); }
.mobile-menu-close {
  align-self: flex-end; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 2px solid var(--color-primary); background: #FFF; color: var(--color-primary);
}
.mobile-nav { display: flex; flex-direction: column; gap: 12px; }
.mobile-nav a {
  padding: 12px 10px; border: 1px dashed rgba(28,42,68,0.25); border-radius: var(--radius-s);
  background: #FFF; color: var(--color-primary); font-family: var(--ff-display);
}
.mobile-nav a:hover { background: var(--color-accent); }

/* -----------------------------
   BUTTON-LIKE LINKS IN CONTENT
------------------------------ */
/* Hero/section link groups: .text-section div > a becomes button style */
.text-section > div > a,
.content-wrapper > p > a:first-child {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; margin-right: 10px; margin-bottom: 8px;
  border-radius: var(--radius-s); border: 2px solid var(--color-secondary);
  color: #FFF; background: var(--color-secondary); font-weight: bold;
  text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.9rem;
  box-shadow: var(--shadow-s);
  transition: background-color 160ms ease, transform 160ms ease, color 160ms ease, border-color 160ms ease;
}
.text-section > div > a:hover,
.content-wrapper > p > a:first-child:hover {
  background: var(--color-burnt); border-color: var(--color-burnt); transform: translateY(-1px);
}
/* Secondary ghost style if two CTAs side by side */
.text-section > div > a + a {
  background: #FFF; color: var(--color-secondary);
}
.text-section > div > a + a:hover { color: #FFF; }

/* Inline CTA links in paragraphs */
.content-wrapper > p > a:not(:first-child) {
  text-decoration: underline; color: var(--color-secondary);
}

/* -----------------------------
   LISTS & ICON ROWS (retro feel)
------------------------------ */
.text-section ul, .content-wrapper > ul, .content-wrapper > ol { margin-left: 18px; }
.text-section ul li, .content-wrapper ul li { margin-bottom: 8px; }
.text-section ul li img, .content-wrapper ul li img { margin-right: 8px; }

/* If list items have icons, align them nicely */
.text-section ul li, .content-wrapper ul li { display: flex; align-items: center; gap: 10px; }
.content-wrapper ol { padding-left: 18px; }
.content-wrapper ol li { margin-bottom: 8px; }

/* Retro separators */
hr { border: 0; border-top: 3px double var(--color-primary); margin: 24px 0; }

/* -----------------------------
   TESTIMONIALS (high contrast, light bg)
------------------------------ */
.testimonial-card {
  background: var(--color-accent); color: var(--color-primary);
  border: 1px solid rgba(28,42,68,0.2); border-radius: var(--radius-m);
  box-shadow: var(--shadow-s);
}
.testimonial-card p { margin: 0; }
.testimonial-card + .testimonial-card { margin-top: 16px; }

/* Rating row */
.content-wrapper > p img[alt*="Stern"] { display: inline-block; vertical-align: middle; margin-right: 8px; }

/* -----------------------------
   CARDS (generic)
------------------------------ */
.card {
  background: #FFF; border: 1px solid rgba(28,42,68,0.12);
  border-radius: var(--radius-m); box-shadow: var(--shadow-s);
  padding: 18px;
}
.card:hover { box-shadow: var(--shadow-m); }

/* Corner accents (decorative, not content) */
.card::before, .card::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border: 2px solid var(--color-mustard); border-right: 0; border-bottom: 0;
}
.card::before { top: 8px; left: 8px; }
.card::after { bottom: 8px; right: 8px; transform: rotate(180deg); }

/* -----------------------------
   FOOTER
------------------------------ */
footer { background: var(--color-primary); color: var(--color-accent); padding-top: 10px; }
footer section { background: transparent; border: 0; box-shadow: none; }
footer .content-wrapper { flex-direction: row; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding: 20px 0; }
footer .text-section h3, footer .text-section h4 { color: var(--color-accent); }
footer a { color: #F9F6EE; }
footer a:hover { color: var(--color-mustard); text-decoration: underline; }

/* -----------------------------
   COOKIE CONSENT BANNER & MODAL
------------------------------ */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 2000;
  display: flex; flex-direction: column; gap: 12px;
  background: #FFF; color: var(--color-primary);
  border: 2px solid var(--color-primary); border-radius: var(--radius-m);
  box-shadow: var(--shadow-m); padding: 16px;
  transform: translateY(120%); opacity: 0; transition: transform 280ms ease, opacity 280ms ease;
}
.cookie-banner.is-visible { transform: translateY(0); opacity: 1; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius-s); border: 2px solid var(--color-secondary); background: var(--color-secondary); color: #FFF; font-weight: bold; text-transform: uppercase; letter-spacing: 0.05em; }
.btn:hover { background: var(--color-burnt); border-color: var(--color-burnt); }
.btn-ghost { background: #FFF; color: var(--color-secondary); }
.btn-ghost:hover { color: #FFF; }
.btn-alt { border-color: var(--color-mustard); background: var(--color-mustard); color: #1E1E1E; }

/* Cookie Modal */
.cookie-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 2100; opacity: 0; pointer-events: none; transition: opacity 250ms ease; }
.cookie-overlay.is-visible { opacity: 1; pointer-events: all; }
.cookie-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.96);
  width: min(92vw, 640px);
  background: #FFF; color: var(--color-primary);
  border: 3px double var(--color-primary); border-radius: var(--radius-m);
  box-shadow: var(--shadow-m); padding: 20px; z-index: 2200;
  opacity: 0; pointer-events: none; transition: transform 250ms ease, opacity 250ms ease;
}
.cookie-modal.is-visible { opacity: 1; pointer-events: all; transform: translate(-50%, -50%) scale(1); }
.cookie-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cookie-modal-body { display: flex; flex-direction: column; gap: 10px; }
.cookie-row { display: flex; align-items: center; justify-content: space-between; padding: 10px; border: 1px dashed rgba(28,42,68,0.25); border-radius: var(--radius-s); }

/* Toggle switch (no inputs required, style class) */
.toggle { width: 46px; height: 26px; border-radius: 26px; background: #DDD; position: relative; border: 2px solid #BBB; }
.toggle::after { content: ""; position: absolute; width: 18px; height: 18px; left: 4px; top: 50%; transform: translateY(-50%); background: #FFF; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.toggle.is-on { background: var(--color-fern); border-color: var(--color-fern); }
.toggle.is-on::after { left: 22px; }

/* -----------------------------
   RESPONSIVE (Mobile-first)
------------------------------ */
@media (min-width: 576px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.625rem; }
}

@media (min-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.8rem; }

  /* Show desktop nav */
  .main-nav { display: flex; }
  .cta-nav { display: flex; }
  .mobile-menu-toggle { display: none; }

  .content-wrapper { gap: 24px; }
  .text-image-section { flex-direction: row; }
}

@media (min-width: 992px) {
  h1 { font-size: 2.75rem; }
  h2 { font-size: 2rem; }
  .main-nav a { padding: 10px 12px; }
}

/* -----------------------------
   ACCESSIBILITY & UTILITIES
------------------------------ */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* -----------------------------
   PAGE-SPECIFIC SOFT STYLES
------------------------------ */
/* Hero-like first section emphasis */
main > section:first-of-type {
  background: #FFF;
  border: 2px solid var(--color-primary);
}
main > section:first-of-type .text-section h1 { color: var(--color-secondary); }

/* Index: rating line spacing */
main > section img[alt*="Stern"], main > section img[alt*="Sterne"] { width: 20px; height: 20px; }

/* Footer spacing at end */
main { padding-bottom: 40px; }

/* -----------------------------
   FLEX SAFETY & SPACING GUARANTEES
------------------------------ */
/* Ensure minimum gaps between siblings */
.content-wrapper > * + * { margin-top: 8px; }
/* Ensure content cards never overlap */
.card, .testimonial-card { margin-bottom: 20px; }

/* -----------------------------
   PRINT (basic)
------------------------------ */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-overlay, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
  body { background: #FFF; }
}
