:root {
    --beige-bg: #FAF8F4;
    --verde-principal: #2E7D32;
    --verde-hover: #1B5E20;
    --texto-gris: #2E2E2E;
    --gris-claro: #E0E0E0;
    --blanco: #FFFFFF;
    --sombra: 0 2px 8px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --error-color: #d32f2f;
    --success-color: #388e3c;
    --warning-color: #F57C00;
    --info-color: #1976D2;
}

/* ========== MODAL STYLES ========== */
/* Asegurar que los modales aparezcan por encima del header */
.modal {
    z-index: 99999 !important;
}

.modal-backdrop {
    z-index: 99998 !important;
}

.modal.show {
    z-index: 99999 !important;
}

.modal-dialog {
    z-index: 99999 !important;
}

/* Mejorar diseño del modal siguiendo el estilo de perfil.html */
.modal-header {
    background: linear-gradient(135deg, var(--verde-principal), var(--verde-hover));
    color: white;
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-title i {
    margin-right: 8px;
}

.modal-body {
    padding: 1.5rem;
    background-color: var(--blanco);
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.form-label {
    font-weight: 600;
    color: var(--texto-gris);
    margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--verde-principal);
    box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.25);
}

.btn-group .btn-check:checked + .btn {
    background-color: var(--verde-principal);
    border-color: var(--verde-principal);
}

.btn-outline-primary {
    color: var(--verde-principal);
    border-color: var(--verde-principal);
}

.btn-outline-primary:hover {
    background-color: var(--verde-principal);
    border-color: var(--verde-principal);
}

.btn-outline-success {
    color: var(--success-color);
    border-color: var(--success-color);
}

.btn-outline-success:hover {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

/* Estilos específicos para el modal de detalle */
.news-detail-content {
    font-size: 1rem;
    line-height: 1.7;
}

.news-detail-meta .badge {
    background-color: var(--verde-principal) !important;
}

.news-detail-summary {
    font-style: italic;
    border-left: 4px solid var(--verde-principal);
    padding-left: 1rem;
}

.news-detail-image-container img {
    max-height: 400px;
    width: 100%;
    object-fit: cover;
}

.news-detail-full-content {
    font-size: 1.1rem;
    color: var(--texto-gris);
}

.news-detail-full-content p {
    margin-bottom: 1rem;
}

.news-detail-full-content h1,
.news-detail-full-content h2,
.news-detail-full-content h3,
.news-detail-full-content h4,
.news-detail-full-content h5,
.news-detail-full-content h6 {
    color: var(--verde-principal);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--beige-bg);
    color: var(--texto-gris);
    line-height: 1.6;
    padding-top: 90px;
}

/* Contenedor principal centrado */
.news-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.controls-section {
    background: var(--blanco);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--sombra);
}

.news-content-section {
    background: var(--blanco);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--sombra);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== HERO SECTION ========== */
.hero-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 60px 40px;
    margin-bottom: 40px;
    box-shadow: var(--sombra);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: var(--verde-principal);
    opacity: 0.1;
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: #FF6B6B;
    opacity: 0.1;
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--texto-gris);
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 20px;
    color: #666;
    margin-bottom: 40px;
    font-weight: 300;
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--verde-principal);
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 16px;
    color: #666;
    margin-top: 5px;
}

/* ========== CONTROLES ========== */
.content-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--sombra);
    gap: 20px;
    flex-wrap: wrap;
}

