/*
 * NEVÁREZ CSS - Archivo de estilos principal
 * Creado y optimizado por Gemini
 */

/* ==================== 🛠️ Variables y Estilos Base ==================== */
:root {
  --gris-nevarez: #323233;
  --amarillo-nevarez: #F6BB17;
  --white: #fff;
  --light-text: #f6f8fb;
  --font-main: 'Montserrat', Arial, sans-serif;
  --font-sec: 'Poppins', Arial, sans-serif;
  --shadow-base: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);
  --padding-section: 80px 20px;
  --gap-lg: 60px;
  --gap-md: 40px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sec);
  background-color: #f8fafd;
  margin: 0;
  color: #444;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-main);
  color: var(--gris-nevarez);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: var(--gap-md);
  color: var(--gris-nevarez);
}

/* ==================== 🗺️ Header y Navegación ==================== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: var(--gris-nevarez);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-base);
  z-index: 1000;
}

.header-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 35px;
  max-width: 100%;
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--amarillo-nevarez);
}

.nav-button {
  background-color: var(--amarillo-nevarez);
  color: var(--gris-nevarez);
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.nav-button:hover {
  background-color: #ffc94a;
  transform: translateY(-2px);
  color: var(--gris-nevarez);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.2rem;
  cursor: pointer;
}

/* --- Menú Móvil (Drawer) - ESTILO MEJORADO --- */
.drawer-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  max-width: 320px;
  /* Ancho máximo para que no ocupe toda la pantalla */
  height: 100vh;
  background-color: var(--gris-nevarez);
  flex-direction: column;
  padding: 30px;
  /* Espaciado interno general */
  z-index: 2100;
  overflow-y: auto;
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  /* Asegura que el padding no aumente el ancho */
}

.drawer-menu.active {
  display: flex;
}

.drawer-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
}

.drawer-logo {
  text-align: left;
  /* Alinea el logo a la izquierda */
  margin-bottom: 40px;
  /* Más espacio debajo del logo */
}

.drawer-logo img {
  max-width: 160px;
  height: auto;
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* Espacio más sutil entre enlaces */
  text-align: left;
}

.drawer-link {
  color: var(--white);
  font-size: 1.2rem;
  /* Tamaño de fuente ajustado */
  font-weight: 500;
  /* Un poco menos grueso para más elegancia */
  text-decoration: none;
  padding: 12px 15px;
  /* Padding para un área de clic más grande */
  transition: all 0.3s ease;
  display: inline-flex;
  justify-content: flex-start;
  /* Alinea el contenido a la izquierda */
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  /* Bordes redondeados para el hover */
}

.drawer-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  /* Fondo sutil al pasar el cursor */
  color: var(--amarillo-nevarez);
}

.drawer-divider {
  border: 0;
  height: 1px;
  background-color: #555;
  margin: 30px 0;
}

.drawer-contact {
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-size: 1rem;
  text-align: left;
  /* Alineado a la izquierda */
}

.drawer-contact a {
  color: #ccc;
  /* Un color un poco más suave */
  text-decoration: none;
  transition: color 0.2s;
}

.drawer-contact a:hover {
  color: var(--amarillo-nevarez);
}

.drawer-social {
  margin-top: 30px;
  display: flex;
  gap: 15px;
  justify-content: flex-start;
  /* Alineado a la izquierda */
}

.drawer-social-link {
  color: var(--white);
  font-size: 1rem;
  width: 38px;
  height: 38px;
  border: 1px solid #777;
  /* Borde más sutil */
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.drawer-social-link:hover {
  background-color: var(--amarillo-nevarez);
  border-color: var(--amarillo-nevarez);
  color: var(--gris-nevarez);
}

/* ==================== 🖼️ Sección Hero ==================== */
.hero-section {
  position: relative;
  width: 100%;
  height: clamp(500px, 80vh, 720px);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.video-fondo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65);
}

.hero-content {
  position: relative;
  padding: 0 20px;
  max-width: 800px;
  z-index: 2;
}

