/* Estilos para el carrusel hero */
.hero-carousel-nosotros {
    position: relative;
    height: 80vh;
    min-height: 600px;
    overflow: hidden;
    background: #000;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1.1);
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.carousel-slide.next {
    transform: translateX(100%) scale(1);
}

.carousel-slide.prev {
    transform: translateX(-100%) scale(1);
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(223, 30, 83, 0.3) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 1;
}

.carousel-slide .container {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: -1px;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 1s ease forwards 0.3s;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    transform: translateY(30px);
    animation: slideInUp 1s ease forwards 0.6s;
}

.hero-stats {
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 1s ease forwards 0.9s;
}

.hero-stat {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.hero-stat:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.hero-stat strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.hero-stat div {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Controles del carrusel */
.carousel-controls {
    position: absolute;
    top: 50%;
    left: 2rem;
    right: 2rem;
    display: flex;
    justify-content: space-between;
    z-index: 3;
    pointer-events: none;
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 1.2rem;
    pointer-events: all;
    opacity: 0.7;
}

.carousel-btn:hover {
    background: rgba(223, 30, 83, 0.8);
    border-color: rgba(223, 30, 83, 1);
    opacity: 1;
    transform: scale(1.1);
}

.carousel-btn:active {
    transform: scale(0.95);
}

/* Indicadores */
.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 3;
}

.indicator {
    width: 50px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.indicator.active {
    background: rgba(223, 30, 83, 0.8);
}

.indicator.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: indicatorShine 2s ease-in-out infinite;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scaleY(1.5);
}

/* Botón play/pausa */
.carousel-play-pause {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    z-index: 3;
}

.play-pause-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 1rem;
}

.play-pause-btn:hover {
    background: rgba(223, 30, 83, 0.8);
    border-color: rgba(223, 30, 83, 1);
    transform: scale(1.1);
}

/* Animaciones */
@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes indicatorShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Efecto de transición suave */
.carousel-slide.fade-in {
    animation: fadeInScale 1s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-carousel-nosotros {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem !important;
    }
    
    .hero-stat {
        padding: 0.8rem;
    }
    
    .carousel-controls {
        left: 1rem;
        right: 1rem;
    }
    
    .carousel-btn {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .indicator {
        width: 30px;
        height: 3px;
    }
    
    .carousel-indicators {
        bottom: 1rem;
        gap: 0.5rem;
    }
    
    .carousel-play-pause {
        bottom: 1rem;
        right: 1rem;
    }
    
    .play-pause-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-stat strong {
        font-size: 1.5rem;
    }
    
    .hero-stat div {
        font-size: 0.8rem;
    }
    
    .hero-content {
        padding: 1rem;
    }
}

/* Mejoras de rendimiento */
.carousel-slide {
    will-change: opacity, transform;
}

.carousel-slide img {
    will-change: transform;
}

/* Efecto parallax sutil en las imágenes de fondo */
@media (prefers-reduced-motion: no-preference) {
    .carousel-slide.active {
        animation: subtleZoom 8s ease-in-out infinite alternate;
    }
}

@keyframes subtleZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* Sección de información institucional */
.info-institucional {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.info-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    box-shadow: var(--card-shadow);
    border: none;
    transition: var(--transition);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(223, 30, 83, 0.2);
}

.info-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    background: rgba(223, 30, 83, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.info-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    text-align: center;
}

.info-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #666;
    text-align: justify;
}

/* Misión y Visión */
.mision-vision {
    padding: 5rem 0;
    background: white;
}

.mv-card {
    background: linear-gradient(135deg, rgba(223, 30, 83, 0.05), rgba(251, 125, 58, 0.05));
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    border-left: 5px solid var(--primary-color);
    margin-bottom: 2rem;
    transition: var(--transition);
    position: relative;
}

.mv-card.vision {
    border-left-color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(251, 125, 58, 0.05), rgba(223, 30, 83, 0.05));
}

.mv-card:hover {
    transform: translateX(10px);
    box-shadow: var(--card-shadow);
}

