/* =====================================================
   Whisper Glade Immobilien — style.css
   Design style: playful_dynamic (bright, animated, fun, energetic)
   Brand: Playfair Display + Inter, Greens & neutral accents
   Mobile-first, flexbox-only layouts, no CSS Grid/Columns
   Includes: Mobile menu + Cookie consent banner/modal
   ===================================================== */

/* -----------------------------
   1) Reset & base normalize
------------------------------ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, picture { max-width: 100%; display: block; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus { outline: 2px solid #FFD644; outline-offset: 2px; }

/* -----------------------------
   2) Theme variables (solid colors only)
------------------------------ */
:root {
  --color-primary: #1F4D3A;   /* Brand primary */
  --color-secondary: #6A5E56; /* Brand secondary */
  --color-accent: #F2F5EF;    /* Brand accent (soft) */
  --color-bg: #FFFFFF;
  --color-text: #172C22;      /* Dark, high-contrast text */
  --color-muted: #5F726B;     /* Muted text */

  /* Playful dynamic helpers */
  --vibrant-pink: #FF4D6D;
  --vibrant-yellow: #FFD644;
  --vibrant-cyan: #16C1B8;
  --vibrant-blue: #2D7FF9;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 22px;
  --shadow-s: 0 2px 10px rgba(0,0,0,0.06);
  --shadow-m: 0 10px 24px rgba(0,0,0,0.10);
  --shadow-l: 0 18px 38px rgba(0,0,0,0.14);

  --container-max: 1120px;
}

/* Fallbacks for custom properties in very old browsers */
body { background: var(--color-bg, #FFFFFF); color: var(--color-text, #172C22); }

/* -----------------------------
   3) Typography
------------------------------ */
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.2px;
  background: var(--color-accent);
}
h1, h2, h3 { font-family: "Playfair Display", Georgia, Cambria, "Times New Roman", serif; color: var(--color-primary); line-height: 1.25; }
h1 { font-size: 36px; margin-bottom: 14px; }
h2 { font-size: 28px; margin-bottom: 12px; }
h3 { font-size: 20px; margin-bottom: 10px; }

p { margin-bottom: 12px; color: var(--color-text); }
small { font-size: 14px; color: var(--color-muted); }
strong { font-weight: 700; }

/* Playful heading accent dots (decorative) */
h1, h2 {
  position: relative;
}
h1::after, h2::after {
  content: "";
  position: absolute; /* Decorative only */
  left: -10px;
  bottom: -12px;
  width: 18px; height: 18px;
  background: var(--vibrant-yellow);
  border-radius: 50%;
  opacity: 0.9;
  animation: bob 3.2s ease-in-out infinite;
}
h2::after { width: 14px; height: 14px; background: var(--vibrant-cyan); left: -8px; bottom: -10px; animation-duration: 3.6s; }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

/* -----------------------------
   4) Layout primitives (flex-only)
------------------------------ */
.container {
  display: flex; /* layout container must use flex */
  width: 100%;
  justify-content: center;
  padding: 0 16px;
}
.content-wrapper {
  display: flex; /* layout container */
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
}
section { margin-bottom: 48px; padding: 28px 0; }

/* 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; }

/* Utilities */
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: #fff; border: 2px solid var(--vibrant-yellow); color: var(--color-text); }
.muted { color: var(--color-muted); }
.visually-hidden { position: absolute !important; clip: rect(1px,1px,1px,1px); padding: 0 !important; border: 0 !important; height: 1px !important; width: 1px !important; overflow: hidden; }

/* -----------------------------
   5) Header & Navigation
------------------------------ */
header {
  position: sticky; top: 0; z-index: 1000;
  background: #fff;
  border-bottom: 4px solid var(--vibrant-cyan);
  box-shadow: var(--shadow-s);
}
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; padding: 10px 0; gap: 12px; }
.logo { display: inline-flex; align-items: center; }
.logo img { height: 34px; width: auto; }

/* Desktop nav hidden by default (mobile-first) */
.main-nav { display: none; align-items: center; gap: 18px; }
.main-nav a { color: var(--color-primary); font-weight: 600; padding: 8px 10px; border-radius: 10px; position: relative; }
.main-nav a:hover { background: var(--color-accent); }
.main-nav a[aria-current="page"] { color: var(--vibrant-blue); }

