/* Sansbury Insurance — design system
   Brand colors confirmed from live site via computed styles:
   navy #003d75 (primary/CTA), accent blue #0476b0 (heading accent), body gray #262626 */

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

:root {
  --navy: #003d75;
  --navy-dark: #002a52;
  --blue: #0476b0;
  --text: #262626;
  --text-light: #545454;
  --bg: #ffffff;
  --bg-alt: #efeded;
  --bg-dark: #0b1f33;
  --border: #e1e5ea;
  --success: #1e7e34;
  --danger: #b3261e;

  --font-heading: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --radius-pill: 140px;
  --radius-card: 14px;
  --radius-input: 8px;
  --shadow-card: 0 4px 20px rgba(0, 20, 50, 0.08);
  --shadow-lift: 0 10px 30px rgba(0, 20, 50, 0.14);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.accent { color: var(--blue); }
ul.check-list { list-style: none; padding: 0; margin: 0 0 1.5em; }
ul.check-list li {
  position: relative;
  padding-left: 1.75em;
  margin-bottom: 0.6em;
}
ul.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--bg-dark); color: #fff; }
.section--dark h2, .section--dark h3, .section--dark p { color: #fff; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue);
  display: block;
  margin-bottom: 0.5em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); box-shadow: var(--shadow-lift); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border-color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--navy); }
.btn-sm { padding: 9px 20px; font-size: 0.9rem; }
.btn-block { width: 100%; justify-content: center; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}
.logo { justify-self: start; min-width: 0; }
.logo img { height: 46px; width: auto; }
.main-nav { justify-self: center; min-width: 0; position: relative; }
.main-nav > ul { list-style: none; display: flex; align-items: center; margin: 0; padding: 0; gap: 2px; }
.main-nav > ul > li { position: static; }
.main-nav > ul > li > a {
  display: block;
  padding: 10px 13px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 999px;
  white-space: nowrap;
}
.main-nav > ul > li > a:hover { color: var(--navy); text-decoration: none; background: var(--bg-alt); }

/* "For Clients" is a different kind of destination (existing clients, not marketing
   nav) — give it a faint permanent shade so it reads as slightly set apart. */
.main-nav > ul > li > a.nav-client-link {
  background: var(--bg-alt);
  border: 1px solid var(--border);
}
.main-nav > ul > li > a.nav-client-link:hover {
  background: #fff;
  border-color: var(--blue);
}

/* Dropdown mega-menu: icon + label "bubble" grid, matching the brand's original style */
.main-nav > ul > li.has-submenu { padding-bottom: 14px; margin-bottom: -14px; }
.main-nav .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lift);
  padding: 20px;
  list-style: none;
  margin: 14px 0 0;
  max-height: 75vh;
  overflow-y: auto;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 4px 12px;
  width: max-content;
  max-width: min(900px, 90vw);
}
.main-nav li.has-submenu:hover > .submenu,
.main-nav li.has-submenu:focus-within > .submenu { display: grid; }

/* "For Clients" is a short, purpose-specific list — show it as one vertical
   column rather than the multi-column bubble grid used for product menus.
   It's also anchored to its own trigger (not the whole nav bar) since a
   narrow list centered under the full nav drifts away from the link. */
.main-nav > ul > li.has-submenu-list { position: relative; }
.main-nav .submenu.submenu-list {
  grid-template-columns: 1fr;
  width: 260px;
  max-width: 260px;
  /* This submenu is anchored to its own (already hover-bridged) trigger li
     rather than the whole nav bar, so the li's own bridge padding already
     supplies the visual gap — stacking the usual margin-top on top of that
     doubled it, making this one dropdown look detached from the header. */
  margin-top: 0;
}
.main-nav .submenu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 999px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.25;
}
.main-nav .submenu li a svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--blue);
}
.main-nav .submenu li a:hover { background: #fff; box-shadow: var(--shadow-card); color: var(--navy); text-decoration: none; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 14px; }
.header-phone { font-weight: 700; color: var(--navy); white-space: nowrap; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 1150px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .header-phone { display: none; }
  body.nav-open .main-nav {
    display: block;
    position: fixed;
    inset: 0;
    top: 82px;
    background: #fff;
    padding: 20px;
    overflow-y: auto;
    z-index: 400;
  }
  body.nav-open .main-nav > ul { flex-direction: column; align-items: stretch; }
  body.nav-open .main-nav > ul > li > a { padding: 12px 4px; border-radius: 0; }
  body.nav-open .main-nav .submenu {
    display: flex !important;
    flex-direction: column;
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 8px 14px;
    margin-top: 0;
    max-width: none;
    width: auto;
  }
  body.nav-open .main-nav .submenu li a { padding: 9px 4px; border-radius: 0; }
  body.nav-open .main-nav .submenu li a:hover { background: transparent; box-shadow: none; }
}

/* Content row — alternating photo/text section used on product & industry
   pages, matching the live site's real layout instead of a flat text stack. */
.content-row {
  display: flex;
  align-items: center;
  gap: 48px;
}
.content-row.reverse { flex-direction: row-reverse; }
.content-row-media, .content-row-text { flex: 1 1 0; min-width: 0; }
.content-row-media img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.content-row-text h2 { margin-bottom: 0.5em; }
@media (max-width: 860px) {
  .content-row, .content-row.reverse { flex-direction: column; }
}

/* Hero */
.hero {
  padding: 56px 0 72px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.hero-photos img { border-radius: var(--radius-card); object-fit: cover; height: 100%; }
.hero-photos .tall { grid-row: span 2; height: 100%; }
.hero-photos img.tall { height: 100%; aspect-ratio: 3/4; }
.hero-photos img:not(.tall) { aspect-ratio: 4/3; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .card-grid, .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid, .card-grid.cols-2, .card-grid.cols-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card .card-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt); border-radius: 50%;
  color: var(--navy); margin-bottom: 6px;
}
.card .card-actions { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; padding-top: 10px; }

/* Industry tiles — icon-badge feature cards */
.industry-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px 22px 26px;
  text-decoration: none !important;
  color: var(--text);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.industry-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: transparent;
}
.industry-card .icon-badge {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(4, 118, 176, 0.14), rgba(0, 61, 117, 0.1));
  color: var(--navy);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.industry-card:hover .icon-badge {
  background: var(--navy);
  color: #fff;
  transform: scale(1.06);
}
.industry-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}
.industry-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
}
.industry-card-link svg { transition: transform 0.2s ease; }
.industry-card:hover .industry-card-link svg { transform: translateX(3px); }