.mv-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.mv-card .mv-icon {
    color: var(--primary-color);
}

.mv-card.vision .mv-icon {
    color: var(--secondary-color);
}

.mv-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.mv-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    text-align: justify;
}

/* Principios y Valores */
.principios-valores {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8f9fa, white);
}

.valor-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 2px solid transparent;
    height: 100%;
}

.valor-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(223, 30, 83, 0.2);
}

.valor-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    background: rgba(223, 30, 83, 0.1);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.valor-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.valor-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
}

/* ════════════════════════════════════════════════════════
   RESEÑA HISTÓRICA — NUEVO DISEÑO
   Reemplaza los estilos de .resena-historica, .timeline,
   .timeline-item, .timeline-year, etc. en soycore.css
   ════════════════════════════════════════════════════════ */

/* -- Sección wrapper -- */
.resena-historica {
    padding: 6rem 0;
    background: #f6f5f3;
    position: relative;
    overflow: hidden;
}

/* Textura de fondo sutil */
.resena-historica::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.resena-historica .container {
    position: relative;
    z-index: 1;
}

/* -- Encabezado de sección propio (no sobreescribe .section-title global) -- */
.section-header-timeline {
    text-align: center;
    margin-bottom: 5rem;
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary-color);
    background: rgba(223, 30, 83, 0.08);
    border: 1px solid rgba(223, 30, 83, 0.2);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    margin-bottom: 1.2rem;
}

.section-title-timeline {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--dark-color);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.section-title-timeline span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle-timeline {
    font-size: 1.05rem;
    color: #888;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

/* -- Contenedor timeline -- */
.timeline {
    position: relative;
    display: grid;
    gap: 0;
    max-width: 1000px;
    margin: 0 auto;
}

/* Línea central */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(223, 30, 83, 0.3) 5%,
        rgba(223, 30, 83, 0.5) 50%,
        rgba(251, 125, 58, 0.3) 95%,
        transparent 100%
    );
}

/* -- Item de timeline -- */
.tl-item {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    align-items: start;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.tl-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Orden: impares → contenido izquierda */
.tl-item:nth-child(odd) .tl-content  { order: 1; text-align: right; padding-right: 2.5rem; }
.tl-item:nth-child(odd) .tl-node     { order: 2; }
.tl-item:nth-child(odd) .tl-empty    { order: 3; }

/* Orden: pares → contenido derecha */
.tl-item:nth-child(even) .tl-empty   { order: 1; }
.tl-item:nth-child(even) .tl-node    { order: 2; }
.tl-item:nth-child(even) .tl-content { order: 3; text-align: left; padding-left: 2.5rem; }

.tl-empty { min-height: 1px; }

/* -- Nodo (burbuja de año) -- */
.tl-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.tl-year {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 6px #f6f5f3,
        0 0 0 8px rgba(223, 30, 83, 0.15),
        0 8px 24px rgba(223, 30, 83, 0.3);
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tl-item:hover .tl-year {
    transform: scale(1.12);
    box-shadow:
        0 0 0 6px #f6f5f3,
        0 0 0 10px rgba(223, 30, 83, 0.25),
        0 12px 30px rgba(223, 30, 83, 0.4);
}

/* -- Card de contenido -- */
.tl-content { padding-bottom: 1rem; }

.tl-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.8rem 2rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tl-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(223, 30, 83, 0.12);
}

/* Barra de acento superior (aparece en hover) */
.tl-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 0 0 3px 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tl-card:hover::before { opacity: 1; }

/* Flecha conectora — impares (izquierda) */
.tl-item:nth-child(odd) .tl-card::after {
    content: '';
    position: absolute;
    top: 24px;
    right: -10px;
    border: 10px solid transparent;
    border-left-color: white;
}

/* Flecha conectora — pares (derecha) */
.tl-item:nth-child(even) .tl-card::after {
    content: '';
    position: absolute;
    top: 24px;
    left: -10px;
    border: 10px solid transparent;
    border-right-color: white;
}

/* Ícono dentro del card */
.tl-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(223, 30, 83, 0.08);
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.tl-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.tl-card-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #777;
    margin: 0;
}

