/* =============================
   StellarFrost Innenausbau – Minimalist Style
   Mobile-first, Flexbox-only layout, subtle shadows, generous spacing
   Brand: Primary #233041, Secondary #D97706, Accent #F5F7FA
   Fonts: Trebuchet MS (display), Arial (body)
   ============================= */

/* ----- CSS Reset & Base Normalize ----- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: Arial, Helvetica, sans-serif; color: #233041; background-color: #ffffff; line-height: 1.6; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: #233041; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.35); border-radius: 6px; }

/* ----- CSS Custom Properties (with fallbacks) ----- */
:root {
  --color-primary: #233041;
  --color-secondary: #D97706;
  --color-accent: #F5F7FA;
  --color-text: #233041;
  --color-muted: #667085;
  --color-border: #E5E7EB;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-sm: 0 2px 8px rgba(16, 24, 40, 0.08);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.12);
  --container-max: 1120px;
}

/* ----- Typography Scale ----- */
h1, h2, h3, h4 { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; color: var(--color-primary); line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px 20px; padding: 0; }
small { color: var(--color-muted); }

/* Responsive type upscaling */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 22px; }
}
@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  h3 { font-size: 24px; }
}

/* ----- Layout Containers (Flexbox-only) ----- */
.container {
  display: flex; /* flexbox-only */
  width: 100%;
  padding: 0 16px;
  justify-content: center; /* center inner content */
}
.content-wrapper {
  display: flex; /* flexbox-only */
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* Global section spacing (semantic sections) */
main > section { margin-bottom: 60px; padding: 40px 0; background: transparent; }

/* ----- Mandatory spacing classes (as required) ----- */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-xs); padding: 20px; }
.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; background: #fff; color: var(--color-text); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-xs); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Ensure no overlapping and generous whitespace */
.testimonial-card + .testimonial-card { margin-top: 20px; }

