/* ═══════════════════════════════════════
   Body Ambulance Service — Main CSS
═══════════════════════════════════════ */

:root {
  --color-primary-blue: #005B96;
  --color-primary-red:  #D62828;
  --color-secondary:    #003B63;
  --color-secondary-light: #EAF4FB;
  --color-secondary-soft:  #F3F8FC;
  --color-background:   #FFFFFF;
  --color-surface:      #F3F8FC;
  --color-text-primary: #1F2933;
  --color-text-secondary: #64748B;
  --color-border:       #D9E2EC;
  --color-success:      #16803C;
  --color-warning:      #F59E0B;
  --color-error:        #B91C1C;
  --color-white:        #FFFFFF;
  --color-navy:         #003B63;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--color-text-primary);
  background: var(--color-background);
}

/* ─── Typography ─── */
.font-display { font-family: 'Syne', sans-serif; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-secondary-soft); }
::-webkit-scrollbar-thumb { background: var(--color-primary-blue); border-radius: 3px; }

/* ─── Safe bottom (for notch phones) ─── */
.safe-bottom { padding-bottom: max(0.5rem, env(safe-area-inset-bottom)); }

/* ─── Header scroll shadow ─── */
#site-header.scrolled nav { box-shadow: 0 4px 20px rgba(0,0,0,.10); }

/* ─── Pulse Ring (Call button) ─── */
.pulse-ring {
  box-shadow: 0 0 0 0 rgba(214,40,40,.7);
  animation: pulse-red 2s infinite;
}
@keyframes pulse-red {
  0%   { box-shadow: 0 0 0 0 rgba(214,40,40,.7); }
  70%  { box-shadow: 0 0 0 12px rgba(214,40,40,0); }
  100% { box-shadow: 0 0 0 0 rgba(214,40,40,0); }
}

.pulse-ring-green {
  box-shadow: 0 0 0 0 rgba(34,197,94,.7);
  animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.7); }
  70%  { box-shadow: 0 0 0 12px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* ─── Hero ─── */
.hero-bg {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-primary-blue) 60%, #0a6fb5 100%);
  position: relative;
  overflow: hidden;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,.05) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(214,40,40,.1) 0%, transparent 50%);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* ─── Gradient text ─── */
.gradient-text {
  background: linear-gradient(90deg, #ffffff 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Service cards ─── */
.service-card {
  transition: transform .25s ease, box-shadow .25s ease;
  border: 1px solid var(--color-border);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,91,150,.12);
  border-color: var(--color-primary-blue);
}
.service-card:hover .service-icon {
  background: var(--color-primary-blue);
  color: white;
}
.service-icon {
  transition: background .25s ease, color .25s ease;
}

/* ─── Counter odometer ─── */
.counter-number { font-variant-numeric: tabular-nums; }

/* ─── Gallery lightbox ─── */
.gallery-item { position: relative; overflow: hidden; }
.gallery-item img { transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,59,99,.8) 0%, transparent 60%);
  opacity: 0; transition: opacity .3s ease;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 1.25rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ─── Lightbox ─── */
#lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
#lightbox.open { opacity: 1; pointer-events: all; }
#lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 12px; object-fit: contain; }
#lightbox-close {
  position: absolute; top: 1.25rem; right: 1.25rem;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: rgba(255,255,255,.15); color: white;
  border: none; cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
#lightbox-close:hover { background: rgba(255,255,255,.3); }

/* ─── Testimonial slider ─── */
.testimonial-slider { overflow: hidden; }
.testimonial-track {
  display: flex; transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.testimonial-slide { flex: 0 0 100%; }

/* ─── FAQ accordion ─── */
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .35s ease, padding .35s ease; }
.faq-answer.open { max-height: 500px; }
.faq-icon { transition: transform .3s ease; }
.faq-btn[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }

/* ─── Breadcrumb ─── */
.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  margin: 0 .4rem;
  color: var(--color-text-secondary);
}

/* ─── Animations ─── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
  .pulse-ring, .pulse-ring-green { animation: none; }
}

/* ─── Section headings ─── */
.section-label {
  display: inline-block;
  background: var(--color-secondary-light);
  color: var(--color-primary-blue);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .25rem .8rem;
  border-radius: 999px;
  border: 1px solid rgba(0,91,150,.15);
}

/* ─── Red accent divider ─── */
.heading-accent {
  display: inline-block;
  width: 3rem; height: 3px;
  background: var(--color-primary-red);
  border-radius: 2px;
  margin-top: .5rem;
}

/* ─── Stat card gradient ─── */
.stat-card {
  background: linear-gradient(135deg, var(--color-primary-blue) 0%, var(--color-navy) 100%);
}

/* ─── Form inputs ─── */
.form-input {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: .625rem;
  font-size: .9rem;
  background: white;
  color: var(--color-text-primary);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-input:focus {
  border-color: var(--color-primary-blue);
  box-shadow: 0 0 0 3px rgba(0,91,150,.1);
}
.form-input::placeholder { color: var(--color-text-secondary); }

/* ─── Mobile: hide floating call/WA when sticky bar is visible ─── */
@media (max-width: 1023px) {
  .pulse-ring, .pulse-ring-green { bottom: 5.5rem !important; }
}

/* ─── Mobile spacing for sticky bottom bar ─── */
@media (max-width: 1023px) {
  body { padding-bottom: 5rem; }
}
