/* =========================================================
   LBC AESTHETIC V3 — HERO MEJORADO
   ========================================================= */

/* --- IMPORTACIÓN DE FUENTES --- */
@import url('https://api.fontshare.com/v2/css?f[]=general-sans@400,500,700&display=swap');
/* Se ha añadido la importación de la fuente Poppins para los títulos. */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');


:root {
  /* Paleta de Colores */
  --brand-teal: #0F766E;
  --ink-dark: #420317;
  --ink-light: #4E2F22;
  --paper-light: #F2E6DC;
  --surface-white: #FFFFFF;
  --border-light: #E6D6CB;

  /* Tipografía */
  --font-sans: 'General Sans', sans-serif;
  /* Se ha cambiado la fuente para los títulos a Poppins. */
  --font-display: 'Poppins', sans-serif;
  
  /* Geometría */
  --radius: 12px;
  --container: 1200px;
}

/* --- RESET Y BASE --- */
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--surface-white);
  color: var(--ink-light);
  line-height: 1.6;
  font-weight: 400;
}
p {
  /* ...otros estilos de párrafo... */
  font-weight: 400; /* Añade esta línea para asegurar que los párrafos no estén en negrita */
}
h1, h2, h3 {
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
  color: var(--ink-dark);
  /* Los títulos ahora usan la nueva fuente Poppins. */
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(95%, var(--container)); margin-inline: auto; }

/* --- HEADER --- */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  padding: 0.7rem 0; transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.nav.scrolled {
  background-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 15px rgba(0,0,0,0.05);
  backdrop-filter: blur(8px);
}
/* Ajusta el ancho para que el logo y el menú estén más cerca de los bordes. */
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 92%; /* Aumenta este valor para acercar el contenido a los bordes. */
  margin: 0 auto; /* Centra el contenedor horizontalmente. */
}

/* El resto de las reglas para el logo y el menú permanecen igual */
.logo img {
  height: 90px;
}

.menu {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.menu a {
  font-weight: 600;
  color: var(--ink-light);
  transition: color 0.2s ease;
  font-family: var(--font-sans);
}

.menu a:hover {
  color: var(--brand-teal);
}

.menu a.cta {
  background-color: var(--ink-dark);
  color: var(--surface-white);
  padding: 0.6rem 1.2rem;
  border-radius: 99px;
  transition: background-color 0.2s;
}

/* INICIO DE MODIFICACIÓN: Ocultar el botón de contacto móvil en vista desktop */
.nav-inner .cta-mobile {
    display: none; 
}

/* --- HERO CON COMPROMISOS INTEGRADOS --- */
.hero-fullscreen {
  position: relative; height: 100vh; min-height: 750px;
  display: flex; align-items: center;
  overflow: hidden; background-color: var(--ink-dark);
}
#hero-video {
  position: absolute; top: 50%; left: 50%; width: auto; height: auto;
  min-width: 100%; min-height: 100%; transform: translate(-50%, -50%); z-index: 1;
}
.hero-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(14, 35, 31, 0.65); z-index: 2;
}
.hero-fullscreen .container { position: relative; z-index: 3; }
.hero-content { text-align: left; max-width: 850px; }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  color: var(--surface-white);
  line-height: 1.1;
}
.hero-commitments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.commitment-item { display: flex; align-items: flex-start; gap: 1rem; }
.commitment-icon { color: var(--surface-white); flex-shrink: 0; }
/* --- REGLA PARA PONER LOS LOGOS EN BLANCO --- */
.commitment-icon img {
  filter: brightness(0) invert(1);
}
.commitment-text h3 { font-size: 1.25rem; color: var(--surface-white); margin-bottom: 0.5rem; }
.commitment-text p { margin: 0; color: rgba(255, 255, 255, 0.8); font-size: 0.95rem; font-family: var(--font-sans); font-weight: 300;}

