/* ===== CSS Reset & Base ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 16px 24px; padding: 0; }
h1, h2, h3, h4, h5, h6, p { margin: 0 0 16px 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; }
:focus-visible { outline: 3px solid rgba(255,183,3,0.8); outline-offset: 2px; }

/* ===== Brand Tokens (with fallbacks) ===== */
:root {
  --color-primary: #0B3D91;
  --color-secondary: #2E6F6C;
  --color-accent: #F5F7FA;
  --color-ink: #122033;
  --color-muted: #5B6C7D;
  --color-white: #FFFFFF;
  --color-sky: #00B3C7; /* creative accent */
  --color-coral: #FF6B6B; /* creative accent */
  --color-violet: #6A4C93; /* creative accent */
  --color-amber: #FFB703; /* creative accent */

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --shadow-sm: 0 3px 10px rgba(0,0,0,0.08);
  --shadow-md: 0 10px 24px rgba(11,61,145,0.14);
  --shadow-lg: 0 18px 40px rgba(0,0,0,0.18);
}

/* ===== Typography ===== */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif; /* body font */
  color: var(--color-ink);
  background: var(--color-accent);
  line-height: 1.6;
  font-size: 16px;
}
h1, h2, h3 {
  font-family: 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', Arial, sans-serif; /* display font */
  letter-spacing: 0.3px;
}
h1 { font-size: 40px; line-height: 1.15; }
h2 { font-size: 28px; line-height: 1.25; }
h3 { font-size: 20px; line-height: 1.35; }
p, li { font-size: 16px; color: var(--color-ink); }
small { color: var(--color-muted); font-size: 12px; }

/* ===== Global Layout Helpers (Flex-only) ===== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

/* MANDATORY SPACING AND ALIGNMENT PATTERNS */
.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 ===== */
header { position: relative; z-index: 50; background: var(--color-white); box-shadow: var(--shadow-sm); }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; padding: 16px 0; }
.brand img { height: 42px; width: auto; }

.main-nav { display: none; align-items: center; gap: 16px; }
.main-nav a { color: var(--color-ink); padding: 10px 12px; border-radius: 10px; transition: background-color .2s ease, color .2s ease, transform .2s ease; }
.main-nav a[aria-current="page"] { color: var(--color-primary); font-weight: bold; }
.main-nav a:hover { background: var(--color-accent); }

.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--color-primary); color: #fff; box-shadow: var(--shadow-sm); transition: transform .2s ease, background-color .2s ease; }
.mobile-menu-toggle:hover { transform: translateY(-1px); background: #0A367F; }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed; inset: 0; background: rgba(18,32,51,0.72);
  display: flex; justify-content: flex-end; align-items: stretch;
  transform: translateX(100%); transition: transform .35s ease; z-index: 1000;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu > nav.mobile-nav {
  background: var(--color-white); width: 84%; max-width: 360px; padding: 24px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-lg);
}
.mobile-nav a { padding: 14px 12px; border-radius: 12px; color: var(--color-ink); background: #fff; box-shadow: var(--shadow-sm); }
.mobile-nav a:hover { background: var(--color-accent); }
.mobile-menu-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; background: var(--color-coral); color: #fff; box-shadow: var(--shadow-sm); }

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

/* ===== Hero ===== */
.hero { position: relative; background: var(--color-white); }
.hero .content-wrapper { padding: 32px 0 24px; }
.hero h1 { color: var(--color-primary); }
.hero p { color: var(--color-muted); max-width: 800px; }

/* Creative decorative shapes (purely decorative, no content) */
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none; opacity: 0.12;
}
.hero::before { width: 180px; height: 180px; background: var(--color-sky); border-radius: 36% 64% 45% 55% / 50% 45% 55% 50%; top: -40px; left: -30px; }
.hero::after { width: 220px; height: 220px; background: var(--color-coral); border-radius: 50%; bottom: -60px; right: -40px; }
.hero .container, .hero .content-wrapper, .hero * { position: relative; z-index: 1; }

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

/* Trust badges */
.trust-badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.trust-badges .text-section { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--color-accent); border-radius: 999px; color: var(--color-ink); box-shadow: var(--shadow-sm); }
.trust-badges img { width: 18px; height: 18px; }

