/* Modal principal */
.eses-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    animation: esesFadeIn 0.3s ease;
}

.eses-modal.active {
    display: flex !important;
}

@keyframes esesFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Overlay oscuro */
.eses-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    cursor: pointer;
}

/* Caja del modal */
.eses-modal-box {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    z-index: 2;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: esesSlideIn 0.3s ease;
}

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

/* Botón cerrar - SIN fondo negro */
.eses-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.eses-close:hover {
    background: #fff;
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Loading */
.eses-loading {
    text-align: center;
    padding: 60px 40px;
    color: #999;
    font-size: 16px;
}

/* Contenido del modal */
.eses-content {
    padding: 0;
    max-height: 85vh;
    overflow-y: auto;
}

/* Scrollbar personalizado */
.eses-content::-webkit-scrollbar {
    width: 8px;
}

.eses-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.eses-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.eses-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Header con foto */
.eses-header {
    display: flex;
    gap: 25px;
    align-items: center;
    padding: 40px 40px 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e5e5e5;
}

.eses-header img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.eses-header div {
    flex: 1;
}

.eses-header h2 {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.eses-header p {
    margin: 0;
    font-size: 18px;
    color: #7f8c8d;
    font-weight: 500;
}

/* Body con secciones */
.eses-body {
    padding: 40px;
}

.eses-body > div {
    margin-bottom: 30px;
}

.eses-body > div:last-child {
    margin-bottom: 0;
}

.eses-body h3 {
    font-size: 22px;
    font-weight: 600;
    color: #3498db;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.eses-body p {
    line-height: 1.7;
    color: #555;
    margin: 0 0 12px;
    font-size: 15px;
}

.eses-body p:last-child {
    margin-bottom: 0;
}

/* Cursor pointer en tarjetas */
.team-member {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 768px) {
    .eses-modal-box {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .eses-close {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }
    
    .eses-header {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px 25px;
    }
    
    .eses-header img {
        width: 100px;
        height: 100px;
    }
    
    .eses-header h2 {
        font-size: 26px;
    }
    
    .eses-header p {
        font-size: 16px;
    }
    
    .eses-body {
        padding: 30px 20px;
    }
    
    .eses-body h3 {
        font-size: 20px;
    }
}
