/* ----------------------------------
   CSS RESET & BASE NORMALIZATION
---------------------------------- */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
main, menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: baseline;
  font: inherit;
  font-size: 100%;
  box-sizing: border-box;
}
body, html {
  height: 100%;
  width: 100%;
  min-height: 100vh;
  scroll-behavior: smooth;
  background: #E6F0FA linear-gradient(125deg, #E6F0FA 60%, #40A2D8 100%);
}
ul, ol {
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
img {
  max-width: 100%;
  display: block;
  height: auto;
}
button {
  font: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

/* ---------------------
    VARIABLES
---------------------- */
:root {
  --color-primary: #1B365D;
  --color-secondary: #40A2D8;
  --color-accent: #E6F0FA;
  --color-text: #1B365D;
  --color-on-primary: #fff;
  --color-on-secondary: #fff;
  --color-on-accent: #1B365D;
  --shadow-soft: 0 2px 12px 0 rgba(27, 54, 93, 0.07); 
  --shadow-md: 0 6px 24px 0 rgba(27, 54, 93, 0.14);
  --radius-md: 16px;
  --radius-lg: 20px;
  --font-display: 'Montserrat', Arial, Helvetica, sans-serif;
  --font-body: 'Roboto', Arial, Helvetica, sans-serif;
}

/* Font Fallbacks & Imports */
@import url('https://fonts.googleapis.com/css?family=Montserrat:700,600,400&display=swap');
@import url('https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap');

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: #E6F0FA linear-gradient(125deg, #E6F0FA 60%, #40A2D8 100%);
  line-height: 1.6;
  font-size: 16px;
}

/* ---------------------------------
   CONTAINER & LAYOUT SYSTEM - FLEX
---------------------------------- */
.container {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.text-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  margin-bottom: 20px;
  position: relative;
  transition: box-shadow 0.3s;
}
.card:hover,
.card:focus-within {
  box-shadow: var(--shadow-md);
}
.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;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  margin-bottom: 24px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* Extra layout classes (for services page) */
.service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 0 -12px;
}
.service-list .text-section {
  flex: 1 1 250px;
  min-width: 240px;
  background: #fff;
  padding: 24px 20px;
  margin: 12px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.3s, transform 0.2s;
}
.service-list .text-section:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px) scale(1.025);
}

/* ---------------------
   TYPOGRAPHY
---------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.17;
}
h1 {
  font-size: 2.75rem; /* 44px on desktop */
}
h2 {
  font-size: 2rem; /* 32px */
}
h3 {
  font-size: 1.3125rem; /* 21px */
  color: var(--color-secondary);
}
h4, h5, h6 {
  font-size: 1.125rem; /* 18px */
}
.subhead {
  font-size: 1.15rem;
  color: var(--color-secondary);
  font-family: var(--font-display);
  font-weight: 600;
}
p, li, label, input, textarea {
  font-family: var(--font-body);
  font-size: 1rem;
}
strong {
  font-weight: 700;
}

ul, ol {
  padding-left: 1.15em;
  margin-top: 10px;
  margin-bottom: 10px;
  list-style: disc;
}
ul li, ol li {
  margin-bottom: 8px;
  color: #243A5E;
}

label {
  font-weight: 600;
  margin-bottom: 4px;
  display: inline-block;
  color: var(--color-primary);
}
input[type="text"] {
  border: 1px solid #cfe3f7;
  border-radius: var(--radius-md);
  padding: 11px 16px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
  max-width: 400px;
  margin-top: 4px;
}
input[type="text"]:focus {
  border-color: var(--color-secondary);
}

/* CTA Styles */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 34px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  border: none;
  border-radius: 30px;
  background: linear-gradient(92deg, #1B365D 75%, #40A2D8 100%);
  color: #fff;
  box-shadow: var(--shadow-soft);
  transition: background 0.25s, box-shadow 0.25s, transform 0.14s;
  cursor: pointer;
  margin-top: 10px;
  margin-bottom: 10px;
}
.cta.primary {
  background: linear-gradient(92deg, #1B365D 85%, #40A2D8 100%);
  color: #fff;
}
.cta.secondary {
  background: #40A2D8;
  color: #fff;
}
.cta:hover,
.cta:focus {
  box-shadow: var(--shadow-md);
  background: linear-gradient(92deg, #244376 90%, #40A2D8 100%);
  transform: translateY(-2px) scale(1.025);
}

/* -------------------------------
   HEADER, FOOTER, & NAVIGATION
-------------------------------- */
header {
  background: #fff;
  box-shadow: 0 1px 12px 0 rgba(27,54,93,0.07);
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 68px;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 0;
}
header nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}
header nav a {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-primary);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.17s;
}
header nav a:hover,
header nav a:focus {
  background: var(--color-accent);
}
header .cta {
  margin-left: 32px;
  min-width: 180px;
}
header img {
  max-height: 46px;
  width: auto;
  margin-right: 18px;
}

