/* ========================================
   EMERGENCY BANNER
   ======================================== */
.emergency-banner {
  background: var(--emergency);
  color: var(--white);
  height: 36px;
  overflow: hidden;
  position: relative;
  z-index: 1001;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.emergency-banner a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.emergency-marquee {
  display: inline-flex;
  align-items: center;
  height: 36px;
  animation: marquee-scroll 18s linear infinite;
}

.emergency-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 48px;
}

.emergency-pulse {
  width: 8px;
  height: 8px;
  background: #4ADE80;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-emergency 1.5s ease-in-out infinite;
}

@keyframes pulse-emergency {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 14px 0;
  background: var(--white);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}

.has-emergency-banner .nav {
  top: 36px;
}

.nav.scrolled {
  padding: 10px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  top: 0;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
}

.nav-logo-img {
  height: 38px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--primary-dark); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta .btn { padding: 10px 22px; font-size: 14px; }

.nav-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
}

.nav-phone svg { width: 18px; height: 18px; }

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: relative;
  z-index: 1001;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  margin: 6px 0;
  transition: all 0.3s;
  border-radius: 2px;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1100;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.mobile-menu-overlay.open { display: block; }

.mobile-menu {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
  max-width: 360px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius-xl);
  z-index: 1101;
  padding: 24px;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
}

.mobile-menu.open { display: flex; }

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu-header img {
  height: 28px;
  width: auto;
}

.mobile-menu a.mobile-menu-link {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu a.mobile-menu-link::after {
  content: '\203A';
  font-size: 20px;
  color: var(--gray-400);
  font-weight: 400;
}

.mobile-menu a.mobile-menu-link:last-of-type {
  border-bottom: none;
}

.mobile-menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.mobile-menu-buttons .btn {
  width: 100%;
  justify-content: center;
  display: flex;
  line-height: 1;
  font-size: 15px;
  padding: 14px 24px;
}

.mobile-close {
  background: none;
  border: none;
  color: var(--gray-400);
  font-size: 28px;
  cursor: pointer;
  padding: 12px;
  line-height: 1;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  padding: 60px 0 30px;
  background: #060B14;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 48px;
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-logo img {
  height: 36px;
  width: auto;
}

.footer-brand p {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  line-height: 1.7;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.footer-social a {
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--primary-bright);
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-col h5 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--primary-bright); }

.footer-disclaimer {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 700px;
}

.footer-disclaimer a {
  color: rgba(255,255,255,0.5);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-disclaimer a:hover {
  color: rgba(255,255,255,0.7);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255,255,255,0.3);
}

/* ========================================
   EMERGENCY CALL MODAL
   ======================================== */
.emergency-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1200;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.emergency-modal-overlay.open { display: flex; align-items: center; justify-content: center; }

.emergency-modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: calc(100% - 32px);
  max-width: 400px;
  padding: 32px 28px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  position: relative;
}

.emergency-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
}

.emergency-modal-close:hover { color: var(--gray-700); }

.emergency-modal-icon {
  width: 48px;
  height: 48px;
  background: var(--emergency-light);
  color: var(--emergency);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.emergency-modal-icon svg { width: 24px; height: 24px; }

.emergency-modal h3 {
  font-size: 20px;
  text-align: center;
  margin-bottom: 6px;
  color: var(--text);
}

.emergency-modal .emergency-modal-sub {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
}

.emergency-modal label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.emergency-modal input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  margin-bottom: 14px;
  box-sizing: border-box;
}

.emergency-modal input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,110,194,0.1);
}

.emergency-modal .btn {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.emergency-modal-number {
  display: none;
  text-align: center;
  padding: 8px 0;
}

.emergency-modal-number p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.emergency-modal-number a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 28px;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--emergency);
  text-decoration: none;
  padding: 16px;
  background: var(--emergency-light);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.emergency-modal-number a:hover {
  background: var(--emergency);
  color: var(--white);
}

.emergency-modal-number a svg { width: 28px; height: 28px; }

.emergency-modal-number .emergency-modal-note {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 12px;
}

/* ========================================
   AI CHAT OVERLAY
   ======================================== */
.bp-chat-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bp-chat-overlay.open {
  display: flex;
}

.bp-chat-container {
  width: 100%;
  max-width: 480px;
  height: 600px;
  max-height: 90vh;
  background: var(--white);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.bp-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--navy);
  flex-shrink: 0;
}

.bp-chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bp-chat-avatar {
  height: 32px;
  width: auto;
}

.bp-chat-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
}

.bp-chat-status {
  font-size: 12px;
  color: var(--success);
}

.bp-chat-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 28px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s;
}

.bp-chat-close:hover {
  color: var(--white);
}

.bp-chat-form {
  flex: 1;
  overflow-y: auto;
}

.bp-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bp-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.5;
}

