/* Estilos para el Sistema de Gestión de Noticias */

/* Botón de crear noticia */
.create-news-btn {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--portal-primary), var(--portal-secondary));
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.create-news-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.3);
}

/* Acciones de administrador en las tarjetas */
.admin-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.btn-edit, .btn-delete {
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.btn-edit {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.btn-edit:hover {
    background: rgba(59, 130, 246, 0.3);
    transform: scale(1.1);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.1);
}

/* Badge de noticia destacada */
.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Acciones de artículo mejoradas */
.article-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modales */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem;
}

.modal-medium {
    max-width: 600px;
}

.modal-large {
    max-width: 900px;
    width: 90%;
}

.modal > div {
    background: rgba(20, 25, 35, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-body {
    padding: 2rem;
}

/* Formulario de noticias */
.news-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Checkbox personalizado */
.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--portal-primary);
    border-color: var(--portal-primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

/* Acciones del formulario */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.form-actions button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, var(--portal-primary), var(--portal-secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.3);
}

/* Nuevo diseño del modal de noticias */
.news-modal-content {
    background: rgba(20, 25, 35, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.news-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.news-modal-title-section {
    flex: 1;
    margin-right: 2rem;
}

.news-modal-title {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 1rem 0;
}

.news-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}

.news-modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.news-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.1);
}

.news-modal-image-container {
    padding: 0 2rem;
    margin-bottom: 2rem;
}

.news-modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.news-modal-body {
    padding: 0 2rem 2rem 2rem;
}

.news-modal-content-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.news-modal-content-text p {
    margin-bottom: 1.5rem;
}

