/* Variables de color y tipografía de CEEN - Fusión Moderno y Bauhaus */
:root {
    --rojo-coral: #F36766;
    --amarillo: #F4C752;
    --azul: #4A77F4;
    --beige: #f6f4e1;
    --negro-calido: #1E1717;
    --font-titulos: 'Poppins', sans-serif;
    --font-textos: 'Comfortaa', cursive;
}

/* Reset y estilos base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-textos);
    color: var(--negro-calido);
    background-color: var(--beige);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Bauhaus Subtle Grid Background (Aplicando al body) */
.bg-grid {
    background-image: 
      linear-gradient(to right, rgba(30, 23, 23, 0.04) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(30, 23, 23, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-titulos); font-weight: 700; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }

.section { padding: 100px 0; }

/* Títulos con toque geométrico Bauhaus */
.section-title {
    font-size: 2.5rem;
    margin: 0 auto 50px auto;
    width: fit-content;
    position: relative;
    display: block;
    color: var(--negro-calido);
}

/* Círculo de color primario detrás del título */
.section-title::before {
    content: '';
    position: absolute;
    width: 45px;
    height: 45px;
    background-color: var(--amarillo);
    border-radius: 50%;
    z-index: -1;
    top: -10px;
    left: -15px;
    opacity: 0.9;
}

.section-description {
    font-size: 1.15rem;
    max-width: 800px;
    margin: 0 auto 60px;
    text-align: center;
}

/* Navbar */
.navbar {
    position: fixed; top: 0; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 40px;
    background-color: var(--negro-calido);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 1000;
}
.logo img { height: 45px; filter: brightness(0) invert(1); /* Lo hace blanco si era oscuro */ }
.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}
.nav-links a:hover { color: var(--amarillo); }

/* Hero */
.hero { padding-top: 75px; }

/* Video cropping (menos recorte) */
.video-banner-full {
    width: 100%;
    height: 75vh; /* Se recortó un poquito menos */
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-video-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.0); /* Eliminado el zoom para evitar cortes adicionales */
}

.hero-content {
    max-width: 900px; margin: 0 auto; padding: 60px 20px 80px;
}
.hero h1 { font-size: 4rem; line-height: 1.1; margin-bottom: 20px; }
.subtitle { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.8; }
.highlight-phrase {
    display: inline-block;
    font-family: var(--font-titulos);
    font-size: 1.5rem;
    color: var(--azul);
    margin-bottom: 40px;
    font-weight: 700;
}

/* Botones (Redondeados Modernos) */
.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px; /* Diseño suave original */
    font-family: var(--font-titulos);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); /* Sombra suave original */
}
.btn-primary { background-color: var(--rojo-coral); color: white; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 25px rgba(243, 103, 102, 0.3); }
.btn-secondary { background-color: white; color: var(--negro-calido); }
.btn-secondary:hover { transform: translateY(-3px); background-color: var(--amarillo); }

/* Cards (Problemática) - Diseño original con toques de color */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.card {
    background-color: white;
    padding: 40px 30px;
    border-radius: 20px; /* Bordes suaves */
    box-shadow: 0 15px 35px rgba(0,0,0,0.05); /* Sombra difusa suave */
    text-align: center;
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}
/* Bauhaus primary color accents (Líneas de color superior) */
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 8px;
}
.card.color-rojo::before { background-color: var(--rojo-coral); }
.card.color-amarillo::before { background-color: var(--amarillo); }
.card.color-azul::before { background-color: var(--azul); }

.card:hover { transform: translateY(-10px); }
.card-icon { font-size: 3rem; margin-bottom: 20px; }
.card h3 { margin-bottom: 15px; font-weight: 700; }

/* Justificación */
.justificacion {
    background-color: white;
    border-radius: 40px;
    margin: 0 20px;
    padding: 80px 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    position: relative;
}
.justificacion-content { display: flex; align-items: center; gap: 60px; }
.justificacion .text-content { flex: 1; }
.justificacion .image-content { flex: 1; position: relative; z-index: 2; }
.justificacion .image-content img { width: 100%; border-radius: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); }

/* Figura Bauhaus decorativa debajo de la imagen */
.justificacion .image-content::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background-color: var(--azul);
    border-radius: 50%;
    bottom: -30px;
    right: -30px;
    z-index: -1;
}