h1.hero-titulos {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
  color: var(--white);
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.5;
  margin-top: 20px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-btn {
  display: inline-block;
  background-color: var(--amarillo-nevarez);
  color: var(--gris-nevarez);
  font-weight: 700;
  text-decoration: none;
  padding: 16px 40px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1.15rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  margin-top: 40px;
}

.hero-btn:hover {
  background-color: #ffc94a;
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(246, 187, 23, 0.4);
}

/* ==================== 📝 Contenido Principal ==================== */

/* --- Sección Sobre Nosotros --- */
.quienes-somos-section {
  padding: var(--padding-section);
  background-color: var(--white);
}

.contenido-sobre-nosotros-final {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-lg);
  align-items: center;
}

.imagen-principal-final {
  flex: 1 1 350px;
  max-width: 40%;
}

.img-destacada-final {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.texto-bloque-final {
  flex: 1 1 50%;
  text-align: left;
}

.titulo-final {
  font-size: clamp(2.5rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 30px;
}

.descripcion-final {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
  color: #555;
}

.img-secundaria-final {
  width: 250px;
  height: auto;
  margin-top: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  float: right;
  margin-left: 20px;
}

/* --- Sección Filosofía (Nuestro Enfoque) --- */
.filosofia-section {
  padding: var(--padding-section);
  background-color: var(--gris-nevarez);
  color: var(--white);
  /* CORRECCIÓN: Texto blanco para mejor contraste */
}

.filosofia-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.filosofia-img-container {
  flex: 1 1 400px;
  max-width: 100%;
}

.filosofia-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.filosofia-texto {
  flex: 1 1 50%;
  min-width: 300px;
  text-align: left;
}

.filosofia-titulo {
  color: var(--amarillo-nevarez);
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 20px;
}

.filosofia-desc,
.filosofia-principios p {
  line-height: 1.7;
  margin-bottom: 15px;
}

/* CORRECCIÓN: Métricas en fila para escritorio */
.filosofia-metricas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-md);
  margin-top: 30px;
  justify-content: flex-start;
}

.filosofia-metrica {
  text-align: left;
}

.filosofia-metrica-num {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--amarillo-nevarez);
  margin-bottom: 5px;
  display: block;
}

.filosofia-metrica-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: #ccc;
  display: block;
}

/* --- Bloques de Servicio --- */
.servicios-section {
  padding: var(--padding-section);
  background-color: #f8fafd;
}

.servicios-titulo {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: var(--gap-lg);
}

.servicio-bloque {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-lg);
  max-width: 1200px;
  margin: 0 auto 60px auto;
}

.servicio-bloque-invertido {
  flex-direction: row-reverse;
}

.servicio-info,
.servicio-img-container {
  flex: 1 1 400px;
}

.servicio-img-container {
  text-align: center;
}

