/* =====================
   Reset & Base Normalize
   ===================== */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0 0 16px 20px; padding: 0; }
p { margin: 0 0 16px; }
h1, h2, h3, h4 { margin: 0 0 12px; }
a { color: inherit; text-decoration-color: rgba(0,0,0,0.25); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

/* =====================
   Brand Tokens
   ===================== */
:root {
  --primary: #0D2B45;
  --secondary: #2E7D6D;
  --accent: #F4F7FB;
  /* Vibrant energetic supporting accents */
  --electric-pink: #FF1F8E;
  --electric-lime: #B4FF00;
  --electric-cyan: #00E5FF;
  --ink: #0A1E33;
  --text: #0D2B45; /* dark text on light backgrounds */
  --muted: #5B6C84;
  --white: #FFFFFF;
  --shadow-color: 20, 40, 80; /* for rgba shadows */
}

/* Fallbacks in case CSS variables are not supported by a very old UA */
body { background: #FFFFFF; color: #0D2B45; }

/* =====================
   Typography
   ===================== */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  color: var(--text);
}

h1, h2, h3, h4 {
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0.2px;
}

h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 24px; line-height: 1.25; margin-top: 8px; }
h3 { font-size: 20px; line-height: 1.3; }
h4 { font-size: 18px; }
small { font-size: 14px; color: var(--muted); }
strong { font-weight: 800; }

@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 22px; }
}
@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  h3 { font-size: 24px; }
}

/* Text selection with energetic accent */
::selection { background: var(--electric-cyan); color: #002137; }

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

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

/* Apply comfortable spacing to sections (element) */
section {
  display: flex;
  flex-direction: column;
  padding: 40px 20px;
  margin-bottom: 60px;
  position: relative;
}

/* =====================
   MANDATORY SPACING PATTERNS (exact)
   ===================== */
.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: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 8px 24px -12px rgba(var(--shadow-color), 0.25);
  border-bottom: 3px solid var(--electric-cyan);
}

header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.logo img { height: 36px; }

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

.main-nav a {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}
.main-nav a:hover { background: var(--accent); color: var(--secondary); transform: translateY(-1px); }

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

/* Mobile burger */
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 2px solid var(--primary);
  background: var(--white);
  color: var(--primary);
  font-size: 22px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
.mobile-menu-toggle:hover { background: var(--electric-cyan); color: #062034; box-shadow: 0 8px 18px -8px rgba(0,229,255,0.6); transform: translateY(-1px); }
.mobile-menu-toggle:focus-visible { outline: 3px solid var(--electric-pink); outline-offset: 2px; }

/* Mobile Menu Overlay */
.mobile-menu {
  display: flex; /* flex container required */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  position: fixed;
  inset: 0;
  background: var(--primary);
  color: var(--white);
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
  z-index: 1200;
}
.mobile-menu.open { transform: translateX(0); opacity: 1; pointer-events: auto; }

.mobile-menu-close {
  position: absolute; /* UI control, allowed */
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 42px; height: 42px;
  background: transparent;
  color: var(--white);
  border: 2px solid var(--electric-cyan);
  border-radius: 12px;
  font-size: 20px;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.2s ease;
}
.mobile-menu-close:hover { background: rgba(255,255,255,0.1); transform: rotate(10deg); }

.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.12);
  transition: background-color 0.25s ease, transform 0.2s ease;
}
.mobile-nav a:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }

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

/* =====================
   Buttons
   ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 2px solid transparent;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease, border-color 0.25s ease;
}

.btn.primary {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 10px 24px -10px rgba(var(--shadow-color), 0.5);
}
.btn.primary:hover {
  background: #103656;
  box-shadow: 0 16px 30px -10px rgba(13,43,69,0.55), 0 0 0 4px rgba(0,229,255,0.15);
  transform: translateY(-2px);
}

.btn.secondary {
  background: var(--white);
  color: var(--secondary);
  border-color: var(--secondary);
}
.btn.secondary:hover {
  background: var(--secondary);
  color: #FFFFFF;
  box-shadow: 0 12px 24px -12px rgba(46,125,109,0.6);
  transform: translateY(-2px);
}

.btn:focus-visible { outline: 3px solid var(--electric-pink); outline-offset: 2px; }

/* =====================
   Hero Section (vibrant energetic)
   ===================== */
.hero {
  background: var(--accent);
  overflow: hidden;
  border-top: 4px solid var(--electric-lime);
  border-bottom: 4px solid var(--electric-cyan);
}
.hero .container { gap: 0; }
.hero .content-wrapper { max-width: 900px; gap: 14px; }
.hero::before, .hero::after {
  content: "";
  position: absolute; /* decorative only */
  inset: auto auto -40px -40px;
  width: 160px; height: 160px;
  background: var(--electric-pink);
  opacity: 0.08;
  transform: rotate(25deg);
  pointer-events: none;
}
.hero::after {
  inset: 20px -50px auto auto;
  background: var(--electric-cyan);
  opacity: 0.10;
  transform: rotate(-18deg);
}
.hero p { color: var(--ink); }
.hero ul { margin-left: 20px; }

/* =====================
   Text + Image Sections
   ===================== */
.text-image-section { /* mandatory already set above */
  background: #FFFFFF;
  border: 1px solid #E6ECF3;
  border-left: 6px solid var(--electric-cyan);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 24px -14px rgba(var(--shadow-color), 0.25);
}
.text-image-section h3 { margin-bottom: 6px; }

@media (min-width: 768px) {
  .text-image-section { padding: 22px; }
}