.filters-section {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-select {
    padding: 10px 15px;
    border: 2px solid var(--gris-claro);
    border-radius: 8px;
    background: white;
    color: var(--texto-gris);
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--verde-principal);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.search-group {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    border: 2px solid var(--gris-claro);
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.search-group:focus-within {
    border-color: var(--verde-principal);
}

.search-input {
    border: none;
    padding: 10px 15px;
    font-family: 'Poppins', sans-serif;
    background: transparent;
    color: var(--texto-gris);
    min-width: 250px;
}

.search-input:focus {
    outline: none;
}

.search-btn {
    background: var(--verde-principal);
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.search-btn:hover {
    background: var(--verde-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(46, 125, 50, 0.3);
}

.search-btn i {
    font-size: 16px;
}

.action-controls {
    display: flex;
    gap: 10px;
}

/* ========== BOTONES ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--verde-principal);
    color: white;
}

.btn-primary:hover {
    background: var(--verde-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.btn-secondary {
    background: var(--gris-claro);
    color: var(--texto-gris);
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background: #b71c1c;
}

/* ========== GRID DE NOTICIAS ========== */
.news-section {
    margin-bottom: 60px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Mismo patrón que Notificaciones recientes de perfil.php */
.levels-pagination.news-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 40px;
    padding: 1rem 0;
    border-top: 1px solid #e5e7eb;
}

.news-pagination[hidden] { display: none; }

.news-pagination .pagination-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #718096;
    font-size: 0.875rem;
}

.news-pagination .pagination-dots {
    display: flex;
    gap: 0.5rem;
}

.news-pagination .pagination-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-pagination .pagination-dot.active {
    background: var(--verde-principal);
    transform: scale(1.2);
}

.news-pagination .pagination-dot:hover { background: #66bb6a; }

.news-pagination .pagination-controls {
    display: flex;
    gap: 0.5rem;
}

.news-pagination .pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0.5rem 1rem !important;
    background: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    color: #4a5568;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-pagination .pagination-btn:hover:not(:disabled) {
    background: var(--verde-principal);
    color: #fff;
    border-color: var(--verde-principal);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-pagination .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.news-pagination .pagination-btn i { font-size: 0.75rem; }

@media (max-width: 768px) {
    .levels-pagination.news-pagination {
        flex-direction: column;
        gap: 1rem;
    }

    .news-pagination .pagination-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .news-pagination .pagination-controls {
        width: 100%;
        justify-content: space-between;
    }

    .news-pagination .pagination-btn { flex: 1; justify-content: center; }
}

.news-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--sombra);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-card.destacada {
    border: 3px solid var(--verde-principal);
}

.news-card.destacada::before {
    content: "⭐ Destacada";
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--verde-principal);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.news-banner {
    width: 100%;
    height: 220px;
    object-fit: cover;
    position: relative;
    overflow: hidden;
}

.news-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-content {
    padding: 25px;
}

.news-category {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-general { background: #E3F2FD; color: #1976D2; }
.category-adopcion { background: #E8F5E8; color: #388E3C; }
.category-rescate { background: #FFF3E0; color: #F57C00; }
.category-educativo { background: #F3E5F5; color: #7B1FA2; }
.category-eventos { background: #FCE4EC; color: #C2185B; }
.category-salud { background: #FFEBEE; color: #D32F2F; }

.news-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
    color: var(--texto-gris);
}

.news-summary {
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--gris-claro);
    font-size: 0.85rem;
    color: #888;
}

.news-author {
    font-weight: 500;
}

.news-date {
    font-style: italic;
}

/* Overlay de acciones elegante - Posición inferior derecha */
.news-actions-overlay {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: auto;
    height: auto;
    background: none;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    border-radius: 0;
    backdrop-filter: none;
    pointer-events: none;
}

.news-card:hover .news-actions-overlay {
    opacity: 1;
    pointer-events: auto;
}

.action-buttons-container {
    display: flex;
    gap: 8px;
    transform: translateY(10px);
    transition: transform 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.news-card:hover .action-buttons-container {
    transform: translateY(0);
}

.action-btn {
    background: transparent;
    color: var(--texto-gris);
    border: none;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.action-btn:hover {
    transform: scale(1.1);
}

.edit-btn {
    color: #3498db;
}

.edit-btn:hover {
    background: rgba(52, 152, 219, 0.15);
    color: #2980b9;
}

.delete-btn {
    color: #e74c3c;
}

.delete-btn:hover {
    background: rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

/* ========== ESTADOS ========== */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gris-claro);
    border-top: 4px solid var(--verde-principal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty state aplicado directamente al grid */
.news-grid.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--sombra);
    min-height: 400px;
}

.empty-icon {
    font-size: 4rem;
    color: var(--gris-claro);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--texto-gris);
}

.empty-state p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* ========== MODALES PERSONALIZADOS (NO BOOTSTRAP) ========== */
.modal-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
}

.modal-custom-content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-custom-header {
    padding: 25px 30px;
    border-bottom: 1px solid var(--gris-claro);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--texto-gris);
}

.modal-custom-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--gris-claro);
    color: var(--texto-gris);
}

.modal-custom-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--gris-claro);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: var(--glass-bg);
}

/* ========== FORMULARIOS ========== */
.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: end;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--texto-gris);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gris-claro);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    background: white;
    color: var(--texto-gris);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--verde-principal);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85rem;
}

