/* Contenedor principal centrado y con ancho óptimo */
.main-content {
    max-width: 1150px !important;
    margin: 0 auto;
    padding-top: 24px !important;
    padding-bottom: 60px;
}

/* Títulos de sección internos */
.team-section-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: #4ade80;
    margin-top: 45px;
    margin-bottom: 20px;
    border-bottom: 1px solid #262626;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Cuadrícula compacta de tarjetas de equipo */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Tarjeta compacta y moderna */
.team-card {
    background: #161616;
    border: 1px solid #262626;
    border-radius: 14px;
    padding: 24px 18px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.team-card:hover {
    border-color: #2e7d32;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.25);
}

.team-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px auto;
    border: 2px solid #2e7d32;
}

.team-name {
    font-size: 16px;
    font-weight: 600;
    color: #f7fafc;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-role {
    font-size: 12px;
    color: #4ade80;
    font-weight: 600;
    margin-bottom: 8px;
}

.team-project {
    font-size: 11.5px;
    color: #9ca3af;
    margin-bottom: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-ver-mas {
    background-color: #1b5e20;
    color: #fff;
    border: none;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: auto;
}

.btn-ver-mas:hover {
    background-color: #2e7d32;
}

/* Barra de búsqueda estilizada */
.search-container {
    margin-bottom: 25px;
}

.search-input {
    width: 100%;
    background-color: #161616;
    border: 1px solid #262626;
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #2e7d32;
}

/* Estilos de la Modal Flotante */
.team-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(6px);
    padding: 1rem;
}

.team-modal-content {
    background-color: #161616;
    border: 1px solid #262626;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    padding: 30px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
}

/* ---------- Esferas: Estudiantes Graduados y Miembros Anteriores ---------- */
.team-esferas {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 32px;
    margin: 56px 0 12px;
    padding-top: 40px;
    border-top: 1px solid #262626;
}
.team-esfera {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(74, 222, 128, 0.35);
    background: rgba(74, 222, 128, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    text-align: center;
    text-decoration: none;
    color: #e5e7eb;
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}
.team-esfera i { font-size: 34px; color: rgba(74, 222, 128, 0.85); }
.team-esfera__titulo { font-size: 15px; font-weight: 600; line-height: 1.25; color: #f7fafc; }
.team-esfera__cuenta { font-size: 12px; color: #9ca3af; }
.team-esfera:hover { border-color: #4ade80; background: rgba(74, 222, 128, 0.09); transform: translateY(-3px); }
.team-esfera:focus-visible { outline: 2px solid #4ade80; outline-offset: 4px; }
.team-esfera:active { transform: scale(0.98); }

/* Resultados de la búsqueda en las otras secciones */
.team-otras { display: none; }
.team-otras.is-visible { display: block; }
.team-otras__titulo { font-size: 1.05rem; font-weight: 600; color: #9ca3af; margin: 34px 0 14px; }
.team-otras__titulo a { color: #4ade80; text-decoration: none; }
.team-otras__titulo a:hover { text-decoration: underline; }

/* Encabezado de la vista de una sección */
.team-volver {
    display: inline-flex; align-items: center; gap: 8px;
    margin-bottom: 18px; font-size: 13px; font-weight: 600; color: #4ade80; text-decoration: none;
}
.team-volver:hover { text-decoration: underline; }
.team-volver:focus-visible { outline: 2px solid #4ade80; outline-offset: 4px; border-radius: 4px; }
.team-sin-resultados { display: none; text-align: center; padding: 26px; color: #718096; border: 1px dashed #262626; border-radius: 12px; font-size: 14px; }
.team-sin-resultados.is-visible { display: block; }

@media (max-width: 560px) {
    .team-esferas { gap: 20px; }
    .team-esfera { width: 170px; height: 170px; }
    .team-esfera i { font-size: 28px; }
    .team-esfera__titulo { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .team-esfera { transition: none; }
}