/* Footer styles */
footer {
  background: #1B365D;
  color: #fff;
  padding: 36px 0 0 0;
  margin-top: 48px;
  font-size: 1rem;
}
footer .container {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 36px;
  border-bottom: 1px solid #294c8333;
}
footer img {
  max-width: 48px;
  margin-bottom: 10px;
}
footer nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
footer nav a {
  color: #fff;
  opacity: 0.95;
  transition: color 0.2s;
}
footer nav a:hover,
footer nav a:focus {
  color: var(--color-secondary);
}
footer .text-section {
  color: #E6F0FA;
  font-size: 1rem;
  gap: 6px;
}

/* ------------------------
   HERO, SECTIONS, CARDS
------------------------- */
main > section {
  margin-bottom: 60px;
  padding: 40px 0;
  background: none;
}
main > section:nth-child(odd) {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
main > section .container {
  gap: 0;
}

.card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 24px 20px;
  margin-bottom: 20px;
  transition: box-shadow 0.2s, background 0.18s;
}

/* Card hover for modern look */
.card:hover {
  box-shadow: var(--shadow-md);
}

/* Testimonial Card Style (ensure contrast) */
.testimonial-card {
  background: #fff;
  color: #1B365D;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 12px 0 rgba(27, 54, 93, 0.08);
  margin-bottom: 24px;
  padding: 22px 24px;
  font-size: 1.125rem;
}
.testimonial-card span {
  font-family: var(--font-display);
  font-weight: 500;
  color: #40A2D8;
  font-size: 1rem;
}

/* -----------------------------
   FLEX SPACING/MARGINS/GAPS
------------------------------ */
.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;
}

/* Prevent overlapping */
.card, .testimonial-card, .text-section, .content-wrapper {
  margin-bottom: 20px;
}

/* ----------------------------------------
   MOBILE MENU / HAMBURGER & OVERLAY
---------------------------------------- */
.mobile-menu-toggle {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 1101;
  display: none;
  background: var(--color-secondary);
  color: #fff;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
  background: var(--color-primary);
  color: #fff;
}
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #fff;
  z-index: 1100;
  transform: translateX(-100%);
  transition: transform 0.37s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0px 6px 52px 0 rgba(27, 54, 93, 0.12);
  display: flex;
  flex-direction: column;
  padding-top: 42px;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 2rem;
  color: var(--color-secondary);
  background: #fff;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  border: none;
  transition: background 0.2s, color 0.2s;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus {
  background: var(--color-secondary);
  color: #fff;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: flex-start;
  margin: 56px 0 0 32px;
}
.mobile-nav a {
  font-size: 1.2rem;
  padding: 13px 0;
  width: 100%;
  color: var(--color-primary);
  border-radius: 8px;
  transition: background 0.16s, color 0.2s;
}
.mobile-nav a:hover,
.mobile-nav a:focus {
  background: var(--color-accent);
  color: var(--color-secondary);
}

/* --------------------------------------
   RESPONSIVE (Mobile first approach)
--------------------------------------- */
@media (max-width: 1200px) {
  .container { padding: 0 18px; }
}
@media (max-width: 980px) {
  .container { padding: 0 10px; }
}
@media (max-width: 900px) {
  header .container, footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  header .cta {
    margin-left: 0;
    margin-top: 16px;
  }
}
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.3rem; }
  .container { padding: 0 4vw; }
  main > section, .section {
    padding: 25px 0;
    margin-bottom: 37px;
  }
  .content-wrapper { gap: 26px; }
  .card-container, .service-list, .content-grid {
    flex-direction: column;
    gap: 20px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 25px;
  }
  .testimonial-card { padding: 17px 13px; }
  .mobile-menu-toggle {
    display: flex;
  }
  header nav,
  header .cta {
    display: none;
  }
  footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding-left: 10px;
    padding-bottom: 16px;
  }
}
@media (max-width: 540px) {
  h1 { font-size: 1.375rem; }
  h2 { font-size: 1.12rem; }
  .container { padding: 0 2vw; }
  .testimonial-card { font-size: 1rem; }
  .cta, .cta.primary, .cta.secondary {
    padding: 11px 20px;
    font-size: 1rem;
  }
}

/* ---------------------------
   HOVER, FOCUS & INTERACTIVE
---------------------------- */
a, .cta, button {
  outline: none;
  transition: box-shadow 0.16s, background 0.19s, color 0.19s, transform 0.135s;
}
a:focus, .cta:focus, button:focus {
  box-shadow: 0 0 0 2px var(--color-secondary), 0 2px 12px rgba(27,54,93,0.07);
  z-index: 3;
}

