/* team.css - Diseño Bento Box Minimalista y Magnético */

.team-section {
    padding: 80px 0;
    background-color: #ffffff;
}

/* Team Hero Section */
.team-hero {
    position: relative;
    padding: 180px 0 100px;
    background-color: var(--secondary-color);
    color: var(--white);
    text-align: center;
    overflow: hidden;
}

.team-hero .hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    opacity: 1;
    z-index: 0;
}

.team-hero .container {
    position: relative;
    z-index: 1;
}

.team-hero .badge-partner {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(56, 189, 248, 0.5);
}

.team-hero .title {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: #fff;
}

.team-hero .description {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin: 0 auto;
    max-width: 600px;
    line-height: 1.6;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Elementos Bento */
.bento-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #f1f5f9;
    aspect-ratio: 1 / 1.1; /* Ligeramente más altos que anchos */
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.bento-item-jefatura {
    grid-row: span 2;
    aspect-ratio: auto; /* Permite que el grid lo estire hasta cubrir las 2 filas */
    height: 100%;
}

.bento-item-wide {
    grid-column: span 2;
    aspect-ratio: auto;
    height: 100%;
}

/* Imágenes */
.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Efecto Magnético (El truco de magia) */
/* Cuando pasamos el cursor sobre el contenedor de la grilla, aplicamos estilos a los elementos NO hovereados */
.bento-grid:has(.bento-item:hover) .bento-item:not(:hover) {
    /* Eliminamos el efecto de opacidad por solicitud del usuario */
    /* transform: scale(0.96); */
}

.bento-item:hover {
    transform: scale(1.03);
    z-index: 10;
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

.bento-item:hover img {
    transform: scale(1.08);
}

/* Overlay y Textos */
.bento-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 40%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    transition: all 0.5s ease;
}

.bento-item:hover .bento-overlay {
    /* Un oscurecimiento mucho más sutil, sin llegar a oscurecer todo el cuadro */
    background: linear-gradient(to top, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.6) 50%, transparent 100%);
}

.bento-info h4 {
    color: #ffffff;
    font-size: 1.5rem;
    margin: 0 0 5px 0;
    font-weight: 700;
}

.bento-item-jefatura .bento-info h4 {
    font-size: 2.2rem;
}

.bento-info .role {
    color: var(--accent-color); /* Naranjo corporativo */
    font-weight: 600;
    margin: 0;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.bento-info .tag {
    display: inline-block;
    background-color: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-left: 8px;
    vertical-align: middle;
}

.bento-desc {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s ease;
    color: rgba(241, 245, 249, 0.9);
    margin-top: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.bento-item:hover .bento-desc {
    max-height: 150px;
    opacity: 1;
    margin-top: 15px;
}

/* Tarjeta de Mensaje (Quiénes Somos) */
.bento-message {
    background: var(--primary-color);
    background-image: linear-gradient(135deg, var(--primary-color) 0%, #001f4d 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    color: white;
    border-radius: 24px;
    transition: all 0.5s ease;
}

.bento-message i {
    font-size: 2.5rem;
    color: #38bdf8;
    margin-bottom: 15px;
}

.bento-message h3 {
    font-size: 1.8rem;
    margin: 0 0 10px 0;
    font-family: 'Outfit', sans-serif;
    color: white;
}

.bento-message p {
    font-size: 1.1rem;
    margin: 0;
    color: rgba(255,255,255,0.8);
    max-width: 400px;
}

/* Responsividad */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-item {
        aspect-ratio: 1 / 1.2;
    }
    .bento-item-jefatura {
        grid-row: auto;
        aspect-ratio: 1 / 1.2;
    }
    .bento-item-wide {
        grid-column: auto;
        aspect-ratio: 1 / 1;
    }
}
