/* Estilos mínimos — Tailwind CDN cubre casi todo */

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

body {
  overflow-x: hidden;
}

/* Hero con imagen de fondo + overlay */
.hero-bg {
  background-image: linear-gradient(
      to right,
      rgba(255, 255, 255, 0.97) 0%,
      rgba(255, 255, 255, 0.88) 45%,
      rgba(255, 255, 255, 0.55) 100%
    ),
    url('https://placehold.co/1200x800/e8f5e9/166534?text=Tecnico+uniformado');
  background-size: cover;
  background-position: center right;
}

@media (max-width: 767px) {
  .hero-bg {
    background-image: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.97) 0%,
        rgba(255, 255, 255, 0.92) 70%,
        rgba(255, 255, 255, 0.82) 100%
      ),
      url('https://placehold.co/800x600/e8f5e9/166534?text=Tecnico');
    background-position: center bottom;
    background-size: cover;
  }
}

/* iOS: inputs < 16px hacen zoom al enfocar */
input,
select,
textarea,
button {
  font-size: max(16px, 1em);
}

@media (min-width: 640px) {
  input,
  select,
  textarea {
    font-size: inherit;
  }
}

/* Barra fija móvil (WhatsApp + llamada) */
.mobile-cta-bar {
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
}

@media (max-width: 1023px) {
  body {
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0));
  }
}

/* Hero: etiquetas cortas en móvil */
.btn-hero-wa .wa-label-long {
  display: none;
}

@media (min-width: 640px) {
  .btn-hero-wa .wa-label-short {
    display: none;
  }

  .btn-hero-wa .wa-label-long {
    display: inline;
  }
}

/* Contacto / footer: líneas largas */
.contact-line {
  flex-wrap: wrap;
  row-gap: 0.25rem;
}

.break-anywhere {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* FAQ: título largo en móvil */
@media (max-width: 639px) {
  .faq-trigger {
    font-size: 0.9375rem;
    line-height: 1.35;
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
  }
}

/* Reseñas */
.review-card {
  min-height: 10rem;
}

@media (max-width: 639px) {
  .review-card {
    min-height: auto;
  }
}

/* Botón urgencias: etiqueta + teléfono en dos líneas (números largos no rompen el header) */
.btn-urgencias {
  max-width: 10.75rem;
  text-decoration: none;
}

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

.btn-urgencias__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  line-height: 1.15;
  min-width: 0;
  max-width: 100%;
}

.btn-urgencias__label {
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}

.btn-urgencias__phone {
  font-size: 0.6875rem;
  font-weight: 600;
  opacity: 0.92;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-urgencias--block .btn-urgencias__phone {
  max-width: 14rem;
}

@media (min-width: 768px) {
  .btn-urgencias {
    max-width: 11.5rem;
  }

  .btn-urgencias__phone {
    max-width: 10.5rem;
  }
}

/* Galería: scroll-snap horizontal */
.gallery-track {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #16a34a #e5e7eb;
  max-width: 100%;
}

.gallery-slide {
  scroll-snap-align: start;
  flex: 0 0 min(88vw, 20rem);
}

@media (min-width: 640px) {
  .gallery-slide {
    flex: 0 0 72%;
  }
}

@media (min-width: 768px) {
  .gallery-slide {
    flex: 0 0 48%;
  }
}

/* FAQ acordeón */
.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-panel.is-open {
  max-height: 24rem;
}

.faq-trigger[aria-expanded='true'] .faq-chevron {
  transform: rotate(180deg);
}

.faq-chevron {
  transition: transform 0.25s ease;
}

/* Botón WhatsApp marca */
.btn-whatsapp {
  background-color: #25d366;
}

.btn-whatsapp:hover {
  background-color: #1ebe57;
}

.btn-whatsapp:focus-visible {
  outline: 2px solid #166534;
  outline-offset: 2px;
}

/* Menú móvil */
.nav-mobile-panel {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.nav-mobile-panel.is-open {
  transform: translateX(0);
}

/* Modal privacidad */
.modal-backdrop {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}
