/* ===============================
   GlintPath Stadtimmobilien - style.css
   Style: warm_friendly (warm colors, rounded corners, friendly fonts, soft shadows)
   Layout: Flexbox-only (no grid/columns)
   =============================== */

/* 1) CSS RESET & BASELINE (mobile-first) */
html { box-sizing: border-box; -webkit-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: inherit; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"], ul, ol { list-style: none; padding: 0; margin: 0; }
a { text-decoration: none; color: inherit; }
img, picture { max-width: 100%; display: block; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus { outline: 2px solid #FFB47B; outline-offset: 2px; }

/* 2) THEME TOKENS (variables with fallbacks) */
:root {
  --color-primary: #0A2540;/* deep brand blue */
  --color-secondary: #2E7D32;/* brand green */
  --color-accent: #F6F9FC;/* brand accent (pale blue) */
  --color-warm-1: #FFF7F0;/* warm friendly background */
  --color-warm-2: #FFE8D9;/* soft peach */
  --color-warm-3: #FFD7BA;/* peach deeper */
  --color-ink: #0A2540;/* main text */
  --color-ink-soft: #2C3E57;/* secondary text */
  --color-border: #E8E6E3;/* subtle border */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(10,37,64,0.08);
  --shadow-md: 0 6px 20px rgba(10,37,64,0.12);
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-60: 60px;
}

/* 3) TYPOGRAPHY */
body {
  font-family: Arial, Helvetica, sans-serif; /* brand body */
  color: var(--color-ink, #0A2540);
  background: var(--color-warm-1, #FFF7F0);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3 {
  font-family: Georgia, 'Times New Roman', serif; /* brand display */
  color: var(--color-ink, #0A2540);
}

h1 { font-size: 32px; line-height: 1.25; letter-spacing: 0.2px; }
h2 { font-size: 24px; line-height: 1.3; margin-bottom: var(--space-16); }
h3 { font-size: 18px; line-height: 1.35; margin-top: var(--space-16); margin-bottom: var(--space-8); }
p, li { color: var(--color-ink-soft, #2C3E57); font-size: 16px; }
strong { color: var(--color-ink, #0A2540); }

/* 4) LAYOUT HELPERS (Flexbox only) */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.text-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

/* Mandatory spacing and alignment patterns */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); background: #fff; }
.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; }

/* Generic section spacing for pages whose <section> lacks .section class */
section { padding-top: var(--space-40); padding-bottom: var(--space-40); }

/* 5) HEADER & NAVIGATION */
header {
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 50;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}
.logo img { height: 36px; width: auto; }

.main-nav {
  display: none; /* mobile-first: hidden */
  align-items: center;
  gap: var(--space-16);
}
.main-nav a {
  color: var(--color-ink, #0A2540);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background-color 160ms ease, color 160ms ease;
}
.main-nav a:hover { background: var(--color-warm-2, #FFE8D9); }

.header-cta {
  display: none; /* mobile-first */
  align-items: center;
  gap: var(--space-12);
}

/* 6) BUTTONS */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 180ms ease, background-color 160ms ease, color 160ms ease;
  box-shadow: var(--shadow-sm);
}
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.button:active { transform: translateY(0); }

.button.primary {
  background: var(--color-primary, #0A2540);
  color: #FFFFFF;
}
.button.primary:hover { background: #0C2E52; }
.button.primary:focus { outline-color: #FFB47B; }

.button.secondary {
  background: #FFFFFF;
  color: var(--color-primary, #0A2540);
  border-color: var(--color-secondary, #2E7D32);
}
.button.secondary:hover { background: var(--color-warm-2, #FFE8D9); }

/* Links */
a { color: var(--color-secondary, #2E7D32); }
a:hover { color: #256628; text-decoration: underline; }

/* 7) HERO */
.hero {
  background: var(--color-warm-2, #FFE8D9);
  border-bottom: 1px solid var(--color-border, #E8E6E3);
}
.hero .container { align-items: flex-start; }
.hero .content-wrapper {
  background: #FFFFFF;
  padding: var(--space-24);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.hero h1 { font-size: 28px; }
.hero p { font-size: 16px; }

/* 8) LISTS WITH FRIENDLY BULLETS */
.text-section ul { display: flex; flex-direction: column; gap: 8px; padding-left: 0; }
.text-section ul li { position: relative; padding-left: 26px; }
.text-section ul li::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #FFB47B; /* warm dot */
  display: inline-block;
  position: absolute; left: 0; top: 10px;
}
.text-section ol { display: flex; flex-direction: column; gap: 8px; padding-left: 20px; }

/* 9) TESTIMONIALS (readable: dark text on light bg) */
.testimonial-card {
  background: #FFF5EC; /* warm, light */
  border: 1px solid var(--color-border, #E8E6E3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.testimonial-card p { color: var(--color-ink, #0A2540); }
.testimonial-card:hover { box-shadow: var(--shadow-md); }

/* 10) FOOTER */
footer {
  background: var(--color-primary, #0A2540);
  color: #FFFFFF;
  margin-top: var(--space-40);
}
footer .container { gap: var(--space-24); }
footer .content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}
footer nav { display: flex; flex-wrap: wrap; gap: var(--space-12); }
footer a { color: #FDEFE6; }
footer a:hover { color: #FFFFFF; text-decoration: underline; }
footer img { height: 30px; }

/* 11) MEDIA & ICON ALIGNMENT */
li img { width: 20px; height: 20px; object-fit: contain; display: inline-block; vertical-align: middle; margin-right: 8px; }

/* 12) MOBILE NAVIGATION (Hamburger) */
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid var(--color-border, #E8E6E3);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.mobile-menu-toggle:hover { background: var(--color-warm-2, #FFE8D9); }

.mobile-menu {
  position: fixed; /* full screen overlay */
  top: 0; right: 0; bottom: 0; left: 0;
  background: #FFFFFF;
  z-index: 2000;
  transform: translateX(100%);
  transition: transform 260ms ease;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 16px;
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu-close {
  align-self: flex-end;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--color-border, #E8E6E3);
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.mobile-menu-close:hover { background: var(--color-warm-2, #FFE8D9); }

.mobile-nav { display: flex; flex-direction: column; gap: 12px; }
.mobile-nav a {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--color-accent, #F6F9FC);
  color: var(--color-ink, #0A2540);
  box-shadow: var(--shadow-sm);
}
.mobile-nav a:hover { background: #EAF2FF; }

/* Optional: prevent scroll under menu when opened with body.noscroll */
body.noscroll { overflow: hidden; }

/* 13) COOKIE CONSENT (banner + modal) */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #FFFFFF;
  border-top: 1px solid var(--color-border, #E8E6E3);
  box-shadow: 0 -10px 30px rgba(10,37,64,0.12);
  padding: 16px 20px;
  z-index: 1900;
  transform: translateY(110%);
  transition: transform 260ms ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner .cookie-text { color: var(--color-ink-soft, #2C3E57); font-size: 14px; }
.cookie-actions {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.cookie-btn { composes: button; } /* note: for clarity only; not functional in pure CSS */
.cookie-accept { background: var(--color-secondary, #2E7D32); color: #fff; border: 1px solid transparent; }
.cookie-accept:hover { background: #256628; }
.cookie-reject { background: #FFFFFF; color: var(--color-primary, #0A2540); border: 1px solid #D7D3CF; }
.cookie-reject:hover { background: var(--color-warm-2, #FFE8D9); }
.cookie-settings { background: var(--color-accent, #F6F9FC); border: 1px solid #DCE6F5; color: var(--color-ink, #0A2540); }
.cookie-settings:hover { background: #EAF2FF; }

/* Cookie Preferences Modal */
.cookie-backdrop {
  position: fixed; inset: 0; background: rgba(10,37,64,0.44); z-index: 2100;
  opacity: 0; pointer-events: none; transition: opacity 220ms ease;
}
.cookie-backdrop.open { opacity: 1; pointer-events: auto; }

.cookie-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.96);
  width: min(92vw, 560px);
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border, #E8E6E3);
  z-index: 2200;
  padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
  opacity: 0; pointer-events: none; transition: opacity 220ms ease, transform 220ms ease;
}
.cookie-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Toggle rows in cookie modal */
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border: 1px solid var(--color-border, #E8E6E3); border-radius: 10px; background: var(--color-accent, #F6F9FC); }
.cookie-row .label { display: flex; flex-direction: column; gap: 4px; }

/* Simple switch style */
.switch { position: relative; width: 44px; height: 26px; border-radius: 999px; background: #D0D7DF; transition: background 160ms ease; display: flex; align-items: center; padding: 3px; }
.switch input { appearance: none; width: 0; height: 0; }
.switch .knob { width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform 160ms ease; }
.switch input:checked + .knob { transform: translateX(18px); }
.switch input:checked ~ .switch { background: var(--color-secondary, #2E7D32); }

/* 14) CARDS & PANELS (generic) */
.panel {
  background: #FFFFFF;
  border: 1px solid var(--color-border, #E8E6E3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-20);
}

/* 15) RESPONSIVE BEHAVIOR */
@media (min-width: 480px) {
  h1 { font-size: 36px; }
}

@media (min-width: 768px) {
  .hero h1 { font-size: 40px; }
  header .container { gap: var(--space-24); }
  .main-nav { display: flex; }
  .header-cta { display: flex; }
  .mobile-menu-toggle { display: none; }

  /* text-image sections horizontal on tablet+ */
  .text-image-section { flex-direction: row; align-items: center; }
}

@media (max-width: 768px) {
  /* Required: column on mobile for text-image sections */
  .text-image-section { flex-direction: column; align-items: center; }
}

@media (min-width: 992px) {
  .container { gap: var(--space-24); }
  .content-wrapper { gap: var(--space-20); }
  h1 { font-size: 44px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
  .hero p { font-size: 18px; }

  /* Footer multi-column using flex wrap */
  footer .content-wrapper { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  footer .content-wrapper > * { flex: 1 1 240px; }
}

/* 16) UTILITIES */
.hidden { display: none !important; }
.center { display: flex; align-items: center; justify-content: center; }
.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 17) PAGE-SPECIFIC POLISH */
/* Index and other pages use many simple sections. Add subtle cards for lists when needed */
section > .container > .content-wrapper > .text-section {
  background: #FFFFFF;
  border: 1px solid var(--color-border, #E8E6E3);
  border-radius: var(--radius-md);
  padding: var(--space-16);
  box-shadow: var(--shadow-sm);
}

/* CTA rows inside hero */
.hero .content-wrapper > div:has(.button) { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header CTA spacing */
.header-cta .button { min-width: 44px; }

/* Ensure adequate spacing between cards/sections */
section > .container > .content-wrapper > * + * { margin-top: 12px; }

/* 18) ACCESSIBILITY & STATES */
.button:focus, .main-nav a:focus, .mobile-nav a:focus { outline: 2px solid #FFB47B; outline-offset: 2px; }

/* 19) PREVENT OVERLAP & Z-INDEX MANAGEMENT */
header, .mobile-menu, .cookie-banner, .cookie-modal, .cookie-backdrop { z-index: 1000; }
.mobile-menu { z-index: 2000; }
.cookie-backdrop { z-index: 2100; }
.cookie-modal { z-index: 2200; }

/* 20) COMPLIANCE REMINDERS (No grid/columns used. All layout containers are flex-based.) */
/* Classes present but not in HTML are provided for future extensibility within flexbox rules. */
