/* Site header — single source of truth (homepage + quote-flow pages) */

/* Header navigation links */
.nav-link-cm {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #1a202c;
  text-decoration: none;
  padding: 4px 8px;
  transition: all 0.15s cubic-bezier(0, 0, 0.2, 1);
  white-space: nowrap !important;
}

.nav-link-cm:hover {
  color: #2563eb;
}

/* Header free-quote CTA - yellow/orange */
.btn-see-prices {
  background-color: #FEC963;
  color: #1a202c;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.15s cubic-bezier(0, 0, 0.2, 1);
  white-space: nowrap;
  text-decoration: none;
}

.btn-see-prices:hover,
.btn-see-prices:focus,
.btn-see-prices:active {
  background-color: #f5b942;
  box-shadow: 0 4px 8px rgba(254, 201, 99, 0.4);
  transform: translateY(-1px);
  text-decoration: none;
  color: #1a202c;
}

/* Phone block styles */
.phone-block-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.phone-block-number {
  font-size: 16px;
  font-weight: 700;
  color: #0D47A1;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.phone-block-number:hover {
  color: #1565C0;
  text-decoration: underline;
}

/* Header: tap-to-call icon only */
.header-phone-compact {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.2rem;
  color: #0D47A1;
  text-decoration: none !important;
  border-radius: 8px;
  line-height: 1;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.header-phone-compact .fa-phone {
  font-size: 1.15rem;
}

.header-phone-compact:hover {
  color: #1565C0;
}

@media (min-width: 992px) {
  .header-phone-compact {
    display: inline-flex;
  }
}

/* --- Header: fixed height, larger logo, nav pushed right with even spacing --- */
.navbar {
  height: 81px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
}

.navbar-brand {
  flex: 0 0 auto;
  display: flex !important;
  align-items: center !important;
  padding: 0 !important;
  margin-right: 20px;
}

.navbar-brand img {
  height: 244px !important;
  width: auto !important;
  max-height: none !important;
  object-fit: contain;
}

.navbar-nav {
  flex: 1 1 auto;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar-nav .nav-link {
  padding-left: 15px;
  padding-right: 15px;
}

header.sticky-top {
  height: auto !important;
  min-height: 81px;
  padding: 0 !important;
  overflow: visible !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1060;
}

header.sticky-top > .container {
  height: auto !important;
  min-height: 81px;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
  padding-right: 0.4rem !important;
  display: flex !important;
  align-items: center !important;
  overflow: visible !important;
}

.header-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.35rem;
  width: 100%;
  overflow: visible !important;
}

.header-logo-wrap {
  /* Large cropped logo — layout width capped so nav does not collapse */
  flex: 0 0 232px !important;
  width: 232px !important;
  max-width: 232px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  height: 81px !important;
  padding: 0 !important;
  /* Keep wrap on-screen — negative margin was clipping the left leaf at the viewport edge */
  margin-left: 0 !important;
  margin-right: 0.5rem !important;
  overflow: hidden !important;
}

.header-logo {
  height: 244px !important;
  width: auto !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain;
  display: block !important;
  /* Crop empty padding only — leave the left leaf tip intact */
  margin-left: -72px !important;
  transform: translateY(8px) !important;
}

.nav-link-cm.nav-link-stack {
  white-space: normal !important;
  max-width: 5.1rem;
  text-align: center;
  line-height: 1.22;
  align-self: center;
  display: inline-block;
}

.nav-link-cm.nav-link-questions-wrap {
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  max-width: 5.6rem;
  white-space: normal !important;
}

.nav-link-cm.nav-link-questions-wrap span {
  display: inline-block;
  max-width: 5.6rem;
  text-align: center;
  line-height: 1.18;
}

.nav-link-cm.nav-link-schedule-wrap {
  white-space: normal !important;
  max-width: 6rem;
  text-align: center;
  line-height: 1.25;
  align-self: center;
  display: inline-block;
}

.nav-link-cm.nav-link-fe-calc-wrap {
  white-space: normal !important;
  max-width: 5.85rem;
  text-align: center;
  line-height: 1.22;
  align-self: center;
  display: inline-block;
  font-size: 14px;
}

.header-inner .desktop-nav {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  gap: 0.35rem 1rem !important;
  justify-content: space-evenly !important;
  padding-right: 0.5rem;
  overflow: visible !important;
}

.header-inner > .d-flex.align-items-center.gap-2,
.header-inner > .header-actions {
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  gap: 0.5rem !important;
  align-items: center !important;
}

.header-inner .btn-see-prices,
.header-inner .desktop-cta {
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  overflow: visible !important;
  white-space: nowrap !important;
}

@media (min-width: 992px) {
  .header-inner .desktop-nav .nav-link-cm {
    padding: 5px 10px !important;
    font-size: 14px !important;
  }

  .header-inner .desktop-nav .nav-link-cm.nav-link-stack {
    max-width: 5rem;
    font-size: 12.5px;
  }

  .header-inner .desktop-nav .nav-link-cm.nav-link-questions-wrap {
    max-width: 5.45rem;
    font-size: 12.5px;
  }

  .header-inner .desktop-nav .nav-link-cm.nav-link-schedule-wrap {
    max-width: 5.85rem;
    font-size: 12.5px;
  }

  .header-inner .desktop-nav .nav-link-cm.nav-link-fe-calc-wrap {
    font-size: 12px;
  }

  .header-inner > .header-actions {
    gap: 0.65rem !important;
  }

  .header-inner > .header-actions .btn-see-prices,
  .header-inner > .header-actions .desktop-cta {
    margin-right: 0.35rem;
  }

  header.sticky-top:has(.header-office-bar) {
    height: auto !important;
  }

  header.sticky-top:has(.header-office-bar) > .container {
    height: auto !important;
    min-height: 81px;
  }
}

.header-agent-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.1rem;
  max-width: 7.75rem;
  line-height: 1.15;
  color: #1a365d;
  text-align: right;
}