/* --- OTRAS SECCIONES --- */
.section { padding: 80px 0; }
/* NUEVO: Ajuste de altura para la franja de contacto */
#contacto {
    padding: 50px 0; /* Ajustado de 80px a 50px para reducir la altura */
}
.section-offset { background-color: #F8F8F8; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 50px; }
/* --- REGLA PARA CAMBIAR EL COLOR DEL TÍTULO DE SECCIÓN --- */
.section-tag { 
  display: inline-block; margin-bottom: 0.5rem; font-weight: 600; 
  color: #136F63; /* <-- NUEVO COLOR */
  text-transform: uppercase; letter-spacing: 1px; font-family: var(--font-sans);
}
.section-header h2 { font-size: clamp(2rem, 5vw, 2.5rem); }
.section-header p { color: var(--ink-light); }
.kpi-grid, .projects-grid, .team-grid { display: grid; gap: 30px; }
.section-kpis { background-color: var(--ink-dark); color: var(--surface-white); padding: 60px 0; }
.kpi-grid { grid-template-columns: repeat(4, 1fr); text-align: center; }
.kpi-item b { display: block; font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 500; line-height: 1.1; font-family: var(--font-display); }
.kpi-item span { font-size: 1rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 1px; font-family: var(--font-sans); }

/* AJUSTES PARA LA SEGUNDA FILA DE KPIS (2 ELEMENTOS) */
.kpi-grid-row-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas para desktop */
    gap: 30px; 
    margin-top: 30px; 
    max-width: 500px; /* Limita el ancho para que se sienta centrado bajo la fila de 4 */
    margin-left: auto;
    margin-right: auto;
}

/* Aplicar estilos visuales a los nuevos items */
.kpi-grid-row-2 .kpi-item {
    text-align: center; 
}

.projects-grid { grid-template-columns: repeat(5, 1fr); }
.team-grid { grid-template-columns: repeat(3, 1fr); text-align: center; }
.team-member img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; object-position: top; margin: 0 auto 1rem; box-shadow: 0 5px 20px rgba(0,0,0,0.1); }
.team-member p { margin: 0; color: var(--ink-light); text-transform: none; font-family: var(--font-sans);}
.cta-container { background-color: var(--ink-dark); color: var(--surface-white); text-align: center; padding: 50px; border-radius: var(--radius); }
.cta-container h2 { font-size: 2rem; color: white; }
.cta-container p { max-width: 500px; margin: 1rem auto 2rem; }
.footer { padding: 40px 0; text-align: center; background-color: var(--paper-light); }
.footer-logo { height: 90px; margin: 0 auto 1rem; }
.footer p { margin: 0; font-size: 0.9rem; }
.footer-contact { margin-top: 0.5rem; }
.btn { display: inline-block; padding: .9rem 2rem; border-radius: 999px; font-weight: 700; transition: transform 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);}
.btn:hover { transform: translateY(-3px); box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);}
.btn-primary { background-color: var(--brand-teal); color: var(--surface-white); }