.bp-msg-assistant {
  align-self: flex-start;
  background: var(--gray-100);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.bp-msg-user {
  align-self: flex-end;
  background: var(--primary);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.bp-seen {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-align: right;
  margin-top: 4px;
}

.bp-typing {
  align-self: flex-start;
  padding: 12px 20px;
  background: var(--gray-100);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  display: flex;
  gap: 4px;
}

.bp-typing-dot {
  width: 8px;
  height: 8px;
  background: var(--gray-400);
  border-radius: 50%;
  animation: bp-bounce 1.4s ease-in-out infinite;
}

.bp-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.bp-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bp-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.bp-chat-input-area {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.bp-chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px 18px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, height 0.1s ease;
  -webkit-appearance: none;
  appearance: none;
  resize: none;
  min-height: 44px;
  max-height: 140px;
  overflow-y: auto;
  line-height: 1.5;
}

.bp-chat-input:focus {
  border-color: var(--primary);
}

.bp-chat-mic {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  color: var(--gray-500);
}

.bp-chat-mic:hover { border-color: var(--primary); color: var(--primary); }

.bp-chat-mic.listening {
  background: #EF4444;
  border-color: #EF4444;
  color: white;
  animation: bp-mic-pulse 1.5s infinite;
}

@keyframes bp-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

.bp-chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.bp-chat-send:hover { background: var(--primary-hover); }
.bp-chat-send:disabled { background: var(--gray-300); cursor: default; }

.bp-chat-img-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.bp-chat-img-btn:hover { border-color: var(--primary); color: var(--primary); }

.bp-msg-image {
  max-width: 200px;
  border-radius: 12px;
  margin-top: 4px;
  cursor: pointer;
}

.bp-msg-image:hover { opacity: 0.9; }

.bp-img-uploading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-500);
  padding: 8px 12px;
  background: var(--gray-100);
  border-radius: 12px;
}

.bp-chat-complete {
  text-align: center;
  padding: 24px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.bp-chat-complete p {
  font-size: 14px;
  color: var(--text-secondary);
}

.bp-brief-buttons { display: flex; gap: 8px; padding: 8px 0; flex-wrap: wrap; }
.bp-brief-btn { padding: 10px 18px; border-radius: 20px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all 0.2s; border: none; }
.bp-brief-yes { background: var(--primary); color: white; }
.bp-brief-yes:hover { background: var(--primary-hover); }
.bp-brief-no { background: var(--gray-100); color: var(--text); border: 1px solid var(--border); }
.bp-brief-no:hover { background: var(--gray-200); }

/* ========== CHAT WIDGET BUBBLE ========== */
.bp-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1500;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: right 0.35s ease, transform 0.2s;
  touch-action: pan-x;
}

.bp-chat-widget:hover {
  transform: scale(1.05);
}

.bp-chat-widget.hidden {
  display: none;
}

.bp-chat-widget.docked {
  right: -60px;
  transition: right 0.35s ease;
}

.bp-chat-widget-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(27, 110, 194, 0.4);
  transition: background 0.2s, box-shadow 0.2s;
}

.bp-chat-widget-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 28px rgba(27, 110, 194, 0.5);
}

.bp-chat-widget-label {
  background: var(--white);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  white-space: nowrap;
  animation: bp-widget-nudge 4s ease-in-out infinite;
}

.bp-chat-widget.docked .bp-chat-widget-label {
  display: none;
}

@keyframes bp-widget-nudge {
  0%, 90%, 100% { transform: translateX(0); }
  93% { transform: translateX(-4px); }
  96% { transform: translateX(2px); }
}

/* Docked tab */
.bp-chat-tab {
  position: fixed;
  right: 0;
  bottom: 28px;
  z-index: 1500;
  background: var(--primary);
  color: var(--white);
  padding: 12px 8px 12px 12px;
  border-radius: 12px 0 0 12px;
  cursor: pointer;
  box-shadow: -2px 2px 12px rgba(27, 110, 194, 0.3);
  display: none;
  writing-mode: vertical-lr;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: 0.5px;
  transition: background 0.2s;
}

.bp-chat-tab:hover { background: var(--primary-hover); }

.bp-chat-tab.visible {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bp-chat-tab svg { transform: rotate(90deg); }

.bp-chat-nudge {
  position: fixed; right: 48px; bottom: 28px; z-index: 1499;
  background: var(--white); color: var(--gray-900);
  padding: 14px 38px 14px 16px; border-radius: 12px 12px 0 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  max-width: 280px; font-size: 14px; line-height: 1.4;
  font-family: 'Plus Jakarta Sans', sans-serif;
  opacity: 0; transform: translateX(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none; cursor: pointer;
}
.bp-chat-nudge.visible {
  opacity: 1; transform: translateX(0); pointer-events: auto;
}
.bp-chat-nudge strong {
  display: block; font-size: 13px; color: var(--primary);
  margin-bottom: 4px;
}
.bp-chat-nudge p { margin: 0; }
.bp-nudge-close {
  position: absolute; top: 6px; right: 10px;
  font-size: 18px; line-height: 1; color: var(--gray-400);
  cursor: pointer; padding: 2px 4px;
}
.bp-nudge-close:hover { color: var(--gray-700); }


/* ========================================
   RESPONSIVE — Shared components
   ======================================== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-cta .nav-phone {
    display: none;
  }

  .nav-cta .btn {
    padding: 8px 16px;
    font-size: 13px;
  }

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

  .footer-content {
    flex-direction: column;
    gap: 32px;
  }

  .footer-links {
    gap: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .bp-chat-widget {
    bottom: 16px;
    right: 16px;
  }

  .bp-chat-widget.docked {
    right: -54px;
  }

  .bp-chat-widget-btn {
    width: 54px;
    height: 54px;
  }

  .bp-chat-widget-label {
    display: none;
  }

  .bp-chat-overlay {
    padding: 0;
  }

  .bp-chat-container {
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .bp-chat-container {
    height: 100dvh;
    max-height: 100dvh;
  }

  .bp-chat-header {
    padding: 20px 20px 16px;
    padding-top: max(20px, env(safe-area-inset-top));
  }

  .bp-chat-input-area {
    padding: 12px 16px;
    padding-bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px));
  }
}

@media (max-width: 480px) {
  .footer-links {
    flex-direction: column;
    gap: 24px;
  }
}