.header-agent-cta-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: #4a5568;
  white-space: normal;
  text-align: right;
}

.header-agent-cta-phone {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0d47a1 !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.header-agent-cta-phone:hover,
.header-agent-cta-phone:focus-visible {
  color: #1565c0 !important;
  text-decoration: underline !important;
}

.mvi-float-stack {
  position: fixed;
  z-index: 1084;
  top: calc(81px + 0.85rem + env(safe-area-inset-top, 0px));
  right: max(1rem, env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.mvi-whatsapp-fab {
  position: static;
  z-index: auto;
  top: auto;
  right: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: auto;
  min-width: 2.35rem;
  height: 2.35rem;
  padding: 0 0.65rem;
  border-radius: 999px;
  background: #25d366;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.mvi-whatsapp-fab i {
  font-size: 1.05rem;
  line-height: 1;
}

.mvi-whatsapp-fab:hover {
  background: #1da851;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.48);
}

.mvi-whatsapp-fab:focus-visible {
  outline: 3px solid rgba(37, 211, 102, 0.45);
  outline-offset: 3px;
}

.mvi-lang-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.6rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(26, 54, 93, 0.18);
  color: #1a365d !important;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(13, 71, 161, 0.12);
}

.mvi-lang-fab:hover,
.mvi-lang-fab:focus-visible {
  color: #0d47a1 !important;
  text-decoration: underline !important;
}

@media (max-width: 575.98px) {
  .mvi-whatsapp-fab {
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
  }

  .mvi-whatsapp-fab-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

/* Legacy header pill — keep green if used elsewhere */
.header-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  background: #25d366;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.header-whatsapp-btn:hover {
  background: #1da851;
  color: #fff !important;
}

.header-bbb-seal {
  display: none !important;
}

@media (min-width: 992px) {
  .header-inner {
    position: relative;
    padding-right: 0;
  }
}

.header-bbb-seal img {
  display: none;
}

.header-office-bar {
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
  background: #0d47a1 !important;
  border-top-color: rgba(255, 255, 255, 0.18) !important;
  color: #fff;
}

.header-office-bar span,
.header-office-bar strong {
  color: #fff;
}

.header-office-bar a {
  color: #fff !important;
  text-decoration: none;
}

.header-office-bar a:hover,
.header-office-bar a:focus-visible {
  color: #e3f2fd !important;
  text-decoration: underline;
}

.header-lang-toggle {
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.78rem;
  line-height: 1.2;
  color: #1a365d;
  padding: 0.15rem 0.2rem;
}

.header-actions .header-lang-toggle:hover,
.header-actions .header-lang-toggle:focus-visible {
  color: #0d47a1;
  text-decoration: underline;
}

header.sticky-top .header-logo-wrap {
  overflow: hidden;
  max-height: 81px;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 12px 16px 16px;
  z-index: 100;
  max-height: min(78vh, 640px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu-primary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  margin: 0 0 0.55rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  text-decoration: none !important;
  font-weight: 700;
  line-height: 1.25;
  border: 1px solid transparent;
}

.mobile-menu-phone {
  background: #f0f6ff;
  border-color: rgba(13, 71, 161, 0.18);
  color: #0d47a1 !important;
}

.mobile-menu-primary-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #475569;
}

.mobile-menu-primary-value {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.mobile-menu-prices {
  align-items: center;
  justify-content: center;
  background: #FEC963;
  color: #1a202c !important;
  font-size: 1rem;
  padding: 0.9rem 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-menu-prices:hover,
.mobile-menu-prices:focus-visible {
  background: #f5b942;
  color: #1a202c !important;
}

.mobile-menu-phone:hover,
.mobile-menu-phone:focus-visible {
  background: #e4efff;
}

.mobile-menu-accordion {
  border-top: 1px solid #e5e7eb;
}

.mobile-menu-accordion:last-child {
  border-bottom: 1px solid #e5e7eb;
}

.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.95rem 0.25rem;
  border: 0;
  background: transparent;
  color: #1a365d;
  font-size: 0.98rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.mobile-menu-toggle i {
  font-size: 0.78rem;
  color: #64748b;
  transition: transform 0.18s ease;
}

.mobile-menu-accordion.is-open .mobile-menu-toggle i {
  transform: rotate(180deg);
}

.mobile-menu-panel {
  padding: 0 0 0.65rem 0.35rem;
}

.mobile-menu-panel[hidden] {
  display: none !important;
}

.mobile-menu a.mobile-menu-link,
.mobile-menu .mobile-menu-link {
  display: block;
  padding: 0.7rem 0.5rem;
  color: #0d47a1;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
}

.mobile-menu a.mobile-menu-link:last-child,
.mobile-menu .mobile-menu-link:last-child {
  border-bottom: none;
}

.mobile-menu a.mobile-menu-link:hover {
  background-color: #f8fafc;
  text-decoration: underline;
}

/* Keep floating FABs from covering the open menu */
body:has(.mobile-menu.active) .mvi-float-stack {
  visibility: hidden;
  pointer-events: none;
}

.hamburger-btn {
  display: none;
  padding: 8px;
  cursor: pointer;
  font-size: 24px;
  color: #1a365d;
}

@media (max-width: 991px) {
  .hamburger-btn {
    display: block;
    margin-right: 0;
  }

  .desktop-nav {
    display: none !important;
  }

  .desktop-cta {
    display: none !important;
  }

  .header-inner {
    justify-content: space-between !important;
    position: relative;
  }

  .header-inner > .d-flex.align-items-center.gap-2,
  .header-inner > .header-actions {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
    z-index: 2;
  }

  /* Wide enough to show full “MEJOR VIDA” + tagline; leave room for hamburger */
  .header-logo-wrap {
    flex: 0 0 216px !important;
    width: 216px !important;
    max-width: 216px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: hidden !important;
  }

  .header-logo {
    height: 172px !important;
    margin-left: -48px !important;
    max-width: none !important;
    transform: translateY(2px) !important;
  }
}

@media (max-width: 374.98px) {
  .header-logo-wrap {
    flex: 0 0 196px !important;
    width: 196px !important;
    max-width: 196px !important;
  }

  .header-logo {
    height: 156px !important;
    margin-left: -42px !important;
  }
}
