/* =================================================================
   HOJA DE ESTILO PARA ESPECIALISTAS LB
   Última Actualización: 8 de Octubre, 2025
   ================================================================= */

/* ======== OPTIMIZACIÓN DE FUENTE PARA EVITAR CLS ======== */
/* Creamos una fuente fallback local ajustada para que coincida con las métricas de Montserrat. */
@font-face {
  font-family: 'Montserrat Fallback';
  src: local('Arial'); /* Usamos Arial, una fuente sans-serif muy común en todos los sistemas. */
  ascent-override: 92.54%; /* Ajusta la altura por encima de la línea base. */
  descent-override: 22.61%; /* Ajusta la profundidad por debajo de la línea base. */
  line-gap-override: 0.00%; /* Ajusta el espacio entre líneas. */
  size-adjust: 107.28%; /* Ajuste general del tamaño del glifo. */
}
/* ======================================================= */

/* ======== CONFIGURACIÓN GENERAL Y VARIABLES DE COLOR ======== */
:root {
    --primary-dark-blue: #00006c;
    --primary-bright-blue: #011fb3;
    --white: #FFFFFF;
    --dark-gray: #3d3d3d;
    --light-gray-bg: #f4f4f4;
    --font-family: 'Montserrat', 'Montserrat Fallback', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ======== HEADER Y NAVEGACIÓN STICKY ======== */
.main-header {
    background-color: var(--white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: padding 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo a {
    text-decoration: none;
    color: var(--primary-dark-blue);
    font-size: 1.8rem;
    font-weight: 900;
}

.logo strong {
    color: var(--primary-bright-blue);
}

.main-nav a {
    margin: 0 15px;
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 700;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-bright-blue);
    transition: width 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-bright-blue);
}

.main-nav a:hover::after {
    width: 100%;
}

/* ======== BOTONES DE LLAMADA A LA ACCIÓN (CTA) ======== */
.cta-button {
    background: var(--primary-bright-blue);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(1, 31, 179, 0.4);
}

.cta-button:hover {
    background: var(--primary-dark-blue);
    transform: translateY(-3px);
}

/* ======== HERO SECTION Y CARRUSEL ======== */
.hero-section {
    height: 90vh;
    position: relative;
    color: var(--white);
    overflow: hidden;
}

.carousel-container {
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
}

/* Estilos para la imagen LCP optimizada */
.slide .lcp-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Equivalente a background-size: cover */
    z-index: 0; /* Detrás del contenido y el overlay */
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 108, 0.6); /* Overlay azul oscuro */
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    max-width: 800px;
}

.slide-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.slide-description {
    font-size: 1.3rem;
    margin-bottom: 30px;
}

/* ======== TÍTULOS DE SECCIÓN ======== */
.section-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--primary-dark-blue);
    text-align: center;
    margin-bottom: 15px;
}
.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    text-align: center;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ======== SECCIÓN DE SERVICIOS ======== */
.services-section {
    padding: 80px 0;
    background-color: var(--light-gray-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.service-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    font-size: 1.5rem;
    color: var(--primary-dark-blue);
    margin-bottom: 10px;
}

/* ======== SECCIÓN NOSOTROS ======== */
.about-section {
    padding: 80px 0;
    background: var(--white);
}

.about-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-content {
    flex: 1;
}

.about-content .section-title {
    text-align: left;
}

.about-content p {
    margin-bottom: 20px;
}

.about-content ul {
    list-style: none;
    padding-left: 0;
}

.about-content ul li {
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.about-content ul i {
    color: var(--primary-bright-blue);
    margin-right: 15px;
    font-size: 1.5rem;
}


/* ======== SECCIÓN DE PREGUNTAS FRECUENTES (FAQ) ======== */
.faq-section {
    padding: 80px 0;
    background-color: var(--white); /* Fondo limpio para alternar */
}

.faq-accordion {
    max-width: 850px; /* Ancho cómodo para leer las preguntas */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Espacio entre cada tarjeta de pregunta */
}

.faq-item {
    background-color: #f9f9f9; /* Un gris muy suave, más ligero que --light-gray-bg */
    border: 1px solid #eee;
    border-radius: 12px; /* Esquinas redondeadas modernas */
    overflow: hidden; /* Clave para la animación y los bordes */
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
     box-shadow: 0 4px 20px rgba(0,0,0,0.06); /* Sombra sutil al pasar el mouse */
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark-blue);
    cursor: pointer;
    list-style: none; /* Oculta el marcador por defecto de <summary> */
}

/* Ocultar el marcador de <summary> en todos los navegadores */
.faq-question::-webkit-details-marker,
.faq-question::marker {
    display: none;
}

.faq-icon {
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--primary-bright-blue);
    transition: transform 0.3s ease-out; /* Animación del ícono */
}

/* --- ESTADO ABIERTO [open] --- */

/* Cuando la pregunta está abierta, cambia el color del título */
.faq-item[open] .faq-question {
    color: var(--primary-bright-blue);
}

/* Gira el '+' para formar una 'x' */
.faq-item[open] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    /* La magia de la animación moderna (2026) sin JS */
    display: grid;
    grid-template-rows: 0fr; /* Inicia colapsado (altura 0) */
    transition: grid-template-rows 0.3s ease-in-out; /* Animación de apertura/cierre */
}