/* --- RESPONSIVE GENERAL --- */
/* --- RESPONSIVE ESPECÍFICO PARA MÓVILES MUY PEQUEÑOS (e.g., iPhone SE) --- */
@media (max-width: 400px) {
  .hero-title {
    /* Reducido a 2.3rem para que la palabra 'AMBIENTAL' quepa bien en 375px */
    font-size: 2.3rem !important; 
  }
}
@media (max-width: 980px) {
  .hero-commitments { grid-template-columns: 1fr; gap: 2rem; }
  .projects-grid, .team-grid, .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  
  /* NUEVO: Ajuste responsive para la fila de 2 elementos (mantiene 2 columnas hasta 768px) */
  .kpi-grid-row-2 {
      display: grid; 
      grid-template-columns: repeat(2, 1fr); 
      gap: 30px;
      margin: 30px auto 0;
      max-width: 500px; 
  }
  
  /* NUEVO: AJUSTE RESPONSIVE LOGO Y NAV */
  .nav {
    padding: 0.5rem 0;
  }
  .logo img {
    height: 65px; 
  }
}
@media (max-width: 768px) {
  .menu { display: none; }

/* INICIO DE MODIFICACIÓN: Invertir visibilidad del logo en móvil */
  .logo-desktop {
      display: none !important; /* Oculta el logo de escritorio */
  }

  .logo-mobile {
      display: block !important; /* Muestra el logo móvil */
      max-width: 100px; /* Ajusta el ancho según sea necesario para el logo móvil */
      height: auto;
 /* Limpiamos estilos de animación/posicionamiento CSS para que JS tome el control */
      position: static;
      opacity: 1;
      transition: none;
  }

  /* INICIO DE MODIFICACIÓN: Mostrar y aplicar estilos de ICONO SIN FONDO en móvil */
  .nav-inner .cta-mobile {
      display: flex; 
      align-items: center;
      justify-content: center;
      
      /* Se eliminan estilos de fondo, ancho y alto para que sea solo el ícono */
      padding: 0.5rem; /* Pequeño padding para hacerlo clicable */
      background-color: transparent;
      border-radius: 0;
      
      /* ESTADO INICIAL (NO SCROLLED / HERO) */
      font-size: 1.8rem; /* Aumentamos el tamaño para que sea un punto de contacto fácil */
      color: var(--surface-white); /* Color del trazo: blanco */
      margin-left: auto; /* Posicionamiento a la derecha */
      
      transition: all 0.3s ease; 
      box-shadow: none;
  }

  /* ESTADO SCROLLED: Cambiar color del icono a chocolate (trazos) */
  .nav.scrolled .cta-mobile {
      background-color: transparent; 
      color: var(--ink-dark); /* Color del trazo: café/chocolate */
      box-shadow: none;
      border: none;
  }
  
  /* Hover/Active para mejor experiencia */
  .nav-inner .cta-mobile:active {
      transform: scale(0.95);
      opacity: 0.7; /* Ligeramente más transparente al ser presionado */
  }  /* FIN DE AJUSTE PARA AUMENTAR SEPARACIÓN DEL H1 CON EL LOGO */

  /* NUEVO: Ajuste para que la segunda fila se muestre en 1 columna en móviles más pequeños */
  .kpi-grid-row-2 {
      display: grid;
      grid-template-columns: 1fr; 
      gap: 20px;
      max-width: 300px; 
      margin: 30px auto 0; 
  }
  /* Anular la regla de centrado para el último elemento cuando se usa 1 columna */
  .kpi-grid-row-2 .kpi-item:last-child {
      grid-column: auto;
  }
  
  /* NUEVO: Ajuste adicional del logo para móviles más pequeños */
  .logo img {
    height: 60px;
  }
}

/* =========================================================
   ESTILOS PARA SECCIÓN SERVICIOS (VERSIÓN SPLIT CON ACORDEÓN)
   ========================================================= */
.section-split-feature {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
}
.split-feature-image {
    width: 50%;
    background-color: var(--ink-dark);
}
.split-feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.split-feature-content {
    width: 50%;
    background-color: var(--paper-light); /* <-- Fondo cambiado a claro */
    color: var(--ink-light);             /* <-- Color de texto base a oscuro */
    display: flex;
    align-items: center;
    justify-content: center;
}
.split-feature-content-inner {
    width: 100%;
    max-width: 700px; /* ANCHO AJUSTADO */
    padding: 4rem 2rem;
}
.section-header-left {
    text-align: left;
    margin-bottom: 2.5rem;
}
.section-header-left .section-tag { color: #136F63; } /* Título verde se mantiene */
.section-header-left h2 { color: var(--ink-dark); } /* <-- Título principal a oscuro */
.section-header-left p { color: var(--ink-light); } /* <-- Párrafo a oscuro */
.accordion-container { border-top: 1px solid var(--border-light); } /* <-- Borde ajustado */
.accordion-item { border-bottom: 1px solid var(--border-light); } /* <-- Borde ajustado */
.accordion-header {
    width: 100%; background: none; border: none; padding: 1.25rem 0;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; text-align: left; color: var(--ink-dark); /* <-- Texto de acordeón a oscuro */
    font-size: 1.1rem; font-weight: 600; font-family: var(--font-sans);
}
.accordion-icon { font-size: 1.5rem; line-height: 1; transform: rotate(0deg); transition: transform 0.3s ease; }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; }
.accordion-body-inner { padding: 0 0 1.25rem 0; color: var(--ink-light); line-height: 1.6; } /* <-- Texto interior a oscuro */
.accordion-item.active .accordion-header { color: var(--brand-teal); } /* Título verde activo se mantiene */
.accordion-item.active .accordion-body { max-height: 300px; }
.accordion-item.active .accordion-icon { transform: rotate(90deg); }
@media (max-width: 980px) {
    .split-feature-image, .split-feature-content { width: 100%; }
    .split-feature-content-inner { padding: 3rem 1.5rem; }
}