/* -- Hito final (2024) centrado y destacado -- */
.tl-item.milestone {
    grid-template-columns: 1fr;
    justify-items: center;
    margin-top: 1rem;
}

.tl-item.milestone .tl-node    { margin-bottom: 1.5rem; }
.tl-item.milestone .tl-empty   { display: none; }

.tl-item.milestone .tl-content {
    text-align: center;
    padding: 0;
    max-width: 560px;
}

.tl-item.milestone .tl-card::after { display: none; }
.tl-item.milestone .tl-card::before { left: 1.5rem; right: 1.5rem; }

.tl-item.milestone .tl-card {
    background: var(--primary-gradient);
    color: white;
    border: none;
}

.tl-item.milestone .tl-card-title,
.tl-item.milestone .tl-card-text { color: white; }
.tl-item.milestone .tl-card-text { opacity: 0.9; }

.tl-item.milestone .tl-icon {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.tl-item.milestone .tl-year {
    width: 80px;
    height: 80px;
    font-size: 0.9rem;
    box-shadow:
        0 0 0 6px #f6f5f3,
        0 0 0 10px rgba(223, 30, 83, 0.2),
        0 12px 30px rgba(223, 30, 83, 0.4);
}

/* -- Responsive -- */
@media (max-width: 768px) {
    .resena-historica { padding: 4rem 0; }

    .timeline::before { left: 28px; }

    .tl-item {
        grid-template-columns: 56px 1fr;
    }

    /* Todos los items: nodo izquierda, contenido derecha */
    .tl-item:nth-child(odd) .tl-content,
    .tl-item:nth-child(even) .tl-content {
        order: 2;
        text-align: left;
        padding-left: 1.5rem;
        padding-right: 0;
    }

    .tl-item:nth-child(odd) .tl-node,
    .tl-item:nth-child(even) .tl-node { order: 1; }

    .tl-item:nth-child(odd) .tl-empty,
    .tl-item:nth-child(even) .tl-empty { display: none; }

    .tl-year { width: 56px; height: 56px; font-size: 0.7rem; }

    /* Flecha siempre hacia la derecha en móvil */
    .tl-item:nth-child(odd) .tl-card::after,
    .tl-item:nth-child(even) .tl-card::after {
        top: 18px;
        left: -10px;
        right: auto;
        border-left: none;
        border-right-color: white;
    }

    /* Milestone en móvil */
    .tl-item.milestone {
        grid-template-columns: 56px 1fr;
        justify-items: start;
    }

    .tl-item.milestone .tl-node    { margin-bottom: 0; }
    .tl-item.milestone .tl-content { text-align: left; padding-left: 1.5rem; }

    .tl-item.milestone .tl-card::after {
        display: block;
        top: 18px;
        left: -10px;
        border-left: none;
        border-right-color: #df1e53;
    }

    .tl-item.milestone .tl-year { width: 56px; height: 56px; font-size: 0.7rem; }
}

@media (max-width: 576px) {
    .section-title-timeline { font-size: 2rem; }
    .tl-card { padding: 1.4rem 1.2rem; }
}

/* Estadísticas institucionales */
.estadisticas {
    padding: 4rem 0;
    background: var(--primary-gradient);
    color: white;
    text-align: center;
}

.stat-item {
    padding: 2rem 1rem;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: block;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsivo */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding-left: 4rem !important;
        padding-right: 1rem !important;
    }
    
    .timeline-year {
        left: 20px !important;
        transform: none !important;
    }
    
    .timeline-content::after {
        display: none;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .info-card {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .mv-card {
        padding: 2rem 1.5rem;
    }
    
    .valor-item {
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .info-card {
        padding: 1.5rem 1rem;
    }
    
    .mv-card {
        padding: 1.5rem 1rem;
    }
    
    .timeline-item {
        padding-left: 3rem !important;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* Efectos adicionales */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.section-title::after {
    content: '';
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    display: block;
    margin: 2rem auto 0;
    border-radius: 2px;
}