/* Subtle animations */
.card, .testimonial-card, .service-list .text-section {
  transition: box-shadow 0.25s, transform 0.2s;
}
.card:hover, .service-list .text-section:hover, .testimonial-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px) scale(1.02);
}

/* ----------------------------------------
   COOKIE BANNER & COOKIE MODAL
---------------------------------------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1300;
  background: #fff;
  color: var(--color-text);
  box-shadow: 0 -2px 16px rgba(27,54,93,0.15);
  padding: 22px 20px 22px 32px;
  display: flex;
  align-items: flex-start;
  flex-direction: row;
  justify-content: space-between;
  gap: 16px;
  border-radius: 16px 16px 0 0;
  transition: transform 0.35s cubic-bezier(0.675, 0.045, 0.375, 1), opacity 0.17s;
  opacity: 1;
  transform: translateY(0);
}
.cookie-banner.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(60px);
}
.cookie-banner p {
  flex: 1 1 65%;
  font-size: 1rem;
  color: var(--color-text);
  margin-right: 20px;
}
.cookie-banner .cookie-actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
}
.cookie-banner button {
  background: #fff;
  border: 1px solid var(--color-secondary);
  color: var(--color-secondary);
  border-radius: 22px;
  font-size: 1rem;
  padding: 9px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  margin-top: 0;
  transition: background 0.21s, color 0.21s, border 0.21s;
  box-shadow: 0 1px 4px 0 rgba(27,54,93,0.06);
}
.cookie-banner button.accept {
  background: var(--color-secondary);
  color: #fff;
  border: none;
}
.cookie-banner button.accept:hover,
.cookie-banner button.accept:focus {
  background: var(--color-primary);
}
.cookie-banner button.settings:hover,
.cookie-banner button.settings:focus {
  background: var(--color-accent);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

@media (max-width: 650px) {
  .cookie-banner {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
    padding: 22px 7vw 18px 7vw;
  }
  .cookie-banner p { margin-right: 0; }
}

/* Cookie modal overlay */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(27, 54, 93, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.22s;
  animation: fadeInModal 0.21s;
}
@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-modal {
  background: #fff;
  color: var(--color-text);
  max-width: 430px;
  width: 95vw;
  padding: 32px 28px 28px 28px;
  border-radius: 18px;
  box-shadow: 0 12px 32px 0 rgba(27,54,93,0.18);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: modalPopIn .21s cubic-bezier(0.47,1.64,0.41,0.8);
}
@keyframes modalPopIn {
  from { transform: scale(0.96) translateY(48px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.cookie-modal .modal-close {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 1.7rem;
  color: var(--color-secondary);
  background: none;
  border: none;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cookie-modal .modal-close:hover {
  background: var(--color-accent);
  color: var(--color-primary);
}
.cookie-modal h2 { color: var(--color-secondary); font-size: 1.25rem; }
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
}
.cookie-modal .cookie-category label {
  font-size: 1rem;
  font-family: var(--font-body);
}
.cookie-modal .cookie-category input[type="checkbox"] {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  accent-color: var(--color-secondary);
}
.cookie-modal .modal-actions {
  margin-top: 16px;
  display: flex;
  gap: 16px;
  flex-direction: row;
  justify-content: flex-end;
}
.cookie-modal .modal-actions button {
  border-radius: 22px;
  font-size: 1rem;
  padding: 9px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  box-shadow: 0 1px 4px 0 rgba(27,54,93,0.06);
  background: #fff;
  border: 1px solid var(--color-secondary);
  color: var(--color-secondary);
  transition: background 0.21s, color 0.21s, border 0.21s;
}
.cookie-modal .modal-actions button.accept {
  background: var(--color-secondary);
  color: #fff;
  border: none;
}
.cookie-modal .modal-actions button.accept:hover {
  background: var(--color-primary);
}

/* --------------------------------------
   UTILITIES
--------------------------------------- */
.text-center {
  text-align: center;
}
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 32px !important; }
.mt-4 { margin-top: 48px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 32px !important; }

/* Hide visually-only, for accessibility */
.visually-hidden {
  position: absolute !important;
  clip: rect(1px,1px,1px,1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  overflow: hidden;
  white-space: nowrap;
}

/* --------------------------------------
   SPECIAL ELEMENT FIXES/OVERRIDES
--------------------------------------- */
/* For icons in headers/footers */
.header-icon, .footer-icon {
  vertical-align: middle;
  margin-right: 4px;
}

/* Hide mobile menu and overlay by default */
.mobile-menu {
  pointer-events: none;
  opacity: 0;
}
.mobile-menu.open {
  pointer-events: all;
  opacity: 1;
}

/* Hide close modal on desktop cookie modal */
@media (min-width: 769px) {
  .cookie-modal { min-width: 340px; }
}
