/* =============================
   Reset & Base (Mobile-first)
   Geometric Structured: crisp edges, precise spacing, angular vibe
   ============================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Verdana, Arial, sans-serif; color: #0F2A4A; background: #FFFFFF; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: #143A6B; text-decoration: none; transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
a:hover { color: #1F7A8C; }
:root {
  --primary: #143A6B;
  --secondary: #1F7A8C;
  --accent: #F2F6FA;
  --ink: #0F2A4A;
  --muted: #4A6686;
  --line: #E2EAF2;
  --white: #FFFFFF;
  --shadow: rgba(20, 58, 107, 0.12);
}

/* Typography */
h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; color: var(--primary); margin: 0; line-height: 1.2; }
h1 { font-size: 32px; letter-spacing: 0.02em; }
h2 { font-size: 24px; margin-top: 8px; letter-spacing: 0.02em; }
h3 { font-size: 18px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); }
p { margin: 0; color: var(--ink); }
small, .fine_print { font-size: 14px; color: var(--muted); }
.subheadline { font-size: 16px; color: var(--muted); max-width: 70ch; }
strong { color: var(--ink); }

/* Containers & Layout */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; gap: 20px; }
.content-wrapper { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
section { margin-bottom: 56px; }
.hero { background: var(--accent); border-bottom: 4px solid var(--primary); }
.hero .content-wrapper { padding: 32px 0; }

/* Mandatory spacing/alignment patterns */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 20px; box-shadow: 0 4px 12px 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; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; background: var(--accent); border: 1px solid var(--line); border-left: 4px solid var(--secondary); border-radius: 6px; color: var(--ink); box-shadow: 0 4px 12px var(--shadow); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Header & Navigation */
header { background: var(--white); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
header .container { flex-direction: row; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; gap: 16px; }
.logo img { height: 36px; width: auto; }
.logo-small img { height: 28px; width: auto; }

.main-nav { display: none; align-items: center; gap: 12px; flex-wrap: wrap; }
.main-nav a { color: var(--ink); padding: 10px 12px; border: 2px solid transparent; border-radius: 4px; font-weight: 600; letter-spacing: 0.02em; }
.main-nav a:hover { border-color: var(--line); background: #FAFCFE; }
.main-nav a[aria-current="page"] { border-color: var(--primary); color: var(--primary); background: #EEF4FB; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 4px; border: 2px solid transparent; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; cursor: pointer; transition: background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.button.primary { background: var(--primary); color: var(--white); box-shadow: 0 6px 14px var(--shadow); }
.button.primary:hover { background: #0F2F59; transform: translateY(-1px); }
.button.secondary { background: var(--white); color: var(--primary); border-color: var(--primary); }
.button.secondary:hover { background: #F8FBFF; box-shadow: 0 6px 14px var(--shadow); }
.button:focus-visible, .main-nav a:focus-visible, .mobile-nav a:focus-visible, .mobile-menu-toggle:focus-visible, .mobile-menu-close:focus-visible { outline: 2px dashed var(--secondary); outline-offset: 2px; }

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

/* Mobile Menu (off-canvas via flex only) */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 4px; border: 2px solid var(--primary); color: var(--primary); background: var(--white); font-size: 20px; line-height: 1; }

.mobile-menu { position: fixed; top: 0; right: 0; bottom: 0; left: 0; display: flex; justify-content: flex-end; align-items: stretch; background: rgba(15, 42, 74, 0.45); transform: translateX(100%); transition: transform .35s ease; z-index: 1000; }
.mobile-menu.open { transform: translateX(0); }
.mobile-nav { background: var(--white); width: 85%; max-width: 360px; height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 24px; border-left: 4px solid var(--primary); box-shadow: -6px 0 16px rgba(0,0,0,0.1); }
.mobile-nav a { padding: 12px 10px; border: 2px solid transparent; border-radius: 4px; color: var(--ink); font-weight: 600; }
.mobile-nav a:hover { background: #F6FAFF; border-color: var(--line); }
.mobile-menu-close { align-self: flex-end; margin: 12px; padding: 8px 10px; background: var(--white); color: var(--primary); border: 2px solid var(--primary); border-radius: 4px; font-size: 18px; }

/* Language switcher */
.language-switcher { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.language-switcher a { color: var(--primary); text-decoration: underline; }
.language-switcher span { font-weight: 700; color: var(--ink); }

/* Hero specifics */
.hero h1 { max-width: 22ch; }
.hero .subheadline { max-width: 60ch; }

/* Lists (geometric bullets) */
.trust-badges ul, .supporting-bullets, .feature-grid ul, .benefit-list ul, .kpis ul, .kpi_counters, .feature_list, .service_list, .document_list, .approach_principles, .topics_list, .guide_list, .lessons_learned ul, .values_list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.trust-badges li, .supporting-bullets li, .feature-grid li, .benefit-list li, .kpis li, .kpi_counters li, .feature_list li, .service_list li, .document_list li, .approach_principles li, .topics_list li, .guide_list li, .lessons_learned li, .values_list li { display: flex; align-items: flex-start; gap: 10px; }
.trust-badges li::before, .supporting-bullets li::before, .feature-grid li::before, .benefit-list li::before, .kpis li::before, .kpi_counters li::before, .feature_list li::before, .service_list li::before, .document_list li::before, .approach_principles li::before, .topics_list li::before, .guide_list li::before, .lessons_learned li::before, .values_list li::before { content: ""; width: 10px; height: 10px; background: var(--secondary); border: 2px solid var(--primary); transform: rotate(45deg); flex: 0 0 auto; margin-top: 5px; }

/* Cards, sections, and text blocks */
.text-section { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 20px; box-shadow: 0 4px 12px var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.document-requirements-teaser, .deadline_notice, .court_support_note, .legal_disclaimer, .upload_hint, .brand_promise, .map_placeholder_alt_text { background: #FAFCFE; border-left: 4px solid var(--secondary); padding: 12px 14px; border-radius: 4px; color: var(--ink); }

/* Feature/service grids using flex only */
.service-cards, .case_cards, .country_cards, .testimonials_list, .resource_teasers ul, .service_cta_buttons, .kpis, .rating-summary, .rating_summary, .guide_list, .forms_reference, .authority_contacts, .success_drivers_list, .feature-grid, .benefit-list { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.service-cards > .text-section, .case_cards > .text-section, .country_cards > .text-section { flex: 1 1 100%; }

/* KPI and badges */
.kpis { align-items: flex-start; }
.kpis li { font-weight: 800; color: var(--primary); background: var(--accent); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; }

/* Timelines and ordered steps */
ol.timeline, ol.process_steps, ol.service_steps { padding-left: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: step; }
ol.timeline li, ol.process_steps li, ol.service_steps li { list-style: none; display: flex; gap: 12px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 12px; box-shadow: 0 4px 12px var(--shadow); }
ol.timeline li::before, ol.process_steps li::before, ol.service_steps li::before { counter-increment: step; content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; font-weight: 800; color: var(--white); background: var(--primary); border-radius: 2px; }

/* Testimonials (dark text on light bg for contrast) */
.testimonials_list { align-items: stretch; }
.testimonial-card p { margin: 0; }
.rating-summary, .rating_summary { background: var(--accent); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; color: var(--ink); }

/* Footer */
footer { background: #0E2A4C; color: #E8EFF7; border-top: 4px solid var(--secondary); }
footer .container { padding-top: 20px; padding-bottom: 20px; }
footer .content-wrapper { display: flex; flex-direction: column; gap: 16px; }
footer a { color: #E8EFF7; }
footer a:hover { color: #FFFFFF; text-decoration: underline; }
.address-block, footer address { font-style: normal; color: #E8EFF7; }
.footer-menu { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-menu a { padding: 6px 8px; border: 2px solid transparent; border-radius: 4px; }
.footer-menu a:hover { border-color: rgba(255,255,255,0.2); }

/* Details/summary */
details { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; background: var(--white); box-shadow: 0 4px 8px var(--shadow); }
details + details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 800; color: var(--primary); }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-right: 8px; background: var(--secondary); color: var(--white); font-weight: 800; border-radius: 2px; }
details[open] summary::before { content: "–"; }

/* Links lists */
.resource_teasers a, .guide_list a { color: var(--primary); border-bottom: 2px solid var(--line); padding-bottom: 2px; }
.resource_teasers a:hover, .guide_list a:hover { border-color: var(--primary); }

/* Contact blocks */
.support_channels p, .text-section p img { display: inline-flex; vertical-align: middle; margin-right: 8px; }

/* Accessibility and micro-interactions */
:focus { scroll-margin-top: 80px; }
.card:hover, .text-section:hover, .testimonial-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }

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

/* Responsive layouts */
@media (min-width: 600px) {
  .service-cards > .text-section, .case_cards > .text-section, .country_cards > .text-section { flex: 1 1 calc(50% - 20px); }
  .testimonials_list > .testimonial-card { flex: 1 1 calc(50% - 20px); }
}

@media (min-width: 900px) {
  .service-cards > .text-section, .case_cards > .text-section, .country_cards > .text-section { flex: 1 1 calc(33.333% - 20px); }
  .testimonials_list > .testimonial-card { flex: 1 1 calc(33.333% - 20px); }
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .hero .content-wrapper { padding: 40px 0; }
}

@media (min-width: 1200px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
}

/* Text-image and hybrid sections */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

/* Breadcrumbs */
[aria-label="Brotkrumen"] { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 14px; }
[aria-label="Brotkrumen"] a { color: var(--primary); }

/* Utility alignments */
.service_cta_buttons { align-items: center; }
.service_cta_buttons .button { flex: 0 0 auto; }

/* Rating/certifications/associations */
.certifications_list, .associations_logos, .guide_categories, .popular_questions, .forms_reference, .authority_contacts, .success_drivers_list, .country-badges, .rating-summary, .rating_summary, .case_snippets_multilingual { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 16px; box-shadow: 0 4px 12px var(--shadow); }

/* Tables (if appear in content) */
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid var(--line); padding: 10px; text-align: left; }
th { background: #F7FAFE; }

/* Forms (basic) */
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px dashed var(--secondary); outline-offset: 2px; }

/* Cookie Consent Banner (fixed bottom) */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; background: var(--white); border-top: 4px solid var(--primary); box-shadow: 0 -8px 18px rgba(0,0,0,0.08); padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; z-index: 1100; transform: translateY(100%); opacity: 0; pointer-events: none; transition: transform .35s ease, opacity .35s ease; }
.cookie-banner.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 10px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cookie-actions .button { padding: 10px 14px; font-size: 14px; }
.cookie-actions .button.reject { border-color: #CC3344; color: #CC3344; background: #FFF5F6; }
.cookie-actions .button.reject:hover { background: #FFECEF; }
.cookie-actions .button.settings { border-color: var(--secondary); color: var(--secondary); background: #F4FBFD; }
.cookie-actions .button.settings:hover { background: #EBF8FB; }

/* Cookie Preferences Modal */
.cookie-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15,42,74,0.55); display: none; z-index: 1200; }
.cookie-overlay.open { display: flex; align-items: center; justify-content: center; }
.cookie-modal { background: var(--white); width: 92%; max-width: 680px; border: 2px solid var(--primary); border-radius: 6px; box-shadow: 0 16px 36px rgba(0,0,0,0.2); display: flex; flex-direction: column; gap: 16px; padding: 20px; transform: translateY(20px); transition: transform .3s ease; }
.cookie-overlay.open .cookie-modal { transform: translateY(0); }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Simple toggle styles for cookie categories */
.cookie-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.switch { position: relative; width: 44px; height: 24px; background: #D9E6F2; border: 2px solid var(--primary); border-radius: 4px; display: inline-flex; align-items: center; padding: 2px; transition: background .2s ease; }
.switch .knob { width: 18px; height: 18px; background: var(--white); border: 2px solid var(--primary); border-radius: 2px; transform: translateX(0); transition: transform .2s ease; }
.switch.on { background: #D9F2EF; border-color: var(--secondary); }
.switch.on .knob { border-color: var(--secondary); transform: translateX(18px); }

/* Language & footer language switcher */
footer .language-switcher { color: #E8EFF7; }

/* Accessibility helpers */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; border: 0; padding: 0; clip: rect(0 0 0 0); overflow: hidden; }

/* Page-specific light adjustments */
.deadline_notice { border-left-color: #D98C00; background: #FFF8EA; }
.no_legal_advice { border-left: 4px solid #CC3344; background: #FFF5F6; }

/* Header language and CTA alignment on narrow screens */
@media (max-width: 420px) {
  header .container { gap: 10px; }
  .button { padding: 10px 14px; }
}

/* Geometric dividers (decorative only) */
.hero::after { content: ""; display: block; height: 6px; width: 120px; margin: 8px 0 0 0; background: var(--secondary); }

/* Ensure minimum spacing between content cards/blocks */
.service-cards > *:not(:last-child), .case_cards > *:not(:last-child), .country_cards > *:not(:last-child), .testimonials_list > *:not(:last-child), .resource_teasers > *:not(:last-child), .content-grid > *:not(:last-child) { margin-bottom: 20px; }

/* Prevent overlap and ensure wrap */
.service-cards, .case_cards, .country_cards, .testimonials_list, .content-grid, .card-container { align-items: stretch; }

/* Header spacing for pages with breadcrumbs */
.hero [aria-label="Brotkrumen"] { margin-bottom: 4px; }

/* Dark text on light background for any review/testimonial section */
.testimonials_list, .testimonial-card, .rating-summary, .rating_summary { color: var(--ink); }

/* Structured grid look using flex only (home modules) */
.feature-grid, .benefit-list { padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 12px var(--shadow); }
.feature-grid h3, .benefit-list h3 { margin-bottom: 6px; }

/* Contact page quick call button emphasis */
[ href^="tel:" ].button.primary { background: #0F2F59; }

/* Print basics */
@media print {
  .mobile-menu-toggle, .mobile-menu, .cookie-banner, .cookie-overlay { display: none !important; }
  header, footer { border: 0; }
}

/* Desktop refinements */
@media (min-width: 992px) {
  header .container { padding-top: 16px; padding-bottom: 16px; }
  .content-wrapper { gap: 28px; }
  section { margin-bottom: 72px; }
  .hero .content-wrapper { padding: 56px 0; }
  .footer-menu { gap: 16px; }
}

/* Ensure alignment for various text blocks */
.text-section, .document_list, .service_list, .feature_list, .kpi_counters, .success_drivers_list { align-items: flex-start; }

/* Hover underline for inline links inside paragraphs */
.text-section a, p a, address a { text-decoration: underline; text-underline-offset: 2px; }
.text-section a:hover, p a:hover, address a:hover { color: var(--secondary); }

/* Header current state for primary CTA in nav area */
a[aria-current="page"].button.primary { box-shadow: 0 8px 18px var(--shadow); }

/* Ensure adequate z-index stacking */
header { z-index: 30; }
.mobile-menu { z-index: 1000; }
.cookie-banner { z-index: 1100; }
.cookie-overlay { z-index: 1200; }

/* END */