/* ==========================================================================
   Farm Bureau Insurance – South Idaho Insurance Agency
   Jimmy John, Licensed Insurance Agent
   ========================================================================== */

:root {
  --fb-red: #da291c;
  --fb-red-dark: #b71f15;
  --fb-black: #1a1a1a;
  --fb-charcoal: #2b2b2b;
  --fb-gray-900: #262626;
  --fb-gray-700: #4d4d4d;
  --fb-gray-500: #767676;
  --fb-gray-300: #b3b3b3;
  --fb-gray-100: #f0f0f0;
  --fb-white: #ffffff;
  --fb-cream: #faf9f7;

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1180px;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.14);
  --transition: 180ms ease;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--fb-gray-900);
  background: var(--fb-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--fb-black);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--fb-gray-700); }

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

.section {
  padding: 72px 0;
}

.section--tight { padding: 48px 0; }

.section--dark {
  background: var(--fb-black);
  color: var(--fb-white);
}

.section--dark h2, .section--dark h3, .section--dark p { color: var(--fb-white); }
.section--dark p { color: rgba(255, 255, 255, 0.78); }

.section--cream { background: var(--fb-cream); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: var(--fb-red);
  margin-bottom: 0.75em;
}

.text-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.92rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--fb-red);
  color: var(--fb-white);
  border-color: var(--fb-red);
}
.btn--primary:hover { background: var(--fb-red-dark); border-color: var(--fb-red-dark); }

.btn--dark {
  background: var(--fb-black);
  color: var(--fb-white);
  border-color: var(--fb-black);
}
.btn--dark:hover { background: #000; }

.btn--outline {
  background: transparent;
  color: var(--fb-black);
  border-color: var(--fb-black);
}
.btn--outline:hover { background: var(--fb-black); color: var(--fb-white); }

.btn--outline-light {
  background: transparent;
  color: var(--fb-white);
  border-color: var(--fb-white);
}
.btn--outline-light:hover { background: var(--fb-white); color: var(--fb-black); }

.btn--block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Header ---------- */
.topbar {
  background: var(--fb-black);
  color: var(--fb-white);
  font-size: 0.82rem;
}
.topbar .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 22px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar a { color: var(--fb-white); opacity: 0.9; }
.topbar a:hover { opacity: 1; color: var(--fb-red); }
.topbar .topbar-item { display: inline-flex; align-items: center; gap: 6px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--fb-white);
  border-bottom: 1px solid var(--fb-gray-100);
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand img.brand-logo { height: 42px; width: auto; }
.brand .brand-div { width: 1px; height: 34px; background: var(--fb-gray-300); }
.brand .brand-agency {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  color: var(--fb-black);
  line-height: 1.2;
}
.brand .brand-agency span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--fb-gray-500);
  font-family: var(--font-body);
  text-transform: uppercase;
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--fb-gray-900);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--fb-red);
  border-color: var(--fb-red);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--fb-black);
  display: block;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--fb-black);
  color: var(--fb-white);
  overflow: hidden;
}
.hero .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.72) 100%);
}
.hero .container {
  position: relative;
  z-index: 2;
  padding-top: 110px;
  padding-bottom: 110px;
}
.hero-inner { max-width: 640px; }
.hero p.lede {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  max-width: 520px;
}

.hero--page {
  padding: 0;
}
.hero--page .container { padding-top: 64px; padding-bottom: 64px; }
.hero--page h1 { margin-bottom: 0.3em; }

/* ---------- Trust strip ---------- */
.trust-strip {
  background: var(--fb-white);
  border-bottom: 1px solid var(--fb-gray-100);
}
.trust-strip .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.trust-strip .trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--fb-gray-700);
}
.trust-strip svg { width: 20px; height: 20px; color: var(--fb-red); flex-shrink: 0; }

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

.card {
  background: var(--fb-white);
  border: 1px solid var(--fb-gray-100);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.card .icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(218, 41, 28, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card .icon-badge svg { width: 26px; height: 26px; color: var(--fb-red); }

.card h3 { margin-bottom: 0.4em; }
.card p { margin-bottom: 0; font-size: 0.95rem; }
.card .card-link {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: var(--fb-red);
  border-bottom: 1px solid var(--fb-red);
}

/* ---------- Two-column split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split img { border-radius: var(--radius); }

.agent-photo-wrap {
  position: relative;
  background: var(--fb-gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.agent-photo-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(218,41,28,0.12), transparent 60%);
}
.agent-photo-wrap img {
  position: relative;
  z-index: 1;
  max-height: 480px;
  width: auto;
  margin: 0 auto;
}

.agent-photo-wrap--portrait {
  align-items: stretch;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-md);
}
.agent-photo-wrap--portrait img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: top center;
  margin: 0;
}

/* ---------- Stars ---------- */
.stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 18px;
}
.stars svg {
  width: 26px;
  height: 26px;
  color: var(--fb-red);
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--fb-red);
  color: var(--fb-white);
}
.cta-banner .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 44px;
  padding-bottom: 44px;
}
.cta-banner h2 { color: var(--fb-white); margin-bottom: 0.2em; }
.cta-banner p { color: rgba(255,255,255,0.9); margin-bottom: 0; }

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--fb-gray-700);
}
.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--fb-gray-300);
  border-radius: var(--radius);
  background: var(--fb-white);
  color: var(--fb-black);
  width: 100%;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--fb-red);
  box-shadow: 0 0 0 3px rgba(218,41,28,0.15);
}
.form-note { font-size: 0.82rem; color: var(--fb-gray-500); margin-top: 10px; }