.news-modal-content-text ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.news-modal-content-text li {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.news-modal-content-text strong {
    color: var(--portal-primary);
    font-weight: 600;
}

.news-modal-admin-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-edit-modal,
.btn-delete-modal {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-edit-modal {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-edit-modal:hover {
    background: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.btn-delete-modal {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-delete-modal:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

.news-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-close-modal,
.btn-all-news {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-close-modal {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.btn-all-news {
    background: linear-gradient(135deg, var(--portal-primary), var(--portal-secondary));
    color: white;
}

.btn-all-news:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.3);
}

/* Badges de categoría mejorados */
.news-category-badge {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.news-category-badge.update {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.3));
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.news-category-badge.event {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(168, 85, 247, 0.3));
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.news-category-badge.maintenance {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.3));
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.news-category-badge.community {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.3));
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.news-date,
.news-author,
.news-views {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.news-date i,
.news-author i,
.news-views i {
    color: var(--portal-primary);
}

/* Estilos para la noticia destacada */
.featured-star {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.featured-admin-actions {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 0.5rem;
}

/* Mensajes de estado */
.no-news-message {
    text-align: center;
    padding: 3rem 2rem;
    color: rgba(255, 255, 255, 0.6);
}

.no-news-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.3);
}

.no-news-message h3 {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.search-results-message {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.search-results-message strong {
    color: var(--portal-primary);
}

/* Indicador de permisos de administrador */
.can-manage-news .news-article {
    position: relative;
}

.can-manage-news .news-article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--portal-primary), var(--portal-secondary));
    border-radius: 0 4px 4px 0;
    opacity: 0.7;
}

/* Notificaciones mejoradas */
.notification {
    backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .modal {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .admin-actions {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .article-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    /* Modal de noticias responsive */
    .news-modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .news-modal-title-section {
        margin-right: 0;
        width: 100%;
    }
    
    .news-modal-title {
        font-size: 1.5rem;
    }
    
    .news-modal-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .news-modal-close {
        align-self: flex-end;
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    .news-modal-body {
        padding: 1.5rem;
    }
    
    .news-modal-content-text {
        font-size: 1rem;
    }
    
    .news-modal-admin-actions {
        flex-direction: column;
    }
    
    .news-modal-footer {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-close-modal,
    .btn-all-news {
        width: 100%;
        justify-content: center;
    }
    
    /* Featured news responsive */
    .featured-admin-actions {
        position: static;
        margin-top: 1rem;
        justify-content: flex-start;
    }
}

/* Animaciones adicionales */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-article {
    animation: fadeInUp 0.5s ease forwards;
}

.news-article:nth-child(2) { animation-delay: 0.1s; }
.news-article:nth-child(3) { animation-delay: 0.2s; }
.news-article:nth-child(4) { animation-delay: 0.3s; }
.news-article:nth-child(5) { animation-delay: 0.4s; }

/* Mejoras de accesibilidad */
.modal:focus-within {
    outline: none;
}

.form-group input:invalid,
.form-group textarea:invalid {
    border-color: rgba(239, 68, 68, 0.5);
}

.form-group input:valid,
.form-group textarea:valid {
    border-color: rgba(34, 197, 94, 0.5);
}

/* Estados de carga */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid var(--portal-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos para noticias recientes en el sidebar */
.recent-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.recent-loading i {
    color: var(--portal-primary);
}

.recent-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.recent-error i {
    color: #ef4444;
    font-size: 1.5rem;
}

.recent-error p {
    margin: 0;
    font-size: 0.9rem;
}

.recent-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.recent-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.recent-item:last-child {
    margin-bottom: 0;
}

.recent-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.recent-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-item:hover .recent-image img {
    transform: scale(1.1);
}

.recent-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.recent-title {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    transition: color 0.3s ease;
}

.recent-item:hover .recent-title {
    color: var(--portal-primary);
}

.recent-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    font-weight: 400;
}

/* Mejoras en el newsletter */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-btn {
    background: linear-gradient(135deg, var(--portal-primary), var(--portal-secondary));
    border: none;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.newsletter-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.3);
}

.newsletter-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Animaciones para las noticias recientes */
.recent-item {
    animation: fadeInLeft 0.5s ease forwards;
    opacity: 0;
}

.recent-item:nth-child(1) { animation-delay: 0.1s; }
.recent-item:nth-child(2) { animation-delay: 0.2s; }
.recent-item:nth-child(3) { animation-delay: 0.3s; }
.recent-item:nth-child(4) { animation-delay: 0.4s; }
.recent-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive para noticias recientes */
@media (max-width: 768px) {
    .recent-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .recent-image {
        width: 50px;
        height: 50px;
    }
    
    .recent-title {
        font-size: 0.85rem;
    }
    
    .recent-date {
        font-size: 0.75rem;
    }
}

/* Estilos para categorías dinámicas */
.categories-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.categories-loading i {
    color: var(--portal-primary);
}

.categories-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.categories-error i {
    color: #ef4444;
    font-size: 1.5rem;
}

.categories-error p {
    margin: 0;
    font-size: 0.9rem;
}

/* Mejoras en los items de categoría */
.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

.category-item:last-child {
    margin-bottom: 0;
}

.category-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.category-count {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.category-item:hover .category-count {
    background: var(--portal-primary);
    color: white;
}

/* Animaciones para las categorías */
.category-item {
    animation: fadeInRight 0.5s ease forwards;
    opacity: 0;
}

.category-item:nth-child(1) { animation-delay: 0.1s; }
.category-item:nth-child(2) { animation-delay: 0.2s; }
.category-item:nth-child(3) { animation-delay: 0.3s; }
.category-item:nth-child(4) { animation-delay: 0.4s; }
.category-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}/* E
stilos adicionales para integración del editor rico */
.modal.extra-large {
    z-index: 10001;
}

.modal.extra-large .modal-content {
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

/* Estilos para el botón de crear noticia */
.create-news-btn {
    background: var(--portal-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.create-news-btn:hover {
    background: var(--portal-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--portal-primary-rgb), 0.3);
}

/* Mejoras para los botones de administración */
.admin-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-edit,
.btn-delete {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-edit:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.btn-delete:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* Estilos para las notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 10002;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.notification-success {
    background: #10b981;
}

.notification.notification-error {
    background: #ef4444;
}

.notification.notification-info {
    background: #3b82f6;
}

.notification.show {
    transform: translateX(0);
}

.notification-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-weight: 400;
    opacity: 0.9;
}

/* Mejoras para el estado de carga */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Estilos para mensajes de estado */
.no-news-message {
    text-align: center;
    padding: 3rem 2rem;
    color: rgba(255, 255, 255, 0.7);
}

.no-news-message i {
    font-size: 3rem;
    color: var(--portal-primary);
    margin-bottom: 1rem;
}

.no-news-message h3 {
    color: white;
    margin-bottom: 0.5rem;
}

/* Mejoras para la paginación */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.page-btn.active {
    background: var(--portal-primary);
    color: white;
    border-color: var(--portal-primary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive para modales */
@media (max-width: 768px) {
    .modal.extra-large .modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 95vh;
    }
    
    .modal-header {
        padding-bottom: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .create-news-btn {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Mejoras para accesibilidad */
.modal:focus-within {
    outline: none;
}

.modal-content:focus {
    outline: 2px solid var(--portal-primary);
    outline-offset: 2px;
}

/* Animaciones suaves */
.modal {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.news-article {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-article:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Mejoras para el estado de carga de noticias */
.news-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.7);
}

.news-loading i {
    font-size: 2rem;
    color: var(--portal-primary);
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

/* Estilos para el preview de imágenes en el formulario */
.image-preview-container {
    margin-top: 0.5rem;
    text-align: center;
}

.image-preview {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    object-fit: cover;
}

/* Mejoras para el contador de caracteres en textarea */
.form-group {
    position: relative;
}

.character-counter {
    position: absolute;
    bottom: 0.5rem;
    right: 0.75rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.5);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    pointer-events: none;
}

.character-counter.warning {
    color: #f59e0b;
}

.character-counter.error {
    color: #ef4444;
}