.header-cta { display: none; align-items: center; gap: 10px; }
.header-cta a { padding: 10px 14px; border-radius: 14px; background: var(--vibrant-yellow); color: #1a1a1a; font-weight: 700; box-shadow: var(--shadow-s); transition: transform .2s ease, box-shadow .2s ease; }
.header-cta a:hover { transform: translateY(-2px) rotate(-0.5deg); box-shadow: var(--shadow-m); }
.header-cta a:nth-child(2) { background: var(--vibrant-cyan); color: #08312E; }

/* Mobile hamburger */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 2px solid var(--color-primary); background: #fff; border-radius: 12px; color: var(--color-primary); font-size: 20px; cursor: pointer; transition: background .2s, transform .2s; }
.mobile-menu-toggle:hover { background: var(--color-accent); transform: translateY(-1px); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(0,0,0,0.2);
  display: flex; /* layout */
  justify-content: flex-end;
  pointer-events: none; /* hidden by default */
  opacity: 0; transition: opacity .25s ease;
}
.mobile-menu .mobile-nav {
  display: flex; flex-direction: column; gap: 14px;
  width: min(86%, 360px);
  background: #fff;
  padding: 24px; box-shadow: var(--shadow-l);
  transform: translateX(100%);
  transition: transform .35s ease;
}
.mobile-menu.open, .mobile-menu.active, .mobile-menu.is-open { opacity: 1; pointer-events: auto; }
.mobile-menu.open .mobile-nav, .mobile-menu.active .mobile-nav, .mobile-menu.is-open .mobile-nav { transform: translateX(0); }

.mobile-menu-close { align-self: flex-end; width: 42px; height: 42px; border-radius: 12px; border: 2px solid var(--color-primary); background: #fff; color: var(--color-primary); font-size: 20px; cursor: pointer; margin-bottom: 12px; }
.mobile-nav a { padding: 12px 14px; border-radius: 12px; background: var(--color-accent); color: var(--color-text); font-weight: 700; box-shadow: var(--shadow-s); }
.mobile-nav a:hover { background: #fff; outline: 2px solid var(--vibrant-cyan); }

/* -----------------------------
   6) Hero sections
------------------------------ */
.hero { position: relative; overflow: hidden; background: #fff; border-radius: 20px; box-shadow: var(--shadow-s); }
.hero .content-wrapper { padding: 28px 0; gap: 18px; }
.hero p { color: var(--color-secondary); }

/* Decorative playful shapes */
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: 0; opacity: 0.12; border-radius: 50%;
}
.hero::before { width: 220px; height: 220px; background: var(--vibrant-pink); top: -60px; right: -40px; animation: floaty 9s ease-in-out infinite; }
.hero::after { width: 160px; height: 160px; background: var(--vibrant-cyan); bottom: -40px; left: -30px; animation: floaty 7.5s ease-in-out infinite reverse; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(2deg); } }

.hero .cta-group { display: flex; flex-wrap: wrap; gap: 12px; position: relative; z-index: 1; }
.hero .cta-group a { padding: 12px 16px; border-radius: 16px; background: var(--vibrant-blue); color: #fff; font-weight: 800; letter-spacing: 0.3px; box-shadow: var(--shadow-m); transition: transform .2s ease, box-shadow .2s ease; }
.hero .cta-group a:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: var(--shadow-l); }
.hero .cta-group a:nth-child(2) { background: var(--vibrant-yellow); color: #101010; }

/* Quick search & search rows */
.quick-search { display: flex; flex-direction: column; gap: 10px; background: var(--color-accent); padding: 14px; border-radius: 16px; border: 2px solid var(--vibrant-cyan); position: relative; z-index: 1; }
.quick-search .hint { font-size: 14px; color: var(--color-muted); }
.search-row { display: flex; flex-wrap: wrap; gap: 10px; }
.search-row input, .search-row select { flex: 1 1 160px; min-width: 0; padding: 12px 12px; border-radius: 12px; border: 2px solid #DDE5E1; background: #fff; color: var(--color-text); }
.search-row button { flex: 1 1 120px; padding: 12px 16px; border-radius: 12px; border: none; background: var(--color-primary); color: #fff; font-weight: 700; box-shadow: var(--shadow-s); transition: transform .2s, box-shadow .2s, background .2s; }
.search-row button:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); background: #1A4332; }

/* -----------------------------
   7) Text, lists, badges, stats
------------------------------ */
.text-section { display: flex; flex-wrap: wrap; gap: 16px; }
.text-section > div { flex: 1 1 260px; background: #fff; border: 2px solid #E8EFEA; border-radius: 16px; padding: 16px; box-shadow: var(--shadow-s); }
.text-section h3 { color: var(--color-primary); }
.text-section a { color: var(--vibrant-blue); font-weight: 700; }
.text-section a:hover { text-decoration: underline; }

.stats ul { display: flex; flex-wrap: wrap; gap: 12px; }
.stats li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 999px; background: #fff; border: 2px dashed var(--vibrant-yellow); font-weight: 700; color: var(--color-text); box-shadow: var(--shadow-s); }
.stats strong { color: var(--vibrant-pink); }

.trust-badges ul { display: flex; flex-wrap: wrap; gap: 10px; }
.trust-badges li { display: inline-flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #fff; border: 2px solid #E8EFEA; box-shadow: var(--shadow-s); }
.trust-badges img { width: 20px; height: 20px; }

/* -----------------------------
   8) Cards & listings
------------------------------ */
.listing-card, .card {
  display: flex; flex-direction: column; gap: 8px;
  background: #fff;
  border-radius: 18px;
  border: 2px solid #E6EEE9;
  padding: 16px;
  box-shadow: var(--shadow-s);
  transition: transform .2s ease, box-shadow .2s ease;
}
.listing-card:hover, .card:hover { transform: translateY(-4px) rotate(-0.4deg); box-shadow: var(--shadow-m); }
.listing-card h3 { color: var(--color-primary); }
.listing-card a { align-self: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--vibrant-yellow); color: #101010; font-weight: 800; box-shadow: var(--shadow-s); }
.listing-card a:hover { box-shadow: var(--shadow-m); transform: translateY(-2px); }

/* Ensure min spacing between cards if stacked */
.listing-card + .listing-card { margin-top: 12px; }

/* -----------------------------
   9) Ordered & unordered lists styling
------------------------------ */
.content-wrapper ul { display: flex; flex-direction: column; gap: 10px; padding-left: 0; }
.content-wrapper ol { display: flex; flex-direction: column; gap: 10px; padding-left: 18px; }
.content-wrapper ol li { list-style: decimal; }

/* -----------------------------
   10) Testimonials — light background for readability
------------------------------ */
.testimonial-card {
  background: #FFFFFF;
  border: 2px solid #E8EFEA;
  border-radius: 16px;
  box-shadow: var(--shadow-s);
}
.testimonial-card p { color: var(--color-text); }
.testimonial-card p strong { color: var(--color-primary); }
.testimonial-card::before {
  content: "\201C"; /* Decorative quote */
  font-family: "Playfair Display", Georgia, serif;
  font-size: 34px; line-height: 1; color: var(--vibrant-pink);
  margin-right: 6px;
}

/* -----------------------------
   11) Footer
------------------------------ */
footer { background: var(--color-primary); color: #F5FFFB; padding: 28px 0; border-top: 6px solid var(--vibrant-yellow); }
footer .content-wrapper { flex-direction: column; gap: 18px; }
footer a { color: #FCE9A6; }
footer nav { display: flex; flex-wrap: wrap; gap: 12px; }
footer img { width: 36px; height: auto; }
footer address { font-style: normal; color: #D4E8E0; }

/* -----------------------------
   12) Buttons & interactive elements
------------------------------ */
button { cursor: pointer; }
.btn, .header-cta a, .hero .cta-group a { will-change: transform; }

/* Link underline animation for inline links */
a:not(.mobile-nav a):not(.main-nav a):not(.header-cta a):not(.hero .cta-group a):not(footer a) {
  position: relative;
}
a:not(.mobile-nav a):not(.main-nav a):not(.header-cta a):not(.hero .cta-group a):not(footer a)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 3px; width: 0; background: var(--vibrant-cyan); transition: width .24s ease; border-radius: 3px;
}
a:not(.mobile-nav a):not(.main-nav a):not(.header-cta a):not(.hero .cta-group a):not(footer a):hover::after { width: 100%; }

/* -----------------------------
   13) Forms
------------------------------ */
input[type="text"], input[type="email"], select, textarea {
  border: 2px solid #DDE5E1;
  border-radius: 12px;
  padding: 12px 12px;
  background: #fff;
  color: var(--color-text);
}
input::placeholder, textarea::placeholder { color: #9AA8A3; }
input:focus, select:focus, textarea:focus { border-color: var(--vibrant-blue); box-shadow: 0 0 0 3px rgba(45,127,249,0.15); outline: none; }

/* -----------------------------
   14) Mobile-first responsive tweaks
------------------------------ */
@media (min-width: 640px) {
  h1 { font-size: 42px; }
  h2 { font-size: 30px; }
}
@media (min-width: 768px) {
  .hero .content-wrapper { padding: 40px 0; gap: 20px; }
  .text-section { gap: 20px; }
  .text-section > div { padding: 18px; }
  section { margin-bottom: 56px; padding: 36px 0; }
}
@media (min-width: 992px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  h3 { font-size: 24px; }

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

  .hero .content-wrapper { flex-direction: column; }

  .search-row { gap: 12px; }
  .search-row input, .search-row select { flex: 1 1 180px; }
  .search-row button { flex: 0 0 auto; }

  footer .content-wrapper { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

/* -----------------------------
   15) Page-specific small touches
------------------------------ */
/* Index highlights more energetic CTA */
.hero .cta-group a:first-child { box-shadow: 0 10px 0 rgba(0,0,0,0.08); }

/* Highlight current section links in footers or content */
[aria-current="page"] { text-underline-offset: 3px; text-decoration: underline; }

/* -----------------------------
   16) Cookie consent banner & modal
------------------------------ */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  background: #fff; color: var(--color-text);
  border-top: 4px solid var(--vibrant-yellow);
  box-shadow: 0 -8px 24px rgba(0,0,0,0.08);
  padding: 14px 16px;
  transform: translateY(110%);
  transition: transform .35s ease;
}
.cookie-banner.show, .cookie-banner.visible { transform: translateY(0); }
.cookie-banner .cookie-text { display: flex; flex: 1 1 260px; align-items: center; gap: 10px; }
.cookie-banner .cookie-actions { display: flex; align-items: center; gap: 10px; }
.cookie-banner button { padding: 10px 14px; border-radius: 12px; border: 2px solid #E6EEE9; background: #fff; color: var(--color-text); font-weight: 700; }
.cookie-banner .accept-all { background: var(--vibrant-cyan); color: #062E2B; border-color: var(--vibrant-cyan); }
.cookie-banner .reject-all { background: var(--vibrant-pink); color: #fff; border-color: var(--vibrant-pink); }
.cookie-banner .settings { background: #fff; color: var(--color-text); }
.cookie-banner button:hover { filter: brightness(0.98); transform: translateY(-1px); }

/* Modal */
.cookie-modal {
  position: fixed; inset: 0; z-index: 1300; background: rgba(0,0,0,0.35);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.cookie-modal.show, .cookie-modal.open { display: flex; }
.cookie-modal .cookie-modal-content {
  display: flex; flex-direction: column; gap: 14px;
  width: 100%; max-width: 640px; background: #fff; color: var(--color-text);
  border-radius: 18px; box-shadow: var(--shadow-l);
  padding: 18px;
}
.cookie-modal h3 { margin-bottom: 4px; }
.cookie-categories { display: flex; flex-direction: column; gap: 10px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--color-accent); border: 2px solid #E8EFEA; border-radius: 14px; padding: 12px; }
.cookie-actions-modal { display: flex; justify-content: flex-end; gap: 10px; }

/* Toggle switch (CSS-only visual) */
.toggle-switch { position: relative; width: 50px; height: 28px; background: #D6E3DE; border-radius: 999px; transition: background .2s; }
.toggle-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-s); transition: transform .2s; }
.toggle-switch.is-on { background: var(--vibrant-cyan); }
.toggle-switch.is-on::after { transform: translateX(22px); }

/* -----------------------------
   17) Accessibility & micro-interactions
------------------------------ */
::selection { background: var(--vibrant-yellow); color: #101010; }

/* Fun micro wiggle on interactive hover */
@keyframes wiggle { 0% { transform: rotate(0); } 25% { transform: rotate(-1deg); } 50% { transform: rotate(1deg); } 75% { transform: rotate(-1deg); } 100% { transform: rotate(0); } }
.header-cta a:active, .hero .cta-group a:active { animation: wiggle .25s ease; }

/* Ensure no overlaps — generous gaps on common blocks */
.content-wrapper > * + * { margin-top: 8px; }

/* -----------------------------
   18) Ensure consistent spacing between all major cards/sections
------------------------------ */
.content-wrapper .listing-card, .content-wrapper .testimonial-card, .content-wrapper .text-section > div, .content-wrapper nav, .content-wrapper ul, .content-wrapper ol { margin-bottom: 12px; }

/* -----------------------------
   19) High-contrast rules for testimonials/reviews
------------------------------ */
/* Already light background with dark text; enforce just in case */
section:has(.testimonial-card) { background: transparent; }
.testimonial-card p, .testimonial-card strong { color: #12261E; }

/* -----------------------------
   20) Print basics (optional light)
------------------------------ */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  body { background: #fff; }
}

/* End of file */