/* =========================================================
   ESTILOS MEJORADOS PARA SECCIÓN DE PROYECTOS (CON PARALLAX)
   ========================================================= */
#proyectos.section-full-bg {
  position: relative;
  color: var(--surface-white);
  padding: 0; /* Cambio: Eliminado el padding vertical */
  background-image: linear-gradient(rgba(14, 35, 31, 0.8), rgba(14, 35, 31, 0.8)), url('assets/img/fondo_servicios.jpg');
  background-attachment: fixed;
  background-size: cover;
  background-position: 50% 0;
}
#proyectos .container { position: relative; z-index: 2; }
/* NUEVOS ESTILOS PARA LOS PANELES DE PROYECTOS */
.grid.projects-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 5 columnas */
  gap: 0;
}

.grid.projects-grid > div {
  aspect-ratio: 4 / 3; /* o 4/3, ajusta según lo que quieras */
  width: 100%;
}

#proyectos .project-card {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

#proyectos .project-card:hover {
    transform: none;
}

#proyectos .project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

#proyectos .project-card:hover img {
    transform: scale(1.1);
}

/* El contenedor del texto ahora ocupa el 100% y usa Flexbox para centrar el contenido */
#proyectos .project-card .card-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    color: white;
    padding: 1.5rem 1rem;
    transition: opacity 0.4s ease, background-color 0.4s ease;
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#proyectos .project-card:hover .card-content {
    opacity: 1;
    background-color: rgba(66, 3, 23, 0.70);
}

/* La línea de acento ahora está centrada */
#proyectos .project-card .card-content::before {
    content: '';
    display: block; /* Convertido a bloque para centrar con margin */
    width: 40px;
    height: 3px;
    transform: scaleX(0);
    transform-origin: center; /* Cambiado para que el zoom sea desde el centro */
    transition: transform 0.4s ease;
    margin: 0 auto 10px; /* Centrado y con margen inferior */
    
}

#proyectos .project-card:hover .card-content::before {
    transform: scaleX(1);
}

/* Ajustes de tipografía para el título */
#proyectos .project-card .card-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2;
}

/* Ajustes de tipografía para el subtítulo */
#proyectos .project-card .card-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    font-family: var(--font-sans);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1.2;
}

/* Colores de las líneas para cada proyecto en la página de inicio */
#index .project-card[data-project="agricultura"] .card-content::before { background-color: #FFBA08; }
#index .project-card[data-project="paitur"] .card-content::before { background-color: #136F63; }
#index .project-card[data-project="delhum"] .card-content::before { background-color: #3F88C5; }
#index .project-card[data-project="municipalidad"] .card-content::before { background-color: #D00000; }
#index .project-card[data-project="saneamientoambiental"] .card-content::before { background-color: #F2E6DC; }

/* Colores de las líneas para los proyectos de la página "Proyectos" */
#proyectos-page #project-fauna .card-content::before { background-color: #4CAF50; }
#proyectos-page #project-zonificacion .card-content::before { background-color: #2196F3; }
#proyectos-page #project-cumplimiento .card-content::before { background-color: #FF9800; }







/* =========================================================
   ESTILOS MEJORADOS PARA SECCIÓN DE EQUIPO
   ========================================================= */