/* ===== Buttons ===== */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; border-radius: 14px; font-weight: bold; transition: transform .15s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease; box-shadow: var(--shadow-sm); }
.button.primary { background: var(--color-primary); color: #fff; }
.button.primary:hover { background: #0A367F; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.button.secondary { background: #fff; color: var(--color-primary); border: 2px solid var(--color-primary); }
.button.secondary:hover { background: var(--color-primary); color: #fff; transform: translateY(-2px); }
.button:active { transform: translateY(0); }

/* ===== Sections & Cards ===== */
section { margin-bottom: 60px; padding: 32px 0; }

/* Flexible grids (flex-only) */
.feature-grid, .service-cards, .case-cards { display: flex; flex-wrap: wrap; gap: 20px; }

/* Text-card style with creative accents */
.text-section {
  background: #fff; padding: 18px 18px 18px 18px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border-left: 6px solid var(--color-primary);
  min-width: 260px; flex: 1 1 280px;
}
/* Creative alternating accents */
.feature-grid .text-section:nth-child(2n) { border-left-color: var(--color-coral); }
.feature-grid .text-section:nth-child(3n) { border-left-color: var(--color-sky); }
.service-cards .text-section:nth-child(2n) { border-left-color: var(--color-violet); }
.case-cards .text-section:nth-child(2n) { border-left-color: var(--color-amber); }

/* Ordered/Unordered lists inside content */
.content-wrapper > ul, .content-wrapper > ol, .text-section > ul, .text-section > ol {
  display: flex; flex-direction: column; gap: 8px; margin: 8px 0 8px 24px; color: var(--color-ink);
}

/* ===== Testimonials (high contrast on light bg) ===== */
.testimonial-card {
  background: #fff; border: 1px solid #E1E7EE; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  color: var(--color-ink);
}
.testimonial-card p { margin: 0; }
.testimonial-card strong { color: var(--color-primary); }

/* ===== Footer ===== */
footer { background: #0A2E6E; color: #E9F0FA; padding: 28px 0; margin-top: 40px; }
footer .content-wrapper { flex-direction: column; gap: 16px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-nav a { color: #E9F0FA; padding: 6px 10px; border-radius: 8px; transition: background-color .2s ease; }
.footer-nav a:hover { background: rgba(255,255,255,0.1); }
footer .text-section { background: transparent; border-left: none; box-shadow: none; color: #E9F0FA; padding: 0; }
footer .text-section p { color: #fff; }

/* ===== Links ===== */
a { color: var(--color-secondary); text-decoration: underline; text-underline-offset: 2px; transition: color .2s ease; }
a:hover { color: var(--color-primary); }

/* ===== Utility: content blocks never overlap ===== */
.content-wrapper > * { margin: 0; } /* spacing via gap */

/* ===== Responsive Rules ===== */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: flex-start; }
}
@media (min-width: 769px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  h3 { font-size: 22px; }
}
@media (min-width: 992px) {
  .hero .content-wrapper { flex-direction: column; }
}

/* ===== Micro-interactions & Artistic Touches ===== */
@keyframes floaty {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}
.hero .button.primary { animation: floaty 4s ease-in-out infinite; }

/* ===== Tables (fallback if any appear) ===== */
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid #E1E7EE; padding: 10px; text-align: left; }
th { background: #F0F4FA; }

/* ===== Forms (general styles if used later) ===== */
input, select, textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid #CCD6E0; background: #fff; color: var(--color-ink); transition: border-color .2s ease, box-shadow .2s ease; }
input:focus, select:focus, textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(11,61,145,0.15); outline: none; }
label { font-weight: bold; display: block; margin-bottom: 8px; }

/* ===== Accessibility: aria-current & focus ===== */
nav a[aria-current="page"] { position: relative; }
nav a[aria-current="page"]::after {
  content: ""; display: block; width: 100%; height: 3px; background: var(--color-secondary); border-radius: 3px; margin-top: 4px;
}

/* ===== Cookie Consent Banner ===== */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200; background: #FFFFFF;
  border-top: 3px solid var(--color-primary); box-shadow: 0 -8px 24px rgba(0,0,0,0.1);
  transform: translateY(100%); transition: transform .35s ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-inner { display: flex; flex-direction: column; gap: 14px; padding: 16px; max-width: 1100px; margin: 0 auto; }
.cookie-banner .cookie-text { color: var(--color-ink); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .button { padding: 10px 14px; border-radius: 12px; }
.cookie-accept { background: var(--color-secondary); color: #fff; }
.cookie-accept:hover { background: #255E5B; }
.cookie-reject { background: #fff; color: var(--color-secondary); border: 2px solid var(--color-secondary); }
.cookie-reject:hover { background: var(--color-accent); }
.cookie-settings { background: var(--color-amber); color: #1E1E1E; }
.cookie-settings:hover { background: #E6A400; }

/* Cookie Modal */
.cookie-overlay { position: fixed; inset: 0; background: rgba(18,32,51,0.65); display: none; align-items: center; justify-content: center; z-index: 1300; }
.cookie-overlay.open { display: flex; }
.cookie-modal {
  background: #fff; width: 92%; max-width: 640px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 16px; padding: 20px; transform: translateY(20px); transition: transform .25s ease;
}
.cookie-overlay.open .cookie-modal { transform: translateY(0); }
.cookie-modal h3 { margin-bottom: 4px; color: var(--color-primary); }
.cookie-list { display: flex; flex-direction: column; gap: 12px; }
.cookie-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; background: var(--color-accent); border-radius: 12px; }
.cookie-item .label { font-weight: bold; }
.cookie-item .note { color: var(--color-muted); font-size: 14px; }

/* Simple toggle style (class-based) */
.toggle { position: relative; width: 48px; height: 28px; background: #CBD6E2; border-radius: 999px; transition: background-color .2s ease; }
.toggle.on { background: var(--color-secondary); }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: #fff; border-radius: 50%; transition: left .2s ease; box-shadow: var(--shadow-sm); }
.toggle.on::after { left: 23px; }

.cookie-modal .cookie-actions { justify-content: flex-end; }

/* ===== Additional Utility Classes (not breaking any layout) ===== */
.center { display: flex; align-items: center; justify-content: center; }
.hidden { display: none !important; }

/* ===== Page-specific Tweaks ===== */
/* Headline separators for clarity */
.content-wrapper > h2 { position: relative; padding-top: 8px; }
.content-wrapper > h2::before {
  content: ""; display: block; width: 56px; height: 6px; border-radius: 6px; background: var(--color-coral);
  margin-bottom: 10px;
}

/* Make certain info rows pill-like */
.text-section p img { display: inline-block; width: 18px; height: 18px; margin-right: 8px; vertical-align: middle; }

/* Ensure adequate spacing between cards and sections */
.feature-grid > *, .service-cards > *, .case-cards > * { margin: 0; }

/* ===== Print-friendly minimal adjustments ===== */
@media print {
  .mobile-menu-toggle, .mobile-menu, .cookie-banner, .cookie-overlay { display: none !important; }
  a { text-decoration: underline; }
  header, footer { box-shadow: none; }
}
