/* =========================
   Luxury Premium Theme CSS
   Brand: RentenBrücke
   Author: Senior CSS Dev & UI Designer
   Requirements: Flex-only layouts, responsive, mobile menu, cookie consent
   ========================= */

/* ---------- CSS Reset & Normalize ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { margin: 0; padding: 0 0 0 1.2rem; }
button { font: inherit; background: transparent; border: none; cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 2px solid #C8AB63; outline-offset: 2px; }

/* ---------- Design Tokens ---------- */
:root {
  --primary: #0B3C77; /* Navy */
  --secondary: #2E7D8A; /* Teal */
  --accent: #F2F5F8; /* Light accent */
  --gold: #C8AB63; /* Luxury gold */
  --gold-deep: #B9974E; /* Deeper gold for borders */
  --ink: #121212; /* Main text */
  --muted: #5B6572; /* Muted text */
  --surface: #FFFFFF; /* Card/base surface */
  --bg: #F7F8FA; /* Page background */
  --hero: #0A223F; /* Darker hero/navy */
  --shadow: 0 8px 24px rgba(11, 23, 41, 0.12);
}

/* ---------- Base Typography ---------- */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif; /* Brand body font */
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; color: #0D1B2A; letter-spacing: 0.2px; margin: 0 0 16px; }
h1 { font-size: 32px; line-height: 1.25; }
h2 { font-size: 24px; line-height: 1.3; position: relative; padding-bottom: 8px; }
h2::after { content: ""; display: block; width: 56px; height: 3px; background: var(--gold); border-radius: 2px; margin-top: 8px; }
h3 { font-size: 18px; line-height: 1.35; color: #182433; }
p { margin: 0 0 14px; color: var(--ink); }
strong { color: #0E243B; }

/* Link styling with luxury gold accent */
a { color: var(--primary); transition: color 0.2s ease; }
a:hover { color: var(--gold); }

/* ---------- Layout Containers (Flex-only) ---------- */
.container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1160px;
  padding: 0 20px;
  margin: 0 auto;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
section { display: flex; flex-direction: column; gap: 16px; padding: 32px 0; }

/* Mandatory spacing class */
.section { margin-bottom: 60px; padding: 40px 20px; }

/* ---------- Header & Navigation ---------- */
header { background: var(--hero); color: #F7FAFF; border-bottom: 1px solid rgba(200,171,99,0.25); position: sticky; top: 0; z-index: 1000; }
header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.logo img { height: 42px; width: auto; filter: drop-shadow(0 1px 0 rgba(0,0,0,0.1)); }

.main-nav { display: none; align-items: center; gap: 16px; }
.main-nav a { color: #EAF1FF; padding: 10px 12px; border-radius: 6px; transition: background 0.2s ease, color 0.2s ease; }
.main-nav a:hover { background: rgba(255,255,255,0.06); color: #FFFFFF; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 28px; font-weight: bold; border: 1px solid transparent; transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, transform 0.08s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #FFFFFF; border-color: var(--gold); box-shadow: 0 4px 16px rgba(11,60,119,0.28); }
.btn-primary:hover { background: #0A356A; box-shadow: 0 6px 20px rgba(11,60,119,0.35); }
.btn-secondary { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-secondary:hover { background: rgba(200,171,99,0.1); }

/* Mobile menu toggle */
.mobile-menu-toggle { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; color: #FFFFFF; font-size: 22px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.18); transition: background 0.2s ease, border-color 0.2s ease; }
.mobile-menu-toggle:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.35); }

/* Mobile menu overlay */
.mobile-menu { position: fixed; inset: 0; background: rgba(7, 14, 25, 0.65); display: flex; align-items: stretch; justify-content: flex-start; transform: translateX(-100%); transition: transform 0.35s ease; z-index: 1200; }
.mobile-menu .mobile-nav { background: #0D1B2A; color: #F1F5FF; width: 82%; max-width: 360px; display: flex; flex-direction: column; padding: 20px; gap: 6px; box-shadow: 8px 0 24px rgba(0,0,0,0.25); }
.mobile-menu .mobile-nav a { padding: 14px 12px; border-radius: 8px; border: 1px solid transparent; }
.mobile-menu .mobile-nav a:hover { background: rgba(255,255,255,0.06); border-color: rgba(200,171,99,0.35); color: #FFFFFF; }
.mobile-menu .mobile-menu-close { align-self: flex-end; color: #FFFFFF; font-size: 22px; margin: 12px; width: 40px; height: 40px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.18); }
.mobile-menu.open, .mobile-menu.active { transform: translateX(0); }

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

/* ---------- Hero Section ---------- */
.hero { background: linear-gradient(0deg, rgba(10,34,63,1) 0%, rgba(13,27,42,1) 100%); color: #EAF1FF; border-bottom: 1px solid rgba(200,171,99,0.25); }
.hero .container { gap: 12px; }
.hero .content-wrapper { gap: 16px; }
.hero h1 { color: #FFFFFF; font-size: 28px; }
.hero p { color: #DCE6F5; }
.hero .cta-group { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Trust badges */
.trust-badges ul { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 16px; padding: 0; margin: 8px 0 0; }
.trust-badges li { display: flex; align-items: center; gap: 8px; color: #EAF1FF; background: rgba(255,255,255,0.06); border: 1px solid rgba(200,171,99,0.25); padding: 8px 12px; border-radius: 10px; }
.trust-badges img { width: 18px; height: 18px; }
.language-switcher { display: flex; align-items: center; gap: 8px; color: #F6F9FF; font-size: 14px; }

/* ---------- Generic Text Sections ---------- */
.text-section { display: flex; flex-direction: column; gap: 10px; }
.text-section ul, .text-section ol { display: flex; flex-direction: column; gap: 8px; }
.text-section li { color: var(--ink); }
.text-section ul li { list-style: none; position: relative; padding-left: 18px; }
.text-section ul li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 8px; background: var(--gold); border-radius: 50%; box-shadow: 0 0 0 2px rgba(200,171,99,0.25) inset; }
.text-section img { width: 18px; height: 18px; margin-right: 8px; }
.text-section p img { display: inline-block; vertical-align: text-bottom; margin-right: 8px; }

/* Ordered lists with gold line */
ol { counter-reset: li; list-style: none; padding-left: 0; }
ol li { position: relative; padding-left: 34px; margin: 6px 0; }
ol li::before { counter-increment: li; content: counter(li) "."; position: absolute; left: 0; top: 0; color: var(--gold); font-weight: bold; }

/* ---------- Cards & Testimonials (luxury surfaces) ---------- */
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; background: var(--surface); border: 1px solid rgba(11,60,119,0.08); border-left: 4px solid var(--gold); border-radius: 12px; box-shadow: var(--shadow); color: var(--ink); }
.testimonial-card p { margin: 0; }

/* ---------- Footer ---------- */
footer { background: #0D1B2A; color: #D7E2F2; border-top: 1px solid rgba(200,171,99,0.25); }
footer .content-wrapper { display: flex; flex-direction: column; gap: 18px; padding: 28px 0; }
footer nav { display: flex; flex-wrap: wrap; gap: 10px 16px; }
footer nav a { color: #E6EDF7; opacity: 0.9; }
footer nav a:hover { color: #FFFFFF; }
footer address { font-style: normal; color: #CCDAEC; }
footer img { height: 36px; }
footer p { margin: 0; color: #E6EDF7;}

/* ---------- Content spacing & sections ---------- */
main > section { border-bottom: 1px solid rgba(11,60,119,0.08); }

/* ---------- Buttons in context groups ---------- */
.cta-group { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Utilities (Flex-only layouts) ---------- */
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid rgba(11,60,119,0.08); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.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; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* ---------- Readability emphasis blocks ---------- */
blockquote { margin: 12px 0; padding: 14px 16px; background: var(--surface); border-left: 4px solid var(--gold); border-radius: 8px; color: var(--ink); }

/* ---------- Forms (if any appear later) ---------- */
input, select, textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(11,60,119,0.18); background: #FFFFFF; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,171,99,0.2); }
label { font-weight: bold; display: block; margin-bottom: 6px; }

/* ---------- Mobile-first adjustments ---------- */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .hero h1 { font-size: 44px; }
  .container { gap: 20px; }
}

@media (min-width: 992px) {
  header .container { gap: 20px; }
  .content-wrapper { gap: 18px; }
  footer .content-wrapper { flex-direction: row; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; }
  footer nav { flex: 1 1 280px; }
}

/* ---------- Tables (if present in Wissen, DSGVO pages later) ---------- */
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid rgba(11,60,119,0.12); border-radius: 10px; overflow: hidden; display: block; }
thead { background: #0F2B52; color: #FFFFFF; display: block; }
tbody, thead tr { display: block; }
tr { display: flex; flex-wrap: nowrap; }
th, td { flex: 1 1 180px; padding: 12px; border-bottom: 1px solid rgba(11,60,119,0.1); }

/* ---------- Lists with icons in contact blocks ---------- */
.text-section p { display: flex; align-items: center; gap: 10px; }

/* ---------- Luxury dividers ---------- */
hr { border: none; height: 1px; background: linear-gradient(90deg, rgba(200,171,99,0), rgba(200,171,99,0.6), rgba(200,171,99,0)); }

/* ---------- Cookie Consent Banner ---------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; background: #0D1B2A; color: #EAF1FF; border-top: 2px solid var(--gold); box-shadow: 0 -6px 24px rgba(0,0,0,0.25); display: none; z-index: 1400; }
.cookie-banner.show, .cookie-banner.active { display: flex; }
.cookie-banner .container { flex-direction: column; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
.cookie-banner p { margin: 0; color: white;}
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-accept { composes: btn btn-primary; }
.cookie-reject, .cookie-settings { composes: btn btn-secondary; }
/* Fallback if composes is not supported */
.cookie-buttons .btn, .cookie-accept, .cookie-reject, .cookie-settings { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 28px; font-weight: bold; border: 1px solid transparent; }
.cookie-accept { background: var(--gold); color: #0D1B2A; border-color: var(--gold-deep); }
.cookie-accept:hover { background: #D7B875; }
.cookie-reject, .cookie-settings { background: transparent; color: #F5F9FF; border-color: rgba(255,255,255,0.35); }
.cookie-reject:hover, .cookie-settings:hover { background: rgba(255,255,255,0.08); }

/* Cookie modal */
.cookie-modal { position: fixed; inset: 0; background: rgba(7, 14, 25, 0.7); display: none; align-items: center; justify-content: center; z-index: 1500; }
.cookie-modal.show, .cookie-modal.active { display: flex; }
.cookie-modal-content { background: #FFFFFF; color: var(--ink); width: 92%; max-width: 720px; border-radius: 14px; box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 14px; border: 1px solid rgba(11,60,119,0.12); }
.cookie-categories { display: flex; flex-direction: column; gap: 10px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--accent); border-radius: 10px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* ---------- Accessibility Helpers ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Page-specific subtle accents ---------- */
/* Breadcrumb-like first paragraph inside hero sections */
.hero .content-wrapper > p:first-child { color: #BFD3F0; font-size: 14px; }
.hero .content-wrapper > p:first-child a { color: #BFD3F0; font-size: 14px; }


/* ---------- Hover micro-interactions ---------- */
.card:hover, .testimonial-card:hover, blockquote:hover { box-shadow: 0 10px 28px rgba(11,23,41,0.16); }

/* ---------- Ensure testimonials high contrast on light surfaces ---------- */
/* Using light card backgrounds and dark text as defined above */

/* ---------- Additional spacing rules to avoid overlaps ---------- */
main .container + .container { margin-top: 20px; }
.testimonial-card + .testimonial-card { margin-top: 16px; }

/* ---------- Print basics ---------- */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; color: #000; }
}

/* ---------- Desktop refinements ---------- */
@media (min-width: 1200px) {
  .container { max-width: 1200px; }
}