/* Timeline Proceso */
.timeline { position: relative; max-width: 900px; margin: 60px auto 0; }
.timeline::after { content: ''; position: absolute; width: 2px; background-color: rgba(30,23,23,0.1); top: 0; bottom: 0; left: 50%; }
.timeline-item { padding: 10px 50px; position: relative; width: 50%; margin-bottom: 50px; }
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-dot {
    position: absolute; width: 20px; height: 20px; right: -10px; top: 10px;
    border-radius: 50%; z-index: 1; border: 4px solid white; box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.dot-rojo { background-color: var(--rojo-coral); }
.dot-azul { background-color: var(--azul); }
.dot-amarillo { background-color: var(--amarillo); }

.timeline-item:nth-child(even) .timeline-dot { left: -10px; }
.timeline-content {
    padding: 30px; background-color: white; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.timeline-img { width: 100%; border-radius: 10px; margin-top: 20px; }

/* Encuesta */
.survey-intro-box { max-width: 800px; margin: 0 auto 50px; }
.survey-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.survey-item {
    background-color: white; padding: 20px; border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: transform 0.3s;
}
.survey-item:hover { transform: translateY(-5px); }
.survey-img-wrapper { border-radius: 10px; overflow: hidden; margin-bottom: 15px; }
.survey-item img { width: 100%; display: block; }
.survey-item h4 {
    display: inline-block; padding: 5px 15px; border-radius: 20px;
    font-size: 0.8rem; margin-bottom: 10px; background-color: rgba(244,199,82,0.2); color: #b8912e;
}

/* Resultados y Galería general */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; margin-bottom: 60px; }
.gallery-item {
    background-color: white; padding: 20px; border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); text-align: center;
}
.gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 15px; margin-bottom: 15px; }
.gallery-item p { font-weight: 600; font-family: var(--font-titulos); }

/* Galería específica Portafolio y Redes (Sin recorte) */
.portafolio .gallery { grid-template-columns: repeat(2, 1fr); align-items: start; }
.portafolio .gallery-item img { aspect-ratio: auto; height: auto; object-fit: contain; }

.redes .gallery { 
    display: flex;
    flex-direction: column;
    align-items: center; 
    gap: 40px;
}
.redes .gallery-item { width: 100%; max-width: 650px; padding: 20px; }
.redes .gallery-item img { aspect-ratio: auto; height: auto; object-fit: contain; }

/* Video Local (CEEN) */
.video-section {
    padding: 100px 8%;
    background: #EDE0D3;
    text-align: center;
}

.video-wrapper {
    width: min(100%, 950px);
    margin: 35px auto 25px;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(30, 23, 23, 0.25);
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.btn-youtube {
    display: inline-block;
    margin-top: 20px;
    background: #F36766;
    color: #fff;
    padding: 14px 28px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-youtube:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 25px rgba(243, 103, 102, 0.65);
    color: #fff;
}

/* Créditos */
.creditos {
    background-color: var(--negro-calido);
    color: white; padding: 80px 0 40px;
    border-radius: 40px 40px 0 0;
}
.creditos .section-title { color: white; }
.creditos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.credito-info h3, .credito-logos h3 { color: var(--amarillo); margin-bottom: 5px; font-size: 1.1rem; }
.credito-info p, .credito-logos p { margin-bottom: 25px; opacity: 0.9; }
.logos-inst { display: flex; gap: 20px; margin-top: 15px; }
.logos-inst img { max-width: 140px; }
.footer-bottom { text-align: center; margin-top: 60px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); opacity: 0.6; font-size: 0.9rem; }

/* Animaciones */
.reveal { opacity: 0; transform: translateY(30px); transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal-left { opacity: 0; transform: translateX(-100px); transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal-right { opacity: 0; transform: translateX(100px); transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1); }

.reveal.active, .reveal-left.active, .reveal-right.active { opacity: 1; transform: translate(0, 0); }

/* Hover en imágenes */
.hero-image img, .image-content img, .timeline-img, .gallery-item img, .identidad-item img, .mockup-grid img {
    transition: transform 0.8s ease, box-shadow 0.8s ease;
}
.hero-image img:hover, .image-content img:hover, .timeline-img:hover, .gallery-item img:hover, .identidad-item img:hover, .mockup-grid img:hover {
    transform: scale(1.04);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    z-index: 10;
    position: relative;
}

/* Nuevas Secciones Dinámicas */
.section-azul { background-color: var(--azul); color: white; }
.section-rojo { background-color: var(--rojo-coral); color: white; }
.section-azul .section-title, .section-rojo .section-title { color: white; }
.section-azul .section-title::before, .section-rojo .section-title::before { background-color: white; opacity: 0.2; }

/* Identidad de Marca Grid */
.identidad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}
.identidad-item {
    border-radius: 20px;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: transform 0.4s ease;
    aspect-ratio: 1;
}
.identidad-item:hover { transform: translateY(-10px); }
.identidad-item img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bg-rojo { background-color: var(--rojo-coral); }
.bg-amarillo { background-color: var(--amarillo); }
.bg-azul { background-color: var(--azul); }

/* Responsive */
@media screen and (max-width: 1024px) {
    /* (Se eliminó la regla de redes de aquí) */
}

@media screen and (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 3rem; }
    .justificacion-content { flex-direction: column; }
    .timeline::after { left: 20px; }
    .timeline-item { width: 100%; padding-left: 50px; }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-item:nth-child(odd) .timeline-dot, .timeline-item:nth-child(even) .timeline-dot { left: 10px; }
    .creditos-grid { grid-template-columns: 1fr; }
    .portafolio .gallery { grid-template-columns: 1fr; }
}
