/* =====================================================
   GASOMATICO S.A. de C.V. — Hoja de estilos principal
   ===================================================== */

:root {
  --rojo:   #D81920;
  --azul:   #1B3A8C;
  --blanco: #ffffff;
  --gris:   #f4f4f4;
  --texto:  #444444;
  --font:   'Roboto', sans-serif;
}

/* Reset base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--texto); overflow-x: hidden; }
img  { max-width: 100%; height: auto; display: block; }

/* Offset para links internos con header fijo
   Header ~78px + Navbar ~46px = 124px → 130px con margen */
section { scroll-margin-top: 130px; }

/* =====================================================
   HEADER
   ===================================================== */
#top-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--blanco);
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo img {
  height: 58px;
  width: auto;
  object-fit: contain;
  transition: transform .3s;
}
.header-logo img:hover { transform: scale(1.04); }

.btn-pedido {
  display: inline-block;
  background: var(--rojo);
  color: var(--blanco) !important;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .07em;
  padding: 10px 24px;
  border-radius: 5px;
  text-decoration: none;
  transition: background .25s, transform .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn-pedido:hover {
  background: #b8151c;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(216,25,32,.4);
}

/* =====================================================
   NAVBAR
   ===================================================== */
#main-nav {
  position: sticky;
  top: 79px;          /* altura del header */
  z-index: 999;
  background: var(--rojo);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
}

/* Links */
#nav-links {
  list-style: none;
  display: flex;
  gap: 0;
  flex: 1;
}

.nav-link {
  display: block;
  color: var(--blanco) !important;
  font-weight: 700;
  font-size: .88rem;
  letter-spacing: .06em;
  padding: 15px 22px;
  text-decoration: none;
  position: relative;
  transition: background .2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 3px;
  background: var(--blanco);
  transition: width .3s;
}
.nav-link:hover,
.nav-link.active { background: rgba(0,0,0,.18); }
.nav-link:hover::after,
.nav-link.active::after { width: 65%; }

/* Redes sociales en nav */
.nav-social {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.nav-social a {
  color: var(--blanco);
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform .2s, opacity .2s;
}
.nav-social a:hover { transform: scale(1.3); opacity: .85; }

/* Hamburger (mobile) */
#nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}
#nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--blanco);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

/* =====================================================
   SECCIÓN HOME — HERO
   ===================================================== */
.hero-section {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../img/elementos_foto Home.png') center/cover no-repeat;
  z-index: 0;
  transform: scale(1.02);
  transition: transform 8s ease-out;
}
.hero-section:hover .hero-bg { transform: scale(1.06); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.52);
  z-index: 1;
}

.hero-content-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 70px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

/* Texto hero */
.hero-text h1 {
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  font-weight: 400;
  color: var(--blanco);
  line-height: 1.2;
  margin-bottom: 14px;
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.hero-text h1 strong { font-weight: 900; }

.hero-sub {
  color: rgba(255,255,255,.9);
  font-size: 1.1rem;
  margin-bottom: 32px;
  text-shadow: 0 1px 5px rgba(0,0,0,.4);
}

.btn-cotiza {
  display: inline-block;
  background: var(--rojo);
  color: var(--blanco) !important;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .07em;
  padding: 13px 38px;
  border-radius: 4px;
  text-decoration: none;
  border: 2px solid var(--rojo);
  transition: background .25s, color .25s, border-color .25s, transform .2s;
  animation: pulso-rojo 2.5s infinite;
}
.btn-cotiza:hover {
  background: transparent;
  border-color: var(--blanco);
  transform: translateY(-3px);
  animation: none;
}

@keyframes pulso-rojo {
  0%,100% { box-shadow: 0 0 0 0 rgba(216,25,32,.5); }
  50%      { box-shadow: 0 0 0 12px rgba(216,25,32,0); }
}

/* QR */
.hero-qr-wrap { flex-shrink: 0; }

.hero-qr {
  background: rgba(0,0,0,.35);
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  backdrop-filter: blur(6px);
}
.hero-qr img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin: 0 auto 8px;
}
.hero-qr p {
  color: var(--blanco);
  font-size: .8rem;
  font-weight: 500;
  margin: 0;
}

/* =====================================================
   SECCIÓN NOSOTROS
   ===================================================== */
/* ¿Quiénes somos? */
.titulo-seccion-izq {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 900;
  color: var(--azul);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 12px;
}
.titulo-seccion-izq::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 55px; height: 4px;
  background: var(--rojo);
  border-radius: 2px;
}

.quienes-wrap p {
  font-size: .96rem;
  line-height: 1.7;
  color: var(--texto);
  margin-bottom: 14px;
}

.nosotros-foto {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  transition: transform .35s, box-shadow .35s;
}
.nosotros-foto:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 28px rgba(0,0,0,.16);
}

/* Banner tres generaciones */
.banner-generaciones {
  position: relative;
  height: 270px;
  background: url('../img/elementos_foto nosotros.png') center/cover no-repeat;
  overflow: hidden;
}
.banner-generaciones-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}
.banner-generaciones-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding: 0 20px;
}
.banner-generaciones-text h3 {
  color: var(--blanco);
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
}

