:root {
  --bg: #F0F8FF;
  --panel: #9dace1;
  --panel2: #d8def3;
  --text: #00004d;
  --textwhite: #ffffff;
  --muted: #242d42;
  --brand: #191970;
  --brand2: #0961aa;
  --accent: #990033;
  --link: #064579;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .15);
  --maxw: 1200px;

  /* ─────────────────────────────────────────────
     FLUID TYPOGRAPHY  —  clamp(min, fluid, max)
     Sizes scale smoothly with viewport width.
     No media-query font overrides needed.
  ───────────────────────────────────────────── */

  /* Brand header — ceiling of the entire site */
  --fs-brand: clamp(1.3rem,  4vw,   2.5rem);

  /* Page & section headings */
  --fs-h1:    clamp(1rem, 1.5vw,  1.5rem);
  --fs-h2:    clamp(1.15rem, 2.8vw,  1.6rem);
  --fs-h3:    clamp(1rem,    2.2vw,  1.25rem);
  --fs-h4:    clamp(0.9rem,  1.8vw,  1.05rem);
  --fs-h5:    clamp(0.82rem, 1.5vw,  0.95rem);

  /* Body & UI text */
  --fs-body:  clamp(0.85rem, 1.4vw,  0.95rem);
  --fs-sm:    clamp(0.78rem, 1.2vw,  0.875rem);
  --fs-xs:    clamp(0.7rem,  1vw,    0.8rem);

  --lh-heading: 1.25;
  --lh-body:    1.7;

  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semi:   600;
  --fw-bold:   700;
}

*,
*:before,
*:after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
  font-size: 16px;
}

/* ===== STICKY FOOTER ===== */
body {
  margin: 0;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main,
.main-content {
  flex: 1 0 auto;
}

/* ===== BASE TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  line-height: var(--lh-heading);
  color: var(--brand);
  font-weight: var(--fw-bold);
}

h1 { font-size: var(--fs-h1); font-weight: var(--fw-bold); }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-bold); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-semi); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-semi); }
h5 { font-size: var(--fs-h5); font-weight: var(--fw-medium); }
h6 { font-size: var(--fs-xs); font-weight: var(--fw-medium); text-transform: uppercase; letter-spacing: .06em; }

p {
  margin: 0 0 1rem;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--muted);
}

p:last-child { margin-bottom: 0; }

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--brand2);
}

ul, ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

li {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--muted);
  margin-bottom: .25rem;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== UTILITY TEXT SIZES ===== */
.text-sm    { font-size: var(--fs-sm) !important; }
.text-xs    { font-size: var(--fs-xs) !important; }
.text-body  { font-size: var(--fs-body) !important; }
.text-muted { color: var(--muted); }
.text-brand { color: var(--brand); }
.text-accent{ color: var(--accent); }

/* ===== SECTION LABELS ===== */
.section-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  display: block;
  margin-bottom: .35rem;
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--brand);
  margin-bottom: .5rem;
  line-height: var(--lh-heading);
}

.section-desc {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: var(--lh-body);
  max-width: 640px;
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.small {
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* ===== TOPBAR ===== */
.topbar {
  background: #F0F8FF !important;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  color: #00004d;
}

.topbar .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .35rem 0;
  flex-wrap: wrap;
  gap: 8px;
}

.toplinks {
  display: flex;
  gap: .85rem;
  flex-wrap: wrap;
  align-items: center;
}

.toplinks a {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--brand);
  white-space: nowrap;
}

.toplinks a:hover {
  color: var(--brand2);
  text-decoration: underline;
}

/* ===== NAV ===== */
.nav {
  display: flex;
  gap: 1rem;
  position: relative;
  flex-wrap: wrap;
  align-items: center;
}

.menu {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu li {
  list-style: none;
  position: relative;
}

.menu li a {
  padding: .45rem .75rem;
  display: block;
  color: #00004d !important;
  border-radius: 6px;
  transition: background .2s;
  white-space: nowrap;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

.menu li:hover > a {
  background: rgba(0, 0, 77, .06);
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--panel2);
  border-radius: 10px;
  padding: .4rem;
  min-width: 190px;
  box-shadow: var(--shadow);
  z-index: 1000;
}

.dropdown li a {
  padding: .4rem .85rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-normal);
  border-radius: 6px;
  display: block;
  white-space: nowrap;
}

.dropdown li a:hover {
  background: rgba(0, 0, 77, .08);
}

.menu li:hover .dropdown {
  display: block;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--brand);
  border-radius: 6px;
  cursor: pointer;
  padding: .38rem .6rem;
  font-size: 1.1rem;
  color: var(--brand);
  line-height: 1;
  transition: background .2s;
}

.menu-toggle:hover {
  background: rgba(25, 25, 112, .08);
}

/* ===== HERO ===== */
.hero {
  padding: 2.75rem 0;
}

.herogrid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 2rem;
  align-items: center;
}

.hero h2 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  color: var(--brand);
  margin-bottom: .6rem;
  line-height: 1.2;
}

.hero p {
  font-size: var(--fs-body);
  color: var(--muted);
  line-height: var(--lh-body);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem 1.1rem;
  border-radius: 8px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background .2s, box-shadow .2s, transform .15s;
  line-height: 1.4;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--brand);
  color: #fff !important;
}

.btn-primary:hover {
  background: #10105a;
  box-shadow: 0 4px 14px rgba(25, 25, 112, .3);
}

