/* --- VARIABLES CSS --- */
:root {
    --primary-dark: #192D36; /* Fondo oscuro principal */
    --text-light: white; /* Color de texto predeterminado claro */
    --accent-red: #DB3A56; /* Color de acento principal (rojo) */
    --light-grey: #f0f0f0; /* Gris claro para hover */
    --shadow-light: rgba(0, 0, 0, 0.15);
    --shadow-medium: rgba(0, 0, 0, 0.2);
    --shadow-dark: rgba(0, 0, 0, 0.3);
    --border-radius-base: 10px;
    --border-radius-large: 12px;
}

/* --- RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
    background-color: var(--primary-dark);
    color: var(--text-light);
    scroll-behavior: smooth;
    overflow-x: hidden; /* Evita el scroll horizontal en toda la página */
}

a,
button {
    transition: all 0.3s ease;
    text-decoration: none;
}

/* --- NAVBAR --- */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 1rem;
    color: var(--text-light);
    gap: 2rem;
}

.logo {
    order: 1;
}

.logo img {
    height: 70px;
    animation: logo-fade 1.2s ease-in-out;
}

@keyframes logo-fade {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links li a {
    color: var(--text-light);
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: var(--light-grey);
}

.social-icons {
    order: 2; /* Mantendrá su orden en desktop, ajustado en mobile */
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex: 1; /* Permite que ocupe espacio disponible */
}

.social-icons a {
    color: var(--text-light);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--light-grey);
}

/* --- MENU TOGGLE (Hamburguesa) --- */
.menu-toggle {
    display: none; /* Hidden by default for desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle span {
    height: 3px;
    background: var(--text-light);
    border-radius: 2px;
    transition: 0.4s ease;
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translateY(9px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translateY(-9px); }

/* --- MAIN CONTENT GENERAL --- */

/* Estilos Generales para el Contenido Principal */
main {
    padding: 20px;
    font-family: 'Montserrat', sans-serif; /* Sugiero una fuente más moderna si tienes la posibilidad de cargarla */
    color: #333; /* Color de texto por defecto para armonizar con fondos claros */
    overflow-x: hidden; /* Previene scroll horizontal si hay elementos que se desbordan */
}

/* Base para animaciones al hacer scroll */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

.content-section {
    padding: 40px; /* Espacio interno para cada sección */
    margin-bottom: 30px; /* Espacio entre secciones */
    border-radius: var(--border-radius-base); /* Bordes redondeados para un toque moderno */
    box-shadow: 0 4px 15px var(--shadow-light); /* Sombra más pronunciada para profundidad */
    transition: all 0.4s ease-in-out; /* Transición suave para todos los cambios */
}

.content-section:hover {
    transform: translateY(-8px) scale(1.01); /* Pequeño efecto al pasar el ratón, un poco más notorio */
    box-shadow: 0 8px 25px var(--shadow-medium); /* Sombra más grande al hover */
}

.content-section h2 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.8em; /* Títulos un poco más grandes */
    font-weight: bold;
    letter-spacing: 1px; /* Pequeño espaciado entre letras */
    position: relative;
    padding-bottom: 15px; /* Espacio para la línea de abajo */
}

.content-section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px; /* Línea de decoración bajo el título */
    height: 4px;
    background-color: var(--accent-red); /* Color de la línea */
    border-radius: 2px;
}

.section-content {
    display: flex;
    align-items: center;
    gap: 40px; /* Espacio entre imagen y texto, ligeramente más grande */
    flex-wrap: wrap; /* Permite que los elementos se envuelvan en pantallas pequeñas */
    justify-content: center; /* Centra el contenido si se envuelve */
}

.section-content p {
    flex: 1; /* Permite que el párrafo ocupe el espacio restante */
    line-height: 1.8; /* Mayor interlineado para mejor legibilidad */
    font-size: 1.15em; /* Texto ligeramente más grande */
    max-width: 600px; /* Limita el ancho del párrafo para legibilidad */
}

