/* ENASEI Mentores Plugin - Estilos Frontend COIPRI Style */
/* CSS COMPLETAMENTE AISLADO - NO AFECTA SITIO PRINCIPAL */

/* Variables solo para el plugin - evita conflictos globales */
.enasei-mentors {
    --enasei-primary-blue: #1e40af;
    --enasei-secondary-blue: #3b82f6;
    --enasei-accent-orange: #f97316;
    --enasei-light-blue: #e0f2fe;
    --enasei-text-dark: #1f2937;
    --enasei-text-gray: #6b7280;
    --enasei-white: #ffffff;
    --enasei-light-gray: #f8fafc;
    --enasei-border-gray: #e5e7eb;
    --enasei-button-bg: #2563eb;
    --enasei-button-hover: #1d4ed8;
}

/* AISLAMIENTO TOTAL - NO AFECTA OTROS ELEMENTOS DEL SITIO */
.enasei-mentors {
    /* Contención completa para evitar conflictos con ENASEI.pe */
    isolation: isolate;
    contain: layout style paint;
    
    /* Estilos del contenedor */
    padding: 60px 20px;
    background: transparent;
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    
    /* Asegurar que no afecte elementos padre */
    color: initial;
    line-height: initial;
}

.enasei-mentors *,
.enasei-mentors *::before,
.enasei-mentors *::after {
    box-sizing: border-box;
}

.enasei-mentors .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Título de la sección */
.enasei-mentors .section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 50px;
    position: relative;
}

/* Grid unificado de mentores - 4 por línea */
.enasei-mentors .mentors-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Layout simple sin conflictos */

/* Tarjetas de mentores - SIN CARDS COMO COIPRI ORIGINAL */
.enasei-mentors .mentor-card {
    text-align: center;
    background: transparent; /* SIN fondo - completamente transparente */
    border: none; /* SIN bordes */
    padding: 20px 15px 25px 15px;
    transition: all 0.3s ease;
    border-radius: 0; /* SIN bordes redondeados */
    width: 100%;
    max-width: 260px;
    min-height: 280px;
    position: relative; /* Necesario para el contenido expandible */
    overflow: visible;
    cursor: pointer;
    box-shadow: none; /* SIN sombras */
    margin-bottom: 0; /* Sin margen para evitar interferencias */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.enasei-mentors .mentor-card:hover {
    transform: none; /* SIN efectos de movimiento */
    box-shadow: none;
}

.enasei-mentors .mentor-card.featured {
    padding: 25px 15px 30px 15px;
    background: transparent; /* SIN fondo para destacados también */
    box-shadow: none; /* SIN sombras para destacados */
    max-width: 300px;
    min-height: 320px;
}

.enasei-mentors .mentor-card.featured:hover {
    transform: none;
    box-shadow: none;
}

/* Fotos de mentores - Exacto tamaño COIPRI */
.enasei-mentors .mentor-photo {
    width: 110px; /* Tamaño más cercano a COIPRI */
    height: 110px;
    border-radius: 50%;
    margin: 0 auto 15px; /* Menos margen como COIPRI */
    overflow: hidden;
    border: none;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08); /* Sombra más sutil */
}

.enasei-mentors .mentor-card.featured .mentor-photo {
    width: 130px; /* Proporcionalmente más grande para destacados */
    height: 130px;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); /* Sombra más sutil */
}

.enasei-mentors .mentor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.enasei-mentors .mentor-photo i {
    font-size: 2.5rem;
    color: var(--text-gray);
    transition: all 0.3s ease;
}

.enasei-mentors .mentor-card.featured .mentor-photo i {
    font-size: 3rem;
    color: var(--primary-blue);
}

.enasei-mentors .mentor-card:hover .mentor-photo {
    transform: none; /* Sin zoom del contenedor */
}

.enasei-mentors .mentor-card:hover .mentor-photo img {
    transform: scale(1.05); /* Zoom muy sutil solo en la imagen */
}

/* Nombres y títulos - Exacto estilo COIPRI */
.enasei-mentors .mentor-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #2d3748; /* Color más oscuro como COIPRI */
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.enasei-mentors .mentor-card.featured .mentor-name {
    font-size: 1.1rem;
    color: #2d3748;
    font-weight: 700; /* Mismo peso que los regulares */
}

.enasei-mentors .mentor-title {
    font-size: 0.75rem; /* Más pequeño como en COIPRI */
    color: #718096; /* Gris más claro como COIPRI */
    line-height: 1.3;
    margin-bottom: 12px;
    transition: color 0.3s ease;
    text-transform: uppercase;
    font-weight: 400; /* Más ligero */
    letter-spacing: 0.3px;
}

