/* ==========================================================================
   Barstoni Insurance Agency Limited - Mobile-first stylesheet
   ========================================================================== */

:root {
  --brand-blue: #005f8a;
  --brand-blue-dark: #004a6d;
  --brand-red: #c8102e;
  --brand-red-dark: #a30d26;
  --brand-gold: #d4af37;
  --brand-navy: #005f8a;
  --ink: #1c2733;
  --ink-soft: #45535f;
  --muted: #6b7681;
  --line: #dde3e8;
  --bg-page: #efefef;
  --bg-card: #ffffff;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(16, 34, 47, 0.10);
  --shadow-md: 0 6px 18px rgba(16, 34, 47, 0.14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: inherit; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-navy);
  color: #fff;
  padding: 10px 18px;
  z-index: 10000;
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

.icon { width: 20px; height: 20px; flex-shrink: 0; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 26px; height: 26px; }

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--brand-red);
  color: #fff;
  font-size: 12px;
}
.topbar-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 7px;
  padding-bottom: 7px;
  text-align: center;
}
.topbar-tagline { font-style: italic; }
.topbar-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.topbar-links a { color: #fff; text-decoration: none; }
.topbar-links a:hover, .topbar-links a:focus { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.navbar {
  background: var(--brand-blue);
  color: #fff;
  position: relative;
  z-index: 50;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
}
.navbar-logo {
  background: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 6px 12px;
  box-shadow: var(--shadow-sm);
  display: block;
  position: relative;
  z-index: 10;
}
.navbar-logo img { height: 52px; width: auto; }

.nav-toggle {
  background: transparent;
  border: 0;
  color: #fff;
  padding: 10px;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.12); }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.nav-desktop { display: none; }

.nav-mobile {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--brand-blue);
  padding: 10px 0 16px;
}
.nav-mobile.is-open { display: block; }
.nav-mobile a, .nav-mobile-group {
  display: block;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  padding: 9px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-mobile a:hover, .nav-mobile a:focus { color: var(--brand-gold); }
.nav-mobile-group {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
}
.nav-mobile-sub { padding-left: 18px !important; }

@media (min-width: 900px) {
  .nav-toggle, .nav-mobile { display: none !important; }
  .navbar-logo { margin-bottom: -16px; }
  .nav-desktop {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px;
    padding: 16px 0;
  }
  .nav-desktop > a, .nav-dropdown-btn {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    background: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
  }
  .nav-desktop > a:hover, .nav-desktop > a:focus,
  .nav-dropdown-btn:hover, .nav-dropdown-btn:focus,
  .nav-desktop > a.is-active, .nav-dropdown-btn.is-active {
    color: var(--brand-gold);
  }
  .nav-dropdown { position: relative; }
  .nav-dropdown-menu {
    position: absolute;
    left: 0;
    top: 100%;
    padding-top: 10px;
    display: none;
    z-index: 60;
  }
  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu a {
    display: block;
    background: #fff;
    color: var(--brand-navy);
    text-decoration: none;
    font-size: 14px;
    padding: 9px 16px;
    min-width: 280px;
    white-space: nowrap;
  }
  .nav-dropdown-menu a:first-child { border-radius: var(--radius) var(--radius) 0 0; }
  .nav-dropdown-menu a:last-child { border-radius: 0 0 var(--radius) var(--radius); }
  .nav-dropdown-menu a:hover, .nav-dropdown-menu a:focus { background: #f1f4f6; }
  .nav-dropdown-menu { box-shadow: var(--shadow-md); border-radius: var(--radius); }
  .nav-cart { display: inline-flex; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
}
.hero img.hero-bg {
  width: 100%;
  height: 250px;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 16px;
}
.hero-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.hero-title .t-gold { color: var(--brand-gold); }
.hero-title .t-white { color: #fff; text-shadow: 2px 2px 0 var(--brand-blue); }
.hero-strip {
  margin-top: 16px;
  width: 100%;
  max-width: 760px;
  background: rgba(200, 16, 46, 0.82);
  color: #fff;
  font-size: 12px;
  padding: 8px 16px;
}
.hero-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.hero-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid #fff;
}
.hero-dots span.on { background: #fff; }

@media (min-width: 640px) {
  .hero img.hero-bg { height: 360px; }
  .hero-title { font-size: 42px; }
  .hero-strip { font-size: 14px; padding: 12px 24px; }
}
@media (min-width: 900px) {
  .hero img.hero-bg { height: 470px; }
  .hero-title { font-size: 54px; }
  .hero-strip { font-size: 16px; }
}

/* --------------------------------------------------------------------------
   Sections, cards, general typography
   -------------------------------------------------------------------------- */
.section { padding: 34px 0; }
.section-white { background: #fff; }
.section-grey { background: var(--bg-page); }

.section h2.section-title {
  color: var(--brand-navy);
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 16px;
}
.section .lead {
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 14px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.card + .card { margin-top: 20px; }
.card-title {
  color: var(--brand-navy);
  font-size: 19px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 16px;
}
.card-title-flex {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 0;
  padding-bottom: 0;
}
.card-title-flex .icon { color: var(--brand-red); }

.grid { display: grid; gap: 16px; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 26px; }
  .section { padding: 44px 0; }
  .section h2.section-title { font-size: 24px; }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
  transition: box-shadow 0.15s ease;
}
.tile:hover { box-shadow: var(--shadow-sm); }
.tile .icon { color: var(--brand-red); margin-bottom: 8px; }
.tile h3 {
  color: var(--brand-navy);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tile h3 .icon { margin-bottom: 0; width: 18px; height: 18px; }
.tile p { font-size: 14px; color: var(--ink-soft); }

/* Page header band */
.page-band {
  background: var(--brand-blue);
  color: #fff;
  padding: 22px 0;
}
.page-band .crumbs {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 4px;
}
.page-band .crumbs a { color: #fff; text-decoration: none; }
.page-band .crumbs a:hover { text-decoration: underline; }
.page-band h1 { font-size: 24px; font-weight: 700; }
@media (min-width: 640px) {
  .page-band h1 { font-size: 30px; }
}

/* Slim breadcrumb band used by product pages */
.band-slim {
  background: var(--brand-blue);
  color: #fff;
  font-size: 14px;
}
.band-slim .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 11px;
  padding-bottom: 11px;
}
.band-slim a { color: #fff; text-decoration: none; }
.band-slim a:hover { color: var(--brand-gold); }
.band-slim span { opacity: 0.8; }

/* Regulatory notice */
.notice {
  border-left: 4px solid var(--brand-red);
  background: rgba(200, 16, 46, 0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px;
}
.notice-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.notice-head .icon { color: var(--brand-red); width: 24px; height: 24px; margin-top: 2px; }
.notice-head h2 { color: var(--brand-navy); font-size: 18px; font-weight: 700; }
.notice p { font-size: 15px; color: var(--ink-soft); margin-bottom: 12px; }
.notice ul { list-style: none; }
.notice li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.notice li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-red);
}
@media (min-width: 640px) {
  .notice { padding: 26px; }
  .notice-head h2 { font-size: 20px; }
}

/* Partners */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  align-items: center;
}
.partners-grid .partner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px solid #f0f2f4;
  border-radius: var(--radius);
  background: #fff;
  transition: box-shadow 0.15s ease;
}
.partners-grid .partner:hover { box-shadow: var(--shadow-sm); }
.partners-grid img { max-height: 62px; width: auto; object-fit: contain; }
@media (min-width: 640px) { .partners-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .partners-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .partners-grid { grid-template-columns: repeat(6, 1fr); } }

/* --------------------------------------------------------------------------
   Forms and buttons
   -------------------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 14px;
  color: var(--brand-navy);
  margin-bottom: 5px;
}
.field .req { color: var(--brand-red); }
.field .hint {
  margin-left: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0, 95, 138, 0.18);
}
.textarea { resize: vertical; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: var(--radius);
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease;
  min-height: 44px;
}
.btn-primary { background: var(--brand-navy); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--brand-blue-dark); }
.btn-red { background: var(--brand-red); color: #fff; }
.btn-red:hover, .btn-red:focus { background: var(--brand-red-dark); }
.btn-grey { background: #e2e6ea; color: var(--ink); }
.btn-grey:hover, .btn-grey:focus { background: #d3d9de; }
.btn-sm { padding: 7px 14px; font-size: 13px; min-height: 36px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.alert {
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 14px;
  margin-bottom: 18px;
}
.alert-success {
  background: #e8f5ee;
  border: 1px solid #bfe3cf;
  color: #135c33;
}
.alert-error {
  background: #fdecee;
  border: 1px solid #f3c2c9;
  color: #8f1024;
}

/* Quote result table */
.quote-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.quote-table td { padding: 9px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.quote-table td:first-child { font-weight: 700; width: 46%; }
.quote-table .total { color: var(--brand-red); font-weight: 800; }

/* --------------------------------------------------------------------------
   Content helpers
   -------------------------------------------------------------------------- */
.prose p { font-size: 15px; color: var(--ink-soft); margin-bottom: 14px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 14px; }
.prose li { font-size: 15px; color: var(--ink-soft); margin-bottom: 8px; }

.info-box {
  background: rgba(0, 95, 138, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.info-box h2 { color: var(--brand-navy); font-size: 17px; font-weight: 700; margin-bottom: 10px; }

.contact-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.contact-item .icon { color: var(--brand-red); margin-top: 3px; }
.contact-item .ci-title { font-size: 14px; font-weight: 600; color: var(--brand-navy); }
.contact-item p { font-size: 14px; color: var(--ink-soft); }
.contact-item .ci-closed { color: var(--brand-red); font-weight: 600; }

/* Risk categories */
.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.filters .search-wrap, .filters .filter-wrap { position: relative; flex: 1; }
.filters .search-wrap .icon, .filters .filter-wrap .icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.filters .input, .filters .select { padding-left: 36px; }
@media (min-width: 640px) {
  .filters { flex-direction: row; align-items: center; }
  .filters .filter-wrap { flex: 0 0 260px; }
}

.risk-cat { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; overflow: hidden; }
.risk-cat-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 95, 138, 0.05);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}
.risk-cat-head h2 { color: var(--brand-navy); font-size: 15px; font-weight: 700; }
.risk-cat ul { list-style: none; }
.risk-cat li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 16px;
  font-size: 14px;
  border-bottom: 1px solid #eef1f3;
}
.risk-cat li:last-child { border-bottom: 0; }
.risk-cat li a.quote-link {
  flex-shrink: 0;
  color: var(--brand-navy);
  font-size: 12px;
  font-weight: 600;
}
.risk-cat li a.quote-link:hover { color: var(--brand-red); }
@media (min-width: 640px) {
  .risk-cat-head { flex-direction: row; align-items: center; justify-content: space-between; }
}
/* FAQ accordion */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-of-type { border-bottom: 0; }
.faq-item summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-navy);
  padding: 14px 4px;
  list-style: none;
  position: relative;
  padding-right: 30px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 400;
  color: var(--brand-red);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p {
  font-size: 14px;
  color: var(--ink-soft);
  padding: 0 4px 16px;
  line-height: 1.65;
}

.hidden { display: none !important; }
.no-results { font-size: 14px; color: var(--muted); font-style: italic; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  margin-top: auto;
  background: var(--brand-blue);
  color: #fff;
  font-size: 12px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
  text-align: center;
}
.footer a { color: #fff; }
.footer-cards { display: flex; gap: 8px; }
.card-badge {
  background: #fff;
  font-weight: 800;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
}
.card-visa { color: var(--brand-blue); }
.card-mc { color: var(--brand-red); }

@media (min-width: 640px) {
  .topbar-inner { flex-direction: row; justify-content: space-between; text-align: left; }
  .topbar { font-size: 13px; }
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

.footer-links-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.footer-links-row nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  padding: 12px 0;
}
.footer-links-row a {
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  opacity: 0.9;
}
.footer-links-row a:hover, .footer-links-row a:focus { text-decoration: underline; opacity: 1; }
.footer-ira { display: block; opacity: 0.85; margin-top: 2px; }
.card-mpesa { color: var(--brand-green); }

/* WhatsApp click-to-chat */
.wa-chat {
  position: fixed;
  bottom: 70px;
  right: 16px;
  z-index: 9998;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1faa53;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}
.wa-chat svg { width: 26px; height: 26px; }
.wa-chat:hover, .wa-chat:focus { background: #178a43; }

/* Hero slider */
.hero-slide { display: none; }
.hero-slide.on { display: block; }
.hero-dots button {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid #fff;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.hero-dots button.on { background: #fff; }
.hero-cta {
  margin-top: 14px;
  display: inline-flex;
}

/* --------------------------------------------------------------------------
   Language switcher (English / Chinese)
   -------------------------------------------------------------------------- */
.lang-switcher {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(4px);
}
.lang-switcher button {
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-switcher button:hover,
.lang-switcher button:focus {
  background: rgba(0, 95, 138, 0.10);
  color: var(--brand-navy);
}
.lang-switcher .lang-sep { color: var(--muted); font-size: 12px; }
.gt-hidden { position: absolute; left: -9999px; top: -9999px; }

/* Suppress the Google Translate banner and tooltips */
.goog-te-banner-frame, .skiptranslate iframe { display: none !important; }
body { top: 0 !important; }
#goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
font { background: transparent !important; box-shadow: none !important; }

/* Inline language toggle on translated pages (EN / 中文) */
.lang-inline {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  padding-bottom: 6px;
  font-size: 13px;
}
.lang-inline a {
  color: var(--brand-navy);
  text-decoration: none;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}
.lang-inline a:hover,
.lang-inline a:focus {
  background: rgba(0, 95, 138, 0.10);
}
.lang-inline a.on {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lang-inline .lang-sep { color: var(--muted); }