.section-image-left,
.section-image-right {
    max-width: 450px; /* Tamaño máximo para las imágenes de sección, un poco más grande */
    height: auto;
    border-radius: var(--border-radius-large); /* Bordes más redondeados */
    object-fit: cover; /* Asegura que la imagen se ajuste bien */
    box-shadow: 0 8px 20px var(--shadow-dark); /* Sombra más pronunciada para las imágenes */
    filter: brightness(95%); /* Ligeramente menos brillante */
    transition: all 0.4s ease-in-out;
}

.section-image-left:hover,
.section-image-right:hover {
    transform: scale(1.02); /* Efecto de zoom sutil al pasar el ratón */
    filter: brightness(100%); /* Vuelve al brillo normal */
}

/* Alineación de imágenes */
.section-image-left {
    margin-right: auto; /* Empuja el texto a la derecha si es necesario */
}

.section-image-right {
    margin-left: auto; /* Empuja el texto a la izquierda si es necesario */
}

/* La imagen de "Únete a la Familia CEO" (ideasceo2.jpg) */
.section-image-full-width {
    width: 60%; /* Un poco más grande */
    max-width: 900px; /* Un poco más grande pero centrada */
    height: auto;
    display: block;
    margin: 40px auto 0 auto; /* Centra la imagen y da espacio superior */
    border-radius: var(--border-radius-large);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); /* Sombra más grande y oscura */
    filter: saturate(1.1); /* Ligeramente más saturada */
    transition: transform 0.4s ease-out, filter 0.4s ease-out;
}

.section-image-full-width:hover {
    transform: translateY(-5px); /* Pequeño desplazamiento hacia arriba */
    filter: saturate(1.2) brightness(1.05); /* Más saturada y brillante */
}

/* --- SECCIÓN 1: Conoce a CEO --- */
#conoce-ceo {
    background: linear-gradient(135deg, var(--accent-red) 0%, #C4304A 100%);
    color: var(--text-light);
    padding: 30px 20px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#conoce-ceo::before {
    content: "";
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    z-index: 0;
}

#conoce-ceo h2 {
    color: var(--text-light);
    font-size: 2em;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

#conoce-ceo h2::after {
    background-color: var(--text-light); /* Hereda del elemento padre */
}

#conoce-ceo p {
    color: var(--light-grey);
    font-size: 0.8em;
    line-height: 1.4;
    max-width: 1000px;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.slogan-container {
    text-align: center;
    margin-top: 30px;
    padding: 25px 30px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-style: italic;
    font-size: 1.6em;
    font-weight: 600;
    color: var(--text-light);
    box-shadow: 0 6px 15px var(--shadow-dark);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
}

.slogan-container:hover {
    transform: scale(1.04);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* --- SECCIÓN 2: Nuestra Misión --- */
#nuestra-mision {
    background: linear-gradient(135deg, #FFFFFF 0%, #F9F9F9 100%);
    color: #333;
    padding: 30px 20px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#nuestra-mision::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 160px;
    height: 160px;
    background: rgba(219, 58, 86, 0.05); /* rojo suave */
    border-radius: 50%;
    z-index: 0;
}

#nuestra-mision h2 {
    color: var(--accent-red);
    font-size: 2em;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

#nuestra-mision h2::after {
    background-color: var(--accent-red);
}

#nuestra-mision p {
    color: #555;
    font-size: 0.8em;
    line-height: 1.6;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.03);
}

/* --- SECCIÓN 3: Nuestra Visión --- */
#nuestra-vision {
    background: linear-gradient(135deg, #1A1A1A 0%, #2A2A2A 100%);
    color: var(--text-light);
    padding: 30px 20px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#nuestra-vision::before {
    content: "";
    position: absolute;
    top: -60px;
    left: -60px;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    z-index: 0;
}

#nuestra-vision h2 {
    color: var(--text-light);
    font-size: 2em;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

#nuestra-vision h2::after {
    background-color: var(--text-light);
}

#nuestra-vision p {
    color: #E0E0E0;
    font-size: 0.8em;
    line-height: 1.6;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

/* --- SECCIÓN 4: Nuestros Valores --- */
#nuestros-valores {
    background: linear-gradient(135deg, var(--accent-red) 0%, #C7324D 100%);
    color: var(--text-light);
    padding: 30px 20px 30px;
    position: relative;
    overflow: hidden;
}

