/* ===========================================================
   Velvet Crossing Immobilienkompass Deutschland
   Nature Organic UI — style.css (Mobile-first, Flexbox-only)
   =========================================================== */

/* -----------------------------
   CSS Reset & Base Normalize
   ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Verdana, Arial, sans-serif; color: #0B2C3F; background-color: #F4F1EA; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: #245C4D; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid #6FA27B; outline-offset: 2px; }
ul, ol { padding-left: 20px; }

/* -----------------------------
   CSS Variables (Nature Organic)
   ----------------------------- */
:root {
  --primary: #0B2C3F; /* deep ink / forest night */
  --secondary: #245C4D; /* evergreen */
  --accent: #F4F1EA; /* sand / paper */
  --leaf: #6FA27B; /* leaf green */
  --earth-100: #EDE7DD; /* light paper */
  --earth-200: #D9D0C4; /* beige */
  --earth-300: #C9B9A6; /* clay */
  --earth-700: #7A6A55; /* bark */
  --ink: #0B2C3F; /* text */
  --white: #FFFFFF;
  --shadow-sm: 0 2px 8px rgba(11,44,63,0.08);
  --shadow-md: 0 6px 20px rgba(11,44,63,0.12);
  --radius-sm: 10px; 
  --radius-md: 16px;
  --radius-lg: 22px;
}

/* -----------------------------
   Typography
   ----------------------------- */
h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; color: var(--primary); line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
p { margin: 0 0 14px; font-size: 16px; }
small, .language-note, .compliance-note, .privacy-note, .breadcrumbs { font-size: 14px; color: #2C4C3F; opacity: 0.9; }

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

/* -----------------------------
   Layout Containers (Flex-only)
   ----------------------------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; gap: 20px; }
.content-wrapper { display: flex; flex-direction: column; gap: 18px; }
section { margin-bottom: 48px; }

/* 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 minimum spacing between content blocks */
.text-section { display: flex; flex-direction: column; gap: 12px; }
.cta-group { display: flex; flex-wrap: wrap; gap: 12px; }

/* -----------------------------
   Header & Navigation
   ----------------------------- */
header { background: var(--white); border-bottom: 1px solid var(--earth-200); position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow-sm); }
header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.logo img { height: 40px; width: auto; }

.main-nav { display: none; align-items: center; gap: 14px; }
.main-nav a { padding: 10px 12px; border-radius: 22px; color: var(--primary); transition: background-color .2s ease, color .2s ease, transform .2s ease; }
.main-nav a:hover { background: var(--earth-100); transform: translateY(-1px); }
.main-nav a[aria-current="page"] { background: var(--earth-200); color: var(--primary); font-weight: bold; }

