/* 1. Importación desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&display=swap');

/* =================================================
   VARIABLES GLOBALES
   Aquí definimos los colores corporativos
   para reutilizarlos en todo el sitio
================================================= */
:root {
  --azul-principal: #131FA9;     /* Azul corporativo INDUMEQ */
  --azul-claro: #e9efff;         /* Fondo claro para secciones */
  --gris-claro: #f2f2f2;         /* Fondo gris */
  --negro: #111;                 /* Negro para footer */
  --blanco: #ffffff;             /* Blanco base */
  --texto: #222;                 /* Color de texto general */
  --radius-sm: 0.6rem;
  --radius-md: 1.2rem;
  --radius-lg: 2rem;

  --shadow-soft: 0 0.8rem 2rem rgba(0,0,0,0.08);
  --shadow-strong: 0 2rem 4rem rgba(0,0,0,0.15);
}

/* =================================================
   RESET GENERAL
   Eliminamos estilos por defecto del navegador
================================================= */
*,
*::before,
*::after {
  margin: 0;                     /* Elimina márgenes */
  padding: 0;                    /* Elimina rellenos */
  box-sizing: border-box;        /* Evita errores de tamaño */
  margin: 0;
  padding: 0;
}
body {
  font-family: "Poppins", system-ui, sans-serif;
}


html {
  font-size: 100%;
  scroll-behavior: smooth;
}
/* =================================================
   ESTILOS GENERALES DEL BODY
================================================= */
body {
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--texto);           /* Color de texto */
  line-height: 1.6;              /* Espaciado entre líneas */
  background: var(--blanco);     /* Fondo blanco */
  line-height: 1.6;
  overflow-x: hidden; /* No scroll horizontal */
}

/* =================================================
   HEADER
================================================= */
.header {
  background: var(--blanco);     /* Fondo blanco */
  box-shadow: 0 2px 10px rgba(16, 28, 252, 0.05); /* Sombra ligera */
  position: sticky;              /* Header fijo al hacer scroll */
  top: 0;
  z-index: 1000;                 /* Siempre encima */
  transition: all 0.35s ease;
}

/* Contenedor del header */
.header-container {
  display: flex;                 /* Alinea elementos en fila */
  align-items: center;           /* Centra verticalmente */
  justify-content: space-between;/* Logo izquierda, menú derecha */
  padding: 1rem 4rem;
}

/* Logo */
.header-logo img {
  height: 5.5rem;                  /* Tamaño del logo */
}

/* Estado al hacer scroll */
.header.scrolled {
  background-color: rgba(255, 255, 255, 0.97);
  box-shadow: 0 0.8rem 2rem rgba(0,0,0,0.12);
}

/* Logo se hace más pequeño */
.header.scrolled .header-logo img {
  height: 4.8rem;
  transition: height 0.3s ease;
}

/* =================================================
   NAVEGACIÓN
================================================= */
.nav-list {
  display: flex;                 /* Menú horizontal */
  list-style: none;              /* Quita viñetas */
  gap: 1.5rem;                     /* Espacio entre enlaces */
  margin-bottom: auto;
}

/* Enlaces del menú */
.nav-link {

  text-decoration: none;         /* Quita subrayado */
  color: #333;                   /* Color del texto */
  font-weight: 500;              /* Grosor medio */
  transition: color 0.3s ease;   /* Animación suave */
  padding: 1rem 1.4rem;
  border-radius: 0.6rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Hover (NO activo) */
.nav-link:hover {
  background-color: rgba(19, 31, 169, 0.12);
  color: var(--azul-principal);
}
/* Activo */
.nav-link.active {
  background-color: var(--azul-principal);
  color: #ffffff;
}
/* Línea inferior animada SOLO para activo */
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 10%;
  bottom: -0.6rem;
  width: 80%;
  height: 0.3rem;
  background-color: var(--azul-principal);
  border-radius: 0.2rem;
}
/* Estilos para el botón Hamburguesa */
.nav-toggle {
    display: none; /* Oculto en escritorio */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.nav-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--azul-principal, #131fa9);
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* MEDIA QUERY PARA MÓVILES (Menos de 768px) */
@media (max-width: 768px) {
    .header-container {
        padding: 1rem 2rem; /* Reducimos padding lateral */
    }

    .nav-toggle {
        display: flex; /* Mostramos el botón */
    }

    .nav-list {
        position: fixed;
        top: 0;
        right: -100%; /* Oculto fuera de la pantalla */
        flex-direction: column;
        background-color: white;
        width: 70%; /* Ancho del menú lateral */
        height: 100vh;
        padding: 8rem 2rem;
        gap: 2rem;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.4s ease;
    }

    /* Clase que activaremos con JS */
    .nav-list.nav-list-visible {
        right: 0;
    }

    .nav-link {
        display: block;
        font-size: 1.2rem;
    }
}
/* =================================================
   HERO (IMAGEN PRINCIPAL)
================================================= */
.hero {
  position: relative;            /* Para usar overlay */
  min-height: min(85vh, 50rem);                  /* Altura casi pantalla completa */
  overflow: hidden;              /* Evita desbordes */
}

/* Imagen del hero */
.hero-img {
  width: 100%;                   /* Ocupa todo el ancho */
  height: 100%;                  /* Ocupa toda la altura */
  object-fit: cover;             /* No se deforma */

    /* Animación inicial */
  transform: scale(1.1);
  animation: heroZoom 18s ease-in-out infinite alternate;
}
/* Zoom suave de fondo */
@keyframes heroZoom {
  from {
    transform: scale(1.1);
  }
  to {
    transform: scale(1.5);
  }
}

/* Capa oscura encima de la imagen */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;                      /* Cubre todo */
  background: rgba(0, 0, 0, 0.792);  /* Oscurece la imagen */
  z-index: 0;
}

