/* ==========================================================================
   AMA 2 Investment — Perforación de pozos de agua en Roatán
   styles.css — Diseño responsive mobile-first
   Paleta: agua y tierra (según especificación)
   ========================================================================== */

/* Google Fonts: Montserrat (títulos) + Inter (texto) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Montserrat:wght@600;700;800&display=swap');

/* ---------- Variables ---------- */
:root {
  --azul-profundo: #0B3C5D;   /* fondos oscuros, header, footer-cta */
  --azul-agua:     #328CC1;   /* acentos, botones de llamada, enlaces */
  --tierra:        #D9B310;   /* acento arena/tierra */
  --gris:          #1D2731;   /* texto principal, footer */
  --hueso:         #F5F5F0;   /* fondos alternos */
  --blanco:        #FFFFFF;
  --verde-wa:      #25D366;   /* WhatsApp */
  --verde-wa-dark: #1DA851;
  --header-h: 72px;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(11, 60, 93, 0.12);
  --font-head: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
}

/* ---------- Reset y base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;               /* desplazamiento suave entre secciones */
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--gris);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.2;
  color: var(--azul-profundo);
}

img, video { max-width: 100%; display: block; }

a { color: var(--azul-agua); }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: 0 0 auto;
}

/* Espacio para que el header fijo no tape las secciones al navegar por anclas */
section[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* ==========================================================================
   HEADER FIJO
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: #ffffff;
  border-bottom: 1px solid rgba(11, 60, 93, 0.1);
  transition: box-shadow 0.3s ease;
}

.header.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Logo: imagen directa sobre el header blanco */
.logo {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  text-decoration: none;
}

.logo-img {
  display: block;
  height: 44px;
  width: auto;
}

/* Navegación: panel desplegable en móvil */
.nav {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  background: #ffffff;
  border-top: 1px solid rgba(11, 60, 93, 0.1);
  box-shadow: 0 12px 24px rgba(11, 60, 93, 0.12);
  padding: 0.5rem 1.25rem 1rem;
}

.nav.open { display: flex; }

.nav a {
  color: var(--gris);
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 0.25rem;
  border-bottom: 1px solid rgba(11, 60, 93, 0.08);
}

.nav a:last-child { border-bottom: none; }
.nav a:hover, .nav a:focus-visible { color: var(--azul-agua); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Selector de idioma */
.lang-toggle {
  display: flex;
  border: 1px solid rgba(29, 39, 49, 0.3);
  border-radius: 999px;
  overflow: hidden;
}

.lang-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--gris);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  min-height: 36px;
}

.lang-btn.active {
  background: var(--tierra);
  color: var(--gris);
}

/* Botón hamburguesa */
.menu-toggle {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--azul-profundo);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ==========================================================================
   BOTONES (grandes, fáciles de tocar con el pulgar)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  min-height: 52px;               /* área táctil cómoda */
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18); }
.btn:active { transform: translateY(0); }

.btn-call {
  background: var(--azul-agua);
  color: var(--blanco);
}

