/* Mohsen Insurance Agency — site styles */

:root {
  --ink: #16233a;
  --teal: #0b4ea2;
  --teal-dark: #0a2c58;
  --teal-light: #e8f0fb;
  --orange: #e8720c;
  --orange-dark: #c25e08;
  --gray: #5b6472;
  --line: #dde2ec;
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(16, 25, 44, 0.1);
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

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

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1320px;
  margin: 0 auto;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--teal-dark);
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand .brand-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.brand small {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--teal-dark);
  text-transform: uppercase;
  margin-top: 2px;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}

nav.main-nav a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--teal-dark);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  border-color: var(--teal);
}

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 8px;
  min-width: 180px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  border-bottom: none;
}
.nav-dropdown-menu a:hover { background: var(--teal-light); }

.nav-cta-quote {
  background: var(--orange);
  color: #fff !important;
  padding: 9px 16px !important;
  border-radius: 8px;
  border-bottom: none !important;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta-quote:hover { background: var(--orange-dark); }

.nav-cta-signin {
  background: #fff;
  color: var(--teal-dark) !important;
  border: 2px solid var(--teal) !important;
  padding: 7px 14px !important;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta-signin:hover { background: var(--teal-light); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--teal-dark);
  margin: 5px 0;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--teal-light);
  padding: 72px 0 56px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.15;
  color: var(--teal-dark);
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--gray);
  max-width: 46ch;
  margin: 0 0 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--teal-dark); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--teal);
  color: var(--teal-dark);
}
.btn-outline:hover { background: var(--teal); color: #fff; }

.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art svg { width: 100%; max-width: 380px; }

/* ---------- Sections ---------- */

section { padding: 64px 0; }
section.alt { background: var(--bg-alt); }

h2.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--teal-dark);
  text-align: center;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

p.section-sub {
  text-align: center;
  color: var(--gray);
  max-width: 60ch;
  margin: 0 auto 44px;
}

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

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.card .icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card .icon-badge svg { width: 30px; height: 30px; color: var(--teal); }

.card h3 {
  font-size: 1.1rem;
  color: var(--teal-dark);
  margin: 0 0 10px;
}
.card p {
  color: var(--gray);
  font-size: 0.95rem;
  margin: 0;
}

/* About / mission */

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}
.about-art {
  background: var(--teal-light);
  border-radius: var(--radius);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-art svg { width: 100%; max-width: 260px; }

.states-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.states-list span {
  background: var(--teal-light);
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 999px;
}

/* CTA banner */

.cta-banner {
  background: var(--teal);
  color: #fff;
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: #fff; }
.cta-banner .btn { background: #fff; color: var(--teal); }
.cta-banner .btn:hover { background: var(--teal-light); }

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}
.info-list .icon-badge {
  width: 42px; height: 42px; flex-shrink: 0;
}
.info-list .icon-badge svg { width: 22px; height: 22px; }
.info-list strong { display: block; color: var(--teal-dark); font-size: 0.95rem; }
.info-list span, .info-list a { color: var(--gray); font-size: 0.95rem; }

table.hours { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.hours td { padding: 6px 0; border-bottom: 1px solid var(--line); }
table.hours td:first-child { font-weight: 700; color: var(--teal-dark); width: 40%; }

/* Forms */

form.card-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--teal-dark);
  margin-bottom: 6px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg-alt);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-note {
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 14px;
}
.form-success {
  display: none;
  background: #e9f6ee;
  border: 1px solid #b9e3c6;
  color: #24693c;
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-weight: 600;
}

/* Quote type toggle */

.quote-type-toggle {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.quote-type-toggle input { display: none; }
.quote-type-toggle label {
  flex: 1;
  min-width: 140px;
  text-align: center;
  padding: 14px 12px;
  border: 2px solid var(--line);
  border-radius: 10px;
  font-weight: 700;
  color: var(--teal-dark);
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.quote-type-toggle input:checked + label {
  border-color: var(--teal);
  background: var(--teal-light);
}
.conditional-field { display: none; }
.conditional-field.visible { display: block; }

/* Footer */

footer.site-footer {
  background: var(--teal);
  color: #dbe8fa;
  padding: 48px 0 24px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-grid h4 {
  color: #fff;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.footer-grid a, .footer-grid p { color: #b7c6c6; font-size: 0.9rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid li a:hover { color: #fff; }
.footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: #8fa3a3;
}

/* Logo image */
.brand img.brand-logo {
  height: 44px;
  width: auto;
  display: block;
}
.hero-art img.hero-logo {
  width: 100%;
  max-width: 340px;
}
.about-art img.about-logo {
  width: 100%;
  max-width: 220px;
}

/* Tooltip */
.field-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.field-label-row label { margin-bottom: 0; }
.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--teal-light);
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 700;
  font-style: italic;
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  font-family: Georgia, serif;
  line-height: 1;
}
.info-tip .tip-bubble {
  display: none;
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  background: var(--teal-dark);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 20;
}
.info-tip .tip-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--teal-dark);
}
.info-tip:hover .tip-bubble,
.info-tip:focus .tip-bubble,
.info-tip.tip-open .tip-bubble { display: block; }