/* Contenedor del texto */
.hero-overlay {
  position: absolute; /* Fija la capa sobre la imagen */
  inset: 0;           /* Cubre el 100% del contenedor padre */
  display: flex;      /* Activa Flexbox para alinear el contenido */
  align-items: center;           /* Centrado vertical */
  justify-content: center;       /* Centrado horizontal */
  text-align: center;
  padding: 2rem;            /* Margen lateral para que el texto no toque el borde */
  z-index: 1;                    /* Sobre la capa oscura */
}

/* Texto principal */
.hero-title {
  color: var(--blanco);          /* Texto blanco */
  font-size: 3rem;               /* Tamaño grande */
  max-width: 70rem;              /* No se extiende demasiado */
  line-height: 1.2;               /* Ajusta el espacio vertical entre líneas; 1.2 hace que el título se vea compacto y sólido. */

  /* Estado inicial para una animación */
  opacity: 0;                    /* Hace que el elemento sea totalmente invisible al cargar la página. */
  transform: translateY(4rem);   /* Empuja el elemento 30px hacia abajo de su posición real para luego "subirlo". */
}

/* Animación del texto */
.animate-text {
  animation: textFadeUp 1.6s ease-out forwards;
  animation-delay: 0.4s;
}

/* Fade + slide */
@keyframes textFadeUp {
  to {
    opacity: 2;
    transform: translateY(0);
  }
}

/* =================================================
   BOTONES (REUTILIZABLES)
================================================= */
.btn {
  display: inline-block;
  padding: 1.2rem 2.8rem;            /* Tamaño del botón */
  border-radius: 2.5rem;           /* Bordes redondeados */
  text-decoration: none;         /* Quita subrayado */
  font-weight: 500;
  transition: all 0.3s ease;     /* Animación suave */
}

/* Botón principal */
.btn-primary {
  background: var(--azul-principal);
  color: var(--blanco);
}

/* Hover del botón principal */
.btn-primary:hover {
  background: #14238a;           /* Azul más oscuro */
}

/* Botón con borde */
.btn-outline {
  border: 0.2rem solid var(--azul-principal);
  color: var(--azul-principal);
}

/* Hover botón borde */
.btn-outline:hover {
  background: var(--azul-principal);
  color: var(--blanco);
}

/*------------------------CONTENIDO-----------------------*/

.servicios {
  padding: 8rem 8%;
  background: #ffffff;
  text-align: center;
}

/* Título */
.servicios-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 5rem;
}

/* Grid */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
  justify-items: center;
}

/* Tarjeta */
.servicio-card {
  width: 100%;
  max-width: 36rem;
  border: 0.1rem solid #ddd;
  overflow: hidden;
  background: #fff;
}

/* Imagen */
.servicio-card img {
  width: 100%;
  height: 15rem;
  object-fit: cover;
  display: block;
  transition: transform 0.99s ease, filter 0.3s ease;
}
.servicio-card img:hover{
    transform: scale(1.04);  /* Agranda el logo un 4% para que resalte */
}

/* Franja roja */
.servicio-label {
  background: var(--azul-principal);
  color: #fff;
  font-size: 0.8rem;
  padding: 1.5rem 1rem;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.4;
}

/* Hover */
.servicio-card:hover {
  transform: translateY(-5px);
  transition: transform 0.3s ease;
}