.form-card {
  background: var(--fb-white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.form-status {
  display: none;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  font-size: 0.92rem;
}
.form-status.is-visible { display: block; }
.form-status.success { background: #e7f6ec; color: #1e6b3a; border: 1px solid #b7e3c4; }
.form-status.error { background: #fdeceb; color: var(--fb-red-dark); border: 1px solid #f6c3bf; }

/* ---------- Info list ---------- */
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--fb-gray-100);
}
.info-list li:last-child { border-bottom: none; }
.info-list .icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(218, 41, 28, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.info-list svg { width: 18px; height: 18px; color: var(--fb-red); }
.info-list .info-label {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--fb-gray-500);
  margin-bottom: 2px;
}
.info-list .info-value { color: var(--fb-black); font-weight: 500; }
.info-list a.info-value:hover { color: var(--fb-red); }

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--fb-gray-100);
  box-shadow: var(--shadow-sm);
}
.map-wrap iframe { width: 100%; height: 340px; border: 0; display: block; }

/* ---------- Checklist ---------- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  color: var(--fb-gray-700);
}
.checklist svg { width: 20px; height: 20px; color: var(--fb-red); flex-shrink: 0; margin-top: 2px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--fb-gray-500);
  letter-spacing: 0.02em;
}
.breadcrumb a { color: var(--fb-gray-500); }
.breadcrumb a:hover { color: var(--fb-red); }
.breadcrumb .sep { margin: 0 6px; }
.breadcrumb .current { color: var(--fb-white); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--fb-black);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand img { height: 40px; margin-bottom: 16px; }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.9rem; max-width: 320px; }
.footer-col h4 {
  color: var(--fb-white);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,0.72); font-size: 0.92rem; }
.footer-col a:hover { color: var(--fb-red); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-top: 22px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ---------- Chatbot widget ---------- */
.chatbot-launcher-wrap {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.chatbot-launcher {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--fb-red);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition);
}
.chatbot-launcher:hover { transform: scale(1.05); background: var(--fb-red-dark); }
.chatbot-launcher svg { width: 78px; height: 78px; }
.chatbot-launcher .chatbot-icon-close { display: none; }
.chatbot-launcher.is-open .chatbot-icon-chat { display: none; }
.chatbot-launcher.is-open .chatbot-icon-close { display: block; }

.chatbot-badge {
  background: var(--fb-black);
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 20px;
  border-radius: 999px;
  border: 2px solid var(--fb-white);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.chatbot-panel {
  position: fixed;
  right: 24px;
  bottom: 240px;
  z-index: 200;
  width: 350px;
  max-width: calc(100vw - 32px);
  max-height: min(540px, calc(100vh - 140px));
  background: var(--fb-white);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.chatbot-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.chatbot-header {
  background: var(--fb-black);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}
.chatbot-header-title strong {
  display: block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.92rem;
}
.chatbot-header-title span {
  display: block;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}
.chatbot-header button.chatbot-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  opacity: 0.8;
}
.chatbot-header button.chatbot-close:hover { opacity: 1; }

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--fb-cream);
}
.chatbot-msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
}
.chatbot-msg.bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--fb-gray-100);
  color: var(--fb-gray-900);
  border-bottom-left-radius: 4px;
}
.chatbot-msg.user {
  align-self: flex-end;
  background: var(--fb-red);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chatbot-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
  background: var(--fb-cream);
  flex-shrink: 0;
}
.chatbot-quick-replies button {
  font-family: var(--font-body);
  font-size: 0.84rem;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--fb-red);
  background: #fff;
  color: var(--fb-red);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.chatbot-quick-replies button:hover { background: var(--fb-red); color: #fff; }

.chatbot-error {
  color: var(--fb-red-dark);
  font-size: 0.78rem;
  padding: 0 16px 8px;
  background: var(--fb-cream);
  flex-shrink: 0;
}

.chatbot-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--fb-gray-100);
  background: #fff;
  flex-shrink: 0;
}
.chatbot-input-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--fb-gray-300);
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: var(--font-body);
}
.chatbot-input-row input:focus { outline: none; border-color: var(--fb-red); }
.chatbot-input-row button {
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.chatbot-input-row button.chatbot-send {
  background: var(--fb-red);
  color: #fff;
  padding: 0 16px;
}
.chatbot-input-row button.chatbot-skip {
  background: transparent;
  border: 1px solid var(--fb-gray-300);
  color: var(--fb-gray-700);
  padding: 0 12px;
}

@media (max-width: 480px) {
  .chatbot-panel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 190px;
  }
  .chatbot-launcher-wrap { right: 16px; bottom: 16px; }
  .chatbot-launcher { width: 130px; height: 130px; }
  .chatbot-launcher svg { width: 56px; height: 56px; }
  .chatbot-badge { font-size: 0.85rem; padding: 6px 16px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .split.split--reverse .split-media { order: -1; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--5 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .topbar .container { justify-content: center; }
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 82vw);
    background: var(--fb-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 90px 28px 28px;
    transform: translateX(100%);
    transition: transform 220ms ease;
    box-shadow: -8px 0 24px rgba(0,0,0,0.15);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 22px; width: 100%; }
  .main-nav .btn { width: 100%; margin-top: 26px; }
  .nav-toggle { display: flex; }
  .nav-scrim {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 90;
  }
  .nav-scrim.is-open { display: block; }

  .grid--3, .grid--2, .grid--5 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .cta-banner .container { flex-direction: column; align-items: flex-start; }
  .form-card { padding: 26px; }
  .footer-grid { grid-template-columns: 1fr; }
}
