/* ==========================================================================
   PROVTEC — base.css
   Estilos compartidos: variables, reset, header transparente (se vuelve
   sólido al hacer scroll), footer, botones y utilidades.
   ========================================================================== */

/* ---------- Variables ---------- */
:root {
  --azul-noche: #0b1e33;
  --azul-profundo: #10294a;
  --azul: #1f6fe0;
  --celeste: #00A6DE;
  --cian: #00BBC1;
  --gris-fondo: #f4f7fb;
  --blanco: #ffffff;
  --gris-texto: #4b5b6f;
  --gris-borde: #e3eaf3;

  --fuente-titulos: 'Sora', 'Segoe UI', sans-serif;
  --fuente-cuerpo: 'Inter', 'Segoe UI', sans-serif;

  --contenedor: 1200px;
  --radio: 14px;
  --sombra: 0 14px 34px rgba(11, 30, 51, 0.12);
  --transicion: 0.25s ease;
  --alto-header: 84px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--fuente-cuerpo);
  color: var(--gris-texto);
  background: var(--blanco);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--fuente-titulos);
  color: var(--azul-noche);
  line-height: 1.2;
  font-weight: 700;
}

/* ---------- Utilidades ---------- */
.contenedor {
  width: min(var(--contenedor), 92%);
  margin-inline: auto;
}

.seccion {
  padding: 90px 0;
}

.etiqueta {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cian);
  margin-bottom: 14px;
}

.titulo-seccion {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  margin-bottom: 18px;
}

/* ---------- Animación de aparición (compartida) ---------- */
[data-animar] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-animar].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 10px;
  font-family: var(--fuente-titulos);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transicion);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primario {
  background: var(--cian);

  color: var(--blanco);
  box-shadow: var(--sombra);
}

.btn-primario:hover {
  background: var(--celeste);
  transform: translateY(-2px);
}

.btn-secundario {
  background: transparent;
  color: var(--blanco);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-secundario:hover {
  border-color: var(--blanco);
  background: rgba(255, 255, 255, 0.08);
}

.btn-borde {
  background: transparent;
  color: var(--cian);
  border-color: var(--cian);
}

.btn-borde:hover {
  background: var(--cian);
  color: var(--blanco);
}

/* ==========================================================================
   HEADER TRANSPARENTE
   Fijo sobre el hero. Sin scroll: fondo transparente.
   Con scroll (clase .header--solido añadida por JS): fondo azul noche.
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.header--solido {
  background: rgba(11, 30, 51, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--alto-header);
}

.header__logo img {
  height: 46px;
  width: auto;
}

.header__derecha {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__lista {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav__enlace {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 0;
  position: relative;
  transition: var(--transicion);
}

.nav__enlace::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--cian);
  transition: width var(--transicion);
}

.nav__enlace:hover,
.nav__enlace--activo {
  color: var(--blanco);
}

.nav__enlace:hover::after,
.nav__enlace--activo::after {
  width: 100%;
}

.header__cta {
  padding: 11px 24px;
  font-size: 0.9rem;
}

/* Menú móvil */
.header__hamburguesa {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 42px;
  height: 42px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.header__hamburguesa span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--blanco);
  transition: var(--transicion);
}

/* ---------- Hero interno de página ---------- */
/* padding-top compensa el header fijo */
.hero-pagina {
  background:
    radial-gradient(ellipse at 85% 15%, rgba(34, 211, 238, 0.18), transparent 55%),
    linear-gradient(135deg, var(--azul-noche) 0%, var(--azul-profundo) 100%),
    url('/assets/img/inicio/paginas.png');
  color: var(--blanco);
  text-align: center;
  padding: calc(var(--alto-header) + 80px) 0 90px;
}

.hero-pagina .etiqueta {
  color: var(--cian);
}

.hero-pagina h1 {
  color: var(--blanco);
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 18px;
}

.hero-pagina p {
  max-width: 760px;
  margin: 0 auto 30px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--azul-noche);
  color: rgba(255, 255, 255, 0.75);
  padding: 70px 0 0;
  font-size: 0.95rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 50px;
}

.footer__logo img {
  height: 48px;
  width: auto;
  margin-bottom: 20px;
}

.footer__descripcion {
  margin-bottom: 22px;
  line-height: 1.7;
}

.footer__social {
  display: flex;
  gap: 12px;
}

.footer__social a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  transition: var(--transicion);
}

.footer__social a:hover {
  background: var(--azul);
  border-color: var(--azul);
}

.footer__social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer h4 {
  color: var(--blanco);
  font-size: 1rem;
  margin-bottom: 20px;
}

.footer__lista li {
  margin-bottom: 12px;
}

.footer__lista a {
  transition: var(--transicion);
}

.footer__lista a:hover {
  color: var(--cian);
}

.footer__contacto p {
  margin-bottom: 14px;
  line-height: 1.7;
}

.footer__contacto a {
  color: var(--celeste);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Botón flotante de WhatsApp ---------- */
.whatsapp-flotante {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 90;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.45);
  transition: var(--transicion);
}

.whatsapp-flotante:hover {
  transform: scale(1.08);
}

.whatsapp-flotante svg {
  width: 30px;
  height: 30px;
  fill: var(--blanco);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .seccion {
    padding: 64px 0;
  }

  .header__hamburguesa {
    display: flex;
  }

  .header__cta {
    display: none;
  }

  /* En móvil el header siempre es sólido para que el menú se lea bien */
  .header {
    background: rgba(11, 30, 51, 0.96);
  }

  .nav {
    position: absolute;
    top: var(--alto-header);
    left: 0;
    right: 0;
    background: var(--azul-noche);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .nav--abierto {
    max-height: 420px;
    box-shadow: 0 16px 24px rgba(0, 0, 0, 0.3);
  }

  .nav__lista {
    flex-direction: column;
    gap: 0;
    padding: 12px 0 24px;
  }

  .nav__lista li {
    width: 100%;
    text-align: center;
  }

  .nav__enlace {
    display: block;
    padding: 14px 0;
  }

  .header__derecha {
  display: contents;
}

}

@media (max-width: 540px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}