.team-group-title {
    text-align: center; margin-top: 3rem; margin-bottom: 2rem; font-size: 1.5rem;
    color: var(--ink-light); font-family: var(--font-display); text-transform: uppercase; letter-spacing: 1px;
}
.team-group-title:first-child { margin-top: 0; }
.team-grid-technical { grid-template-columns: repeat(5, 1fr); }
.team-member img {
    width: 180px; height: 180px; border-radius: 50%; object-fit: cover;
    margin: 0 auto 1.5rem; box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 4px solid var(--surface-white); filter: grayscale(100%);
    transition: filter 0.4s ease, transform 0.3s ease;
}
.team-member:hover img { transform: scale(1.05); filter: grayscale(0%); }
@media (max-width: 1200px) { .team-grid-technical { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 980px) {
    .team-grid, .team-grid-technical { grid-template-columns: repeat(3, 1fr); }
    .team-member img { width: 150px; height: 150px; }
}
@media (max-width: 768px) { .team-grid, .team-grid-technical { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .team-grid, .team-grid-technical { grid-template-columns: 1fr; } }

/* =========================================================
   ESTILOS PARA CARRUSEL DE CLIENTES
   ========================================================= */
#clientes.section { padding-top: 60px; padding-bottom: 60px; background-color: var(--surface-white); }
.logo-scroller { overflow: hidden; position: relative; }
.logo-scroller::before, .logo-scroller::after {
  content: ''; position: absolute; top: 0; width: 100px; height: 100%; z-index: 2;
}
.logo-scroller::before { left: 0; background: linear-gradient(to right, var(--surface-white), transparent); }
.logo-scroller::after { right: 0; background: linear-gradient(to left, var(--surface-white), transparent); }
.logo-track { display: flex; align-items: center; gap: 80px; width: max-content; animation: scroll 120s linear infinite; }
.logo-track:hover { animation-play-state: paused; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.logo-track img {
  height: 100px; max-width: 180px; object-fit: contain; filter: grayscale(100%);
  opacity: 0.7; transition: filter 0.3s ease, opacity 0.3s ease;
}
.logo-track img:hover { filter: grayscale(0%); opacity: 1; }

/* Estilos para la lista de puntos en Servicios */
.service-points {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-points li {
  line-height: 1.8; /* Aumenta el espacio entre líneas */
  font-family: var(--font-sans);
}
/* Ajustes para la sección de Preguntas Frecuentes (FAQ) */
#faq .split-feature-content-inner {
    padding-top: 3.2rem;
    padding-bottom: 3.2rem;
}
/* Estilos para las fichas de proyectos y el hover */
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px);
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-card .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    color: white;
    padding: 1.5rem 1rem;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.project-card:hover .card-content {
    opacity: 1;
}

.project-card .card-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.project-card .card-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.8);
   font-weight: normal;
}





/* =========================================================
   Modal estilo iOS - Amplio y Centrado
   ========================================================= */

.modal {
    display: none; /* Por defecto, la ventana modal está oculta */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 2rem;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal.show {
    display: flex; /* La clase 'show' la muestra usando flexbox para centrar */
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    margin: auto; 
    padding: 0;
    border-radius: 24px;
    width: 85%;
    max-width: 1400px;
    min-width: 900px;
    max-height: 100vh;
    position: relative;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.2),
        0 16px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    overflow: hidden; 
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: modalSlideUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.close-btn {
    color: rgba(0, 0, 0, 0.6);
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    font-weight: 200;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    line-height: 1;
    z-index: 20;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.close-btn:hover,
.close-btn:focus {
    color: rgba(0, 0, 0, 0.8);
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.modal-body {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 0;
    padding: 3rem;
    align-items: start;
    min-height: 500px;
    max-height: calc(100vh - 6rem);
    overflow-y: auto; /* Permite el desplazamiento vertical */
}

.modal-image-col {
    position: relative;
    padding-right: 2rem;
    height: 100%;
}

.modal-image-col img {
    width: 100%;
    height: auto;
    min-height: 400px;
    object-fit: cover;
    display: block;
    border-radius: 18px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-image-col img:hover {
    transform: scale(1.02);
    box-shadow: 
        0 24px 48px rgba(0, 0, 0, 0.2),
        0 12px 24px rgba(0, 0, 0, 0.15);
}

.modal-text-col {
    padding-left: 2rem;
    padding-top: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
}

.modal-text-col h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-display, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif);
    color: var(--brand-teal, #2d8a8a);
    text-transform: uppercase;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    text-shadow: none;
    position: relative;
}

.modal-text-col h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-teal, #2d8a8a) 0%, rgba(45, 138, 138, 0.3) 100%);
    border-radius: 2px;
}

.modal-subtitle,
#modalSubtitle {
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif);
    font-weight: 600;
    color: rgba(0, 0, 0, 0.7);
    margin: 1.5rem 0 2rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    line-height: 1.4;
}

.modal-text-col p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: justify;
    font-size: 1.1rem;
    color: rgba(0, 0, 0, 0.75);
    font-weight: 400;
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif);
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
   /* white-space: pre-wrap; <-- Se ha eliminado para permitir el ajuste de línea correcto */
}