.enasei-mentors .mentor-card.featured .mentor-title {
    font-size: 0.8rem;
    margin-bottom: 15px;
}

/* País/Bandera - Estilo COIPRI */
.enasei-mentors .mentor-country {
    margin-bottom: 20px;
    text-align: center;
}

.enasei-mentors .flag-emoji {
    font-size: 1.2rem;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
    margin-right: 3px;
}

.enasei-mentors .flag-emoji:last-child {
    margin-right: 0;
}

/* Botón "Ver biografía" - Texto simple como COIPRI */
.enasei-mentors .mentor-bio-button {
    background: transparent;
    color: #718096; /* Gris como los títulos */
    border: none;
    padding: 4px 0;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 0;
    cursor: pointer;
    transition: color 0.3s ease;
    width: auto;
    margin: 8px auto 0;
    display: block;
    position: relative;
    line-height: 1.2;
}

.enasei-mentors .mentor-bio-button:hover {
    color: #4a5568; /* Ligeramente más oscuro al hover */
}

.enasei-mentors .mentor-card.featured .mentor-bio-button {
    color: #718096;
    padding: 4px 0;
    font-size: 0.7rem;
    font-weight: 600;
}

.enasei-mentors .mentor-card.featured .mentor-bio-button:hover {
    color: #4a5568;
}

/* Icono toggle del botón - Simple como COIPRI */
.enasei-mentors .toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    margin-left: 4px;
    font-size: 0.6rem;
    opacity: 0.8;
}

.enasei-mentors .mentor-bio-button.expanded .toggle-icon {
    transform: rotate(180deg);
}

/* ======================================
   BIOGRAFÍA EXPANDIDA
   ====================================== */

/* Contenedor de biografía expandida */
.enasei-mentors .mentor-bio-expanded {
    width: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    display: none;
}

.enasei-mentors .mentor-bio-expanded.show {
    display: block;
    opacity: 1;
    max-height: 800px; /* Aumentado para biografías más largas */
    padding: 15px 0;
    margin-top: 15px;
}

/* Contenido de biografía */
.enasei-mentors .bio-content {
    background: transparent;
    border-radius: 8px;
    padding: 15px;
    box-shadow: none;
    border: 1px solid #e2e8f0;
    position: relative;
    min-height: auto; /* Altura dinámica según contenido */
    overflow: visible; /* Asegurar que el texto no se corte */
}

.enasei-mentors .mentor-card.featured .bio-content {
    background: rgba(30, 64, 175, 0.05);
    border-color: rgba(30, 64, 175, 0.2);
}

/* Texto de biografía */
.enasei-mentors .bio-content p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #4a5568;
    margin: 0;
    text-align: left;
    word-wrap: break-word; /* Permite romper palabras largas */
    overflow-wrap: break-word; /* Compatibilidad adicional */
    white-space: normal; /* Asegurar que el texto fluya normalmente */
}

/* ======================================
   BOTÓN VER MÁS
   ====================================== */

/* Mentores ocultos */
.enasei-mentors .mentor-card.mentor-hidden {
    display: none;
}

/* Contenedor del botón "Ver más" */
.enasei-mentors .ver-mas-container {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

/* Botón "Ver más" */
.enasei-mentors .ver-mas-button {
    background: #f97316;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.enasei-mentors .ver-mas-button:hover {
    background: #ea580c;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

/* Animación de entrada para el contenido expandido */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.enasei-mentors .mentor-expanded-info.show .expanded-content {
    animation: slideDown 0.3s ease forwards;
}

/* Responsividad */
@media (max-width: 1200px) {
    .enasei-mentors {
        padding: 60px 15px;
    }
    
    .enasei-mentors .mentors-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        max-width: 900px;
    }
}

@media (max-width: 992px) {
    .enasei-mentors .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .enasei-mentors .mentors-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
        max-width: 750px;
    }
}

@media (max-width: 768px) {
    .enasei-mentors {
        padding: 40px 15px;
    }
    
    .enasei-mentors .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .enasei-mentors .mentors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-width: 500px;
    }
    
    .enasei-mentors .mentor-card {
        padding: 15px 10px 20px 10px;
        min-height: 260px;
        max-width: 220px;
    }
    
    .enasei-mentors .mentor-card.featured {
        padding: 20px 10px 25px 10px;
        min-height: 280px;
        max-width: 240px;
    }
}

