/* =============================
   RentenBrücke – style.css
   Design style: modern_bold (bold fonts, bright accents, geometric shapes, high contrast)
   Mobile-first, flexbox-only layouts
   ============================= */

/* ===== CSS Reset & Base Normalize ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0 0 16px 20px; padding: 0; }
p { margin: 0 0 16px 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #00C2FF; outline-offset: 2px; }

/* ===== Theme Variables (with fallbacks where appropriate) ===== */
:root {
  --brand-primary: #0D2B3E;
  --brand-secondary: #1E6A7A;
  --brand-accent: #F3F7FA;
  --brand-highlight: #FF5A3C; /* modern_bold bright accent */
  --brand-electric: #00C2FF; /* modern_bold bright accent */
  --text: #0D2B3E;
  --muted: #5C7482;
  --white: #FFFFFF;
  --shadow: 0 8px 22px rgba(13,43,62,0.12);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition: 200ms ease;
}

/* ===== Typography ===== */
body {
  font-family: Arial, Helvetica, sans-serif; /* brand body */
  color: var(--text);
  background: var(--brand-accent);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; color: var(--brand-primary); margin: 0 0 16px 0; line-height: 1.2; }

h1 { font-size: 32px; letter-spacing: -0.02em; }
h2 { font-size: 24px; position: relative; padding-top: 6px; }
h3 { font-size: 18px; }

/* Geometric accent under h2 for modern_bold */
h2::before {
  content: "";
  display: block;
  width: 56px;
  height: 6px;
  background: var(--brand-electric);
  border-radius: 3px;
  margin-bottom: 12px;
}

.subheadline { color: var(--muted); font-size: 18px; font-weight: 600; }
small { color: var(--muted); }
strong { font-weight: 800; }

/* ===== Layout Containers (Flexbox only) ===== */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Global section spacing (also include mandatory .section class) */
section, .section { margin-bottom: 60px; padding: 40px 20px; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); position: relative; }

/* Subtle geometric corner accent */
section::after {
  content: "";
  position: absolute;
  right: 16px; top: 16px;
  width: 18px; height: 18px;
  border-radius: 4px;
  background: var(--brand-highlight);
  opacity: 0.15;
}

/* ===== Header & Navigation ===== */
header {
  position: sticky; top: 0; z-index: 1000; background: var(--white);
  border-bottom: 4px solid var(--brand-primary);
  box-shadow: 0 8px 18px rgba(13,43,62,0.08);
}

header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; }

header img { height: 36px; width: auto; }

.main-nav {
  display: none; /* hidden on mobile */
  gap: 16px;
  align-items: center;
}

