/* ========================================================================= */
/* 1. TÍTULOS GENERALES                                                      */
/* ========================================================================= */
.section-title {
    font-size: 1.9rem;
    font-weight: 700;
    text-align: center;
    color: var(--primary-color);
    margin: 2rem 0 1.5rem;
    position: relative;
    font-family: var(--font-primary);
}

.section-title::after {
    content: "";
    display: block;
    width: 70px;
    height: 4px;
    background: var(--secondary-color);
    margin: 0.5rem auto 0;
    border-radius: 4px;
}

/* ========================================================================= */
/* 2. ALERTAS                                                                */
/* ========================================================================= */
.alert {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    margin: 1.5rem auto;
    max-width: 700px;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all var(--transition-fast);
    text-align: center;
}

.alert-success { background: #d4edda; color: #155724; }
.alert-danger  { background: #f8d7da; color: #721c24; }

.alert .icon { font-size: 1.4rem; }

/* ========================================================================= */
/* 3. CONTENEDORES TIPO TARJETA                                              */
/* ========================================================================= */
.table-container,
.table-container-card,
.noticias-table-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto 3rem;
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 24px var(--shadow);
    transition: box-shadow var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.table-container:hover,
.table-container-card:hover,
.noticias-table-wrapper:hover {
    box-shadow: 0 12px 32px var(--shadow-hover);
}

/* ========================================================================= */
/* 4. BOTONES GENERALES                                                      */
/* ========================================================================= */
.btn,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-action,
.btn-noticia,
.btn-nueva-staff,
.btn-nueva-espe,
.btn-nueva-noticia {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 140px;
    height: 42px;
    padding: 0 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--btn-radius);
    border: none;
    color: #fff !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 15px var(--shadow);
    text-align: center;
}

.btn:hover,
.btn-primary:hover,
.btn-action:hover,
.btn-nueva-noticia:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.btn-secondary { background: var(--accent-color); }
.btn-danger { background: #dc3545; }
.btn-action.edit { background: var(--accent-color); }
.btn-action.delete { background: #dc3545; }
.btn-sm { min-width: 100px; height: 35px; font-size: 0.85rem; }

/* ========================================================================= */
/* 5. BOTÓN SUPERIOR                                                         */
/* ========================================================================= */
.top-action {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    width: 100%;
}

/* ========================================================================= */
/* 6. TABLAS GENERALES                                                       */
/* ========================================================================= */
table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--text-color);
    text-align: center;
}

table thead {
    background: var(--primary-color);
    color: #fff;
}

table th,
table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
}

table tbody tr {
    transition: background-color 0.25s, transform 0.2s;
}

table tbody tr:hover {
    background-color: var(--bg-light);
    transform: translateY(-1px);
}

/* ========================================================================= */
/* 7. ESTADOS (ACTIVO, ESPECIALIDAD, ETC.)                                   */
/* ========================================================================= */
.estado-activo,
.badge-specialty {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.estado-activo.si { background: #d4edda; color: #155724; }
.estado-activo.no { background: #f8d7da; color: #721c24; }

.badge-specialty {
    background: var(--tertiary-color);
    color: var(--primary-color);
}

/* ========================================================================= */
/* 8. STAFF — FOTO Y ACCIONES                                                */
/* ========================================================================= */
.staff-photo,
.table-professional img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-light);
}

.photo-placeholder {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #eaeaea;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    color: #888;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ========================================================================= */
/* 9. ESPECIALIDADES — ICONOS                                                */
/* ========================================================================= */
.table-professional img {
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
}

/* ========================================================================= */
/* 10. NOTICIAS — BOTONES DE ACCIÓN                                          */
/* ========================================================================= */
.noticias-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-noticia.edit { background: var(--accent-color); }
.btn-noticia.delete { background: #dc3545; }
.btn-noticia:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* ========================================================================= */
/* 11. DASHBOARD CONTENT                                                     */
/* ========================================================================= */
.dashboard-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dashboard-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    font-family: var(--font-primary);
}

.dashboard-content h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    margin: 0.5rem auto 0;
    border-radius: 3px;
}

/* ========================================================================= */
/* 12. TABLAS PROFESIONAL                                                    */
/* ========================================================================= */
.table-professional {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    text-align: center;
}

.table-professional th,
.table-professional td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
}