.btn-call:hover { background: #2a7aad; }

.btn-whatsapp {
  background: var(--verde-wa);
  color: var(--blanco);
}

.btn-whatsapp:hover { background: var(--verde-wa-dark); }

.btn-lg {
  font-size: 1.05rem;
  padding: 1rem 1.9rem;
  min-height: 56px;
}

/* Botón de llamada del header: compacto; en pantallas muy pequeñas solo ícono */
.btn-header {
  min-height: 44px;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .btn-header span { display: none; }
  .btn-header { padding: 0.55rem 0.75rem; }
}

/* Fila de botones CTA reutilizable */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.cta-row .btn { flex: 1 1 240px; }

.cta-row-center { justify-content: center; }
.cta-row-center .btn { flex: 0 1 auto; }

.section-cta { margin-top: 2.5rem; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  color: var(--blanco);
  overflow: hidden;
  background: var(--azul-profundo); /* color de respaldo mientras carga la foto */
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(105deg, rgba(11, 60, 93, 0.92) 0%, rgba(11, 60, 93, 0.65) 55%, rgba(29, 39, 49, 0.45) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero h1 {
  color: var(--blanco);
  font-size: clamp(1.9rem, 5.5vw, 3.4rem);
  font-weight: 800;
  margin-bottom: 1.1rem;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
  max-width: 600px;
}

/* ==========================================================================
   BARRA DE CONFIANZA
   ========================================================================== */
.trust-bar {
  background: var(--azul-profundo);
  color: var(--blanco);
  padding: 2rem 0;
  border-top: 4px solid var(--tierra);
}

.trust-grid {
  display: grid;
  gap: 1.5rem;
  text-align: center;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.trust-number {
  font-family: var(--font-head);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--tierra);
  line-height: 1;
}

.trust-icon {
  width: 2rem;
  height: 2rem;
  color: var(--tierra);
}

.trust-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  max-width: 300px;
}

/* ==========================================================================
   SECCIONES GENERALES
   ========================================================================== */
.section { padding: 4.5rem 0; }

.section-alt { background: var(--hueso); }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-head h2 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 0.6rem;
}

/* Subrayado de acento bajo los títulos de sección */
.section-head h2::after {
  content: '';
  display: block;
  width: 64px;
  height: 4px;
  background: var(--tierra);
  border-radius: 2px;
  margin: 0.9rem auto 0;
}

.section-head p {
  color: #4a5a68;
  font-size: 1.05rem;
}

/* ==========================================================================
   SERVICIOS (tarjetas)
   ========================================================================== */
.cards-grid {
  display: grid;
  gap: 1.75rem;
}

.card {
  background: var(--blanco);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--azul-agua);
}

.card img {
  width: 100%;
  height: auto; /* anula el atributo height del HTML para que mande el aspect-ratio */
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #dde5ea; /* fondo mientras carga o si falta la foto */
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.card-body h3 { font-size: 1.25rem; }

.card-body p { color: #44525e; flex: 1; }

.card-cta {
  font-family: var(--font-head);
  font-weight: 700;
  text-decoration: none;
  color: var(--azul-agua);
  margin-top: 0.25rem;
}

.card-cta:hover { color: var(--azul-profundo); text-decoration: underline; }

/* ==========================================================================
   POR QUÉ ELEGIRNOS
   ========================================================================== */
.why-grid {
  display: grid;
  gap: 2.25rem;
  align-items: center;
}

.why-points {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.why-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.why-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--azul-profundo);
  color: var(--tierra);
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-icon .icon { width: 24px; height: 24px; }

.why-item h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.why-item p  { color: #44525e; }

.why-photo img {
  width: 100%;
  height: auto; /* anula el atributo height del HTML para que mande el aspect-ratio */
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #dde5ea;
}

/* ==========================================================================
   PROCESO DE TRABAJO (4 pasos)
   ========================================================================== */
.steps-grid {
  list-style: none;
  display: grid;
  gap: 1.75rem;
  counter-reset: paso;
}

.step {
  background: var(--blanco);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem 1.75rem;
  position: relative;
  text-align: center;
}

.section-alt .step, #proceso .step { background: var(--hueso); box-shadow: none; }

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--tierra);
  color: var(--gris);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.step h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.step p  { color: #44525e; font-size: 0.97rem; }

/* ==========================================================================
   GALERÍA
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

.gallery-grid img {
  width: 100%;
  height: auto; /* anula el atributo height del HTML para que mande el aspect-ratio */
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #dde5ea;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow);
}

/* ==========================================================================
   VIDEOS
   ========================================================================== */
.videos-grid {
  display: grid;
  gap: 2rem;
}

.video-item video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--gris) url('img/placeholder.svg') center / cover no-repeat;
  border-radius: var(--radius);
}

.video-item figcaption {
  text-align: center;
  font-weight: 600;
  color: #44525e;
  margin-top: 0.75rem;
}

/* ==========================================================================
   ZONA DE SERVICIO
   ========================================================================== */
