/* ==========================================================================
   BASE.CSS — compartido por TODAS las páginas
   Incluye: tokens de color/tipografía, reset, botones, header, footer,
   la utilidad genérica .gallery-placeholder, los componentes de formulario
   (usados en contacto.html y cobertura.html) y la burbuja de WhatsApp.
   Cárgalo SIEMPRE antes del CSS específico de cada página.
   ========================================================================== */

/* ==========================================================================
   TOKENS DE DISEÑO — extraídos directamente de la maqueta en PDF
   --navy    : color primario de marca (header, tarjetas de servicio, texto
               de citas de clientes)
   --maroon  : color de acento (títulos, botones principales, CTA final)
   --orange  : acento secundario (Servicios/Flota/Cobertura)
   --bg-page : fondo general gris muy claro
   --bg-white: fondo blanco
   --tag-ink : color de texto de las etiquetas/pills (verde oliva, tal cual
               aparece en la maqueta)
   ========================================================================== */
:root {
  --navy: #0C6291;
  --navy-dark: #0A5277;
  --maroon: #A63446;
  --maroon-dark: #8B2B3A;
  --orange: #F6AE2D;
  --bg-page: #F9F9F9;
  --bg-white: #FFFFFF;
  --bg-black: #0A0A0A;
  --tag-ink: #506349;
  --line: rgba(12, 98, 145, 0.15);

  --font: "Poppins", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1140px;
}

/* ==========================================================================
   RESET LIGERO
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--navy);
  background: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--font); font-weight: 700; line-height: 1.2; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--maroon);
  color: #fff;
  padding: 12px 20px;
  z-index: 100;
  border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; top: 0; }

:focus-visible {
  outline: 3px solid var(--maroon);
  outline-offset: 2px;
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-accent {
  background: var(--maroon);
  color: #fff;
}
.btn-accent:hover { background: var(--maroon-dark); }

.btn-outline {
  border-color: var(--maroon);
  color: var(--maroon);
  background: transparent;
}
.btn-outline:hover { background: var(--maroon); color: #fff; }

.btn-white {
  background: #fff;
  color: var(--maroon);
}
.btn-white:hover { background: #f3ecec; }

.btn-sm { padding: 10px 22px; font-size: 0.88rem; }

.btn-submit {
  width: 100%;
  justify-content: center;
  padding-block: 15px;
  font-size: 1rem;
}

/* ==========================================================================
   ENCABEZADO
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.logo-mark { width: 30px; height: 30px; object-fit: contain; }
.logo-text {
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.15rem;
}
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a:not(.btn) {
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav a:not(.btn):hover { color: #fff; }
.site-nav .btn { padding: 10px 22px; font-size: 0.9rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* ==========================================================================
   GALERÍA GENÉRICA — usada en Inicio, Servicios y Flota.
   Los degradados de color quedan como respaldo visual si una imagen no
   carga; con foto real puesta, simplemente no se ven.
   ========================================================================== */
.gallery-placeholder {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  display: block;
  background-size: cover;
  background-position: center;
}
.gallery-placeholder--a {
  background: linear-gradient(135deg, #14181c 0%, #2b2f33 60%, #3d4247 100%);
}
.gallery-placeholder--b {
  background: linear-gradient(135deg, #6c7f8c 0%, #9fb2bd 55%, #cfe0e8 100%);
}
.gallery-placeholder--c {
  background: linear-gradient(135deg, #22262a 0%, #4a4f53 100%);
  aspect-ratio: 16 / 11;
}
.gallery-placeholder--d {
  background: linear-gradient(135deg, #16324A 0%, #4d7ea8 60%, #cfe0e8 100%);
}

/* ==========================================================================
   COMPONENTES DE FORMULARIO — usados en Contacto y Cobertura
   ========================================================================== */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.form-field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}
.form-field label span {
  color: var(--maroon);
}
.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--navy);
  background: var(--bg-page);
  border: 1.5px solid transparent;
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: #94a3ad; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: #fff;
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%230C6291'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.19l3.71-3.96a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 38px; }

.form-note {
  font-size: 0.82rem;
  color: #6b7b85;
  margin: 4px 0 24px;
}
.form-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
}
.form-status.is-success {
  background: rgba(16, 122, 74, 0.12);
  color: #0F5C39;
}
.form-status.is-error {
  background: rgba(166, 52, 70, 0.1);
  color: var(--maroon-dark);
}

/* ==========================================================================
   PIE DE PÁGINA — banda maroon a todo lo ancho, como en la maqueta
   ========================================================================== */
.site-footer {
  background: var(--maroon);
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 24px;
  padding-block: 40px;
  align-items: start;
}
.footer-brand {
  font-weight: 800;
  color: #fff;
  margin: 0 0 10px;
  letter-spacing: 0.03em;
}
address { font-style: normal; line-height: 1.7; }
address a:hover { color: #fff; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: rgba(255,255,255,0.85); }
.footer-links a:hover { color: #fff; }
.footer-copy { align-self: end; color: rgba(255,255,255,0.7); font-size: 0.82rem; }

/* ==========================================================================
   BURBUJA FLOTANTE DE WHATSAPP — presente en todas las páginas.
   El botón lo crea js/script.js; aquí solo viven sus estilos.
   ========================================================================== */
.wa-float {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 90; /* por encima del header sticky (50), debajo del skip-link (100) */
  display: flex;
  align-items: center;
  gap: 0;
  height: 58px;
  min-width: 58px;
  margin: 0;
  padding: 0 15px;
  border-radius: 999px;
  background: #25D366;
  color: #fff;
  font-family: var(--font);
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transition: gap 0.25s ease, padding 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.wa-float .wa-float-icon {
  display: block;
  width: 28px;
  height: 28px;
  max-width: none;
  flex: 0 0 auto;
}
.wa-float-label {
  display: block;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
  transition: max-width 0.3s ease;
}
/* Anillo que "late" suavemente para llamar la atención */
.wa-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #25D366;
  z-index: -1;
  animation: wa-pulse 2.4s ease-out infinite;
}
@keyframes wa-pulse {
  0%   { transform: scale(1);    opacity: 0.55; }
  80%  { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(1.45); opacity: 0; }
}
/* En escritorio, al pasar el cursor se despliega el texto */
.wa-float:hover,
.wa-float:focus-visible {
  gap: 10px;
  padding-right: 20px;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}
.wa-float:hover .wa-float-label,
.wa-float:focus-visible .wa-float-label { max-width: 220px; }
.wa-float:hover::before { animation: none; opacity: 0; }
.wa-float:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .wa-float::before { animation: none; opacity: 0; }
}
@media print {
  .wa-float { display: none; }
}

/* ==========================================================================
   RESPONSIVE — encabezado, pie de página y burbuja (comunes a todas)
   ========================================================================== */
@media (max-width: 880px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-copy { grid-column: span 2; align-self: auto; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--navy);
    padding: 12px 24px 20px;
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 16px; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-copy { grid-column: auto; }

  /* Burbuja: en móvil solo el ícono */
  .wa-float { height: 54px; min-width: 54px; padding: 0 13px; }
  .wa-float-label { display: none; }
}