/* Misión / Visión */
.mv-wrap { background: var(--gris); }

.mv-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--blanco);
  border-radius: 10px;
  padding: 28px 24px;
  height: 100%;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  transition: transform .3s, box-shadow .3s;
}
.mv-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,.13);
}

.mv-icon-circle {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
}
.mv-icon-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mv-title {
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--azul);
  margin-bottom: 10px;
}
.mv-desc {
  font-size: .9rem;
  line-height: 1.65;
  color: var(--texto);
  margin: 0;
}

/* =====================================================
   SECCIÓN SERVICIO
   ===================================================== */
.servicio-section { background: var(--blanco); }

.titulo-seccion-centro {
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  font-weight: 900;
  color: var(--azul);
  margin-bottom: 14px;
}

.subtitulo-seccion {
  font-size: .97rem;
  color: var(--texto);
  line-height: 1.65;
  max-width: 680px;
  margin: 0 auto;
}

/* Tarjetas de servicio: usar la imagen directamente */
.servicio-card-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0,0,0,.08);
  transition: transform .35s, box-shadow .35s;
  cursor: default;
}
.servicio-card-img:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 38px rgba(0,0,0,.15);
}

/* =====================================================
   SECCIÓN CONTACTO
   ===================================================== */
.contacto-section {
  position: relative;
  overflow: hidden;
}

.contacto-fondo {
  position: absolute;
  inset: 0;
  background: url('../img/elementos_foto contacto fondo.png') center/cover no-repeat;
  z-index: 0;
}
.contacto-overlay-azul {
  position: absolute;
  inset: 0;
  background: rgba(22, 46, 120, .84);
  z-index: 1;
}

.contacto-inner {
  position: relative;
  z-index: 2;
}

.contacto-titulo {
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  font-weight: 900;
  color: var(--blanco);
  margin-bottom: 28px;
}

.contacto-foto-persona {
  width: 110px;
  height: 110px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.35);
}

.contacto-desc {
  color: rgba(255,255,255,.9);
  font-size: .92rem;
  line-height: 1.7;
  margin: 0;
  align-self: center;
}

.contacto-tels {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}
.tel-item { display: flex; flex-direction: column; }
.tel-label {
  color: rgba(255,255,255,.72);
  font-size: .82rem;
}
.tel-num {
  color: var(--blanco);
  font-weight: 700;
  font-size: 1.05rem;
}

/* Tarjeta formulario */
.contacto-form-card {
  background: var(--blanco);
  border-radius: 0 0 6px 6px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
}

.form-barra-roja {
  height: 7px;
  background: var(--rojo);
}

.form-body {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.campo-gaso {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  background: #ebebeb;
  font-family: var(--font);
  font-size: .92rem;
  color: #555;
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
  resize: none;
}
.campo-gaso::placeholder { color: #999; }
.campo-gaso:focus {
  border-color: var(--azul);
  background: var(--blanco);
  box-shadow: 0 0 0 3px rgba(27,58,140,.12);
}
textarea.campo-gaso { min-height: 110px; resize: vertical; }

.btn-enviar {
  width: 100%;
  padding: 14px;
  background: var(--rojo);
  color: var(--blanco);
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .07em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background .25s, transform .2s;
}
.btn-enviar:hover {
  background: #b8151c;
  transform: translateY(-2px);
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
  background: var(--azul);
  color: rgba(255,255,255,.7);
  font-size: .84rem;
}

/* =====================================================
   WHATSAPP FLOTANTE
   ===================================================== */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 9999;
  width: 58px;
  height: 58px;
  background: #25D366;
  color: var(--blanco);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(37,211,102,.5);
  animation: rebote-wa 2s ease-in-out infinite;
  transition: transform .25s, box-shadow .25s;
}
.wa-float:hover {
  animation: none;
  transform: scale(1.12);
  box-shadow: 0 6px 26px rgba(37,211,102,.65);
  color: var(--blanco);
}

@keyframes rebote-wa {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 991px) {
  section { scroll-margin-top: 60px; }

  #main-nav { top: 0; position: relative; }

  /* Hamburger visible */
  #nav-toggle { display: flex; }

  .nav-inner {
    flex-wrap: wrap;
    padding: 8px 16px;
    gap: 8px;
  }

  #nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-bottom: 10px;
  }
  #nav-links.open { display: flex; }

  .nav-link { padding: 10px 12px; }

  .nav-social {
    margin-left: 0;
    width: 100%;
    padding-bottom: 8px;
  }

  .hero-content-wrap {
    flex-direction: column;
    align-items: flex-start;
    padding: 50px 20px;
  }
  .hero-qr-wrap { align-self: flex-start; }

  .banner-generaciones { height: 200px; }
}

@media (max-width: 767px) {
  .nosotros-foto { height: 170px; }

  .hero-text h1 { font-size: 1.65rem; }

  .contacto-section .d-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .contacto-tels { align-items: center; }
}

@media (max-width: 480px) {
  .header-inner { padding: 8px 16px; }
  .header-logo img { height: 46px; }
  .btn-pedido { font-size: .76rem; padding: 8px 14px; }
}
