/* ===============================
   GlintRidge Rentenkompass – style.css
   Design style: gradient_modern (subtle two-color gradients)
   Mobile-first, flexbox-only layouts, smooth transitions
   =============================== */

/* -------- RESET & NORMALIZE -------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; padding: 0; cursor: pointer; }
ul, ol { margin: 0 0 16px; padding-left: 20px; }
p { margin: 0 0 16px; }
:focus { outline: none; }
:focus-visible { outline: 3px solid rgba(45,140,126,0.4); outline-offset: 2px; }

/* -------- CSS CUSTOM PROPERTIES (with fallbacks) -------- */
:root {
  --clr-primary: #123A5A;
  --clr-secondary: #2D8C7E;
  --clr-accent: #F5F7FA;
  --clr-text: #0B2235;
  --clr-muted: #6A7C8F;
  --clr-white: #FFFFFF;
  --clr-border: #E2E8F0;
  --shadow-sm: 0 2px 8px rgba(18,58,90,0.08);
  --shadow-md: 0 6px 18px rgba(18,58,90,0.12);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --transition-base: 220ms ease;
}

/* -------- BASE TYPOGRAPHY -------- */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  color: var(--clr-text);
  background: var(--clr-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { font-family: Georgia, "Times New Roman", Times, serif; color: var(--clr-primary); margin: 0 0 12px; line-height: 1.25; }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }

@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
}
@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  h3 { font-size: 24px; }
}

p, li { font-size: 16px; color: var(--clr-text); }
small { font-size: 14px; color: var(--clr-muted); }
strong { color: var(--clr-primary); }

/* Links */
a { color: var(--clr-secondary); text-decoration: none; transition: color var(--transition-base), opacity var(--transition-base); }
a:hover { color: #247a6e; }
a:active { opacity: 0.9; }

.btn-primary:hover {
    color: #fff;
}
.hero p strong {
    color: #fff !important;
}
/* -------- LAYOUT HELPERS -------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.content-wrapper {
  display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
}

section { margin-bottom: 60px; }
section:last-of-type { margin-bottom: 0; }

/* MANDATORY spacing patterns (exact class names) */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--clr-border); border-radius: var(--radius-md); background: var(--clr-white); box-shadow: var(--shadow-sm); }
.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; border-radius: var(--radius-md); background: var(--clr-accent); border: 1px solid var(--clr-border); box-shadow: var(--shadow-sm); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Ensure columns via flex only */
.two-col, .three-col, .card-grid, .features { display: flex; flex-wrap: wrap; gap: 20px; }
.two-col > * { flex: 1 1 280px; }
.three-col > * { flex: 1 1 240px; }
.card-grid > * { flex: 1 1 300px; }
.features > * { flex: 1 1 260px; }

/* -------- HEADER & NAV -------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--clr-white);
  box-shadow: 0 2px 10px rgba(18,58,90,0.06);
}
.site-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: 16px; }
.main-nav a { padding: 10px 12px; border-radius: 8px; color: var(--clr-primary); }
.main-nav a:hover { background: var(--clr-accent); }

.header-ctas { display: none; align-items: center; gap: 10px; }

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; color: var(--clr-primary);
  background: var(--clr-accent); box-shadow: var(--shadow-sm);
  transition: background var(--transition-base), transform var(--transition-base);
}
.mobile-menu-toggle:hover { background: #e8eef6; transform: translateY(-1px); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1000; background: var(--clr-white);
  transform: translateX(100%); transition: transform 300ms ease;
  display: flex; flex-direction: column; gap: 10px; padding: 20px;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close {
  align-self: flex-end; font-size: 22px; line-height: 1; width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 10px;
  background: var(--clr-accent);
}
.mobile-nav { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.mobile-nav a {
  padding: 14px 12px; border-radius: 10px; background: var(--clr-accent);
  color: var(--clr-primary); font-size: 18px; box-shadow: var(--shadow-sm);
}
.mobile-nav a:hover { background: #e8eef6; }

/* Desktop nav breakpoint */
@media (min-width: 992px) {
  .main-nav { display: flex; }
  .header-ctas { display: flex; }
  .mobile-menu-toggle { display: none; }
  .mobile-menu { display: none; }
}

