/* Hero Nosotros — solo la imagen de fondo (el resto lo maneja .hero-page) */
.hero-nosotros {
    background-image: url('../img/portada/portada-nosotros.jpg');
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Estilos Bento Grid */
.bento-section {
    padding: 80px 0;
    background-color: #f4f7f9;
}
.bento-section h2 {
    text-align: center;
    font-size: 2.3rem;
    margin-bottom: 60px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 280px 280px auto; 
    gap: 20px;
    min-height: 600px; 
}

.bento-item {
    background: white;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 91, 159, 0.05);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 91, 159, 0.1);
}

.bento-item:hover {
    transform: translateY(-5px);
}

/* Posicionamiento de bloques */
.historia-main {
    grid-column: span 2;
}

.slider-vertical-container {
    grid-row: span 2;
    padding: 0; /* Para que la imagen ocupe todo */
    overflow: hidden;
    position: relative;
    min-height: 400px;
}

.valores-full {
    grid-column: span 3;
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
}

/* Slider Vertical */
.vertical-slider {
    height: 100%;
    width: 100%;
}

.slider-track {
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: scrollVertical 12s cubic-bezier(0.645, 0.045, 0.355, 1) infinite;
}

.slider-track img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

@keyframes scrollVertical {
    0%, 20% { transform: translateY(0); }
    25%, 45% { transform: translateY(-100%); }
    50%, 70% { transform: translateY(-200%); }
    75%, 100% { transform: translateY(-300%); }
}

/* Detalles Estéticos */
.bento-title {
    color: #005B9F;
    font-size: 1.5rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mvv-icon-small {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #E58E21;
}

.valores-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.v-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #005B9F;
    font-weight: 600;
}

.v-item i {
    font-size: 1.5rem;
    color: #E58E21;
    margin-bottom: 5px;
}

/* Responsivo para Móviles */
@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .historia-main, .slider-vertical-container, .valores-full {
        grid-column: span 1;
    }
    .slider-vertical-container {
        height: 300px;
    }
    .valores-bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Timeline */
.timeline-section {
    padding: 80px 0;
    background: white;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 50px auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #005B9F, #E58E21);
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
    text-align: left;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: auto;
    text-align: right;
}

.timeline-content {
    width: 45%;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 91, 159, 0.1);
    position: relative;
}

.timeline-date {
    display: inline-block;
    background: linear-gradient(135deg, #005B9F, #0077CC);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #E58E21;
    border: 4px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #005B9F;
    top: 30px;
}

/* Equipo Section */
/* Equipo Section (Dark Cards on White Background) */
.equipo-section {
    padding: 100px 0 80px;
    background: #ffffff;
}

.equipo-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 120px 30px; /* 120px row gap prevents heads from overlapping cards above */
    margin-top: 130px;
    padding: 0 15px;
}

.equipo-card {
    background-color: #005B9F;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    position: relative;
    padding: 0 0 30px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.equipo-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.team-img-wrapper {
    position: relative;
    width: 100%;
    height: 160px; /* Slightly taller base */
    display: flex;
    justify-content: center;
}

.team-person {
    position: absolute;
    bottom: 0;
    height: 280px; /* Agrandar la imagen */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    /* Desvanecido en la parte inferior */
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.equipo-card:hover .team-person {
    transform: scale(1.05);
}

.team-badge {
    position: absolute;
    top: -20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 2;
}

.team-badge::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #ffb800;
    border-radius: 50%;
    color: #000;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #1a202c;
}

.badge-blue { background: #2563eb; }
.badge-green { background: #10b981; }
.badge-red { background: #ef4444; }
.badge-orange { background: #f59e0b; }

.equipo-card-content {
    padding: 0 30px;
    margin-top: 20px;
}



.equipo-card-content h3 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.equipo-card-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .team-person {
        height: 240px;
    }
    .equipo-cards-container {
        margin-top: 100px;
        gap: 100px 30px;
    }
}

/* Animaciones de scroll */
.fade-in-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-element.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Responsive */
@media (max-width: 768px) {

    
    .historia-content {
        grid-template-columns: 1fr;
    }
    
    .historia-image i {
        font-size: 10rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        text-align: left !important;
    }
    
    .timeline-marker {
        left: 20px;
    }
    
    .stat-number {
        font-size: 3rem;
    }
    
    .slide-in-left,
    .slide-in-right {
        transform: translateY(30px) !important;
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }
    .slide-in-left.visible,
    .slide-in-right.visible {
        transform: translateY(0) !important;
        opacity: 1 !important;
    }
    .hero-nosotros {
        background-image: url('../img/portada/portada-res-nosotros.jpg');
    }
}