/* ===============================
   MetropolWeitblick - Professional Corporate CSS
   Style: professional_corporate (blue/gray palette, structured layout)
   Mobile-first, Flexbox-only, accessible, high-contrast
   =============================== */

/* ===============
   CSS Reset / Normalize
   =============== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; line-height: 1.6; color: #1F2937; background-color: #FFFFFF; }
img { max-width: 100%; height: auto; display: block; }
a { color: #0B2B5C; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
ul, ol { padding-left: 20px; }
button { font-family: inherit; font-size: 1rem; cursor: pointer; background: none; border: none; color: inherit; }
:focus-visible { outline: 3px solid #1E646E; outline-offset: 2px; }

/* ===============
   Theme Variables (with safe defaults)
   =============== */
:root {
  --color-primary: #0B2B5C;
  --color-secondary: #1E646E;
  --color-accent: #F4F7FB;
  --color-text: #1F2937; /* neutral dark gray for body */
  --color-muted: #6B7280; /* gray-500 */
  --color-border: #D1D5DB; /* gray-300 */
  --color-border-strong: #B6C2D4; /* blue-gray */
  --color-white: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 6px 16px rgba(16, 24, 40, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --transition: 200ms ease;
}

/* ===============
   Typography
   =============== */
h1, h2, h3, h4, h5, h6 { font-family: Georgia, 'Times New Roman', Times, serif; color: #0B2B5C; margin: 0 0 12px; line-height: 1.25; }
h1 { font-size: 32px; }
h2 { font-size: 24px; margin-top: 6px; }
h3 { font-size: 20px; color: #1E646E; }
h4 { font-size: 18px; color: #0B2B5C; }
p { margin: 0 0 14px; color: var(--color-text); }
.small { font-size: 14px; color: var(--color-muted); }
.subheadline { font-size: 18px; color: #374151; max-width: 70ch; }
strong { color: #0B2B5C; }

/* ===============
   Layout Helpers (Flexbox-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: 20px; }
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; padding: 18px; transition: box-shadow var(--transition), transform var(--transition); }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.content-grid > * { flex: 1 1 100%; min-width: 260px; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.text-image-section .text, .text-image-section .media { flex: 1 1 320px; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; border: 1px solid var(--color-border-strong); background: var(--color-accent); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Base spacing for sections */
main > section { padding: 40px 0; }

/* ===============
   Header & Navigation
   =============== */
.site-header { position: sticky; top: 0; z-index: 1000; background: var(--color-white); border-bottom: 1px solid var(--color-border); box-shadow: 0 1px 0 rgba(16,24,40,0.04); }
.site-header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }
.logo { display: flex; align-items: center; }
.logo img { height: 36px; width: auto; }

.main-nav { display: none; align-items: center; gap: 14px; }
.main-nav a { color: #0B2B5C; padding: 8px 10px; border-radius: var(--radius-sm); transition: background-color var(--transition), color var(--transition); }
.main-nav a:hover { background: var(--color-accent); color: #0B2B5C; text-decoration: none; }

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

.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--color-border); background: var(--color-white); color: #0B2B5C; box-shadow: var(--shadow-sm); transition: background-color var(--transition), box-shadow var(--transition), transform var(--transition); }
.mobile-menu-toggle:hover { background: var(--color-accent); box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* Mobile Menu Overlay */
.mobile-menu { position: fixed; inset: 0; background: #FFFFFF; transform: translateX(100%); transition: transform 300ms ease; z-index: 1200; display: flex; flex-direction: column; padding: 20px; gap: 20px; }
.mobile-menu.open { transform: translateX(0%); }
.mobile-menu-close { align-self: flex-end; width: 42px; height: 42px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-white); color: #0B2B5C; box-shadow: var(--shadow-sm); }
.mobile-nav { display: flex; flex-direction: column; gap: 12px; }
.mobile-nav a { padding: 12px 10px; border-radius: var(--radius-sm); color: #0B2B5C; border: 1px solid transparent; transition: background-color var(--transition), border-color var(--transition); }
.mobile-nav a:hover { background: var(--color-accent); border-color: var(--color-border); text-decoration: none; }

/* ===============
   Hero
   =============== */
.hero { background: var(--color-accent); border-bottom: 1px solid var(--color-border); }
.hero .content-wrapper { align-items: flex-start; }
.hero h1 { font-size: 28px; }
.hero .cta-group { display: flex; flex-wrap: wrap; gap: 12px; }

/* ===============
   Text blocks
   =============== */
.text-section { display: flex; flex-direction: column; gap: 8px; }
.text-section p:last-child { margin-bottom: 0; }

/* ===============
   Buttons
   =============== */
.btn-primary, .btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 8px; font-weight: 600; line-height: 1.2; text-decoration: none; transition: background-color var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition), border-color var(--transition); }
.btn-primary { background: var(--color-primary); color: var(--color-white); border: 1px solid var(--color-primary); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #0A264F; border-color: #0A264F; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-secondary { background: var(--color-white); color: var(--color-primary); border: 1px solid var(--color-primary); }
.btn-secondary:hover { background: var(--color-accent); box-shadow: var(--shadow-sm); }
.btn-link { color: var(--color-secondary); text-decoration: underline; }

/* ===============
   Lists inside content for corporate spacing
   =============== */
.content-wrapper ul, .content-wrapper ol { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px 0; }

/* ===============
   Testimonials (high-contrast, light background)
   =============== */
.testimonial-card p { margin: 0; color: #111827; }
.testimonial-card strong { color: #0B2B5C; }

/* ===============
   Footer
   =============== */
.site-footer { background: #0B2B5C; color: #E5E7EB; padding: 40px 0; margin-top: 40px; }
.site-footer .content-wrapper { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer h3, .site-footer h4 { color: #FFFFFF; }
.site-footer p { color: #E5E7EB; }
.footer-sitemap, .footer-legal { display: flex; flex-direction: column; gap: 10px; }
.footer-sitemap > div, .footer-legal > div { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.footer-sitemap a, .footer-legal a { color: #D1E4FF; padding: 6px 8px; border-radius: 6px; transition: background-color var(--transition); }
.footer-sitemap a:hover, .footer-legal a:hover { background: rgba(255,255,255,0.08); text-decoration: none; }

/* ===============
   Cookie Consent Banner & Modal
   =============== */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1300; background: #0F172A; color: #F3F4F6; box-shadow: 0 -6px 16px rgba(0,0,0,0.18); }
.cookie-banner .inner { display: flex; flex-direction: column; gap: 14px; padding: 16px 20px; }
.cookie-banner p { margin: 0; color: #E5E7EB; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 8px; font-weight: 600; border: 1px solid transparent; }
.cookie-actions .btn-accept { background: #10B981; color: #FFFFFF; }
.cookie-actions .btn-accept:hover { background: #0EA371; }
.cookie-actions .btn-reject { background: transparent; color: #F3F4F6; border-color: #374151; border: 1px solid #374151; }
.cookie-actions .btn-reject:hover { background: #111827; }
.cookie-actions .btn-settings { background: #1E40AF; color: #FFFFFF; }
.cookie-actions .btn-settings:hover { background: #1B398F; }

/* Cookie Preferences Modal */
.cookie-modal-overlay { position: fixed; inset: 0; background: rgba(2,6,23,0.6); z-index: 1400; opacity: 0; pointer-events: none; transition: opacity 250ms ease; display: flex; align-items: center; justify-content: center; padding: 20px; }
.cookie-modal-overlay.open { opacity: 1; pointer-events: auto; }
.cookie-modal { background: #FFFFFF; color: var(--color-text); width: 100%; max-width: 720px; border-radius: 12px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.cookie-modal header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px; border: 1px solid var(--color-border); border-radius: 8px; }

/* Toggle switch */
.toggle { display: inline-flex; align-items: center; gap: 8px; }
.toggle input[type="checkbox"] { appearance: none; width: 38px; height: 22px; border-radius: 22px; background: #D1D5DB; position: relative; transition: background var(--transition); }
.toggle input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF; box-shadow: var(--shadow-sm); transition: transform var(--transition); }
.toggle input[type="checkbox"]:checked { background: #10B981; }
.toggle input[type="checkbox"]:checked::after { transform: translateX(16px); }
.cookie-modal .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* ===============
   Reusable utilities
   =============== */
.hr { height: 1px; background: var(--color-border); width: 100%; }
.badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; background: var(--color-accent); color: #0B2B5C; font-size: 12px; border: 1px solid var(--color-border); }
.muted { color: var(--color-muted); }
.gap-20 { display: flex; gap: 20px; }
.centered { display: flex; align-items: center; justify-content: center; }

/* ===============
   Forms (if any appear later)
   =============== */
.input, input[type="text"], input[type="email"], input[type="tel"], textarea, select { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--color-border); background: #FFFFFF; color: var(--color-text); transition: border-color var(--transition), box-shadow var(--transition); }
.input:focus, input:focus, textarea:focus, select:focus { border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(30,100,110,0.15); outline: none; }

/* ===============
   Cards & Content visual hierarchy
   =============== */
.content-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #FFFFFF; box-shadow: var(--shadow-sm); }
.content-card .title { font-size: 18px; font-family: Georgia, 'Times New Roman', Times, serif; color: var(--color-primary); }

/* ===============
   Page-specific gentle accents
   =============== */
main > section:nth-child(odd) { background: #FFFFFF; }
main > section:nth-child(even) { background: #F9FBFE; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }

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

/* CTA group (appears in multiple pages) */
.cta-group { display: flex; flex-wrap: wrap; gap: 12px; }

/* ===============
   Accessibility & Contrast tweaks
   =============== */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ===============
   Responsive Layout (Flex-only)
   =============== */
@media (min-width: 600px) {
  h1 { font-size: 34px; }
  .hero h1 { font-size: 36px; }
  .content-grid > * { flex: 1 1 calc(50% - 10px); }
}

@media (min-width: 768px) {
  /* Show desktop nav, hide mobile toggle */
  .main-nav { display: flex; }
  .header-ctas { display: flex; }
  .mobile-menu-toggle { display: none; }

  .content-wrapper { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 24px; }
  .hero .content-wrapper { flex-direction: column; align-items: flex-start; }

  .content-grid > * { flex: 1 1 calc(33.333% - 14px); }

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

@media (min-width: 1024px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .subheadline { font-size: 20px; }
}

/* ===============
   Print (optional, tidy output)
   =============== */
@media print {
  .site-header, .site-footer, .mobile-menu, .cookie-banner, .cookie-modal-overlay { display: none !important; }
  a { color: #000; text-decoration: underline; }
}

/* ===============
   Additional Flex Layout Patterns (for future content compatibility)
   =============== */
.row { display: flex; flex-wrap: wrap; gap: 20px; }
.col { display: flex; flex-direction: column; gap: 12px; flex: 1 1 260px; }

/* ===============
   Page element refinements
   =============== */
/* Nav spacing refinement for business look */
.main-nav a { font-size: 16px; }

/* Highlight lists in corporate tone */
.content-wrapper li::marker { color: var(--color-secondary); }

/* Contact icon alignment in footers */
.text-section img { display: inline-block; vertical-align: middle; margin-right: 6px; }

/* Prevent overlapping and ensure spacing between sections */
main > section + section { margin-top: 0; }

/* ===============
   Animations (subtle)
   =============== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.hero, .card, .testimonial-card { animation: fadeUp 300ms ease both; }

/* ===============
   Compliance with mandatory spacing classes (already defined above)
   - .section
   - .card-container
   - .card
   - .content-grid
   - .text-image-section
   - .testimonial-card
   - .feature-item
   =============== */

/* Note: All layout containers use display:flex and flex properties. No CSS Grid or Columns used. */
