/* ==========================================================================
   Consolidated Insurance Brokers — Shared Stylesheet
   ========================================================================== */

:root {
  --navy: #0411ad;       /* brand royal blue, from new logo wordmark */
  --navy-deep: #0a1160;  /* darker navy for footer/topbar/hero overlays */
  --red: #9c0204;        /* brand crimson, from new logo crescent/diamond */
  --red-light: #ff8f93;  /* light rose — same red family, used as an accent on dark navy backgrounds where deep red would lack contrast */
  --sky: var(--red);      /* legacy variable name, repurposed to the new accent color */
  --sky-pale: #eef1f8;    /* neutral pale tint (kept out of the red family so large soft backgrounds stay calm) */
  --sky-mid: #e3ced0;
  --paper: #ffffff;
  --paper-alt: #f6fafc;
  --ink: #142530;
  --ink-soft: #55697a;
  --ink-faint: #8398a6;
  --line: #e0eaf0;
  --gold: #b6862c; /* used sparingly, for the "customer promise" ribbon */
  --radius: 6px;
  --radius-lg: 14px;
  --shadow-sm: 0 2px 10px rgba(4, 17, 173, 0.07);
  --shadow-md: 0 10px 30px rgba(4, 17, 173, 0.12);
  --shadow-lg: 0 20px 60px rgba(4, 17, 173, 0.18);
  --maxw: 1240px;
  --header-h: 92px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  color: var(--navy-deep);
  line-height: 1.15;
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--sky);
  border-radius: 2px;
}
.section { padding: 88px 0; }
.section--alt { background: var(--paper-alt); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
h2 { font-size: clamp(1.7rem, 2.4vw, 2.4rem); }
h3 { font-size: 1.35rem; }
.lede { font-size: 1.1rem; color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #c0141a; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn-outline { border-color: rgba(255,255,255,0.6); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-outline-navy { border-color: var(--navy); color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: #fff; }
.btn-ghost { color: var(--navy); font-weight: 700; }
.btn-ghost .ring-arrow { transition: transform 0.2s ease; }
.btn-ghost:hover .ring-arrow { transform: translateX(4px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; }

/* ---------- Ring motif (signature element) ---------- */
.ring-badge {
  position: relative;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ring-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring-badge .ring-num { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.15rem; color: var(--navy); z-index: 1; }
.ring-arrow { display: inline-flex; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar {
  background: var(--navy-deep);
  color: #dcebf5;
  font-size: 0.8rem;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.topbar a { color: #dcebf5; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar-links { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.topbar-links span { opacity: 0.75; }

.navbar { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; min-width: 0; }
.brand img { height: 44px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 1; justify-content: flex-end; }
.main-nav > ul { display: flex; align-items: center; gap: 0; }
.main-nav > ul > li { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 5px;
  padding: 14px 11px;
  font-weight: 600; font-size: 0.85rem; color: var(--navy-deep);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-link:hover, .nav-link.active { color: var(--navy); background: var(--sky-pale); }
.nav-link .chev { transition: transform 0.2s ease; flex-shrink: 0; }
.has-mega:hover .chev, .has-mega.open .chev { transform: rotate(180deg); }
.mobile-nav-head, .mobile-nav-foot, .nav-close { display: none; }

/* Mega menu */
.mega {
  position: absolute; left: 50%; top: calc(100% + 10px);
  transform: translate(-50%, 8px);
  width: min(920px, 88vw);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  padding: 32px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 50;
}
.has-mega:hover .mega, .has-mega.open .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.mega-col-title { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sky); font-weight: 700; margin-bottom: 14px; display: block; }
.mega-col ul li a {
  display: block; padding: 7px 0; font-size: 0.92rem; color: var(--ink); font-weight: 500;
  border-bottom: 1px solid transparent;
}
.mega-col ul li a:hover { color: var(--navy); padding-left: 4px; }
.mega-foot { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.mega-foot p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; }

/* Services mega (single column list, wider) */
.mega-services .mega-grid { grid-template-columns: repeat(2, 1fr); }

.mobile-toggle { display: none; background: none; border: none; padding: 8px; flex-shrink: 0; }
.mobile-toggle .bar { display: block; width: 24px; height: 2px; background: var(--navy-deep); margin: 5px 0; transition: transform .2s ease, opacity .2s ease; }

/* ---------- Hero Slider ---------- */
.hero-slider { position: relative; height: 640px; overflow: hidden; }
.slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 1s ease;
  background-size: cover; background-position: center;
}
.slide.is-active { opacity: 1; visibility: visible; z-index: 2; }
.slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(4,17,173,0.92) 0%, rgba(4,17,173,0.66) 45%, rgba(4,17,173,0.28) 100%);
}
.slide-content {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
  height: 100%; display: flex; flex-direction: column; justify-content: center;
  max-width: 620px;
}
.slide-content .eyebrow { color: var(--red-light); }
.slide-content h1 { color: #fff; font-size: clamp(2rem, 4vw, 3.1rem); margin-bottom: 18px; }
.slide-content p { color: #dfeefa; font-size: 1.08rem; max-width: 520px; }
.slider-nav { position: absolute; z-index: 5; bottom: 34px; left: 0; right: 0; }
.slider-nav .container { display: flex; align-items: center; justify-content: space-between; }
.slider-dots { display: flex; gap: 10px; }
.slider-dot { width: 34px; height: 4px; background: rgba(255,255,255,0.35); border: none; border-radius: 2px; transition: background 0.2s ease; }
.slider-dot.is-active { background: var(--red-light); }
.slider-arrows { display: flex; gap: 10px; }
.slider-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.08); color: #fff; display: flex; align-items: center; justify-content: center; transition: background 0.2s ease; }
.slider-arrow:hover { background: rgba(255,255,255,0.22); }

/* ---------- Page Hero (interior pages) ---------- */
.page-hero {
  position: relative; padding: 120px 0 70px; color: #fff;
  background: linear-gradient(120deg, rgba(4,17,173,0.93), rgba(10,17,96,0.88)), center/cover no-repeat;
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 3.4vw, 2.8rem); }
.page-hero .lede { color: #dcebf5; max-width: 640px; }
.breadcrumb { display: flex; gap: 8px; font-size: 0.85rem; color: var(--red-light); margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;}
.breadcrumb a { color: #cfe6f5; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Cards / Grids ---------- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card-img { aspect-ratio: 4/3; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-img img { transform: scale(1.06); }
.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { margin-bottom: 10px; font-size: 1.15rem; }
.card-body p { color: var(--ink-soft); font-size: 0.95rem; flex: 1; }
.card-link { margin-top: 12px; font-weight: 700; color: var(--navy); font-size: 0.92rem; display: inline-flex; align-items: center; gap: 6px; }
.card-link .ring-arrow { transition: transform 0.2s ease; }
.card:hover .card-link .ring-arrow { transform: translateX(4px); }

.pill { display: inline-block; padding: 5px 14px; border-radius: 20px; background: var(--sky-pale); color: var(--navy); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

/* Category chip on product/service cards */
.card .pill { margin: 18px 24px 0; align-self: flex-start; }

/* ---------- Split feature blocks ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }
.framed-image { position: relative; }
.framed-image::before {
  content: "";
  position: absolute; top: -18px; left: -18px;
  width: 90px; height: 90px;
  border: 2px solid var(--sky);
  border-radius: 50%;
  z-index: -1;
}

/* ---------- Value / Why choose icons ---------- */
.value-item { display: flex; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.value-item:last-child { border-bottom: none; }
.value-item h3 { margin-bottom: 6px; font-size: 1.08rem; }
.value-item p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }
.section--navy .value-item { border-bottom-color: rgba(255,255,255,0.15); }
.section--navy .value-item p { color: #dbeaf5; }
.section--navy .ring-badge .ring-num { color: #fff; }
.section--navy .ring-badge circle:nth-child(1) { stroke: var(--red-light); }
.section--navy .ring-badge circle:nth-child(2) { stroke: rgba(255,255,255,0.3); }
.section--navy .eyebrow { color: var(--red-light); }
.section--navy .eyebrow::before { background: var(--red-light); }

/* ---------- Milestones (ring stats — signature element) ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; text-align: center; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.stat .ring-badge { width: 108px; height: 108px; }
.stat .ring-badge .ring-num { font-size: 1.5rem; }
.stat-label { font-size: 0.88rem; color: #cfe3f0; max-width: 140px; }

/* ---------- Process steps ---------- */
.process-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.process-step { text-align: left; }
.process-step .ring-badge { margin-bottom: 16px; }
.process-step h3 { font-size: 1rem; margin-bottom: 8px; }
.process-step p { font-size: 0.88rem; color: var(--ink-soft); }

/* ---------- Detail page content blocks (products/services) ---------- */
.detail-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 56px; align-items: start; }
.detail-main h2 { margin-top: 44px; }
.detail-main h2:first-child { margin-top: 0; }
.check-list li { position: relative; padding: 8px 0 8px 30px; font-size: 0.96rem; border-bottom: 1px dashed var(--line); }
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 13px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--sky);
}
.check-list li::after {
  content: ""; position: absolute; left: 4px; top: 17px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--navy);
}
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-list li { padding: 8px 16px; background: var(--sky-pale); color: var(--navy-deep); border-radius: 20px; font-size: 0.86rem; font-weight: 600; }

.promise-box {
  background: var(--navy); color: #fff; border-radius: var(--radius-lg);
  padding: 32px; margin-top: 44px; position: relative; overflow: hidden;
}
.promise-box::before {
  content: ""; position: absolute; top: -40px; right: -40px; width: 140px; height: 140px;
  border: 2px solid rgba(255,255,255,0.18); border-radius: 50%;
}
.promise-box .eyebrow { color: var(--red-light); }
.promise-box p { font-family: 'Fraunces', serif; font-size: 1.15rem; font-style: italic; margin: 0; position: relative; z-index: 1; }

.sidebar { position: sticky; top: calc(var(--header-h) + 40px); display: flex; flex-direction: column; gap: 20px; }
.side-card { background: var(--paper-alt); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.side-card h3 { font-size: 1.05rem; margin-bottom: 14px; }
.side-card ul li { padding: 6px 0; font-size: 0.9rem; color: var(--ink-soft); }
.side-card .btn { width: 100%; justify-content: center; margin-top: 8px; }
.side-contact { background: var(--navy); color: #fff; }
.side-contact h3 { color: #fff; }
.side-contact a { display: block; margin: 6px 0; color: #cfe6f5; font-weight: 600; }
.side-contact a:hover { color: #fff; }

.related-strip { margin-top: 24px; }
.related-strip h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin-bottom: 14px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.86rem; font-weight: 600; color: var(--navy-deep); }
.field input, .field textarea, .field select {
  padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 0.95rem; background: #fff; color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--sky); box-shadow: 0 0 0 4px var(--sky-pale); outline: none; }
.field textarea { resize: vertical; min-height: 120px; }
.checkbox-group { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.checkbox-group label { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; font-weight: 500; color: var(--ink); }
.checkbox-group input { width: 17px; height: 17px; accent-color: var(--navy); }
.form-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 44px; border: 1px solid var(--line); }
.form-section-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sky); font-weight: 700; margin: 28px 0 14px; }
.form-section-title:first-child { margin-top: 0; }
.file-drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--ink-soft); font-size: 0.9rem; }
.form-note { font-size: 0.85rem; color: var(--ink-faint); margin-top: 18px; }

/* ---------- Contact info blocks ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
.info-list li { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.info-list li:last-child { border-bottom: none; }
.info-list .ring-badge { width: 48px; height: 48px; }
.info-list .ring-badge .ring-num { font-size: 0; }
.info-list h4 { margin: 0 0 4px; font-size: 1rem; }
.info-list p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.info-list a { color: var(--navy); font-weight: 600; }
.map-frame { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); aspect-ratio: 16/11; }

/* ---------- FAQ Accordion ---------- */
.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-item:first-child { border-top: 1px solid var(--line); }
.accordion-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  background: none; border: none; padding: 22px 0; text-align: left;
  font-family: 'Fraunces', serif; font-size: 1.08rem; font-weight: 600; color: var(--navy-deep);
}
.accordion-q .plus { flex-shrink: 0; width: 26px; height: 26px; position: relative; }
.accordion-q .plus::before, .accordion-q .plus::after { content: ""; position: absolute; background: var(--navy); border-radius: 2px; transition: transform 0.25s ease; }
.accordion-q .plus::before { top: 50%; left: 0; width: 100%; height: 2px; margin-top: -1px; }
.accordion-q .plus::after { left: 50%; top: 0; width: 2px; height: 100%; margin-left: -1px; }
.accordion-item.open .plus::after { transform: rotate(90deg); opacity: 0; }
.accordion-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.accordion-a-inner { padding-bottom: 24px; color: var(--ink-soft); max-width: 760px; }
.accordion-item.open .accordion-a { max-height: 500px; }

/* ---------- Legal pages ---------- */
.legal-body h2 { margin-top: 40px; font-size: 1.3rem; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body ul { list-style: disc; padding-left: 22px; margin-bottom: 1em; }
.legal-body ul li { margin-bottom: 6px; color: var(--ink-soft); }
.legal-meta { color: var(--ink-faint); font-size: 0.88rem; margin-bottom: 40px; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--navy); color: #fff; border-radius: var(--radius-lg);
  padding: 56px; display: flex; justify-content: space-between; align-items: center; gap: 40px;
  position: relative; overflow: hidden;
}
.cta-banner::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px;
  border: 2px solid rgba(255,255,255,0.15); border-radius: 50%;
}
.cta-banner h2 { color: #fff; margin-bottom: 8px; }
.cta-banner p { color: #cfe3f0; margin: 0; }
.cta-banner .btn-row { margin-top: 0; flex-shrink: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #cfe0ec; padding: 72px 0 0; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.1fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-brand img { height: 34px; }
.footer-brand span { font-family: 'Fraunces', serif; font-weight: 600; color: #fff; font-size: 1rem; }
.site-footer p { color: #9db7c7; font-size: 0.9rem; }
.site-footer h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #b8cddb; font-size: 0.92rem; transition: color 0.2s ease; }
.footer-links a:hover { color: #fff; }
.footer-social { display: flex; gap: 12px; margin-top: 18px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; transition: background 0.2s ease, border-color 0.2s ease; }
.footer-social a:hover { background: var(--sky); border-color: var(--sky); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 26px 0; flex-wrap: wrap; font-size: 0.85rem; color: #83a0b3; }
.footer-bottom .legal-links { display: flex; gap: 20px; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.center-col { max-width: 760px; margin: 0 auto; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .process-grid { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .footer-top { grid-template-columns: 1fr 1fr; row-gap: 40px; }
}

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split, .detail-layout, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse { direction: ltr; }
  .sidebar { position: static; }
  .cta-banner { flex-direction: column; text-align: center; }
}

@media (max-width: 860px) {
  .topbar .topbar-links.desktop-only, .topbar-links span.desktop-only { display: none; }

  .main-nav {
    position: fixed; inset: 0; z-index: 1000;
    height: 100vh; height: 100dvh; width: 100vw;
    flex: none;
    background: #fff;
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    -webkit-overflow-scrolling: touch;
  }
  .main-nav.open { transform: translateX(0); }
  .mobile-nav-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--line); flex-shrink: 0;
  }
  .mobile-nav-title { font-family: 'Fraunces', serif; font-weight: 600; color: var(--navy-deep); font-size: 1.1rem; }
  .nav-close {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--sky-pale);
    color: var(--navy-deep); font-size: 1.5rem; line-height: 1; flex-shrink: 0;
  }
  .main-nav > ul {
    flex: 1 1 auto; min-height: 0; overflow-y: auto;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 24px;
  }
  .main-nav > ul > li { border-bottom: 1px solid var(--line); }
  .nav-link { padding: 18px 4px; justify-content: space-between; white-space: normal; font-size: 0.98rem; }
  .mobile-nav-foot { display: block; padding: 20px 24px; border-top: 1px solid var(--line); flex-shrink: 0; }
  .mobile-nav-foot .btn { width: 100%; justify-content: center; }
  .mega {
    position: static; transform: none; width: auto; box-shadow: none; border: none;
    padding: 0 4px 20px; max-height: 0; overflow: hidden; opacity: 1; visibility: visible;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }
  .has-mega.open .mega { max-height: 2000px; transform: none; }
  .mega-grid { grid-template-columns: 1fr; gap: 22px; }
  .mega-services .mega-grid { grid-template-columns: 1fr; }
  .mobile-toggle { display: block; }
  .navbar { gap: 10px; }
  .brand img { height: 36px; }

  /* --- Hero slider: rebuilt for small/medium screens ---
     The nav controls move out of the absolute overlay into a normal-flow
     bar below the image, so they can never collide with the slide's own
     buttons; the slider itself uses a generous min-height (not a clipping
     fixed height) sized to comfortably fit the longest slide's text. */
  .hero-wrap { display: flex; flex-direction: column; }
  .hero-slider { height: auto; min-height: 480px; order: 1; }
  .slide-content { max-width: 100%; padding: 40px 20px 32px; }
  .slide-content .eyebrow { margin-bottom: 10px; font-size: 0.7rem; }
  .slide-content h1 { font-size: 1.7rem; line-height: 1.25; margin-bottom: 12px; }
  .slide-content p { font-size: 0.96rem; max-width: 100%; }
  .slide-content .btn-row { margin-top: 18px; gap: 10px; }
  .slide-content .btn-row .btn { flex: 1 1 auto; justify-content: center; padding: 12px 16px; font-size: 0.88rem; }

  .slider-nav {
    order: 2;
    position: static;
    background: var(--navy-deep);
    padding: 16px 0;
  }
  .slider-nav .container { justify-content: center; gap: 18px; }
  .slider-dots { order: 1; }
  .slider-arrows { order: 2; }
}

@media (max-width: 420px) {
  .brand img { height: 30px; }
  .topbar .container { font-size: 0.72rem; }
}

@media (max-width: 640px) {
  .section { padding: 60px 0; }
  h2 { font-size: 1.6rem; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .checkbox-group { grid-template-columns: 1fr; }
  .cta-banner { padding: 36px 24px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; padding-bottom: 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .slide-content h1 { font-size: 1.5rem; }
}

@media (max-width: 400px) {
  .hero-slider { min-height: 500px; }
  .slide-content h1 { font-size: 1.35rem; }
}