.btn-secondary {
  background: var(--panel2);
  color: var(--brand) !important;
  border: 1px solid rgba(25, 25, 112, .18);
}

.btn-secondary:hover {
  background: var(--panel);
  box-shadow: 0 4px 14px rgba(25, 25, 112, .15);
}

.btn-outline {
  background: transparent;
  color: var(--brand) !important;
  border: 1.5px solid var(--brand);
}

.btn-outline:hover {
  background: var(--brand);
  color: #fff !important;
}

.btn-sm {
  padding: .35rem .75rem;
  font-size: var(--fs-xs);
}

.btn-icon {
  font-size: .95em;
  line-height: 1;
}

/* ===== CARDS ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(#ffffff);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .07);
  transition: transform .2s, box-shadow .2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
}

.card h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semi);
  color: var(--brand);
  margin-bottom: .4rem;
}

.card h4 {
  font-size: var(--fs-h4);
  font-weight: var(--fw-semi);
  color: var(--brand);
  margin-bottom: .35rem;
}

.card p {
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--muted);
}

/* ===== TABLES ===== */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  color: var(--text);
}

thead th {
  background: var(--brand);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .6rem .85rem;
  text-align: left;
}

tbody td {
  padding: .55rem .85rem;
  border-bottom: 1px solid rgba(25, 25, 112, .1);
  font-size: var(--fs-sm);
  vertical-align: top;
}

tbody tr:nth-child(even) {
  background: rgba(216, 222, 243, .35);
}

tbody tr:hover {
  background: rgba(157, 172, 225, .25);
}

/* ===== BADGES / TAGS ===== */
.badge {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  padding: .18rem .55rem;
  border-radius: 20px;
  line-height: 1.5;
}

.badge-primary {
  background: var(--brand);
  color: #fff;
}

.badge-secondary {
  background: var(--panel2);
  color: var(--brand);
  border: 1px solid rgba(25, 25, 112, .2);
}

.badge-accent {
  background: #fde8ed;
  color: var(--accent);
  border: 1px solid rgba(153, 0, 51, .15);
}

/* ===== SECTION & GRID ===== */
section {
  padding: 2.5rem 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* ===== DIVIDER ===== */
.divider {
  border: none;
  border-top: 1px solid rgba(25, 25, 112, .12);
  margin: 2rem 0;
}

/* ===== GALLERY ===== */
.gallery .slider {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: var(--panel2);
}

.gallery .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
}

.gallery .slide.active {
  opacity: 1;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ===== SOCIAL ===== */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.social-icons img {
  width: 22px;
  height: 22px;
  transition: transform .2s, opacity .2s;
}

.social-icons a:hover img {
  transform: scale(1.15);
  opacity: .85;
}

/* ===== UTILITY ===== */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-left    { text-align: left; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.pt-1 { padding-top: 1rem; }
.pb-1 { padding-bottom: 1rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.w-100 { width: 100%; }

/* ===== TABLET — 980px ===== */
@media (max-width: 980px) {

  .logo {
    width: 120px;
    height: 60px;
  }

  .herogrid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .grid-3 {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .footgrid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .menu li a {
    padding: .4rem .6rem;
  }
}

/* ===== MOBILE — 640px ===== */
@media (max-width: 640px) {

  /* --- Topbar --- */
  .topbar .row {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: .45rem 0;
  }

  .toplinks { gap: .5rem; }

  /* --- Brand / Header --- */
  .brandrow {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: .55rem 0;
  }

  .brand {
    gap: .55rem;
    width: 100%;
  }

  .logo {
    width: 80px;
    height: 44px;
  }

  /* --- Nav / Menu toggle --- */
  .nav {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .menu-toggle {
    display: block;
    width: 100%;
    text-align: left;
    margin-bottom: .2rem;
    font-size: 1rem;
  }

  .menu {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    background: #f5f7ff;
    border-radius: 8px;
    padding: .45rem;
    border: 1px solid rgba(0, 0, 77, .08);
  }

  .menu.open { display: flex; }

  .menu li { width: 100%; }

  .menu li a {
    width: 100%;
    padding: .5rem .75rem;
    border-radius: 6px;
  }

  /* Mobile dropdown — stays inline */
  .dropdown {
    position: static;
    display: none;
    box-shadow: none;
    border-radius: 6px;
    padding: .2rem .45rem;
    margin-top: .2rem;
    background: rgba(0, 0, 77, .05);
    min-width: unset;
  }

  .menu li.open .dropdown { display: block; }

  /* --- Hero --- */
  .hero { padding: 1.5rem 0; }

  .herogrid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  /* --- Cards --- */
  .cards {
    grid-template-columns: 1fr;
    gap: .85rem;
  }

  .card { padding: 1rem; }

  /* --- Grids --- */
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: .85rem;
  }

  /* --- Gallery --- */
  .gallery .slider { aspect-ratio: 4 / 3; }

  /* --- Buttons --- */
  .btn { padding: .42rem .9rem; }

  /* --- Tables --- */
  thead th,
  tbody td {
    padding: .45rem .6rem;
  }

  /* --- Section spacing --- */
  section { padding: 1.5rem 0; }

  /* --- Social --- */
  .social-icons { gap: 10px; }

  .social-icons img {
    width: 18px;
    height: 18px;
  }
}

/* ===== EXTRA SMALL — 380px ===== */
@media (max-width: 380px) {

  .container { padding: 0 .75rem; }

  .logo {
    width: 65px;
    height: 38px;
  }

  .card { padding: .8rem; }

  .btn { padding: .38rem .75rem; }
}