#nuestros-valores::before {
    content: "";
    position: absolute;
    bottom: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    z-index: 0;
}

#nuestros-valores h2 {
    color: var(--text-light);
    font-size: 2em;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

#nuestros-valores h2::after {
    background-color: var(--text-light);
}

#nuestros-valores p.section-intro {
    font-size: 1.1em;
    color: var(--light-grey);
    max-width: 700px;
    margin: 0 auto 40px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.value-item {
    background-color: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(2px);
    position: relative;
    overflow: hidden;
}

.value-item::before {
    content: "";
    position: absolute;
    top: -30px;
    left: -30px;
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    z-index: 0;
}

.value-item:hover {
    background-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.value-item h3 {
    font-size: 1.8em;
    margin-top: 15px;
    margin-bottom: 10px;
    color: var(--text-light);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.value-item p {
    font-size: 0.8em;
    color: #F8F8F8;
    position: relative;
    z-index: 1;
}

.value-icon {
    font-size: 4.5em;
    color: var(--text-light);
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s ease-in-out;
    position: relative;
    z-index: 1;
}

.value-item:hover .value-icon {
    transform: scale(1.12);
}

/* --- SECCIÓN 5: ¡Únete a la Familia CEO! --- */
#unete-ceo {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    color: #333;
    text-align: center;
    padding: 30px 10px 30px;
    position: relative;
    overflow: hidden;
}

#unete-ceo::before {
    content: "";
    position: absolute;
    top: -80px;
    left: -80px;
    width: 200px;
    height: 200px;
    background: var(--accent-red);
    border-radius: 50%;
    opacity: 0.1;
    z-index: 0;
}

#unete-ceo h2 {
    color: var(--accent-red);
    font-size: 1.5em;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

#unete-ceo h2::after {
    background-color: var(--accent-red);
}

#unete-ceo p {
    color: #555;
    font-size: 0.8em;
    margin-bottom: 10px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.whatsapp-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.whatsapp-button {
    display: inline-flex;
    align-items: center;
    padding: 14px 30px;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 35px;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px var(--shadow-dark);
    letter-spacing: 0.3px;
    position: relative;
}

.whatsapp-button::after {
    content: "📲";
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1rem;
    background: #fff;
    color: inherit;
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.whatsapp-button:hover::after {
    transform: rotate(20deg) scale(1.2);
}

.whatsapp-button i {
    margin-right: 12px;
    font-size: 1.4em;
}

/* Colores personalizados para cada persona */
.whatsapp-button.gissel {
    background-color: #DB3A56; /* Verde WhatsApp */
}

.whatsapp-button.gissel:hover {
    background-color: red;
}

.whatsapp-button.adrian {
    background-color: #2b65b7; /* Azul brillante */
}

.whatsapp-button.adrian:hover {
    background-color: blue;
}

.whatsapp-button.Mary {
    background-color: #2A253B; /* Coral/rojo suave */
}

.whatsapp-button.Mary:hover {
    background-color: #000000;
}

.whatsapp-note {
    margin-top: 40px;
    font-size: 1em;
    color: #777;
    font-style: italic;
    position: relative;
    z-index: 1;
}

/* --- EXTRA SECTIONS (FOOTER LINKS) --- */
.extra-sections {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    background: #f5f5f5; /* Fondo claro para esta sección */
    padding: 2rem 1rem;
    color: #000; /* Texto oscuro */
    border-top: 2px solid #ddd; /* Borde superior suave */

    /* Animación al aparecer */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Clase que se activa al hacer scroll */
.extra-sections.visible {
    opacity: 1;
    transform: translateY(0);
}

.enlaces-fce,
.redes-ceo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 300px;
    width: 100%;
}

.enlaces-fce h3,
.redes-ceo h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem; /* Tamaño de fuente ligeramente más grande */
    text-transform: uppercase;
    font-weight: bold;
    color: var(--primary-dark); /* Color de título */
}