.area-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.area-text p { color: #44525e; margin-bottom: 1rem; }

.area-note a { font-weight: 600; }

.area-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.area-list li {
  background: var(--blanco);
  border-radius: 8px;
  padding: 0.8rem 1rem 0.8rem 2.4rem;
  font-weight: 600;
  color: var(--azul-profundo);
  box-shadow: var(--shadow);
  position: relative;
}

/* Pin de mapa antes de cada localidad */
.area-list li::before {
  content: '';
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1em;
  height: 1.1em;
  background: var(--tierra);
  /* Pin dibujado con máscara SVG */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ==========================================================================
   PREGUNTAS FRECUENTES
   ========================================================================== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid #d8dee3;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--azul-profundo);
  padding: 1.2rem 2.5rem 1.2rem 0.25rem;
  position: relative;
  min-height: 52px;
}

.faq-item summary::-webkit-details-marker { display: none; }

/* Indicador + / − */
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--azul-agua);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after { content: '−'; }

.faq-item p {
  padding: 0 2rem 1.3rem 0.25rem;
  color: #44525e;
}

.faq-cta {
  text-align: center;
  font-weight: 600;
  color: var(--azul-profundo);
  margin-top: 2.5rem;
  font-size: 1.05rem;
}

.faq-cta + .cta-row { justify-content: center; margin-top: 1rem; }
.faq-cta + .cta-row .btn { flex: 0 1 auto; }

/* ==========================================================================
   CTA FINAL
   ========================================================================== */
.final-cta {
  background: linear-gradient(135deg, var(--azul-profundo) 0%, #0e4a73 100%);
  color: var(--blanco);
  text-align: center;
  padding: 5rem 0;
}

.final-cta h2 {
  color: var(--blanco);
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  font-weight: 800;
  max-width: 720px;
  margin: 0 auto 1rem;
}

.final-cta p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--gris);
  color: rgba(255, 255, 255, 0.82);
  padding-top: 3.5rem;
}

.footer-grid {
  display: grid;
  gap: 2.25rem;
  padding-bottom: 2.5rem;
}

.logo-footer {
  height: 44px;
  width: auto;
  background: #ffffff;
  border-radius: 10px;
  padding: 6px 12px;
  margin-bottom: 0.75rem;
}

.footer-brand p { max-width: 280px; font-size: 0.95rem; }

.footer-col h3 {
  color: var(--blanco);
  font-size: 1rem;
  margin-bottom: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-contact { list-style: none; }

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.footer-contact .icon { color: var(--tierra); }

.footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.footer a:hover { color: var(--tierra); text-decoration: underline; }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.25rem 0;
  font-size: 0.85rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   BOTÓN FLOTANTE DE WHATSAPP
   ========================================================================== */
.whatsapp-float {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 90;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--verde-wa);
  color: var(--blanco);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background 0.2s ease;
  animation: wa-pulse 2.6s ease-out infinite;
}

.whatsapp-float svg { width: 30px; height: 30px; }

.whatsapp-float:hover { transform: scale(1.08); background: var(--verde-wa-dark); }

/* Pulso suave del botón flotante */
@keyframes wa-pulse {
  0%   { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(37, 211, 102, 0.45); }
  70%  { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ==========================================================================
   ANIMACIONES DE SCROLL (fade-in)
   Solo se ocultan los elementos cuando JS está disponible (html.js),
   para que el contenido siempre sea visible si JS falla.
   ========================================================================== */
html.js .fade-in {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js .fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   BREAKPOINTS (mobile-first)
   ========================================================================== */

/* Tablets pequeñas */
@media (min-width: 640px) {
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Escritorio */
@media (min-width: 960px) {
  .section { padding: 6rem 0; }

  /* Navegación en línea; se oculta la hamburguesa */
  .menu-toggle { display: none; }

  .nav {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 1.4rem;
    padding: 0;
    border-top: none;
    background: transparent;
  }

  .nav a {
    padding: 0.25rem 0;
    border-bottom: none;
    font-size: 0.92rem;
    white-space: nowrap;
  }

  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: 1.15fr 1fr; gap: 3rem; }
  .steps-grid { grid-template-columns: repeat(4, 1fr); }
  .videos-grid { grid-template-columns: repeat(2, 1fr); }
  .area-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 0.8fr 0.8fr; }
}

/* ==========================================================================
   ACCESIBILIDAD: movimiento reducido
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  html.js .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .whatsapp-float { animation: none; }

  .btn, .gallery-grid img { transition: none; }
}