.char-counter {
    text-align: right;
    font-weight: 500;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* ========== NOTICIA COMPLETA ========== */
.noticia-completa {
    line-height: 1.8;
}

.noticia-completa img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.noticia-meta-complete {
    padding: 20px 0;
    border-bottom: 1px solid var(--gris-claro);
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.noticia-banner-complete {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: toastSlideIn 0.3s ease;
    border-left: 4px solid var(--success-color);
}

.toast.error { border-left-color: var(--error-color); }
.toast.warning { border-left-color: var(--warning-color); }
.toast.info { border-left-color: var(--info-color); }

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-icon.success { color: var(--success-color); }
.toast-icon.error { color: var(--error-color); }
.toast-icon.warning { color: var(--warning-color); }
.toast-icon.info { color: var(--info-color); }

.toast-message {
    flex: 1;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .content-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-select {
        min-width: auto;
    }
    
    .search-input {
        min-width: auto;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
    
    .toast-container {
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
    }
}

/* ========== MODAL DE VISTA DE NOTICIA ========== */
.modal-large {
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.noticia-completa {
    line-height: 1.8;
}

.noticia-completa img {
    width: 100%;
    max-width: 600px;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin: 20px 0;
    box-shadow: var(--sombra);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.noticia-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--gris-claro);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.noticia-categoria {
    background: var(--verde-principal);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.noticia-fecha {
    color: var(--texto-gris);
    font-size: 0.9rem;
}

.noticia-autor {
    color: var(--verde-principal);
    font-weight: 500;
}

.noticia-texto {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--texto-oscuro);
    margin-bottom: 20px;
}

.noticia-texto p {
    margin-bottom: 15px;
}

.modal-footer {
    border-top: 1px solid var(--gris-claro);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 15px 20px;
}

.modal-footer .btn {
    min-width: 100px;
}

/* ========== NUEVO MODAL DE VISUALIZACIÓN ========== */
.modal-news-view {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.news-modal-header {
    padding: 40px 40px 20px;
    background: linear-gradient(135deg, var(--verde-principal), var(--verde-hover));
    color: white;
    position: relative;
}

.news-category-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.news-modal-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.news-modal-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 0.9rem;
    opacity: 0.9;
    flex-wrap: wrap;
}

.news-author, .news-date, .news-views {
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-modal-image {
    max-height: 400px;
    overflow: hidden;
    position: relative;
}

.news-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-modal-body {
    padding: 40px;
}

.news-summary {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--texto-gris);
    background: var(--glass-bg);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--verde-principal);
    margin-bottom: 30px;
    font-style: italic;
}

.news-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--texto-gris);
}

.news-content p {
    margin-bottom: 20px;
}

.news-content h2, .news-content h3 {
    color: var(--verde-principal);
    margin: 30px 0 15px;
}

.news-modal-actions {
    padding: 20px 40px 40px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-outline-primary {
    background: transparent;
    color: var(--verde-principal);
    border: 2px solid var(--verde-principal);
}

.btn-outline-primary:hover {
    background: var(--verde-principal);
    color: white;
}

.btn-outline-danger {
    background: transparent;
    color: var(--error-color);
    border: 2px solid var(--error-color);
}

.btn-outline-danger:hover {
    background: var(--error-color);
    color: white;
}

/* Responsivo para modal de vista */
@media (max-width: 768px) {
    .modal-large {
        width: 95%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .news-modal-header {
        padding: 30px 20px 15px;
    }
    
    .news-modal-title {
        font-size: 1.8rem;
    }
    
    .news-modal-body {
        padding: 30px 20px;
    }
    
    .news-modal-actions {
        padding: 15px 20px 30px;
        flex-direction: column;
    }
    
    .noticia-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ========== LOADING SPINNER ========== */
#loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-overlay {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gris-claro);
    border-top: 4px solid var(--verde-principal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .news-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
        gap: 1.5rem;
    }
    
    .hero-section {
        padding: 40px 20px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .controls-section {
        padding: 1rem;
    }
    
    .news-content-section {
        padding: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}