.main-nav a {
  display: flex; align-items: center; justify-content: center;
  padding: 10px 12px;
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  border-radius: 10px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.main-nav a:hover { background: var(--brand-accent); color: var(--brand-secondary); transform: translateY(-1px); }

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

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 12px; padding: 12px 18px; font-weight: 800; letter-spacing: 0.02em; border: 2px solid transparent; transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition); cursor: pointer; }
.btn.primary { background: var(--brand-secondary); color: var(--white); box-shadow: var(--shadow); }
.btn.primary:hover { background: var(--brand-primary); transform: translateY(-2px); }
.btn.secondary { background: var(--white); color: var(--brand-primary); border-color: var(--brand-primary); }
.btn.secondary:hover { background: var(--brand-primary); color: var(--white); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* Mobile Menu Controls */
.mobile-menu-toggle { background: var(--brand-primary); color: var(--white); border: none; padding: 10px 14px; border-radius: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.mobile-menu-toggle:hover { background: var(--brand-secondary); }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(13,43,62,0.85);
  display: flex; flex-direction: row; justify-content: flex-end; align-items: stretch;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }

/* Sliding panel */
.mobile-nav { background: var(--white); width: 82%; max-width: 420px; padding: 20px; display: flex; flex-direction: column; gap: 10px; transform: translateX(100%); transition: transform 260ms ease; border-top-left-radius: 16px; border-bottom-left-radius: 16px; }
.mobile-menu.open .mobile-nav { transform: translateX(0); }

.mobile-menu-close { align-self: flex-end; background: var(--brand-highlight); color: var(--white); border: none; padding: 8px 12px; border-radius: 10px; font-weight: 800; margin-bottom: 8px; }
.mobile-menu-close:hover { background: #E44F32; }

.mobile-nav a { padding: 14px 12px; border-radius: 10px; font-weight: 800; color: var(--brand-primary); text-transform: uppercase; letter-spacing: 0.06em; }
.mobile-nav a:hover { background: var(--brand-accent); color: var(--brand-secondary); }

/* ===== Hero, Lists, Badges ===== */
.usp-list, .value-list, .expected-outcomes, .included-list, .brand-values-list, .documents-checklist, .stats-list { display: flex; flex-direction: column; gap: 10px; margin-left: 0; list-style: none; }

.usp-list li, .value-list li, .expected-outcomes li, .included-list li, .brand-values-list li, .documents-checklist li, .stats-list li { position: relative; padding-left: 28px; }

.usp-list li::before, .value-list li::before, .expected-outcomes li::before, .included-list li::before, .brand-values-list li::before, .documents-checklist li::before, .stats-list li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; border-radius: 4px; background: var(--brand-electric);
}

.trust-badges, .badges, .badge-list { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.trust-badges span, .badges span, .badge-list span { background: var(--brand-accent); color: var(--brand-primary); font-weight: 800; border: 2px solid var(--brand-primary); padding: 8px 12px; border-radius: 999px; }

.language-notice, .help-text, .note, .risk-note, .remote-note, .privacy-note, .support-note, .retention-periods-note, .urgent-assistance-note, .data-protection-note {
  background: var(--brand-accent); border-left: 4px solid var(--brand-secondary); padding: 12px 14px; border-radius: 10px; color: var(--brand-primary);
}

.reminder-badge { display: inline-flex; align-items: center; background: var(--brand-highlight); color: var(--white); padding: 8px 12px; font-weight: 800; border-radius: 999px; }

.rating-summary p { display: flex; flex-direction: column; gap: 6px; color: var(--brand-primary); }
.rating-summary span { color: var(--muted); font-size: 14px; }

/* ===== Feature Grid, Service Cards, Topic Cards (Flexbox only) ===== */
.feature-grid, .service-cards, .service-list, .testimonial-list, .topic-cards, .article-list, .contact-summary, .footer-nav, .service-nav-pills, .category-filters {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch;
}

/* Feature Item (MANDATORY pattern already below) */
.feature-item { background: var(--white); border: 2px solid var(--brand-accent); border-left: 6px solid var(--brand-electric); border-radius: var(--radius-lg); padding: 18px; transition: transform var(--transition), box-shadow var(--transition); }
.feature-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-item img { width: 40px; height: 40px; }

/* Service Cards */
.service-card, .topic-card { flex: 1 1 260px; background: var(--white); border-radius: var(--radius-lg); padding: 18px; border: 2px solid var(--brand-accent); box-shadow: 0 6px 14px rgba(0,0,0,0.04); transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.service-card:hover, .topic-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand-secondary); }

/* Service pills */
.service-nav-pills a, .category-filters a { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 999px; border: 2px solid var(--brand-primary); color: var(--brand-primary); font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.service-nav-pills a:hover, .category-filters a:hover { background: var(--brand-primary); color: var(--white); }

/* Topic Cards specific */
.topic-card h3 { margin-bottom: 8px; }

/* Article list */
.article-list { flex-direction: column; gap: 12px; list-style: none; margin-left: 0; }
.article-list li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--brand-accent); }
.article-list a { color: var(--brand-secondary); font-weight: 800; }
.reading-time, .last-updated { color: var(--muted); font-size: 14px; }

/* Process Steps */
.process-steps { counter-reset: step; display: flex; flex-direction: column; gap: 10px; list-style: none; margin-left: 0; }
.process-steps li { position: relative; padding-left: 40px; font-weight: 700; }
.process-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 6px; background: var(--brand-primary); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; }

.timeline-horizontal { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-weight: 700; }

