/* ==========================================================================
   CSS STYLE - equipo.css
   Estilos premium de la página de Nuestro Equipo (Light Mode / Academia STEAMS)
   ========================================================================== */

/* Variables locales consistentes con style.css y nosotros.css */
:root {
    --equipo-primary: #2563eb;
    --equipo-primary-hover: #1e40af;
    --equipo-primary-light: rgba(37, 99, 235, 0.08);
    --equipo-accent: #3b82f6;
    --equipo-text-dark: #1e293b;
    --equipo-text-slate: #64748b;
    --equipo-bg-light: #f8fafc;
    --equipo-border: #e2e8f0;
}

/* Base style overrides */
.equipo-body {
    background-color: #ffffff !important;
    color: var(--equipo-text-dark) !important;
}

/* HERO SECTION (Light Premium Layout) */
.equipo-hero {
    padding: 100px 0 80px;
    background: radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.06) 0%, rgba(255, 255, 255, 1) 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--equipo-border);
}

.equipo-hero-content {
    max-width: 800px;
}

.equipo-hero h1 {
    font-size: 54px;
    line-height: 1.15;
    color: var(--equipo-text-dark);
    margin-bottom: 15px;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
}

.equipo-hero h1 span {
    color: var(--equipo-primary);
    background: linear-gradient(135deg, var(--equipo-primary) 0%, var(--equipo-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.equipo-hero p {
    font-size: 18px;
    color: var(--equipo-text-slate);
    margin-bottom: 25px;
    line-height: 1.7;
}

.equipo-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--equipo-text-slate);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.equipo-breadcrumb a {
    color: var(--equipo-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.equipo-breadcrumb a:hover {
    color: var(--equipo-primary-hover);
}

.equipo-breadcrumb span {
    opacity: 0.5;
}

/* TEAM GRID SECTIONS */
.team-section {
    padding: 90px 0;
    background-color: var(--equipo-bg-light);
}

.team-section:nth-of-type(even) {
    background-color: #ffffff;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 35px;
    margin-top: 40px;
}

/* TEAM MEMBER CARD */
.team-member {
    background: #ffffff;
    border: 1px solid var(--equipo-border);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    text-align: center;
    position: relative;
    overflow: visible !important; /* Permitir que el pop-up sobresalga libremente */
}

.team-member:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
    border-color: rgba(37, 99, 235, 0.18);
}

.member-img {
    height: 300px;
    border-radius: 15px 15px 0 0;
    overflow: hidden;
    position: relative;
}

.member-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-member:hover .member-img img {
    transform: scale(1.06);
}

.member-info {
    padding: 25px 20px;
    border-top: 1px solid #f1f5f9;
}

.member-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--equipo-text-dark);
    margin-bottom: 5px;
    font-family: 'Poppins', sans-serif;
}

.member-role {
    color: var(--equipo-primary);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--equipo-primary);
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 14px;
}

.social-links a:hover {
    background: var(--equipo-primary);
    color: #ffffff;
    transform: translateY(-3px);
}

/* ==========================================================================
   POP-UP DE HOJA DE VIDA (DESKTOP)
   ========================================================================== */
.member-popup {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    width: 290px;
    background: #ffffff;
    border-radius: 12px;
    border-top: 4px solid var(--equipo-primary);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12), 0 5px 15px rgba(0, 0, 0, 0.06);
    padding: 22px 20px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    pointer-events: none;
}

/* Puente invisible para mantener el estado hover del mouse sobre el pop-up */
.member-popup::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 18px;
    background: transparent;
    z-index: -1;
}

/* Triángulo decorativo abajo del pop-up */
.member-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

/* Mostrar pop-up al hacer hover sobre la tarjeta */
.team-member:hover .member-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.popup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.popup-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--equipo-border);
    flex-shrink: 0;
}

.popup-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-title-info {
    flex-grow: 1;
}

.popup-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--equipo-text-dark);
    line-height: 1.25;
    font-family: 'Poppins', sans-serif;
}