.servicio-img {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.servicio-titulo {
  color: var(--amarillo-nevarez);
  font-size: 2.3rem;
  margin-bottom: 15px;
}

.servicio-subtitulo {
  font-weight: 500;
  color: #555;
}

.servicio-btn {
  background-color: var(--gris-nevarez);
  color: var(--white);
  font-weight: 600;
  padding: 13px 24px;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  margin-top: 25px;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.servicio-btn:hover {
  background-color: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* Contenedor del ícono */
.servicio-icono {
  width: 45px;
  /* <- Cambia este valor al tamaño que desees */
  height: 45px;
  /* <- Cambia este valor al tamaño que desees */
  margin-bottom: 15px;
}

/* Imagen DENTRO del contenedor */
.servicio-icono img {
  width: 100%;
  /* Esto hace que la imagen ocupe todo el ancho del contenedor */
  height: 100%;
  /* Esto hace que la imagen ocupe todo el alto del contenedor */
  object-fit: contain;
  /* Esto asegura que la imagen no se deforme */
}

/* --- Sección FAQs --- */
.faqs {
  padding: var(--padding-section);
}

.faqs-title {
  text-align: center;
  margin-bottom: 20px;
}

.faqs-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--gap-lg) auto;
  line-height: 1.6;
}

.faqs-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.faqs-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.faq-card {
  background-color: var(--white);
  padding: 15px 30px;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.faq-card:hover {
  transform: translateY(-5px);
  border-color: var(--amarillo-nevarez);
  box-shadow: 0 6px 20px rgba(246, 187, 23, 0.4);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 15px 0;
  font-size: 1.1rem;
}

.faq-question h3 {
  margin: 0;
  font-family: var(--font-sec);
  font-weight: 500;
  color: var(--gris-nevarez);
}

.faq-icon {
  transition: transform 0.3s ease-in-out;
  color: var(--gris-nevarez);
  font-size: 1.2rem;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  padding-right: 40px;
  line-height: 1.7;
  color: #555;
}

.faq-card.active .faq-icon {
  transform: rotate(180deg);
}

/* --- Sección Productos (Carrusel) --- */
.productos-section {
  padding: var(--padding-section);
  background-color: var(--white);
  overflow: hidden;
}

.productos-subtitulo {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 500;
  color: #555;
  margin-top: -30px;
  margin-bottom: var(--gap-lg);
}

.mySwiperProductos {
  padding: 0 50px !important;
  max-width: 1400px;
  margin: 0 auto;
}

.mySwiperProductos .swiper-slide {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 5;
  background-color: var(--gris-nevarez);
}

.mySwiperProductos .producto-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.mySwiperProductos .swiper-slide:hover .producto-img {
  transform: scale(1.05);
}

.mySwiperProductos .producto-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 20px;
  text-align: center;
}

.mySwiperProductos .producto-titulo {
  color: var(--white);
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.mySwiperProductos .swiper-button-next,
.mySwiperProductos .swiper-button-prev {
  color: var(--gris-nevarez);
  background-color: rgba(255, 255, 255, 0.9);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: var(--shadow-base);
  transition: all 0.2s ease;
}

.mySwiperProductos .swiper-button-next:hover,
.mySwiperProductos .swiper-button-prev:hover {
  background-color: var(--amarillo-nevarez);
}

.mySwiperProductos .swiper-button-next::after,
.mySwiperProductos .swiper-button-prev::after {
  font-size: 1.2rem;
  font-weight: 900;
}

/* --- Sección Contacto --- */
.contacto {
  padding: var(--padding-section);
  text-align: center;
  background-color: var(--light-text);
}

.contacto-subtitulo {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--amarillo-nevarez);
}

.contacto-titulo {
  margin-bottom: var(--gap-md);
}

.contacto-formulario {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.input-grupo {
  position: relative;
}

.input-grupo i {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #ccc;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.input-grupo.textarea-grupo i {
  top: 20px;
  transform: none;
}

.input-grupo input,
.input-grupo textarea {
  width: 100%;
  padding: 15px 15px 15px 50px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: var(--white);
  font-family: var(--font-sec);
  font-size: 1rem;
  color: var(--gris-nevarez);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.input-grupo input:focus,
.input-grupo textarea:focus {
  border-color: var(--amarillo-nevarez);
  outline: none;
  box-shadow: 0 0 0 3px rgba(246, 187, 23, 0.2);
}

.input-grupo input:focus~i,
.input-grupo textarea:focus~i {
  color: var(--amarillo-nevarez);
}

.input-grupo textarea {
  height: 150px;
  resize: vertical;
  padding-top: 15px;
}

.submit-btn {
  background-color: var(--amarillo-nevarez);
  color: var(--gris-nevarez);
  font-weight: 700;
  padding: 15px 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 50%;
  margin: 0 auto;
  font-size: 1.1rem;
}

.submit-btn:hover {
  background-color: #ffc94a;
  transform: translateY(-2px);
}

.form-messages {
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
  display: none;
}

.form-messages.success {
  display: block;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-messages.error {
  display: block;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* --- Sección Logos --- */
.logos-certificacion {
  text-align: center;
  padding: var(--padding-section);
  background-color: var(--white);
}

.certificaciones-titulo {
  text-align: center;
}

.logos-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 50px;
  max-width: 1000px;
  margin: 40px auto 0 auto;
}

.grayscale-hover img {
  filter: grayscale(100%);
  transition: filter 0.3s ease, transform 0.3s ease;
  height: 80px;
  width: auto;
}

.grayscale-hover img:hover {
  filter: grayscale(0%);
  transform: scale(1.1);
}

/* ==================== Footer ==================== */
.footer {
  background-color: #2e2e2e;
  color: #f0f0f0;
  padding: 60px 20px 20px;
  font-family: var(--font-sec);
}

.footer-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  gap: 40px;
}

.footer-col {
  flex: 1 1 220px;
}

.footer-logo-img {
  width: 200px;
  margin-bottom: 20px;
}

.footer-director,
.footer-contact-info,
.footer-text,
.footer-office-info p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 10px;
  color: #ccc;
}

.footer-contact-info a {
  color: #ccc;
  text-decoration: none;
}

.footer-contact-info a:hover {
  text-decoration: underline;
}

.footer-office-title {
  font-family: var(--font-main);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--white);
}

.footer-social-horizontal {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icon {
  width: 35px;
  height: auto;
  filter: grayscale(100%);
  transition: all 0.3s ease;
}

.social-icon:hover {
  filter: grayscale(0%) brightness(1.2) drop-shadow(0 0 8px #F6BB17);
}

.footer-copy {
  text-align: center;
  border-top: 1px solid #444;
  padding-top: 20px;
  margin-top: 40px;
  font-size: 12px;
  color: #999;
}

.footer-copy a {
  color: #999;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-copy a:hover {
  color: var(--white);
  text-decoration: underline;
}

/* ==========================================================================
 * Media Queries para Responsive Design (CORREGIDO Y OPTIMIZADO)
 * ========================================================================== */

/* --- Breakpoint principal para Tabletas y Móviles --- */
@media (max-width: 991px) {

  /* --- Navegación --- */
  .nav-menu {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .header-container {
    padding: 0 25px;
  }

  .logo img {
    height: 30px;
  }

  /* --- Hero --- */
  .hero-section {
    height: clamp(400px, 70vh, 600px);
  }

  h1.hero-titulos {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .hero-desc {
    font-size: 1rem;
  }

  .hero-btn {
    padding: 12px 30px;
    font-size: 1rem;
    margin-top: 20px;
  }

  /* --- Sobre Nosotros --- */
  .contenido-sobre-nosotros-final {
    flex-direction: column;
    text-align: center;
  }

  .imagen-principal-final {
    max-width: 100%;
    order: -1;
    /* Muestra la imagen primero en móvil */
  }

  .img-destacada-final,
  .img-secundaria-final {
    float: none;
    /* Elimina la flotación para que no interfiera con el centrado */
    margin: 20px auto;
    /* Usa márgenes automáticos a los lados para centrarla */
    display: block;
    /* Asegura que se comporte como un bloque para centrado con margin:auto */
  }

  .titulo-final {
    font-size: 2rem;
    text-align: center;
  }

  /* --- Filosofía --- */
  .filosofia-texto,
  .filosofia-metrica {
    text-align: center;
  }

  .filosofia-img-container {
    margin-bottom: var(--gap-md);
  }

  .filosofia-metricas {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    justify-content: center;
  }

  /* --- Servicios --- */
  .servicio-bloque,
  .servicio-bloque-invertido {
    flex-direction: column;
    gap: 40px;
  }

  .servicio-info {
    text-align: center;
  }

  .servicio-icono {
    margin: 0 auto 15px;
  }

  .servicio-btn {
    margin: 20px auto 0;
  }

  /* --- Footer --- */
  .footer {
    padding-top: 40px;
    /* Reduce el espacio superior del footer */
  }

  .footer-wrapper {
    flex-direction: column;
    align-items: flex-start;
    /* Mantiene la alineación a la izquierda */
    text-align: left;
    gap: 25px;
    /* CORRECCIÓN: Reduce el espacio vertical entre secciones */
  }

  .footer-col {
    width: 100%;
    margin-bottom: 0;
  }

  .footer-office-info {
    margin-top: 0;
  }

  /* --- CORRECCIÓN FINAL: Reduce el espaciado vertical entre secciones en móvil --- */
  .quienes-somos-section,
  .filosofia-section,
  .servicios-section,
  /* <--- CAMBIA ESTO */
  .faqs,
  /* <--- Y ESTO */
  .productos-section,
  .contacto,
  .logos-certificacion {
    padding-top: 40px;
    /* Por ejemplo, a 40px */
    padding-bottom: 40px;
    /* Por ejemplo, a 40px */
  }
}

/* --- Breakpoint para Móviles Pequeños --- */
@media (max-width: 600px) {

  /* --- Formulario de Contacto --- */
  .form-grid {
    grid-template-columns: 1fr;
  }

  .submit-btn {
    width: 100%;
  }
}