/* Documents & Lists */
.documents-preview { display: flex; flex-direction: column; gap: 10px; background: var(--brand-accent); border-radius: var(--radius-md); padding: 16px; }
.documents-preview h3 { margin-bottom: 6px; }

/* Testimonial Cards - light background, dark text (accessibility) */
.testimonial-list { align-items: stretch; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; background: #FFFFFF; border: 2px solid var(--brand-accent); border-left: 6px solid var(--brand-secondary); border-radius: var(--radius-lg); color: var(--brand-primary); box-shadow: 0 8px 18px rgba(13,43,62,0.06); }
.testimonial-card p { margin: 0; font-style: italic; }
.testimonial-footer { color: var(--brand-primary); }

.quote-carousel { display: flex; flex-direction: column; gap: 8px; background: var(--brand-accent); padding: 16px; border-radius: var(--radius-md); font-weight: 700; }

/* Contact info lines */
.contact-info { display: flex; flex-direction: column; gap: 8px; }
.contact-info span { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.contact-info img { width: 18px; height: 18px; }

.map-directions, .direction-notes, .forms-certificates-overview, .contact-points, .languages-supported { color: var(--muted); }

/* Search bar */
.search-bar { display: flex; }
.search-bar input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--brand-accent); outline: none; transition: border-color var(--transition), box-shadow var(--transition); }
.search-bar input:focus { border-color: var(--brand-secondary); box-shadow: 0 0 0 3px rgba(30,106,122,0.18); }

/* Footer */
footer { background: var(--brand-primary); color: var(--white); margin-top: 40px; }
footer .container { padding: 28px 20px; gap: 20px; }
.footer-nav { justify-content: center; }
.footer-nav a { color: var(--white); opacity: 0.9; padding: 6px 10px; border-radius: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-nav a:hover { background: rgba(255,255,255,0.12); }
.contact-summary { justify-content: center; }
.contact-summary span { display: inline-flex; align-items: center; gap: 8px; }
.contact-summary img { filter: brightness(0) invert(1); width: 16px; height: 16px; }
.brand-tagline { font-weight: 800; color: #E7F3F8; text-align: center; }
.copyright { text-align: center; opacity: 0.8; font-size: 14px; }
.languages-note { text-align: center; color: #D6E6EE; }

/* ===== Cookie Consent Banner & Modal ===== */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 999;
  background: var(--white); color: var(--brand-primary);
  border: 2px solid var(--brand-accent);
  border-left: 6px solid var(--brand-secondary);
  border-radius: 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px; padding: 16px;
  transform: translateY(18px); opacity: 0; pointer-events: none; transition: transform var(--transition), opacity var(--transition);
}
.cookie-banner.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cookie-text { display: flex; flex-direction: column; gap: 6px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-btn { padding: 10px 14px; border-radius: 10px; font-weight: 800; border: 2px solid transparent; cursor: pointer; }
.cookie-accept { background: var(--brand-secondary); color: var(--white); }
.cookie-accept:hover { background: var(--brand-primary); }
.cookie-reject { background: var(--white); color: var(--brand-primary); border-color: var(--brand-primary); }
.cookie-reject:hover { background: var(--brand-primary); color: var(--white); }
.cookie-settings { background: var(--brand-accent); color: var(--brand-primary); border-color: var(--brand-primary); }
.cookie-settings:hover { background: var(--brand-primary); color: var(--white); }

/* Cookie Modal */
.cookie-modal {
  position: fixed; inset: 0; z-index: 1200; background: rgba(13,43,62,0.85);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.cookie-modal.show { opacity: 1; pointer-events: auto; }
.cookie-modal-content {
  background: var(--white); color: var(--brand-primary);
  width: 92%; max-width: 720px; border-radius: 16px; box-shadow: var(--shadow);
  padding: 20px; display: flex; flex-direction: column; gap: 14px; border: 2px solid var(--brand-accent);
}
.cookie-modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal-close { background: var(--brand-highlight); color: var(--white); border: none; padding: 8px 12px; border-radius: 10px; font-weight: 800; }
.cookie-categories { display: flex; flex-direction: column; gap: 12px; }
.cookie-category { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; background: var(--brand-accent); }
.cookie-category .toggle { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.cookie-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* ===== Utilities & Misc ===== */
.badges { align-items: center; }
.timeline-horizontal span { background: var(--brand-accent); padding: 6px 10px; border-radius: 8px; font-weight: 800; }

.quality-standards, .rating-summary, .country-list-focus { color: var(--brand-primary); }

/* ===== Mandatory Spacing and Alignment Patterns (as requested) ===== */
.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; }

/* ===== Responsive ===== */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }

  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }

  /* Layout tightening for larger screens */
  .feature-grid > .feature-item { flex: 1 1 calc(33% - 20px); }
  .service-cards > .service-card { flex: 1 1 calc(50% - 20px); }
  .service-list > .service-card { flex: 1 1 calc(50% - 20px); }
  .testimonial-list > .testimonial-card { flex: 1 1 calc(50% - 20px); }
  .topic-cards > .topic-card { flex: 1 1 calc(33% - 20px); }
  .article-list li { justify-content: space-between; }

  .text-image-section { flex-direction: row; }
}

@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  .feature-grid > .feature-item { flex: 1 1 calc(25% - 20px); }
  .testimonial-list > .testimonial-card { flex: 1 1 calc(33% - 20px); }
}