.photo-card { border-radius: var(--radius-card); overflow: hidden; position: relative; box-shadow: var(--shadow-card); }
.photo-card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.photo-card figcaption {
  padding: 14px 16px;
  font-weight: 600;
  background: #fff;
}

/* Testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 800px) { .testimonial-grid { grid-template-columns: 1fr; } }
.testimonial {
  background: var(--bg-alt);
  border-radius: var(--radius-card);
  padding: 26px;
}
.testimonial p { font-style: italic; }
.testimonial .stars { color: #f5a623; letter-spacing: 2px; margin-bottom: 8px; }
.testimonial cite { font-style: normal; font-weight: 700; display: block; margin-top: 10px; }

/* Forms */
.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.field { margin-bottom: 20px; }
.field label, .field legend {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.field .required { color: var(--danger); }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(4, 118, 176, 0.15);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .checkbox-grid { grid-template-columns: 1fr; } }
.check-option {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 12px 14px;
  cursor: pointer;
  font-size: 0.95rem;
}
.check-option:has(input:checked) { border-color: var(--blue); background: rgba(4,118,176,0.06); }
.check-option input { width: 18px; height: 18px; accent-color: var(--navy); }
.radio-row { display: flex; gap: 20px; }
.radio-row label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.help-text { font-size: 0.85rem; color: var(--text-light); margin-top: 4px; }
fieldset { border: none; padding: 0; margin: 0; }

/* Quote wizard */
.wizard { max-width: 760px; margin: 0 auto; }
.wizard-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}
.wizard-progress .step-dot {
  flex: 1;
  height: 6px;
  border-radius: 4px;
  background: var(--border);
}
.wizard-progress .step-dot.active { background: var(--blue); }
.wizard-progress .step-dot.done { background: var(--navy); }
.wizard-step-label { font-size: 0.85rem; color: var(--text-light); margin-bottom: 6px; font-weight: 600; }
.wizard-step { display: none; }
.wizard-step.active { display: block; animation: fadein 0.25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: translateY(0);} }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; gap: 12px; }
.wizard-nav .spacer { flex: 1; }

/* Service center */
.service-card { text-align: left; }
.service-card h3 { margin-bottom: 4px; }

/* CTA banner */
.cta-banner {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  border-radius: 24px;
  padding: 56px;
  text-align: center;
}
.cta-banner h2, .cta-banner p { color: #fff; }
.cta-banner .btn-primary { background: #fff; color: var(--navy); }
.cta-banner .btn-primary:hover { background: var(--bg-alt); }

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: #cdd7e3;
  padding: 56px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: 1rem; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #cdd7e3; }
.site-footer a:hover { color: #fff; }
.footer-logo img { height: 44px; margin-bottom: 14px; filter: brightness(0) invert(1); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: #94a3b8;
}
.footer-bottom a { color: #94a3b8; }
.footer-legal-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* Breadcrumb / page header */
.page-header {
  background: var(--bg-alt);
  padding: 48px 0;
  text-align: center;
}
.page-header p { max-width: 640px; margin: 0 auto; color: var(--text-light); }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.gap-sm { gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.inline-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-alt); border-radius: var(--radius-pill);
  padding: 8px 16px; font-weight: 700; font-size: 0.9rem;
}
.form-success {
  display: none;
  background: #eafaf0;
  border: 1px solid #b7e4c7;
  color: var(--success);
  padding: 16px 20px;
  border-radius: var(--radius-input);
  margin-top: 16px;
}
.form-success.visible { display: block; }
.form-error {
  display: none;
  background: #fdecea;
  border: 1px solid #f5c2c0;
  color: var(--danger);
  padding: 14px 18px;
  border-radius: var(--radius-input);
  margin-top: 16px;
  font-size: 0.9rem;
}
.form-error.visible { display: block; }