/* -------- HERO -------- */
.hero {
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-secondary) 100%);
  color: var(--clr-white);
  padding: 60px 0;
}
.hero .container { gap: 0; }
.hero .content-wrapper { color: var(--clr-white); gap: 14px; max-width: 900px; }
.hero h1, .hero p, .hero strong { color: var(--clr-white); }
.hero .cta-group .btn-secondary { background: rgba(255,255,255,0.12); color: #ffffff; border: 1px solid rgba(255,255,255,0.3); }
.hero .cta-group .btn-secondary:hover { background: rgba(255,255,255,0.18); }

/* -------- BUTTONS -------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: var(--radius-md); border: 1px solid transparent;
  background: var(--clr-accent); color: var(--clr-primary);
  box-shadow: var(--shadow-sm); transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base), color var(--transition-base);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--clr-secondary) 0%, #226F65 100%);
  color: var(--clr-white);
}
.btn-primary:hover { background: linear-gradient(135deg, #257f73 0%, #1e6057 100%); }

.btn-secondary {
  background: var(--clr-white);
  color: var(--clr-secondary);
  border: 1px solid var(--clr-secondary);
}
.btn-secondary:hover { background: #e7f3f1; }

.cta-group { display: flex; flex-wrap: wrap; gap: 12px; }

/* -------- SECTIONS & CONTENT -------- */
.text-image-section > * { flex: 1 1 280px; }

/* Lists spacing */
ul li, ol li { margin-bottom: 8px; }
ul li:last-child, ol li:last-child { margin-bottom: 0; }

/* Cards (generic) */
.card h3 { margin-bottom: 4px; }

/* Testimonials - ensure high contrast (dark text on light bg) */
.testimonial-card { background: var(--clr-accent); color: var(--clr-text); border-left: 4px solid var(--clr-secondary); }
.testimonial-card p { margin: 0; }

/* Accent section (optional utility) */
.section--accent { background: var(--clr-accent); border-top: 1px solid var(--clr-border); border-bottom: 1px solid var(--clr-border); }

/* -------- FOOTER -------- */
.site-footer {
  background: #0E2B43; color: #EAF1F7; padding: 40px 0; margin-top: 40px;
}
.site-footer .content-wrapper { color: #EAF1F7; }
.site-footer a { color: #D6E7EE; }
.site-footer a:hover { color: #ffffff; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.footer-nav a { padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,0.06); }
.footer-nav a:hover { background: rgba(255,255,255,0.12); }
.site-footer .content-wrapper div p,
.site-footer .content-wrapper div p strong{
    color: #fff;
}
/* -------- UTILITIES -------- */
.hidden {
    display: none !important;
}
.muted { color: var(--clr-muted) !important; }
.center { text-align: center; }
.max-w-narrow { max-width: 720px; }

/* -------- RESPONSIVE LAYOUT ADJUSTMENTS -------- */
@media (min-width: 768px) {
  .content-wrapper { gap: 18px; }
}

@media (min-width: 1024px) {
  .text-image-section { flex-wrap: nowrap; }
  .hero { padding: 80px 0; }
}

/* -------- COOKIE CONSENT: Banner & Modal -------- */
/* Banner */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100;
  background: var(--clr-white); border-top: 1px solid var(--clr-border);
  box-shadow: 0 -6px 20px rgba(18,58,90,0.08);
  transform: translateY(100%);
  transition: transform 300ms ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .container {
  padding: 16px; flex-direction: column; gap: 12px;
}
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-btn { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--clr-border); background: var(--clr-accent); color: var(--clr-primary); }
.cookie-accept { background: linear-gradient(135deg, var(--clr-secondary) 0%, #226F65 100%); color: #fff; border: 1px solid transparent; }
.cookie-reject { background: var(--clr-white); color: var(--clr-secondary); border: 1px solid var(--clr-secondary); }
.cookie-settings { background: var(--clr-accent); color: var(--clr-primary); }
.cookie-btn:hover { box-shadow: var(--shadow-sm); }

@media (min-width: 768px) {
  .cookie-banner .container { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* Modal overlay */
.cookie-overlay {
  position: fixed; inset: 0; z-index: 1200; background: rgba(11,34,53,0.5);
  display: none; align-items: center; justify-content: center; padding: 18px;
}
.cookie-overlay.open { display: flex; }
.cookie-modal {
  width: 100%; max-width: 720px; background: var(--clr-white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); border: 1px solid var(--clr-border);
  display: flex; flex-direction: column; gap: 16px; padding: 20px;
}
.cookie-modal .cookie-groups { display: flex; flex-direction: column; gap: 12px; }
.cookie-group { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid var(--clr-border); border-radius: 10px; background: var(--clr-accent); }
.cookie-modal .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Simple toggle style for cookie categories */
.toggle { position: relative; width: 42px; height: 24px; background: #cfd8e3; border-radius: 999px; transition: background var(--transition-base); }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); transition: transform var(--transition-base); }
.toggle.on { background: var(--clr-secondary); }
.toggle.on::after { transform: translateX(18px); }

/* -------- MICRO-INTERACTIONS -------- */
.fade-in-up { opacity: 0; transform: translateY(8px); animation: fadeUp 500ms ease forwards; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* -------- ACCESSIBILITY & MISC -------- */
hr { border: 0; border-top: 1px solid var(--clr-border); margin: 24px 0; }
blockquote { margin: 0; padding: 16px 18px; border-left: 4px solid var(--clr-secondary); background: var(--clr-accent); border-radius: 8px; }

/* -------- PAGE-SPECIFIC TWEAKS (shared classes in HTML) -------- */
/* FAQs and headings spacing */
.content-wrapper h2 { margin-top: 4px; }
.content-wrapper h3 { margin-top: 6px; }

/* Buttons within paragraphs */
.content-wrapper .btn { margin-top: 4px; }

/* Contact details emphasis */
.content-wrapper p strong { color: var(--clr-primary); }

/* Ensure adequate spacing between stacked content blocks */
.content-wrapper > * + * { margin-top: 4px; }

/* -------- NAV VISIBILITY hints for JS (optional classes) -------- */
/* When JS adds .menu-open to body, prevent scroll */
body.menu-open { overflow: hidden; }

/* -------- PRINT BASICS -------- */
@media print {
  .site-header, .site-footer, .mobile-menu, .cookie-banner, .cookie-overlay { display: none !important; }
  a { text-decoration: underline; }
}