/* Ensure text-image sections stack on mobile */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

/* ===== Page-specific small touches ===== */
.brand-values-list li::before { background: var(--brand-highlight); }
.expected-outcomes li::before { background: var(--brand-secondary); }

.timeline-horizontal { font-size: 14px; }

.rating-summary span { font-size: 14px; }

/* Footer spacing on pages with callouts */
footer .container .copyright { margin-top: 6px; }

/* ===== Forms and Inputs ===== */
input[type="text"], input[type="email"], input[type="tel"], textarea {
  border: 2px solid var(--brand-accent); border-radius: 12px; padding: 12px 14px; width: 100%; transition: border-color var(--transition), box-shadow var(--transition);
}
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, textarea:focus { border-color: var(--brand-secondary); box-shadow: 0 0 0 3px rgba(30,106,122,0.18); }

/* ===== Links ===== */
a:hover { color: var(--brand-secondary); }

/* ===== Page footer mini bars for modern_bold geometric accent ===== */
section .cta-group .btn.primary { box-shadow: 0 10px 18px rgba(30,106,122,0.24); }

/* ===== Header hero background nuance on first section ===== */
main > section:first-of-type { background: linear-gradient(0deg, var(--white), var(--white)); border: 2px solid var(--brand-accent); }
main > section:first-of-type::before {
  content: ""; position: absolute; left: 16px; top: 16px; width: 64px; height: 12px; border-radius: 6px; background: var(--brand-electric); opacity: 0.8;
}

/* ===== Make sure no elements overlap by spacing ===== */
section + section { margin-top: 0; }

/* ===== Header link focus states ===== */
.main-nav a:focus-visible, .mobile-nav a:focus-visible, .btn:focus-visible { outline: 3px solid var(--brand-electric); outline-offset: 2px; border-radius: 12px; }

/* ===== High-contrast testimonials requirement ===== */
.testimonial-card, .testimonial-card p, .testimonial-card .testimonial-footer { color: #0D2B3E; background-color: #FFFFFF; }

/* ===== Print safe small styles ===== */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  section { box-shadow: none; border: none; background: #fff; }
}

/* ===== Explicit Flex rules for all remaining composite groups to guarantee flex-only layout ===== */
.service-cards, .service-list, .feature-grid, .topic-cards, .testimonial-list, .footer-nav, .contact-summary, .cta-group, .badge-list, .trust-badges, .badges, .service-nav-pills, .category-filters, .article-list, .process-steps, .documents-preview, .quote-carousel, .rating-summary, .map-directions, .direction-notes, .forms-certificates-overview, .contact-points, .languages-supported, .quality-standards {
  display: flex; flex-wrap: wrap; gap: 20px;
}

/* Make inner text blocks stack vertically where needed */
.documents-preview, .quote-carousel, .rating-summary, .map-directions, .direction-notes, .forms-certificates-overview, .contact-points, .languages-supported, .quality-standards { flex-direction: column; align-items: flex-start; }

/* ===== End ===== */
