@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap');

:root {
  /* Brand / Layout */
  --radius: 8px;
  --gap: 1.75rem;
  --shadow-soft: 0 2px 10px rgba(0,0,0,.08);
  --shadow: 0 4px 16px rgba(0,0,0,.15);

  /* Color Palette (P666) - LIGHT BG baseline as required */
  --color-bg: #EFF6FF;            /* very light blue background (LAYOUT) */
  --color-bg-alt: #E6F0FF;
  --color-bg-card: #FFFFFF;        /* white cards per spec */
  --color-primary: #1D4ED8;        /* deep blue primary */

  --color-text: #1E3A5F;           /* body text on light bg (WCAG AA) */
  --color-text-muted: #64748B;     /* muted text on light bg */

  --color-text-on-primary: #FFFFFF;  /* contrast on primary (primary is dark) */

  --color-border: #DDE6F3;
  --color-shadow: rgba(0,0,0,.15);

  /* Typography scale (mandatory) */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.75rem;
  --font-size-hero: 3.5rem;
  --line-height-tight: 1.2;
  --line-height-base: 1.6;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

ul, ol { margin: 0; padding: 0; list-style: none; }

/* Layout utilities & base containers */
.container {
  width: 100%;
  margin: 0 auto; /* required at EVERY breakpoint */
  padding: 0 1rem;
}

.section {
  padding: 2rem 0;
}

.section-title {
  font-size: var(--font-size-2xl);
  margin: 0 0 0.75rem 0;
  color: var(--color-text);
}

/* Header & branding (sticky header) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 64px;
  background: var(--color-bg);
  overflow: visible;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem; /* mobile alignment: vertically centered */
}

.site-logo {
  display:flex;
  align-items:center;
  flex-shrink:0;
  overflow:hidden;
  max-height: 52px;
  text-decoration:none;
}

.site-logo img {
  height: 44px;       /* mandatory: prevents overflow; keeps within header */
  width: auto;
  max-width: 160px;   /* mandatory: prevents logo from growing too wide */
  object-fit: contain;
  display: block;
}

/* Hamburger / Nav toggle (mobile only) */
.nav-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

/* Hamburger label (visible on mobile only) - must be white bars + styled container */
.nav-toggle-label {
  display: none; /* shown only on mobile via media query */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
  padding: 0.4rem 0.6rem;
  z-index: 200;
  border-radius: 6px;
  background: rgba(0,0,0,0.45);
  border: 1.5px solid rgba(255,255,255,0.7);
}

.nav-toggle-label span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff; /* ALWAYS white bars */
  border-radius: 2px;
  transition: 0.2s ease;
}

.site-nav {
  display: none; /* mobile hidden by default; shown via checkbox */
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 500;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}

.nav-list {
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  flex-wrap: nowrap;
}

.nav-item {}

.nav-link {
  font-size: var(--font-size-xs); /* mobile default per requirement */
  padding: 0.75rem 1rem;
  display: block;
  color: var(--color-text);
  transition: color 0.2s ease, background 0.2s ease;
  border-radius: 4px;
  white-space: nowrap;
}

/* Dropdown nav items */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
  user-select: none;
  padding: 0.75rem 1rem;
  display: inline-block;
  color: var(--color-text);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  z-index: 9999;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  white-space: nowrap;
}

.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown:focus-within > .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu .nav-link {
  display: block;
  padding: 0.5rem 1.25rem;
  width: 100%;
  border-bottom: none;
  color: var(--color-text);
}
.nav-dropdown-menu .nav-link:hover {
  background: var(--color-bg-alt);
}

/* Mobile dropdown adjustments */
@media (max-width: 767px) {
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    display: none;
  }
  .nav-dropdown:focus-within > .nav-dropdown-menu {
    display: block;
  }
  /* vertical nav on mobile */
  .nav-list {
    flex-direction: column;
    width: 100%;
  }
  .nav-link {
    font-size: var(--font-size-xs);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
  }
  .site-nav {
    display: none; /* overridden by checkbox when active */
  }
}