.modal-text-col p strong {
    font-weight: 700 !important; /* Asegura que la negrita sea visible */
    color: var(--ink-dark); /* Opcional: para que las negritas destaquen más */
}

.modal-text-col p:last-child {
    margin-bottom: 0;
}

.modal-text-col hr {
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    margin: 1rem 0;
    width: 60%;
    opacity: 0.6;
}

/* Scrollbar estilo iOS */
.modal-body::-webkit-scrollbar {
    width: 1px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Animaciones estilo iOS */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        backdrop-filter: blur(40px) saturate(200%);
        -webkit-backdrop-filter: blur(40px) saturate(200%);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .modal-content {
        width: 90%;
        min-width: 800px;
    }
    
    .modal-body {
        padding: 2.5rem;
        gap: 1rem;
    }
    
    .modal-image-col {
        padding-right: 1rem;
    }
    
    .modal-text-col {
        padding-left: 1rem;
    }
}

@media (max-width: 900px) {
    .modal-content {
        width: 95%;
        min-width: auto;
        max-height: 85vh;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }
    
    .modal-image-col,
    .modal-text-col {
        padding-left: 0;
        padding-right: 0;
    }
    
    .modal-image-col img {
        min-height: 300px;
        max-height: 350px;
    }
    
    .modal-text-col h2 {
        font-size: 2.2rem;
        text-align: center;
    }
    
    .modal-text-col h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .modal-subtitle,
    #modalSubtitle {
        text-align: center;
    }
    
    .close-btn {
        top: 1.5rem;
        right: 1.5rem;
        width: 36px;
        height: 36px;
        font-size: 2.2rem;
    }
}

@media (max-width: 600px) {
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        width: 98%;
        border-radius: 20px;
        max-height: 90vh;
    }
    
    .modal-body {
        padding: 1.5rem;
        gap: 1.5rem;
        min-height: auto;
    }
    
    .modal-image-col img {
        min-height: 250px;
        max-height: 280px;
    }
    
    .modal-text-col h2 {
        font-size: 1.8rem;
    }
    
    .modal-text-col p {
        font-size: 1.0rem;
        text-align: left;
    }
    
    .close-btn {
        top: 1rem;
        right: 1rem;
        width: 32px;
        height: 32px;
        font-size: 2rem;
    }
}

/* Estados de enfoque para accesibilidad */
.modal:focus-within .modal-content {
    outline: none;
}

.close-btn:focus {
    outline: 2px solid var(--brand-teal, #2d8a8a);
    outline-offset: 2px;
}

/* Efecto glassmorphism mejorado */
@supports (backdrop-filter: blur(20px)) {
    .modal-content {
        background: rgba(255, 255, 255, 0.85);
        border: 1px solid rgba(255, 255, 255, 0.4);
    }
    
    .close-btn {
        background: rgba(255, 255, 255, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.4);
    }
}

/* Fallback para navegadores sin backdrop-filter */
@supports not (backdrop-filter: blur(20px)) {
    .modal-content {
        background: rgba(255, 255, 255, 0.98);
    }
    
    .modal {
        background-color: rgba(0, 0, 0, 0.7);
    }
}










/* Estilos para el Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--surface-white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
    opacity: 1;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--brand-teal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
/* Estilos para el Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--surface-white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
    opacity: 1;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader-logo {
  width: 500px;
  height: auto;
  /* Estado inicial para la animación de entrada */
  opacity: 0;
  transform: scale(1);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes logoPureFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}


/* =========================================================
   ESTILOS PARA UN FORMULARIO DE CONTACTO MÁS COMPACTO
   ========================================================= */

.contact-form-simple {
  margin-top: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: center; /* Centra el botón y el mensaje de estado */
}

.contact-form-simple .form-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem; /* Aumenta el espacio antes del botón */
}

.contact-form-simple input,
.contact-form-simple textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background-color: #FFFFFF;
  color: var(--ink-dark);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease; /* Transición suave */
}

.contact-form-simple input:focus,
.contact-form-simple textarea:focus {
  outline: none;
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2); /* Sombra de foco para accesibilidad */
}

.contact-form-simple textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form-simple .form-status {
  display: block;
  margin-top: 1rem; /* Aumenta el espacio sobre el mensaje de estado */
  color: var(--ink-dark);
  min-height: 1.2em;
  font-weight: 500;
}