/* =====================
   Lists & Content Blocks
   ===================== */
ol li, ul li { margin-bottom: 8px; }

.content-grid > * {
  flex: 1 1 280px;
}

/* =====================
   Cards
   ===================== */
.card {
  background: #FFFFFF;
  border: 1px solid #E6ECF3;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 12px 24px -16px rgba(var(--shadow-color), 0.25);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -14px rgba(var(--shadow-color), 0.35); }

/* =====================
   Testimonials (light background, dark text)
   ===================== */
.testimonial-card {
  background: var(--accent);
  color: var(--text);
  border: 1px solid #DDE7F2;
  border-left: 6px solid var(--electric-lime);
  border-radius: 16px;
  box-shadow: 0 10px 24px -14px rgba(var(--shadow-color), 0.25);
}
.testimonial-card p { margin: 0; }
.testimonial-card p + p { color: var(--muted); }

/* =====================
   Footer
   ===================== */
footer {
  background: var(--primary);
  color: #FFFFFF;
  padding-top: 24px;
}
footer a { color: #FFFFFF; text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,0.3); }
footer a:hover { border-bottom-color: #FFFFFF; }
footer .content-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
footer .content-wrapper > * { flex: 1 1 240px; }

/* =====================
   Cookie Consent Banner & Modal
   ===================== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--primary);
  color: #FFFFFF;
  padding: 16px;
  transform: translateY(100%);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  z-index: 1100;
  box-shadow: 0 -10px 30px -10px rgba(var(--shadow-color), 0.5);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-row { display: flex; flex-direction: column; gap: 12px; }
.cookie-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cookie-actions .btn { padding: 10px 14px; border-radius: 12px; }
.cookie-actions .accept-all { background: var(--electric-lime); color: #0E2611; border-color: var(--electric-lime); }
.cookie-actions .accept-all:hover { box-shadow: 0 10px 24px -12px rgba(180,255,0,0.6); transform: translateY(-1px); }
.cookie-actions .reject-all { background: #ffffff; color: var(--primary); border-color: var(--electric-pink); }
.cookie-actions .reject-all:hover { background: var(--electric-pink); color: #fff; }
.cookie-actions .settings { background: transparent; color: #fff; border-color: var(--electric-cyan); }
.cookie-actions .settings:hover { background: rgba(255,255,255,0.1); }

.cookie-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 20, 35, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1300;
}
.cookie-modal.open { opacity: 1; pointer-events: auto; }
.cookie-modal .modal-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #FFFFFF;
  color: var(--text);
  border-radius: 16px;
  border: 2px solid var(--electric-cyan);
  padding: 18px;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 24px 48px -18px rgba(var(--shadow-color), 0.45);
}
.cookie-modal .modal-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* Simple toggle style (for analytics/marketing switches) */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.toggle .switch {
  position: relative; /* decorative */
  display: inline-flex;
  align-items: center;
  width: 48px; height: 28px;
  background: #E6ECF3;
  border-radius: 999px;
  border: 2px solid #D0D9E5;
  transition: background-color 0.2s ease;
}
.toggle .switch::after {
  content: "";
  position: absolute;
  left: 2px; top: 2px;
  width: 22px; height: 22px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}
.toggle input:checked + .switch { background: var(--electric-lime); border-color: var(--electric-lime); }
.toggle input:checked + .switch::after { transform: translateX(20px); }

/* =====================
   Forms (generic)
   ===================== */
input[type="text"], input[type="email"], textarea, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid #DCE6F2;
  background: #FFFFFF;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--electric-cyan); box-shadow: 0 0 0 3px rgba(0,229,255,0.2); }

/* =====================
   Utilities
   ===================== */
.hidden { display: none !important; }
.center { display: flex; align-items: center; justify-content: center; }

/* =====================
   Responsive Adjustments
   ===================== */
@media (min-width: 768px) {
  .content-wrapper { gap: 20px; }
  .container { padding-left: 20px; padding-right: 20px; }
}

@media (min-width: 992px) {
  .container { flex-direction: column; }
}

/* =====================
   Page-specific polishing
   ===================== */
/* Ordered steps look energetic with a left accent */
ol { counter-reset: step; list-style: none; margin-left: 0; }
ol > li { position: relative; padding-left: 44px; margin-bottom: 12px; }
ol > li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute; /* decorative */
  left: 0; top: 0;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--electric-cyan);
  color: #052033;
  font-weight: 800;
  border-radius: 8px;
}

/* Links with high-energy underline on hover */
a { transition: color 0.2s ease; }
a:hover { color: var(--secondary); }

/* =====================
   Ensure adequate spacing between blocks
   ===================== */
main .container + .container, .content-wrapper > * + * { margin-top: 0; }

/* =====================
   Prevent overlapping & set z-index layers
   ===================== */
.hero, header, .mobile-menu, .cookie-banner, .cookie-modal { isolation: isolate; }

/* =====================
   Accessibility Focus Styles
   ===================== */
:focus-visible { outline: 3px solid var(--electric-cyan); outline-offset: 2px; border-radius: 8px; }

/* =====================
   Additional Flex Layout Helpers used on pages
   ===================== */
.card-container > .card { flex: 1 1 280px; }
.content-grid { align-items: stretch; }

/* =====================
   High-energy separators for sections (optional decorative)
   ===================== */
section .section-title-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
section .section-title-bar::before {
  content: "";
  width: 14px; height: 14px;
  background: var(--electric-pink);
  border-radius: 4px;
}

/* =====================
   Print basics
   ===================== */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
}