/* Checkbox grid (cargo / coverages) */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 14px;
  margin-top: 4px;
}
.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.checkbox-grid input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
  flex-shrink: 0;
}
.field-error {
  display: none;
  color: #b3261e;
  font-size: 0.78rem;
  margin-top: 6px;
  font-weight: 600;
}
.field-error.show { display: block; }

/* Map embed */
.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.map-embed iframe { width: 100%; height: 320px; border: 0; display: block; }

/* USA states map (real geography, injected at runtime) */
.usa-map-wrap { text-align: center; }
.usa-map-frame {
  max-width: 720px;
  margin: 0 auto;
  animation: mapFadeIn 0.6s ease;
}
.usa-map-target svg {
  width: 100%;
  height: auto;
  display: block;
}
.usa-map-target svg path,
.usa-map-target svg circle {
  fill: #dde2ec;
  stroke: #fff;
  stroke-width: 1;
  transition: fill 0.2s ease, transform 0.2s ease;
}
.usa-map-target svg path.licensed,
.usa-map-target svg circle.licensed {
  fill: var(--teal);
}
.usa-map-frame svg path:hover,
.usa-map-frame svg circle:hover {
  fill: var(--teal-dark);
  cursor: pointer;
}
.usa-map-fallback {
  padding: 20px;
  color: var(--gray);
  font-size: 0.9rem;
}
.usa-map-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--gray);
}
.usa-map-legend span { display: inline-flex; align-items: center; gap: 8px; }
.usa-map-legend i {
  width: 14px; height: 14px; border-radius: 3px; display: inline-block;
}
.usa-map-legend i.on { background: var(--teal); }
.usa-map-legend i.off { background: #dde2ec; }
.usa-map-caption {
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 10px;
}
@keyframes mapFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero highway animation */
.hero-highway {
  width: 100%;
  max-width: 380px;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #cfe0ee 0%, #eef3f8 55%, #d8dde3 55%, #d8dde3 100%);
  position: relative;
  aspect-ratio: 4 / 3;
}
.hero-highway svg { width: 100%; height: 100%; display: block; }
.hwy-truck { animation: hwyDrive 7s linear infinite; }
.hwy-line { animation: hwyLine 1.1s linear infinite; }
.hwy-cloud1 { animation: hwyCloud 18s linear infinite; }
.hwy-cloud2 { animation: hwyCloud 24s linear infinite; animation-delay: -8s; }
@keyframes hwyDrive {
  0% { transform: translateX(-120px); }
  8%, 92% { transform: translateX(0); }
  100% { transform: translateX(420px); }
}
@keyframes hwyLine {
  from { transform: translateX(0); }
  to { transform: translateX(-60px); }
}
@keyframes hwyCloud {
  from { transform: translateX(-60px); }
  to { transform: translateX(460px); }
}

/* Feature strip */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
.feature-strip .feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 18px;
  text-align: center;
}
.feature-strip .feature .icon-badge {
  margin: 0 auto 12px;
  width: 48px;
  height: 48px;
  border-radius: 11px;
}
.feature-strip .feature .icon-badge svg { width: 26px; height: 26px; }
.feature-strip .feature-visual {
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-strip .feature-visual svg { width: 100%; height: 100%; }
.feature-strip .feature-map {
  width: 100%;
  height: 64px;
  margin-bottom: 12px;
  overflow: hidden;
}
.feature-strip .feature-map svg { width: 100%; height: 100%; }
.feature-strip .feature-map svg path,
.feature-strip .feature-map svg circle { stroke-width: 0.5; }
.feature-strip .feature h4 {
  color: var(--teal-dark);
  font-size: 1rem;
  margin: 0 0 6px;
}
.feature-strip .feature p {
  color: var(--gray);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
}

/* Multi-select dropdown (cargo / coverages) */
.msdd { position: relative; }
.msdd-trigger {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-alt);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.msdd-trigger .msdd-caret { transition: transform 0.15s ease; color: var(--teal); flex-shrink: 0; }
.msdd.open .msdd-trigger .msdd-caret { transform: rotate(180deg); }
.msdd-trigger .msdd-label { color: var(--gray); }
.msdd-trigger .msdd-label.has-value { color: var(--ink); font-weight: 600; }
.msdd-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 14px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 30;
}
.msdd.open .msdd-panel { display: block; }
.msdd .checkbox-grid { grid-template-columns: repeat(2, 1fr); }

/* File upload field */
.file-field {
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  padding: 16px;
  background: var(--bg-alt);
}
.file-field label.file-label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--teal-dark);
  display: block;
  margin-bottom: 6px;
}
.file-field p.file-hint {
  font-size: 0.78rem;
  color: var(--gray);
  margin: 4px 0 0;
}
input[type="file"] {
  width: 100%;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--gray);
}
input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
  background: var(--teal);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  margin-right: 12px;
  transition: background 0.15s ease;
}
input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
  background: var(--teal-dark);
}
.required-mark { color: var(--orange); }

/* Responsive */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 240px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-strip { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  nav.main-nav { display: none; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .cta-banner { padding: 32px 20px; }
  section { padding: 44px 0; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .msdd .checkbox-grid { grid-template-columns: 1fr; }
}