.faq-answer p {
     /* El contenido real, necesita overflow: hidden para la animación */
    overflow: hidden;
    padding: 0 25px 25px 25px; /* Padding (sin top) */
    line-height: 1.7;
    color: var(--dark-gray);
    margin: 0;
}

/* Cuando el item está abierto, la grilla se expande a 1 fracción */
.faq-item[open] .faq-answer {
    grid-template-rows: 1fr; /* Se expande a 1 fracción de su contenido */
}


/* ======== SECCIÓN CTA FINAL ======== */
.cta-final-section {
    padding: 80px 0;
    background: linear-gradient(45deg, var(--primary-dark-blue), var(--primary-bright-blue));
    color: var(--white);
}

.section-title-light, .section-subtitle-light {
    color: var(--white);
    text-align: center;
}
.section-title-light {
    text-shadow: none;
}
.section-subtitle-light {
    margin-bottom: 40px;
}

.final-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.final-cta {
    padding: 18px 35px;
    font-size: 1.2rem;
}

.final-cta i {
    margin-right: 10px;
}

.cta-button-whatsapp {
    background-color: #25D366;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    color: var(--white);
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.cta-button-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-3px);
}

/* ======== SECCIÓN DE MARCAS (VERSIÓN CARRUSEL) ======== */
.brands-section {
    padding: 60px 0;
    background-color: var(--light-gray-bg);
}

.brands-section .container {
    margin-bottom: 40px;
}

/* Creamos la animación de scroll infinito */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.brands-carousel {
    display: flex;
    width: 100%;
    overflow: hidden;
    /* Efecto de desvanecido en los bordes */
    -webkit-mask-image: linear-gradient(to right, hsl(0 0% 0% / 0), hsl(0 0% 0% / 1) 10%, hsl(0 0% 0% / 1) 90%, hsl(0 0% 0% / 0));
    mask-image: linear-gradient(to right, hsl(0 0% 0% / 0), hsl(0 0% 0% / 1) 10%, hsl(0 0% 0% / 1) 90%, hsl(0 0% 0% / 0));
}

.brands-slide {
    display: flex;
    align-items: center;
    /* El doble de logos, por lo que el ancho es 200% */
    flex-shrink: 0;
    min-width: 100%;
    /* Animación: 30s de duración, infinita y lineal */
    animation: scroll 30s linear infinite;
}

.brands-carousel:hover .brands-slide {
    /* Pausamos la animación al pasar el mouse */
    animation-play-state: paused;
}

.brands-slide img {
    height: 45px; /* Altura uniforme para todos los logos */
    width: auto;
    margin: 0 40px; /* Espacio entre logos */
    filter: grayscale(100%) opacity(0.7);
    transition: filter 0.3s ease;
}

.brands-slide img:hover {
    filter: grayscale(0%) opacity(1);
}


/* ======== FOOTER ======== */
.main-footer {
    background-color: var(--dark-gray);
    color: #ccc;
    padding: 30px 0;
    text-align: center;
}

.main-footer p {
    margin: 5px 0;
}

/* ======== ANIMACIONES ======== */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(1, 31, 179, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 6px 25px rgba(1, 31, 179, 0.6); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(1, 31, 179, 0.4); }
}

@keyframes pulse-whatsapp {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); }
}

.pulse {
    animation: pulse 2s infinite;
}

.pulse-whatsapp {
    animation: pulse-whatsapp 2s infinite;
}

/* =================================================================
   RESPONSIVE DESIGN 
   ================================================================= */

/* Tablets y pantallas pequeñas */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-container {
        flex-direction: column;
        gap: 30px;
    }
    .about-content .section-title {
        text-align: center;
    }
    .slide-title {
        font-size: 2.8rem;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .main-header {
        padding: 10px 0;
    }
    .header-container {
        flex-direction: column;
        gap: 10px;
    }
    .main-nav {
        margin: 10px 0;
    }
    .header-cta {
        display: none; /* Ocultar el botón de llamar en el menú móvil para simplicidad */
    }
    .slide-title {
        font-size: 2.2rem;
    }
    .slide-description {
        font-size: 1.1rem;
    }
    .section-title {
        font-size: 2.2rem;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* ======== MEJORAS PARA LA SECCIÓN "NOSOTROS" EN MÓVIL ======== */
    .about-section {
        padding: 60px 20px; /* Un poco menos de padding vertical y asegura espacio lateral */
    }

    .about-content {
        text-align: center; /* Centra todo el texto del contenedor */
    }

    .about-content .section-title {
        font-size: 2rem; /* Título ligeramente más pequeño para no abrumar */
    }

    .about-content p {
        margin-bottom: 40px; /* Más espacio después del párrafo introductorio */
    }

    .about-content ul {
        padding-left: 0; /* Elimina cualquier padding por defecto de la lista */
    }

    .about-content ul li {
        flex-direction: column;   /* Apila el ícono y el texto verticalmente */
        gap: 10px;                /* Espacio entre el ícono y el texto */
        margin-bottom: 30px;      /* Aumenta el espacio entre cada punto clave */
    }

    .about-content ul li i {
        margin-right: 0;          /* Elimina el margen derecho que tenía en la vista de escritorio */
        font-size: 2.2rem;        /* Hace el ícono un poco más grande y protagónico */
        color: var(--primary-bright-blue); /* Asegura que el color del ícono resalte */
    }

    .about-content ul li strong {
        font-size: 1.1rem; /* Aumenta ligeramente el tamaño del texto para mejor lectura */
    }
}