.enlaces-fce ul,
.redes-ceo ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.enlaces-fce li,
.redes-ceo li {
    margin-bottom: 0.8rem; /* Aumenta el margen entre ítems */
    display: flex;
    justify-content: center;
}

.extra-sections a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    padding: 0.7rem 1.5rem; /* Padding ligeramente mayor */
    border-radius: 8px;
    background-color: #ffffff;
    color: #000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #eee; /* Borde sutil */
}

.extra-sections a:hover {
    background-color: var(--primary-dark);
    color: var(--text-light);
    transform: translateY(-3px) scale(1.05); /* Efecto más pronunciado al hover */
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* --- FOOTER --- */
footer {
    background-color: rgba(0, 0, 0, 0.8);
    text-align: center;
    padding: 1.5rem; /* Aumenta el padding del footer */
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Borde superior sutil */
}

/* --- ANIMACIONES ADICIONALES (consolidado) --- */
header.fade-in {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}
header.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}
footer.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}
footer.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes resaltar {
    0% {
        background-color: #fff6ef;
    }
    100% {
        background-color: #fff;
    }
}

/* --- RESPONSIVIDAD (Media Queries) --- */
@media (max-width: 768px) {
    /* Navbar Mobile Specifics */
    .menu-toggle {
        display: flex; /* Display as flex for mobile */
        order: 4; /* Mueve el hamburguesa al final */
    }

    .social-icons {
        order: 3; /* Asegura que los íconos sociales estén antes de la hamburguesa */
    }

    .nav-links {
        order: 2; /* Asegura que los enlaces de navegación estén antes de los íconos sociales y hamburguesa */
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        background: rgba(0,0,0,0.95);
        width: 220px;
        padding: 1rem 0;
        border-radius: 0 0 var(--border-radius-base) 0;
        transform: translateX(100%);
        transition: transform 0.4s ease, opacity 0.4s ease;
        opacity: 0;
        pointer-events: none;
    }

    .nav-links.open {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        padding: 12px 20px;
        width: 100%;
    }

    /* Main Content Mobile Specifics */
    main {
        padding: 15px;
    }
    .content-section {
        padding: 25px;
        margin-bottom: 25px;
    }

    .content-section h2 {
        font-size: 1.5em;
        padding-bottom: 1px;
    }
    .content-section h2::after {
        width: 250px;
        height: 3px;
    }

    .section-content {
        flex-direction: column; /* Apila imagen y texto en pantallas pequeñas */
        text-align: center;
        gap: 25px;
    }

    .section-content p {
        font-size: 1em;
    }

    .section-image-left,
    .section-image-right {
        max-width: 90%; /* Imágenes ocupan un buen porcentaje del ancho */
        margin: 0 auto 20px auto; /* Centra y añade espacio */
    }
    .section-image-full-width {
        width: 50%; /* Más grande en móviles */
        margin: 10px auto 0 auto;
    }

    .slogan-container {
        font-size: 1.2em;
        padding: 15px 20px;
    }

    .values-grid {
        grid-template-columns: 1fr; /* Una columna en móviles */
        gap: 20px;
    }
    .value-item {
        padding: 20px;
    }
    .value-item h3 {
        font-size: 1.5em;
    }
    .value-icon {
        font-size: 3.5em;
    }

    .whatsapp-buttons {
        flex-direction: column; /* Apila botones en móviles */
        gap: 10px;
    }
    .whatsapp-button {
        width: 100%; /* Botones de WhatsApp más anchos */
        padding: 12px 20px;
        font-size: 1em;
    }
    .whatsapp-button i {
        font-size: 1.2em;
    }
    .whatsapp-note {
        margin-top: 10px;
        font-size: 0.85em;
    }

    /* Responsive para extra-sections */
    .extra-sections {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem 1rem;
    }

    .extra-sections > div {
        max-width: 320px;
        width: 100%;
    }
}

/* Orden en desktop (a partir de 769px) */
@media (min-width: 769px) {
    .navbar {
        flex-wrap: nowrap;
    }

    .logo {
        order: 1;
    }

    .social-icons {
        order: 2;
    }

    .nav-links {
        order: 3;
        margin-left: 0;
    }
}