/* ===============================
   CONTACTO
================================ */
.contact {
  background: linear-gradient(135deg, #eef2ff, #f8f9ff);
  padding: 8.5rem 10%;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr;
  gap: 5rem;
  align-items: center;
}

/* TEXTO IZQUIERDA */
.contact-desc {
  font-size: 1.2rem;
  line-height: 2rem;
  margin-bottom: 3rem;
  color: #444;
  font-family: "fredoka";
}
.contact-subtitle{
  font-family: "fredoka";
  font-size: 2rem;
}
.contact-title{
  font-family: "fredoka";
  font-size: 3rem;
  margin: 0.5rem;
  line-height: 3rem;
}

/* COLUMNA CENTRAL */
.contact-center {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.contact-item-content{
  font-family: "fredoka";
  font-size: 1.2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  font-size: 1.05rem;
  color: #222;
}

.contact-item i {
  color: var(--azul-principal);
  font-size: 1.2rem;
  margin-top: 0.3rem;
}

/* MAPA */
.contact-map iframe {
  width: 100%;
  height: 28rem;
  border-radius: 14px;
  border: none;
  box-shadow: 0 1rem 2.5rem rgba(0,0,0,0.15);
}

/* ===============================
   ANIMACIONES CONTACTO
================================ */
.reveal-contact {
  opacity: 0;
  transform: translateY(3rem);
}

.reveal-contact.active {
  animation: contactFadeUp 0.9s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes contactFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =================================================
   FOOTER
================================================= */
.main-footer {
  background-color: #1a1a1a;
  color: white;
  padding: 6rem 10%;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #333;
  padding-bottom: 3.5rem;
  margin-bottom: 3.5rem;
}

.footer-logo {
  max-width: 15rem;
}

.footer-slogan {
  font-size: 2rem;
  font-weight: 40rem;
  text-align: right;
  max-width: 40rem;
  font-family: "fredoka";
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4rem;
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #fff;
}


.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 1rem;
}

.footer-col a {
  color: #bbb;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: #fff;
}

/* =================================================
   RESPONSIVE GLOBAL – TODOS LOS DISPOSITIVOS
================================================= */

/* ============== HEADER Y FOOTER ================*/
/* ===============================
   TABLETS (≤ 1024px)
================================ */
@media (max-width: 64rem) {

  /* HEADER */
  .header-container {
    padding: 1rem 2rem;
  }

  /* HERO */
  .hero-title {
    font-size: clamp(2rem, 4vw, 2.6rem);
  }

  /* CONTACTO → 2 COLUMNAS */
  .contact {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .contact-map iframe {
    height: 22rem;
  }

  /* FOOTER */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }

  .footer-slogan {
    text-align: center;
  }
}

/* ===============================
   MÓVILES GRANDES (≤ 768px)
================================ */
@media (max-width: 48rem) {

  /* HERO */
  .hero {
    min-height: auto;       /* 👈 deja que la imagen mande */
    height: auto;           /* 👈 elimina alturas forzadas */
  }

  .hero-title {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
  }

  /* CONTACTO → 1 COLUMNA */
  .contact {
    grid-template-columns: 1fr;
    padding: 6rem 6%;
  }

  .contact-center {
    align-items: flex-start;
  }

  .contact-map iframe {
    height: 20rem;
  }

  /* FOOTER */
  .footer-top {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-logo {
    margin-inline: auto;
  }
}

/* ===============================
   MÓVILES PEQUEÑOS (≤ 480px)
================================ */
@media (max-width: 30rem) {

  /* HEADER */
  .header-logo img {
    height: 3.8rem;
  }

  /* HERO */
  .hero-title {
    font-size: 1.5rem;
  }

  /* BOTONES */
  .btn {
    width: 100%;
    text-align: center;
  }

  /* CONTACTO */
  .contact-desc {
    font-size: 1rem;
  }

  .contact-item-content {
    font-size: 1rem;
  }

  /* MAPA */
  .contact-map iframe {
    height: 18rem;
  }
}

/* ===============================
   PANTALLAS GRANDES / 4K (≥ 1600px)
================================ */
@media (min-width: 100rem) {

  /* CONTENEDORES CENTRADOS */
  .header-container,
  .hero,
  .contact,
  .main-footer {
    max-width: 120rem;
    margin-inline: auto;
  }

  body {
    font-size: 110%;
  }
}

/*======================== RESPONSIVE MENU ===========================*/
/* ===============================
   LAPTOPS / TABLETS GRANDES (≤ 1024px)
================================ */
@media (max-width: 64rem) {

  .servicios {
    padding: 6rem 6%;
  }

  .servicios-grid {
    grid-template-columns: repeat(2, 1fr); /* 👈 2 columnas */
    gap: 3rem;
  }

  .servicios-title {
    font-size: 2rem;
    margin-bottom: 4rem;
  }

  .servicio-card img {
    height: 14rem;
  }
}

/* ===============================
   TABLETS / MÓVILES GRANDES (≤ 768px)
================================ */
@media (max-width: 48rem) {

  .servicios {
    padding: 5rem 5%;
  }

  .servicios-grid {
    grid-template-columns: 1fr; /* 👈 1 columna */
    gap: 3rem;
  }

  .servicios-title {
    font-size: 1.8rem;
    margin-bottom: 3rem;
  }

  .servicio-card {
    max-width: 100%;
  }

  .servicio-card img {
    height: 13rem;
  }
}

/* ===============================
   MÓVILES PEQUEÑOS (≤ 480px)
================================ */
@media (max-width: 30rem) {

  .servicios {
    padding: 4rem 4%;
  }

  .servicios-title {
    font-size: 1.6rem;
  }

  .servicio-label {
    font-size: 0.75rem;
    padding: 1.2rem 0.8rem;
  }

  .servicio-card img {
    height: 11.5rem;
  }
}