/* ----- Header & Navigation ----- */
header { position: sticky; top: 0; z-index: 900; background: #ffffff; border-bottom: 1px solid var(--color-border); box-shadow: 0 0 0 rgba(0,0,0,0); }
header .container { justify-content: space-between; align-items: center; padding-top: 12px; padding-bottom: 12px; }
.logo img { height: 36px; width: auto; }

/* Main nav (desktop) */
.main-nav { display: none; gap: 16px; align-items: center; }
.main-nav a { color: var(--color-primary); padding: 8px 10px; border-radius: var(--radius-sm); transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease; }
.main-nav a:hover { background: var(--color-accent); text-decoration: none; }
/* Emphasize last nav link as CTA */
.main-nav a:last-child { background: var(--color-secondary); color: #fff; padding: 10px 14px; box-shadow: var(--shadow-xs); }
.main-nav a:last-child:hover { background: #b86505; box-shadow: var(--shadow-sm); }

/* Mobile menu toggle */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--color-border); background: #fff; box-shadow: var(--shadow-xs); transition: box-shadow 160ms ease, transform 160ms ease; }
.mobile-menu-toggle:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }

/* Mobile menu overlay */
.mobile-menu { display: flex; /* flexbox-only */ flex-direction: column; position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: #ffffff; padding: 16px; transform: translateX(100%); transition: transform 260ms ease; z-index: 1100; box-shadow: var(--shadow-md); }
.mobile-menu[aria-hidden="false"] { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--color-border); background: #fff; box-shadow: var(--shadow-xs); margin-bottom: 8px; }
.mobile-nav { display: flex; /* flexbox-only */ flex-direction: column; gap: 6px; }
.mobile-nav a { display: flex; align-items: center; padding: 14px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); color: var(--color-primary); background: #fff; transition: background-color 160ms ease, box-shadow 160ms ease; }
.mobile-nav a:hover { background: var(--color-accent); text-decoration: none; box-shadow: var(--shadow-xs); }
.mobile-nav a:last-child { background: var(--color-secondary); color: #fff; border-color: transparent; }
.mobile-nav a:last-child:hover { background: #b86505; }

/* Show desktop nav on larger screens */
@media (min-width: 992px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
  .mobile-menu { display: none; }
}

/* ----- Breadcrumbs ----- */
nav[aria-label="Brotkrumen"] { display: flex; /* flexbox-only */ justify-content: center; padding-top: 8px; }
nav[aria-label="Brotkrumen"] .content-wrapper, nav[aria-label="Brotkrumen"] p { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--color-muted); font-size: 14px; }
nav[aria-label="Brotkrumen"] a { color: var(--color-muted); text-decoration: underline; text-underline-offset: 2px; }

/* ----- Buttons (utility) ----- */
.btn, a.btn, .button, a.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--color-secondary); color: #fff; border: 1px solid transparent; box-shadow: var(--shadow-xs); transition: background-color 160ms ease, transform 120ms ease, box-shadow 160ms ease; }
.btn:hover, a.btn:hover, .button:hover, a.button:hover { background: #b86505; text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn.outline, a.btn.outline { background: #fff; color: var(--color-primary); border-color: var(--color-border); }
.btn.outline:hover { background: var(--color-accent); }

/* ----- Lists & Content rhythm ----- */
.content-wrapper > p:last-child { margin-bottom: 0; }
.content-wrapper > ul:last-child, .content-wrapper > ol:last-child { margin-bottom: 0; }

/* ----- Text-Image Section (handles split content) ----- */
.text-image-section { justify-content: space-between; }
.text-image-section > * { flex: 1 1 320px; }
.text-image-section .map-embed-placeholder { flex: 1 1 360px; }

@media (min-width: 768px) {
  .text-image-section { flex-wrap: nowrap; }
}

/* ----- Testimonials (high contrast, minimalist) ----- */
.testimonial-card { transition: box-shadow 200ms ease, transform 200ms ease; }
.testimonial-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.testimonial-card p { margin: 0; }
.testimonial-card p + p { color: var(--color-primary); }

/* ----- Map placeholder ----- */
.map-embed-placeholder { display: flex; /* flexbox-only */ align-items: center; justify-content: center; min-height: 220px; border: 1px dashed var(--color-border); border-radius: var(--radius-md); background: var(--color-accent); color: var(--color-muted); font-size: 14px; padding: 12px; }

/* ----- Links inside content ----- */
main a { color: var(--color-primary); }
main a[href^="tel:"], main a[href^="mailto:"] { text-decoration: underline; text-underline-offset: 2px; }

/* ----- Footer ----- */
footer { background: var(--color-accent); border-top: 1px solid var(--color-border); padding: 32px 0; color: var(--color-primary); }
footer .content-wrapper { gap: 24px; }
footer nav { display: flex; /* flexbox-only */ flex-wrap: wrap; gap: 10px 16px; }
footer nav a { color: var(--color-primary); opacity: 0.9; }
footer nav a:hover { opacity: 1; text-decoration: underline; }
footer .text-image-section { align-items: center; }
footer .logo img, footer a img { height: 30px; }

/* ----- Cards & Feature Items (generic) ----- */
.card h3 { margin-top: 0; }
.feature-item h3 { margin-bottom: 4px; }

/* ----- Tables (if any appear in legal pages) ----- */
table { width: 100%; border-collapse: collapse; border-spacing: 0; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--color-border); }

/* ----- Hero refinements ----- */
main > section:first-of-type .content-wrapper { padding-top: 8px; padding-bottom: 8px; }

/* ----- Mobile-first responsive adjustments ----- */
@media (min-width: 768px) {
  .content-wrapper { gap: 20px; }
}

/* =============================
   Mobile Navigation – slide-in (Flexbox-only)
   ============================= */
/* Already configured above with aria-hidden toggling */

/* =============================
   Cookie Consent Banner & Modal
   ============================= */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1200; display: flex; /* flexbox-only */ flex-direction: column; gap: 12px; background: #ffffff; color: var(--color-text); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 16px; transform: translateY(120%); transition: transform 260ms ease, opacity 260ms ease; opacity: 0; }
.cookie-banner.is-visible { transform: translateY(0); opacity: 1; }
.cookie-banner .cookie-content { display: flex; /* flexbox-only */ flex-direction: column; gap: 8px; }
.cookie-banner .cookie-actions { display: flex; /* flexbox-only */ flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cookie-banner .btn-accept { background: var(--color-secondary); color: #fff; padding: 10px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow-xs); }
.cookie-banner .btn-accept:hover { background: #b86505; box-shadow: var(--shadow-sm); }
.cookie-banner .btn-reject { background: #fff; color: var(--color-primary); border: 1px solid var(--color-border); padding: 10px 14px; border-radius: var(--radius-sm); }
.cookie-banner .btn-settings { background: var(--color-accent); color: var(--color-primary); border: 1px solid var(--color-border); padding: 10px 14px; border-radius: var(--radius-sm); }

/* Cookie modal overlay */
.cookie-modal { position: fixed; inset: 0; z-index: 1300; background: rgba(35, 48, 65, 0.35); display: none; /* hidden by default */ align-items: center; justify-content: center; padding: 16px; }
.cookie-modal.open { display: flex; }
.cookie-modal .modal-panel { display: flex; /* flexbox-only */ flex-direction: column; gap: 16px; width: 100%; max-width: 640px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 20px; }
.cookie-modal .modal-header { display: flex; /* flexbox-only */ align-items: center; justify-content: space-between; gap: 12px; }
.cookie-modal .modal-body { display: flex; /* flexbox-only */ flex-direction: column; gap: 12px; }
.cookie-modal .pref-row { display: flex; /* flexbox-only */ align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 12px; }
.cookie-modal .modal-actions { display: flex; /* flexbox-only */ justify-content: flex-end; gap: 10px; }

/* Toggle switch (checkbox) */
.cookie-toggle { position: relative; width: 44px; height: 26px; display: inline-flex; align-items: center; }
.cookie-toggle input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; background: #E5E7EB; border-radius: 999px; position: relative; outline: none; transition: background-color 160ms ease; border: 1px solid var(--color-border); }
.cookie-toggle input::after { content: ""; position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-xs); transition: transform 160ms ease; }
.cookie-toggle input:checked { background: var(--color-secondary); border-color: var(--color-secondary); }
.cookie-toggle input:checked::after { transform: translateX(18px); }
/* Essential cookies always enabled (visual) */
.cookie-toggle input[disabled] { background: #98A2B3; border-color: #98A2B3; }
.cookie-toggle input[disabled]::after { background: #f9fafb; }

/* =============================
   Responsive Alignments & Flex rules
   ============================= */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: center; }
}
@media (min-width: 992px) {
  header .container { padding-top: 16px; padding-bottom: 16px; }
  footer .content-wrapper { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}

/* =============================
   Accessibility & Micro-interactions
   ============================= */
::selection { background: rgba(217, 119, 6, 0.2); }
[aria-hidden="true"] { visibility: visible; }

/* =============================
   Additional Utilities
   ============================= */
.muted { color: var(--color-muted); }
.accent-bg { background: var(--color-accent); }
.center { display: flex; align-items: center; justify-content: center; }
.stack-8 > * + * { margin-top: 8px; }
.stack-12 > * + * { margin-top: 12px; }
.stack-16 > * + * { margin-top: 16px; }

/* Ensure minimum spacing between sibling sections/cards (safety) */
main > section + section { margin-top: 0; } /* already spaced via margin-bottom */
.content-wrapper > * + * { margin-top: 0; } /* gap handles spacing */

/* =============================
   Forms (generic, if added later)
   ============================= */
input, textarea, select { font: inherit; color: inherit; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 10px 12px; width: 100%; box-shadow: var(--shadow-xs); }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.18); border-color: var(--color-secondary); }
label { display: block; margin-bottom: 6px; color: var(--color-primary); }

/* =============================
   Compliance: No CSS Grid or Columns used
   All layout containers use Flexbox
   ============================= */