@media (max-width: 480px) {
    .enasei-mentors .section-title {
        font-size: 1.5rem;
    }
    
    .enasei-mentors .mentors-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 300px;
    }
    
    .enasei-mentors .mentor-card {
        min-height: 220px;
        max-width: 280px;
        padding: 12px 8px 18px 8px;
    }
    
    .enasei-mentors .mentor-card.featured {
        min-height: 240px;
        max-width: 300px;
        padding: 15px 8px 20px 8px;
    }
    
    .enasei-mentors .mentor-photo {
        width: 95px; /* Proporción mantenida */
        height: 95px;
    }
    
    .enasei-mentors .mentor-card.featured .mentor-photo {
        width: 115px; /* Proporción mantenida */
        height: 115px;
    }
    
    /* Ajustar tipografía en móvil */
    .enasei-mentors .mentor-name {
        font-size: 0.9rem;
    }
    
    .enasei-mentors .mentor-title {
        font-size: 0.7rem;
    }
    
    .enasei-mentors .mentor-bio-button {
        font-size: 0.65rem;
    }
}

/* ======================================
   MODAL STYLES - Actualizados
   ====================================== */

/* Modal de mentor */
.enasei-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: all 0.3s ease;
}

.enasei-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.enasei-modal-content {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.enasei-modal.active .enasei-modal-content {
    transform: scale(1);
}

.enasei-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 32px;
    font-weight: bold;
    color: var(--text-gray);
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
}

.enasei-modal-close:hover {
    color: var(--accent-orange);
    background: rgba(255, 255, 255, 1);
}

.enasei-modal-body {
    padding: 40px;
    overflow-y: auto;
    max-height: 90vh;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Foto del mentor en modal */
.mentor-modal-photo {
    flex: 0 0 200px;
    text-align: center;
    position: relative;
}

.mentor-modal-photo img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.mentor-photo-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    margin: 0 auto;
}

.mentor-photo-placeholder i {
    font-size: 4rem;
    color: var(--text-gray);
}

.mentor-featured-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: linear-gradient(135deg, var(--accent-orange), #ea580c);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

/* Información del mentor en modal */
.mentor-modal-info {
    flex: 1;
}

.mentor-modal-info h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.2;
    text-transform: uppercase;
}

.mentor-modal-info h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--primary-blue);
    margin-bottom: 15px;
    line-height: 1.3;
    text-transform: uppercase;
}

.mentor-modal-country {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    padding: 10px 15px;
    background: var(--light-gray);
    border-radius: 25px;
    display: inline-flex;
}

.mentor-modal-country .flag-emoji {
    font-size: 1.5rem;
}

.mentor-modal-country .country-name {
    font-weight: 600;
    color: var(--text-dark);
}

.mentor-modal-bio {
    margin-top: 20px;
}

.mentor-modal-bio h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent-orange);
    padding-bottom: 5px;
    display: inline-block;
}

.mentor-modal-bio p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.mentor-modal-bio em {
    color: var(--text-gray);
    font-style: italic;
}

/* Loader del modal */
.mentor-modal-loader {
    text-align: center;
    padding: 60px 40px;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-blue);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.mentor-modal-loader p {
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* Error del modal */
.mentor-modal-error {
    text-align: center;
    padding: 60px 40px;
}

.mentor-modal-error i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 20px;
}

.mentor-modal-error h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
}

.mentor-modal-error p {
    color: var(--text-gray);
}

/* Bloquear scroll del body cuando modal está abierto */
body.modal-open {
    overflow: hidden;
}

/* Responsividad del modal */
@media (max-width: 768px) {
    .enasei-modal-content {
        width: 95%;
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .enasei-modal-body {
        flex-direction: column;
        padding: 30px 20px;
        gap: 20px;
        text-align: center;
    }
    
    .mentor-modal-photo {
        flex: none;
    }
    
    .mentor-modal-photo img,
    .mentor-photo-placeholder {
        width: 150px;
        height: 150px;
    }
    
    .mentor-modal-info h2 {
        font-size: 1.8rem;
    }
    
    .mentor-modal-info h3 {
        font-size: 1.1rem;
    }
    
    .mentor-featured-badge {
        position: static;
        display: inline-block;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .enasei-modal-body {
        padding: 20px 15px;
    }
    
    .mentor-modal-photo img,
    .mentor-photo-placeholder {
        width: 120px;
        height: 120px;
    }
    
    .mentor-modal-info h2 {
        font-size: 1.5rem;
    }
    
    .mentor-modal-close {
        top: 15px;
        right: 15px;
        font-size: 24px;
        width: 35px;
        height: 35px;
    }
}

/* Animaciones */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animaciones de entrada */
.enasei-mentors .mentor-card.animate-ready {
    opacity: 0;
    transform: translateY(50px);
}

.enasei-mentors .mentor-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
} 