.button { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 28px; background: var(--secondary); color: var(--white); border: 1px solid #1E4E41; box-shadow: var(--shadow-sm); transition: background .2s ease, transform .2s ease, box-shadow .2s ease; font-weight: 600; }
.button:hover { background: #2E6E5C; text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.button:active { transform: translateY(0); }
.button.secondary { background: var(--accent); color: var(--secondary); border: 1px solid var(--secondary); }
.button.secondary:hover { background: #EAE3D8; }

/* Mobile menu trigger */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--earth-200); border-radius: 12px; background: var(--accent); color: var(--primary); font-size: 22px; line-height: 1; box-shadow: var(--shadow-sm); transition: background .2s ease; }
.mobile-menu-toggle:hover { background: var(--earth-100); }

/* Mobile menu overlay (slide-in) */
.mobile-menu { position: fixed; inset: 0 0 0 auto; width: 86%; max-width: 420px; height: 100vh; background: var(--white); box-shadow: -10px 0 30px rgba(11,44,63,0.18); transform: translateX(100%); transition: transform .32s ease; z-index: 1100; display: flex; flex-direction: column; padding: 20px; gap: 10px; }
.mobile-menu-close { align-self: flex-end; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--earth-200); background: var(--accent); color: var(--primary); font-size: 20px; }
.mobile-nav { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.mobile-nav a { padding: 14px 12px; border-radius: 14px; background: var(--earth-100); color: var(--primary); font-weight: 600; }
.mobile-nav a:hover { background: var(--earth-200); }

/* Open states supported (choose any via JS) */
.mobile-menu.open,
.mobile-menu.active,
.mobile-menu.visible,
body.menu-open .mobile-menu,
.mobile-menu[data-open="true"] { transform: translateX(0); }

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

/* -----------------------------
   Hero Section — Nature Organic
   ----------------------------- */
.hero { padding: 40px 0; position: relative; }
.hero .container { gap: 0; }
.hero .content-wrapper { background: var(--earth-100); border: 1px solid var(--earth-200); border-radius: 28px 22px 26px 18px; padding: 24px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
/* Decorative leaf corner */
.hero .content-wrapper::before { content: ""; position: absolute; top: -60px; right: -80px; width: 220px; height: 220px; background: var(--leaf); opacity: 0.08; border-radius: 50% 55% 45% 60%/55% 45% 60% 50%; }
.hero .content-wrapper::after { content: ""; position: absolute; bottom: -70px; left: -90px; width: 260px; height: 260px; background: var(--secondary); opacity: 0.06; border-radius: 60% 40% 55% 45%/45% 55% 40% 60%; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: #2C4C3F; }
.breadcrumbs a { color: #2C4C3F; }

/* Trust badges */
.trust-badges ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.trust-badges li { display: inline-flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--earth-200); padding: 8px 12px; border-radius: 999px; box-shadow: var(--shadow-sm); color: var(--primary); }
.trust-badges img { width: 18px; height: 18px; }

/* Notes */
.language-note, .compliance-note, .privacy-note { background: var(--earth-100); border-left: 4px solid var(--leaf); padding: 8px 12px; border-radius: 10px; }

/* -----------------------------
   Common Content Blocks
   ----------------------------- */
.text-image-section { align-items: center; }
@media (max-width: 768px) { .text-image-section { flex-direction: column; } }

.content-grid { justify-content: space-between; }
.card, .testimonial-card { background: var(--white); border: 1px solid var(--earth-200); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover, .testimonial-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Testimonials: ensure dark text on light background for readability */
.testimonial-card { background: var(--white); color: var(--ink); border-left: 6px solid var(--leaf); }
.testimonial-card p { margin: 0; }
.testimonial-card strong { color: var(--secondary); }

/* Lists inside text sections */
.text-section ul, .text-section ol { display: flex; flex-direction: column; gap: 8px; margin: 0; }

/* Images inline with icons */
.text-section img { width: 18px; height: 18px; display: inline-block; vertical-align: middle; margin-right: 8px; }

/* -----------------------------
   Footer
   ----------------------------- */
footer { background: var(--primary); color: var(--accent); padding: 30px 0 10px; }
footer a { color: #DCE7E1; }
footer .container { gap: 20px; }
footer .content-wrapper { display: flex; flex-direction: column; gap: 24px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.footer-nav a { padding: 8px 10px; border-radius: 16px; background: rgba(255,255,255,0.06); }
.footer-nav a:hover { background: rgba(255,255,255,0.12); text-decoration: none; }
footer .logo img { filter: brightness(1000%); height: 36px; }

/* -----------------------------
   Buttons & Interactive Elements
   ----------------------------- */
.button:focus-visible { box-shadow: 0 0 0 3px rgba(111,162,123,0.4); }
button { cursor: pointer; }

/* -----------------------------
   Tables (if any appear later)
   ----------------------------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--earth-200); }
th { background: var(--earth-100); font-weight: 700; }

/* -----------------------------
   Utilities
   ----------------------------- */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* -----------------------------
   Page-specific tweaks
   ----------------------------- */
.hero p { max-width: 70ch; }
.text-section a { color: var(--secondary); text-decoration: underline; }
.text-section a:hover { text-decoration: none; }

/* Ensure adequate spacing between stacked sections */
main > section .container + .container { margin-top: 20px; }

/* -----------------------------
   Responsive Layout Enhancements
   ----------------------------- */
@media (min-width: 768px) {
  .hero { padding: 56px 0; }
  .hero .content-wrapper { padding: 32px; }
}

@media (min-width: 992px) {
  .content-wrapper { gap: 22px; }
  .container.row { flex-direction: row; }
}

/* -----------------------------
   Forms (generic styles if added later)
   ----------------------------- */
input[type="text"], input[type="email"], input[type="tel"], textarea, select { width: 100%; padding: 12px 14px; border: 1px solid var(--earth-200); border-radius: 12px; background: var(--white); color: var(--primary); transition: border-color .2s ease, box-shadow .2s ease; }
input:focus, textarea:focus, select:focus { border-color: var(--leaf); box-shadow: 0 0 0 3px rgba(111,162,123,0.25); outline: none; }
label { font-weight: 600; margin-bottom: 6px; display: inline-block; }

/* -----------------------------
   Accessibility helpers
   ----------------------------- */
[aria-current="page"] { font-weight: 700; }

/* -----------------------------
   Cookie Consent Banner & Modal
   ----------------------------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200; display: flex; flex-direction: column; gap: 12px; background: var(--white); border-top: 1px solid var(--earth-200); box-shadow: 0 -6px 20px rgba(11,44,63,0.12); padding: 16px 16px 16px; transform: translateY(110%); transition: transform .32s ease; }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 10px; }
.cookie-banner .cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .button { padding: 10px 16px; }
.cookie-banner .button.reject { background: var(--accent); color: var(--secondary); border: 1px solid var(--secondary); }
.cookie-banner .button.settings { background: var(--earth-100); color: var(--primary); border: 1px solid var(--earth-200); }

/* Modal overlay */
.cookie-modal-overlay { position: fixed; inset: 0; background: rgba(11,44,63,0.4); z-index: 1300; display: none; align-items: center; justify-content: center; padding: 20px; }
.cookie-modal-overlay.show { display: flex; }
.cookie-modal { background: var(--white); width: 100%; max-width: 720px; border-radius: 18px; border: 1px solid var(--earth-200); box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.cookie-modal header { display: flex; align-items: center; justify-content: space-between; border: none; background: transparent; box-shadow: none; position: static; padding: 0; }
.cookie-modal h3 { margin: 0; }
.cookie-category { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--earth-200); border-radius: 12px; background: var(--earth-100); }
.cookie-category .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toggle { position: relative; width: 46px; height: 26px; background: var(--earth-200); border-radius: 999px; transition: background .2s ease; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--white); border-radius: 50%; box-shadow: var(--shadow-sm); transition: transform .2s ease; }
.toggle.on { background: var(--leaf); }
.toggle.on::after { transform: translateX(20px); }
.cookie-modal .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* -----------------------------
   Additional Flex helpers for layout
   ----------------------------- */
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-direction: row; gap: 16px; flex-wrap: wrap; }
.centered { display: flex; align-items: center; justify-content: center; }

/* -----------------------------
   Desktop refinements
   ----------------------------- */
@media (min-width: 768px) {
  .hero .content-wrapper { border-radius: 32px; }
  .footer .content-wrapper, footer .content-wrapper { flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
}

/* -----------------------------
   Ensuring no overlap and safe spacing
   ----------------------------- */
section .content-wrapper > * + * { margin-top: 0; }
.card, .testimonial-card { margin-bottom: 20px; }
.content-grid > * { flex: 1 1 260px; }
.card-container > * { flex: 1 1 260px; }

/* -----------------------------
   Specific navs in footer/top
   ----------------------------- */
.footer-nav a[aria-current="page"], .main-nav a[aria-current="page"] { border: 1px solid rgba(36,92,77,0.35); }

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

/* -----------------------------
   Extra: Organic card accents
   ----------------------------- */
.card.organic, .testimonial-card.organic { border-radius: 24px 18px 22px 16px; }

/* -----------------------------
   Make sections visually cohesive with nature aesthetic
   ----------------------------- */
main > section .content-wrapper { background: transparent; }
main > section:nth-of-type(odd) .content-wrapper { background: var(--earth-100); border: 1px solid var(--earth-200); border-radius: var(--radius-lg); padding: 22px; }

/* -----------------------------
   Desktop spacing/layout for sections & footer columns
   ----------------------------- */
@media (min-width: 992px) {
  .content-wrapper.split { flex-direction: row; align-items: flex-start; gap: 32px; }
  .content-wrapper.split > * { flex: 1 1 0; }
  footer .content-wrapper { align-items: flex-start; }
}

/* -----------------------------
   Ensure proper contrast for testimonial & review sections
   ----------------------------- */
section .testimonial-card, .testimonial-card { background: #FFFFFF; color: #142B36; }

/* -----------------------------
   ARIA-friendly focus styles on links inside navs
   ----------------------------- */
.main-nav a:focus-visible, .footer-nav a:focus-visible, .mobile-nav a:focus-visible { outline: 2px solid #6FA27B; outline-offset: 2px; }

/* -----------------------------
   Last check: All layout uses Flexbox only (no grid/columns)
   ----------------------------- */