.contact-form-simple select {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background-color: #FFFFFF;
  color: var(--ink-dark);
  font-family: var(--font-sans);
  font-size: 1rem;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%234E2F22' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
}

.contact-form-simple select:focus {
  outline: none;
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

/* =========================================================
   ESTILOS MEJORADOS PARA SECCIÓN DE CONTACTO (INTEGRACIÓN PLANA)
   ========================================================= */

/* Eliminamos el estilo de "caja" del contenedor del formulario */
#contacto .cta-container {
  background-color: transparent; /* Quitamos el fondo oscuro */
  color: var(--ink-light);       /* Hacemos el texto de párrafo oscuro y legible */
  padding: 2rem 0;               /* Ajustamos el espaciado vertical */
  border-radius: 0;              /* Eliminamos las esquinas redondeadas */
}

/* Ajustamos el color del título para que sea visible */
#contacto .cta-container h2 {
  color: var(--ink-dark);
}

/* Damos un ancho máximo al formulario para mantenerlo centrado y ordenado */
#contacto .contact-form-simple {
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   AJUSTES DE ESTILO PARA LA FRANJA DE KPIS
   ========================================================= */

/* Hacemos la franja más angosta y ajustamos su espaciado interno */
.section-kpis {
  padding-top: 40px;    /* Reducimos el espacio superior */
  padding-bottom: 25px; /* Reducimos aún más el espacio inferior */
}

/* Ajustamos el margen superior del texto de la fecha */
#kpi-update-date {
  margin-top: 30px; /* Controla la distancia desde los números de arriba */
}

/* Nuevo estilo para la sección de servicios en la página de inicio */
.service-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: var(--paper-light);
    padding: 30px;
    border-radius: var(--radius);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.service-card .card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--surface-white);
    border: 1px solid var(--border-light);
}

.service-card .card-icon img {
    max-width: 35px;
    max-height: 35px;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--ink-dark);
}

.service-card p {
    font-size: 0.95rem;
    color: var(--ink-light);
    line-height: 1.5;
}

/* Responsividad para las tarjetas de servicio */
@media (max-width: 980px) {
    .service-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .service-cards-grid {
        grid-template-columns: 1fr;
    }
}
    text-decoration: underline;
}

/* Estilos de las tarjetas de servicio */
.service-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: var(--paper-light);
    padding: 30px;
    border-radius: var(--radius);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.service-card .card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--surface-white);
    border: 1px solid var(--border-light);
}

.service-card .card-icon img {
    max-width: 35px;
    max-height: 35px;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--ink-dark);
}

.service-card p {
    font-size: 0.95rem;
    color: var(--ink-light);
    line-height: 1.5;
}

/* Animaciones de entrada (AOS) */
[data-aos] {
  opacity: 0;
  transform: translateY(20px);
  transition-property: opacity, transform;
  transition-duration: 0.8s;
  transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Media Queries para la cuadrícula */
@media (max-width: 980px) {
    .service-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .service-cards-grid {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   Solución para precarga sin scrollbar
   ========================================================= */

.preloader-active {
    overflow: hidden;
}

.preloader-active #website-content {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}


#website-content {
  /* Asegura que la web no sea visible al inicio. */
  opacity: 0;
  /* Define la duración de la transición de entrada. */
  transition: opacity 1s ease-in-out; 
}

body.preloader-active #website-content {
  /* Permite el cross-fade al ir de 0 a 1 */
  opacity: 0; 
}

body:not(.preloader-active) #website-content {
  /* Una vez que la clase se remueve, la opacidad se vuelve 1. */
  opacity: 1;
}


/* =========================================================
   ESTILOS PARA MODAL PROMOCIONAL: DISEÑO FINAL LBC - VERSIÓN 2
   Relación de aspecto: 15 (alto) : 31 (ancho)
   ========================================================= */

/* 1. Contenedor Principal */
.promo-modal-content {
    width: 90%;
    max-width: 1100px; 
    min-width: 700px;
    
    /* Relación de aspecto 15:31 */
    aspect-ratio: 16 / 9;
    
    background: var(--surface-white); 
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border: none;
    
    padding: 0;
    overflow: hidden; 
    border-radius: var(--radius); 
    
    display: flex;
}