/* Mobile-first default: show hamburger; hide nav until checked */
@media (max-width: 767px) {
  .nav-toggle-label { display: flex; }
  .site-nav { display: none; }
}
@media (min-width: 768px) {
  /* Tablet+ desktop: always visible nav, horizontal layout */
  .nav-toggle-label { display: none; }
  .site-nav { display: flex; align-items: center; position: static; width: auto; background: transparent; border-top: none; box-shadow: none; }
  .nav-list { flex-direction: row; gap: 1.5rem; justify-content: flex-end; padding: 0; margin: 0; }
  .nav-link { font-size: var(--font-size-sm); padding: 0.4rem 0.75rem; border: none; }
  .nav-dropdown-menu { position: absolute; }
  /* Ensure container centering at tablet/desktop */
  .container { max-width: 960px; }
}
@media (min-width: 1024px) {
  .container { max-width: 1200px; padding-left: 2rem; padding-right: 2rem; }
  /* Desktop hero sizing overrides if desired (handled below) */
}

/* Checkbox control: show mobile nav when checked */
.nav-toggle-input:checked ~ .site-nav {
  display: block;
  background: var(--color-bg);
}
@media (min-width: 768px) {
  /* Keep nav visible on tablet/desktop regardless of toggle */
  .site-nav { display: flex !important; }
}

/* Hero section (centered, brand gradient) */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
  min-height: 50vh;
  color: #fff; /* ensure readability on dark gradient */
  background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 40%, #93C5FD 100%);
}
.hero h1 {
  font-size: var(--font-size-2xl);
  margin: 0;
  line-height: 1.05;
}
.hero p {
  margin: 0.75rem 0 0;
  font-size: var(--font-size-sm);
  color: #F8FBFF;
  opacity: 0.95;
}
@media (min-width: 768px) {
  .hero h1 { font-size: var(--font-size-3xl); }
}
@media (min-width: 1280px) {
  .hero h1 { font-size: var(--font-size-hero); }
  .section { padding: 4rem 0; }
}
@media (min-width: 768px) {
  /* Tablet sizing adjustments for hero text scaling */
  .hero { padding: 3rem 1rem; }
}
@media (min-width: 1280px) {
  .hero { min-height: 70vh; }
}

/* Card grid and cards (outlined accent with hover fill) */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  width: 100%;
}
.card {
  display: flex;
  flex-direction: column; /* mandatory */
  background: transparent; /* outlined accent: transparent background */
  border: 2px solid var(--color-primary);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: var(--shadow-soft);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(0,0,0,.16);
  background: rgba(255,255,255,0.92); /* fills on hover */
}
.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block; /* mandatory rule */
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.card-content {
  padding: 1rem;
}
.card h3 {
  font-size: var(--font-size-lg);
  margin: 0 0 0.25rem 0;
  color: var(--color-text);
}
.card p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: var(--line-height-base);
}
@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.125rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-align: center;
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  border: none;
}
.btn-primary:hover { filter: brightness(0.92); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn:hover { transform: translateY(-1px); }

/* Site footer */
.site-footer {
  background: #f6fbff;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  color: var(--color-text-muted);
}
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; padding: 0 1rem; }
}

/* FAQ Accordion (CSS-only) */
.faq-section {
  padding: 2rem 0;
}
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--color-bg-card);
  overflow: hidden;
  transition: 0.2s ease;
}
.faq-item[open] {
  border-color: var(--color-primary);
  box-shadow: 0 2px 12px var(--color-shadow);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-md);
  list-style: none;
  user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] > .faq-question::after {
  content: "−";
}
.faq-answer {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--color-border);
}
.faq-answer p { margin: 0.75rem 0 0; color: var(--color-text-muted); line-height: var(--line-height-base); }

/* Forms */
input, textarea, select {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  color: var(--color-text);
  font-size: var(--font-size-base);
  width: 100%;
}
label { display: block; font-size: var(--font-size-xs); margin-bottom: 0.25rem; color: var(--color-text); }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem; border-bottom: 1px solid var(--color-border); text-align: left; }
th { font-weight: var(--font-weight-bold); }

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.hidden { display: none !important; }

/* Readability helpers for contrasts on light bg */
@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #1E3A5F;
    --color-text-muted: #64748B;
  }
}