.popup-role {
    font-size: 12px;
    color: var(--equipo-primary);
    font-weight: 600;
    margin-top: 2px;
}

.popup-divider {
    height: 1px;
    background: var(--equipo-border);
    margin-bottom: 12px;
}

.popup-bio {
    font-size: 13px;
    color: var(--equipo-text-slate);
    line-height: 1.6;
    margin-bottom: 16px;
    text-align: justify;
}

.popup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: var(--equipo-primary);
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

.popup-btn:hover {
    background: var(--equipo-primary-hover);
    transform: translateY(-1px);
    color: #ffffff;
}

.popup-btn i {
    font-size: 11px;
    transition: transform 0.2s ease;
}

.popup-btn:hover i {
    transform: translateX(3px);
}

.popup-close-btn {
    display: none;
}

/* backdrop de fondo para el modal móvil */
.popup-backdrop {
    display: none;
}

/* ==========================================================================
   RESPONSIVE DESIGN Y AJUSTES MÓVILES (POP-UP TIPO BOTTOM SHEET)
   ========================================================================== */
@media (max-width: 992px) {
    .equipo-hero h1 {
        font-size: 46px;
    }
}

@media (max-width: 768px) {
    .equipo-hero {
        padding: 80px 0 50px;
    }
    
    .equipo-hero h1 {
        font-size: 36px;
    }
    
    .equipo-hero p {
        font-size: 16px;
    }
    
    .team-section {
        padding: 60px 0;
    }
    
    /* Configuración del Pop-up móvil como Bottom Sheet */
    .member-popup {
        position: fixed;
        bottom: -100%; /* Fuera de pantalla por defecto */
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        transform: none;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
        padding: 35px 24px 25px;
        z-index: 1100;
        transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        border-top: 5px solid var(--equipo-primary);
        opacity: 1 !important; /* Desactivar desvanecimiento en móvil, usar slide */
        visibility: visible !important;
        pointer-events: auto;
    }
    
    .member-popup::after {
        display: none; /* Sin flecha en Bottom Sheet */
    }
    
    /* Mostrar bottom sheet al añadir clase active */
    .team-member.active .member-popup {
        bottom: 0;
    }
    
    /* Botón de cerrar para Bottom Sheet móvil */
    .popup-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 15px;
        right: 18px;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        font-size: 18px;
        color: var(--equipo-text-slate);
        background: #f1f5f9;
        border: none;
        cursor: pointer;
        z-index: 10;
        transition: background 0.2s;
    }
    
    .popup-close-btn:hover {
        background: #e2e8f0;
    }
    
    /* Fondo oscuro traslúcido para móvil */
    .popup-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 1090;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    
    .popup-backdrop.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Indicador visual de deslizar en Bottom Sheet */
    .member-popup::before {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #cbd5e1;
        border-radius: 2px;
        z-index: 1; /* Restablecer z-index para que sea visible en móvil */
    }
}

@media (max-width: 576px) {
    .member-img {
        height: 280px;
    }
    
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
        gap: 25px;
    }
}

/* ==========================================================================
   HERO SLIDER (Integración en Nuestro Equipo)
   ========================================================================== */
body.has-slider {
    padding-top: 0 !important;
}

.equipo-slider .slide-1 {
    background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url('../img/nosotros/2.avif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.equipo-slider .slide-2 {
    background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url('../img/nosotros/1.avif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.equipo-slider .slide-3 {
    background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url('../img/nosotros/3.avif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.equipo-slider .slide.active {
    opacity: 1;
    z-index: 1;
}

.equipo-slider .equipo-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--equipo-text-slate);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    margin-top: 15px;
    margin-bottom: 25px;
}

.equipo-slider .equipo-breadcrumb a {
    color: var(--equipo-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.equipo-slider .equipo-breadcrumb a:hover {
    color: var(--equipo-primary-hover);
}

.equipo-slider .equipo-breadcrumb span {
    color: rgba(255, 255, 255, 0.7);
}