/* 2. Cuerpo del Modal: Rejilla de dos columnas (70/30 split) */
.promo-body {
    display: grid;
    grid-template-columns: 7fr 3fr; 
    gap: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; 
}

/* 3. Columna de la Imagen (Izquierda) */
.promo-image-col {
    position: relative;
    padding: 0;
    height: 100%;
    overflow: hidden; 
    background-color: rgba(0, 0, 0, 0.3);
    background-blend-mode: multiply;
}

.promo-image-col img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none;
    mix-blend-mode: normal;
    opacity: 0.85;
}

/* ESTILO DEL TÍTULO DENTRO DE LA IMAGEN */
.promo-image-col h2 {
    position: absolute;
    bottom: 3rem;
    left: 2.5rem;
    right: 2.5rem;
    margin: 0;
    
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    color: var(--surface-white);
    font-weight: 800;
    line-height: 1.05;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    z-index: 2;
    letter-spacing: -0.02em;
}

/* 4. Columna del Contenido (Derecha) */
.promo-text-col {
    background-color: #F5F1E8; /* Color beige/crema claro */
    padding: 1rem 1.8rem 2rem 1.8rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    
    text-align: center; 
    color: var(--ink-light); 
}

/* 5. Contenedor de Texto Interno */
.promo-text-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex: 1;
    justify-content: flex-start;
    gap: 2rem;
    padding-top: 1rem;
}

.promo-subheading {
    font-family: var(--font-sans);
    font-weight: 900;
    color: #1A7B7F; 
    margin: 0; 
    font-size: 1.6rem;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

.promo-text-inner #promoTitle {
    display: none; /* Ocultamos este título ya que no se usa en el diseño 2 */
}

/* Fila del Logo - Ajuste para disposición vertical */
.promo-logo-row {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    margin: 0;
    width: 100%;
}

.promo-logo-row .promo-small-image {
    width: 270px;
    height: 90px;
    object-fit: contain;
    flex-shrink: 0;
}

.promo-logo-row .promo-logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: justify;
}

.promo-logo-row .logo-name {
    display: none; /* Ocultamos el nombre ya que está en el logo */
}

.promo-logo-row .logo-role {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 0.9rem;
    color: #2B2B2B;
    margin: 1;
}

/* 6. Botones (Agrupados y Centrados) */
.promo-buttons-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 1rem;
    margin-top: auto;
    padding-bottom: 1.5rem;
}

.promo-btn {
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    width: 100%;
    max-width: 100%;
    border-radius: 50px;
    background-color: #1A7B7F; /* Color teal/verde azulado */
    color: white;
    border: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background-color 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(26, 123, 127, 0.2);
}

.promo-btn:hover {
    background-color: #156366;
}

/* 7. Enlace de Descarte */
.promo-skip-btn {
    background: none;
    border: none;
    color: #1A7B7F;
    text-decoration: underline;
    padding: 0.3rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: var(--font-sans);
    font-weight: 500;
    transition: opacity 0.2s;
}

.promo-skip-btn:hover {
    opacity: 0.7;
}


/* 9. Responsive Design */
@media (max-width: 900px) {
    .promo-modal-content {
        min-width: auto;
        max-width: 95%;
        width: 95%;
        aspect-ratio: auto;
        max-height: 90vh;
    }
    
    .promo-body {
        grid-template-columns: 1fr; 
        overflow-y: auto;
    }
    
    .promo-image-col {
        display: none; 
    }
    
    .promo-text-col {
        padding: 3rem 2rem;
        min-height: 500px;
        justify-content: center;
    }
    
    .promo-text-inner {
        max-width: 100%;
        margin-bottom: 2rem;
    }
    
    .promo-subheading {
        font-size: 1rem;
    }
    
    .promo-logo-row {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .promo-logo-row .promo-logo-text {
        align-items: center;
        text-align: center;
    }
    
    .promo-btn {
        max-width: 100%;
        font-size: 1rem;
    }
}

section[id] {
    scroll-margin-top: 100px; /* Un valor general para todos los enlaces internos que apuntan a IDs */
}

/* Ocultar el logo móvil por defecto (desktop) */
.logo-mobile {
    display: none;
    height: 100%; /* Asegura que ambos ocupen el mismo espacio vertical si es necesario */
