/* ===================================================================
   Reset & Normalize
   =================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
body { margin: 0; }
img, svg { max-width: 100%; height: auto; display: inline-block; }
input, button, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: transparent; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding-left: 1.25rem; }
p { margin: 0; }

/* ===================================================================
   Theme Variables (with fallbacks on each usage)
   =================================================================== */
:root {
  --primary: #0D3B66;
  --secondary: #2A9D8F;
  --accent: #F2EDE4;
  --paper: #FFFFFF;
  --ink: #232629;
  --muted: #6B6F72;
  --border: #E3DDD3;
  --shadow: 0 2px 10px rgba(13, 59, 102, 0.06);
}

/* ===================================================================
   Base Typography – elegant_classic
   =================================================================== */
body {
  font-family: Arial, Helvetica, sans-serif; /* brand body */
  color: var(--ink, #232629);
  background: #FAF9F7; /* refined light paper */
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 { font-family: Georgia, "Times New Roman", serif; letter-spacing: 0.2px; color: var(--primary, #0D3B66); margin: 0 0 12px 0; }

h1 { font-size: 36px; line-height: 1.2; }
h2 { font-size: 28px; line-height: 1.3; }
h3 { font-size: 20px; line-height: 1.4; color: #1B3854; }

p, li { color: var(--ink, #232629); font-size: 16px; }
.subheadline { font-size: 18px; color: var(--muted, #6B6F72); }

small { font-size: 14px; color: var(--muted, #6B6F72); }

/* Links */
a { color: var(--primary, #0D3B66); text-underline-offset: 3px; }
a:hover { text-decoration: underline; }

/* Selection */
::selection { background: rgba(13,59,102,0.16); color: #0D3B66; }

/* ===================================================================
   Layout Containers (Flexbox only)
   =================================================================== */
.container { display: flex; width: 100%; justify-content: center; padding: 0 16px; }
.content-wrapper { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 1100px; }

/* Global section rhythm */
section { margin-bottom: 60px; padding: 40px 0; }

/* 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; }

/* ===================================================================
   Header & Navigation
   =================================================================== */
.site-header { position: sticky; top: 0; z-index: 1000; background: var(--paper, #FFFFFF); border-bottom: 1px solid var(--border, #E3DDD3); box-shadow: 0 1px 8px rgba(0,0,0,0.03); }
.site-header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo img { height: 36px; }

.main-nav { display: none; align-items: center; gap: 18px; }
.main-nav a { font-size: 15px; color: #2E3A44; padding: 6px 8px; border-radius: 4px; transition: color .2s ease, background-color .2s ease; }
.main-nav a:hover { background: #F4F1EB; color: var(--primary, #0D3B66); }

/* CTA button */
.cta-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 6px; background: var(--primary, #0D3B66); color: #FFFFFF; font-weight: 600; letter-spacing: 0.2px; box-shadow: var(--shadow, 0 2px 10px rgba(13,59,102,0.06)); transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease; }
.cta-button:hover { background: #0B3358; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(13,59,102,0.12); text-decoration: none; }
.cta-button:focus-visible { outline: 2px solid #2A9D8F; outline-offset: 2px; }
.cta-button.secondary { background: transparent; color: var(--primary, #0D3B66); border: 1px solid var(--primary, #0D3B66); }
.cta-button.secondary:hover { background: #EAF0F6; }

/* Mobile menu toggle */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; font-size: 22px; color: var(--primary, #0D3B66); border-radius: 6px; transition: background-color .2s ease; }
.mobile-menu-toggle:hover { background: #F4F1EB; }

/* Mobile menu overlay */
.mobile-menu { position: fixed; top: 0; right: 0; bottom: 0; left: auto; width: 100%; max-width: 360px; background: var(--paper, #FFFFFF); border-left: 1px solid var(--border, #E3DDD3); box-shadow: -8px 0 24px rgba(0,0,0,0.08); transform: translateX(100%); transition: transform .35s ease; z-index: 1200; display: flex; flex-direction: column; padding: 20px; gap: 20px; }
.mobile-menu[aria-hidden="false"], .mobile-menu.open { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; width: 36px; height: 36px; font-size: 20px; color: #3A4A56; border-radius: 6px; }
.mobile-menu-close:hover { background: #F4F1EB; }
.mobile-nav { display: flex; flex-direction: column; gap: 10px; }
.mobile-nav a { display: flex; align-items: center; padding: 12px 10px; border-radius: 6px; color: #2E3A44; font-size: 16px; transition: background-color .2s ease, color .2s ease; }
.mobile-nav a:hover { background: #F4F1EB; color: var(--primary, #0D3B66); }

/* Show desktop nav on larger viewports */
@media (min-width: 992px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* ===================================================================
   Hero Section – elegant spacing & muted accent
   =================================================================== */
.hero { background: var(--accent, #F2EDE4); border-bottom: 1px solid var(--border, #E3DDD3); }
.hero .content-wrapper { padding: 24px 0; }
.hero h1 { color: #0B3358; }
.hero .subheadline { max-width: 800px; }

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

/* ===================================================================
   Text & Content Blocks
   =================================================================== */
.text-section { display: flex; flex-direction: column; gap: 10px; color: var(--ink, #232629); }
.text-section ul, .text-section ol { display: flex; flex-direction: column; gap: 8px; margin: 0; padding-left: 1.25rem; }
.text-section img { width: 18px; height: 18px; margin-right: 8px; vertical-align: middle; }
.text-section p img { margin-right: 8px; }

/* Cards (generic) */
.card { background: var(--paper, #FFFFFF); border: 1px solid var(--border, #E3DDD3); border-radius: 8px; box-shadow: var(--shadow, 0 2px 10px rgba(13,59,102,0.06)); padding: 20px; }

/* Testimonials – dark text on light background for readability */
.testimonial-card { width: 100%; background: #FFFFFF; border: 1px solid var(--border, #E3DDD3); border-radius: 10px; box-shadow: var(--shadow, 0 2px 10px rgba(13,59,102,0.06)); }
.testimonial-card p { color: #1F2326; }
.testimonial-card p strong { font-family: Georgia, "Times New Roman", serif; color: #0D3B66; font-weight: 700; }

/* ===================================================================
   Footer
   =================================================================== */
.site-footer { background: #0D3B66; color: #E9EFF4; }
.site-footer section { margin-bottom: 0; padding: 36px 0; }
.site-footer .content-wrapper { flex-direction: column; gap: 18px; }
.site-footer .logo img { filter: brightness(0) invert(1); height: 34px; }
.site-footer a { color: #D8E6EF; }
.site-footer a:hover { color: #FFFFFF; text-decoration: underline; }
.site-footer h3 { color: #FFFFFF; }

/* ===================================================================
   Lists & Definitions
   =================================================================== */
ul { list-style: disc; }
ol { list-style: decimal; }
li { padding-left: 2px; }

/* ===================================================================
   Responsive Layout Adjustments
   =================================================================== */
@media (min-width: 600px) {
  h1 { font-size: 42px; }
  h2 { font-size: 32px; }
}

@media (min-width: 992px) {
  h1 { font-size: 48px; }
  h2 { font-size: 36px; }
  h3 { font-size: 22px; }

  /* Wider section breathing room */
  section { padding: 56px 0; }

  /* Text-image / content pairs when used */
  .text-image-section { flex-wrap: nowrap; }
}

/* ===================================================================
   Accessibility & Focus States
   =================================================================== */
:focus-visible { outline: 2px solid var(--secondary, #2A9D8F); outline-offset: 2px; }

/* ===================================================================
   Cookie Consent Banner & Modal
   =================================================================== */
.cookie-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1400; background: #FFFFFF; color: #1E242A; border: 1px solid var(--border, #E3DDD3); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.12); display: flex; flex-direction: column; gap: 14px; padding: 16px; transform: translateY(16px); opacity: 0; pointer-events: none; transition: transform .3s ease, opacity .3s ease; }
.cookie-banner.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 10px; }
.cookie-banner .cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 6px; font-weight: 600; border: 1px solid transparent; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.cookie-banner .btn-accept { background: var(--primary, #0D3B66); color: #FFFFFF; }
.cookie-banner .btn-accept:hover { background: #0B3358; }
.cookie-banner .btn-reject { background: #F5F1EA; color: #1E2328; border-color: var(--border, #E3DDD3); }
.cookie-banner .btn-reject:hover { background: #ECE6DC; }
.cookie-banner .btn-settings { background: transparent; color: var(--primary, #0D3B66); border-color: var(--primary, #0D3B66); }
.cookie-banner .btn-settings:hover { background: #EAF0F6; }

/* Cookie Preferences Modal */
.cookie-modal-overlay { position: fixed; inset: 0; background: rgba(20, 24, 28, 0.48); z-index: 1450; opacity: 0; pointer-events: none; transition: opacity .25s ease; display: flex; align-items: center; justify-content: center; padding: 20px; }
.cookie-modal-overlay.is-visible { opacity: 1; pointer-events: auto; }
.cookie-modal { background: #FFFFFF; width: 100%; max-width: 720px; border-radius: 12px; border: 1px solid var(--border, #E3DDD3); box-shadow: 0 20px 40px rgba(0,0,0,0.18); display: flex; flex-direction: column; gap: 16px; padding: 20px; transform: translateY(10px); transition: transform .25s ease; }
.cookie-modal-overlay.is-visible .cookie-modal { transform: translateY(0); }
.cookie-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cookie-modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid var(--border, #E3DDD3); border-radius: 8px; background: #FBFAF8; }
.cookie-category .label { font-weight: 600; }
.cookie-toggle { position: relative; width: 44px; height: 26px; background: #DAD6CF; border-radius: 20px; transition: background-color .2s ease; display: inline-flex; align-items: center; padding: 3px; }
.cookie-toggle::after { content: ""; width: 20px; height: 20px; background: #FFFFFF; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transform: translateX(0); transition: transform .2s ease; }
.cookie-toggle.is-on { background: var(--secondary, #2A9D8F); }
.cookie-toggle.is-on::after { transform: translateX(18px); }
.cookie-modal-footer { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* ===================================================================
   Utility Classes
   =================================================================== */
.muted { color: var(--muted, #6B6F72); }
.center { text-align: center; }
.hidden { display: none !important; }

/* ===================================================================
   Desktop refinements for layout flow
   =================================================================== */
@media (min-width: 992px) {
  .content-wrapper { gap: 24px; }
  .site-footer .content-wrapper { flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
}

/* ===================================================================
   Page-specific fine-tuning
   =================================================================== */
/* Ensure headings and groups have elegant spacing */
.content-wrapper > h2 { margin-top: 8px; margin-bottom: 8px; }
.content-wrapper > .text-section + .text-section { margin-top: 4px; }

/* Keep adequate spacing between testimonial cards */
.testimonial-card + .testimonial-card { margin-top: 12px; }

/* Contact info alignment with icons */
.text-section p { display: flex; align-items: center; gap: 8px; }

/* Prevent overlaps and ensure breathing room */
.content-wrapper > * { margin-left: 0; margin-right: 0; }

/* ===================================================================
   Optional helper patterns (not used everywhere but ready)
   =================================================================== */
.features { display: flex; flex-wrap: wrap; gap: 20px; }
.card-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }

/* ===================================================================
   Print adjustments (simple)
   =================================================================== */
@media print {
  .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal-overlay { display: none !important; }
  a { text-decoration: underline; }
  .site-header { position: static; box-shadow: none; }
}