.table-professional thead {
    background: var(--primary-color);
    color: #fff;
}

.table-professional tbody tr {
    transition: background-color 0.25s, transform 0.2s;
}

.table-professional tbody tr:hover {
    background-color: var(--bg-light);
    transform: translateY(-1px);
}

/* ========================================================================= */
/* 13. BOTÓN EXPORTAR                                                        */
/* ========================================================================= */
.exportar-form {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 3rem;
}

.btn-primary-custom {
    min-width: 160px;
    height: 42px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--btn-radius);
    border: none;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 15px var(--shadow);
    transition: all var(--transition-fast);
}

.btn-primary-custom:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

/* ========================================================================= */
/* 14. PAGINACIÓN                                                            */
/* ========================================================================= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 1rem 0 2rem;
    flex-wrap: wrap;
}

.pagination button {
    min-width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--bg-white);
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px var(--shadow);
    transition: all var(--transition-fast);
}

.pagination button:hover {
    background: var(--secondary-color);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.pagination .active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px var(--shadow-hover);
}

/* ========================================================================= */
/* 15. ALIANZAS – ESTILO ESTANDARIZADO (IGUAL A NOTICIAS)                     */
/* ========================================================================= */

.alianzas-container {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto 3rem;
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 24px var(--shadow);
    transition: box-shadow var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.alianzas-container:hover {
    box-shadow: 0 12px 32px var(--shadow-hover);
}

.alianzas-container .section-title {
    font-size: 1.9rem;
    font-weight: 700;
    text-align: center;
    color: var(--primary-color);
    margin: 0 0 1.5rem;
    position: relative;
    font-family: var(--font-primary);
}

.alianzas-container .section-title::after {
    content: "";
    display: block;
    width: 70px;
    height: 4px;
    background: var(--secondary-color);
    margin: 0.5rem auto 0;
    border-radius: 4px;
}

.alianzas-container .top-action {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    width: 100%;
}

.alianzas-container .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 140px;
    height: 42px;
    padding: 0 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--btn-radius);
    border: none;
    color: #fff !important;
    text-decoration: none !important;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 15px var(--shadow);
    transition: all var(--transition-fast);
}

.alianzas-container .btn-primary:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.alianzas-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--text-color);
    text-align: center;
}

.alianzas-table thead {
    background: var(--primary-color);
    color: #fff;
}

.alianzas-table th,
.alianzas-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
}

.alianzas-table tbody tr {
    transition: background-color 0.25s, transform 0.2s;
}

.alianzas-table tbody tr:hover {
    background-color: var(--bg-light);
    transform: translateY(-1px);
}

.col-logo  { width: 54px; }
.col-nom   { width: 18%; }
.col-desc  { width: 60%; }
.col-acc   { width: 14%; }

.logo-med {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 2px 6px var(--shadow);
    transition: transform 0.25s ease;
}

.alianzas-table tbody tr:hover .logo-med {
    transform: scale(1.08);
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.8em;
    line-height: 1.4em;
    color: var(--text-color);
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 100px;
    height: 35px;
    padding: 0 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--btn-radius);
    border: none;
    color: #fff !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 10px var(--shadow);
}

.action-buttons .btn-warning {
    background: var(--accent-color);
}

.action-buttons .btn-danger {
    background: #dc3545;
}

.action-buttons .btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 15px var(--shadow-hover);
}

.alianzas-empty {
    text-align: center;
    padding: 4rem 1rem;
    font-size: 1.1rem;
    color: var(--text-muted);
    background: var(--bg-light);
    border-radius: 16px;
    margin-top: 2rem;
    border: 1px dashed var(--border-light);
}

.alianzas-empty i {
    font-size: 3.2rem;
    color: var(--secondary-color);
    display: block;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ========================================================================= */
/* 16. RESPONSIVE                                                            */
/* ========================================================================= */
@media (max-width: var(--sm)) {
    .table-professional th,
    .table-professional td { padding: 10px 6px; font-size: 0.85rem; }

    .btn-primary-custom { min-width: 140px; height: 38px; font-size: 0.85rem; }

    .pagination button { min-width: 30px; height: 30px; font-size: 0.85rem; }
}