/* 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 */
.resena-historica {
    padding: 5rem 0;
    background: linear-gradient(135deg, rgba(223, 30, 83, 0.02), rgba(251, 125, 58, 0.02));
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 2rem;
    margin-bottom: 2rem;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
    padding-right: 3rem;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
    padding-left: 3rem;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    position: relative;
    transition: var(--transition);
}

.timeline-content:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(223, 30, 83, 0.15);
}

.timeline-item:nth-child(odd) .timeline-content::after {
    content: '';
    position: absolute;
    top: 2rem;
    right: -15px;
    width: 0;
    height: 0;
    border: 15px solid transparent;
    border-left-color: white;
}

.timeline-item:nth-child(even) .timeline-content::after {
    content: '';
    position: absolute;
    top: 2rem;
    left: -15px;
    width: 0;
    height: 0;
    border: 15px solid transparent;
    border-right-color: white;
}

.timeline-year {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    top: 1.5rem;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(223, 30, 83, 0.3);
}

.timeline-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.timeline-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
}

/* 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;
}