/* =============================================================
   equipos.css — Mobile-first
   Breakpoints: 480 | 640 | 992 | 1200
   ============================================================= */

/* =============================================================
   1. CONTENEDOR PRINCIPAL
   ============================================================= */
.equipos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem;
}

@media (min-width: 640px)  { .equipos-container { padding: 1.5rem 2rem; } }
@media (min-width: 992px)  { .equipos-container { padding: 2rem; } }


/* =============================================================
   2. BOTONES DE FILTRO POR SERIE
   ============================================================= */
.series-buttons {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;           /* scroll horizontal en móvil */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.5rem 0 1rem;
    margin-bottom: 1.25rem;
}

.series-buttons::-webkit-scrollbar { display: none; }

.serie-btn {
    flex-shrink: 0;             /* no encoge → scroll en vez de wrap */
    background: #e3f2fd;
    border: 2px solid #094c79;
    color: #094c79;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.serie-btn.active {
    background: #094c79;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(9, 76, 121, 0.3);
}

.serie-btn:hover:not(.active) { background: #bbdefb; }

@media (min-width: 640px) {
    .series-buttons {
        flex-wrap: wrap;        /* desde tablet: wrap normal */
        overflow-x: visible;
        justify-content: center;
        margin: 1.5rem 0;
        padding-bottom: 0;
    }
    .serie-btn { padding: 0.6rem 1.8rem; font-size: 0.9rem; }
}


/* =============================================================
   3. GRID DE EQUIPOS
   ============================================================= */
.equipos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);  /* móvil: 2 columnas */
    gap: 0.85rem;
}

@media (min-width: 480px)  { .equipos-grid { gap: 1rem; } }
@media (min-width: 640px)  { .equipos-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
@media (min-width: 992px)  { .equipos-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }
@media (min-width: 1200px) { .equipos-grid { grid-template-columns: repeat(5, 1fr); } }


/* =============================================================
   4. TARJETA DE EQUIPO
   ============================================================= */
.equipo-card {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 0.75rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.equipo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.equipo-card[style*="display: none"] { display: none !important; }

/* Equipos sin logo */
.equipo-card.sin-logo {
    opacity: 0.82;
    background: #f8f9fa;
    border: 2px dashed #d0d0d0;
}

.equipo-card.sin-logo .equipo-nombre { color: #666; }

@media (min-width: 640px) {
    .equipo-card { padding: 1.25rem 1rem; }
}

@media (min-width: 992px) {
    .equipo-card { padding: 1.5rem; border-radius: 14px; }
}


/* =============================================================
   5. LOGO DEL EQUIPO
   ============================================================= */
.equipo-logo-container {
    width: 80px;                 /* móvil: compacto */
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.6rem;
    flex-shrink: 0;
}

.equipo-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #aaa;
}

.equipo-nombre {
    font-size: 0.78rem;
    font-weight: 700;
    color: #094c79;
    text-align: center;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

@media (min-width: 480px) {
    .equipo-logo-container { width: 95px; height: 95px; }
    .equipo-nombre { font-size: 0.85rem; }
}

@media (min-width: 640px) {
    .equipo-logo-container { width: 110px; height: 110px; border-radius: 10px; }
    .equipo-nombre { font-size: 0.9rem; }
}

@media (min-width: 992px) {
    .equipo-logo-container { width: 130px; height: 130px; border-radius: 12px; margin-bottom: 0.75rem; }
    .equipo-nombre { font-size: 1rem; }
}


/* =============================================================
   6. MENSAJE SIN EQUIPOS
   ============================================================= */
.no-equipos {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1.25rem;
    color: rgba(255, 255, 255, 0.7);
}

.no-equipos .icono-triste i { font-size: 3rem; margin-bottom: 1rem; }
.no-equipos h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.no-equipos p  { font-size: 0.9rem; }


/* =============================================================
   7. MODAL
   ============================================================= */
.modal {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    overflow-y: auto;           /* scroll si el modal es alto */
    padding: 1rem;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #f8f9fa;
    max-width: 500px;
    width: 100%;
    margin: 1.5rem auto;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px) scale(0.97);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    color: #2d3436;
}

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

/* --- Cabecera del modal --- */
.modal-header {
    text-align: center;
    margin-bottom: 1.25rem;
    padding-top: 0.5rem;
}

.modal-logo-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    background: #fff;
    padding: 6px;
}

#modalLogo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#modalNombre {
    font-size: 1.3rem;
    color: #094c79;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

/* --- Cuerpo del modal --- */
#modalDescripcion {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 1.25rem;
}

.delegados-info {
    background: #eef2f7;
    padding: 1rem 1.25rem;
    border-radius: 10px;
}

.delegados-info h4 {
    color: #094c79;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.delegados-info h4 i { font-size: 1.1rem; }

.delegados-info p {
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 0.35rem;
}

/* --- Botón cerrar --- */
.close {
    position: absolute;
    right: 1.1rem;
    top: 1rem;
    font-size: 1.6rem;
    color: #888;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close:hover { color: #094c79; }

/* --- Responsive modal --- */
@media (min-width: 640px) {
    .modal-content       { margin: 3rem auto; padding: 2rem; }
    .modal-logo-container{ width: 150px; height: 150px; }
    #modalNombre         { font-size: 1.6rem; }
}

@media (min-width: 992px) {
    .modal-content        { margin: 5rem auto; padding: 2.5rem; }
    .modal-logo-container { width: 180px; height: 180px; }
    #modalNombre          { font-size: 1.8rem; }
}
