/* ============================================
   SISTEMA DE NOTIFICAÇÕES DE NOTÍCIAS - UCP
   Criado em: 2025-02-26
   ============================================ */

/* Badge de notificações */
.news-notification-badge {
    position: relative;
    display: inline-block;
    cursor: pointer;
    margin: 0 15px;
    color: #ffc24c;
    font-size: 20px;
    transition: all 0.3s ease;
}

.news-notification-badge:hover {
    color: #fff;
    transform: scale(1.1);
}

.news-notification-badge .badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #ff4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Animações para Toast de nova notificação */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Modal de notificações */
.news-notifications-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 99999;
    overflow-y: auto;
    padding: 20px;
    animation: fadeInModal 0.3s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.news-notifications-modal.active {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.news-notifications-content {
    background: linear-gradient(145deg, #1a1510 0%, #0c0a08 100%);
    border-radius: 24px;
    max-width: 650px;
    width: 100%;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 178, 125, 0.1);
    border: 1px solid rgba(212, 178, 125, 0.2);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.news-notifications-header {
    background: rgba(212, 178, 125, 0.05);
    padding: 25px 30px;
    border-bottom: 1px solid rgba(212, 178, 125, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-notifications-header h2 {
    margin: 0;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.news-notifications-header h2 i {
    color: #d4b27d;
    font-size: 24px;
}

.news-notifications-header .close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #d4b27d;
    font-size: 22px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.news-notifications-header .close-btn:hover {
    background: #d4b27d;
    color: #1a1510;
    transform: rotate(90deg);
}

.news-notifications-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.news-notifications-body::-webkit-scrollbar {
    width: 5px;
}

.news-notifications-body::-webkit-scrollbar-thumb {
    background: rgba(212, 178, 125, 0.3);
    border-radius: 5px;
}

.news-notification-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    gap: 18px;
    position: relative;
    overflow: hidden;
}

.news-notification-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #d4b27d;
    opacity: 0;
    transition: 0.3s;
}

.news-notification-item:hover {
    background: rgba(212, 178, 125, 0.06);
    border-color: rgba(212, 178, 125, 0.2);
    transform: translateX(8px);
}

.news-notification-item:hover::before {
    opacity: 1;
}

.news-notification-item img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(212, 178, 125, 0.2);
    flex-shrink: 0;
}

.news-notification-item .notification-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-notification-item .notification-title {
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.news-notification-item .notification-summary {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-notification-item .notification-date {
    color: #d4b27d;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-notifications-empty {
    text-align: center;
    padding: 60px 40px;
    color: rgba(255, 255, 255, 0.3);
}

.news-notifications-empty i {
    font-size: 50px;
    margin-bottom: 20px;
    opacity: 0.2;
}

.news-notifications-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(212, 178, 125, 0.1);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
}

.news-notifications-footer button {
    background: linear-gradient(135deg, #d4b27d 0%, #b39363 100%);
    border: none;
    color: #1a1510;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 900;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.news-notifications-footer button:hover {
    background: linear-gradient(135deg, #ffc24c 0%, #d4b27d 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 178, 125, 0.3);
}

.news-notifications-loading {
    text-align: center;
    padding: 60px;
    color: #d4b27d;
}

.news-notifications-loading i {
    font-size: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsivo */
@media (max-width: 768px) {
    .news-notifications-content {
        margin: 0;
        max-height: 95vh;
        border-radius: 20px;
    }
    
    .news-notification-item {
        padding: 12px;
    }
    
    .news-notification-item img {
        width: 60px;
        height: 60px;
    }
}


/* ========================================
   MODAL DE NOTÍCIA (POPUP)
   ======================================== */

/* ========================================
   MODAL DE NOTÍCIA (POPUP DE LEITURA)
   ======================================== */

.news-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.4s ease;
    visibility: hidden;
}

.news-modal-overlay.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 1 !important;
    visibility: visible !important;
}

.news-modal {
    background: var(--royale-card-bg, #1a1510);
    border-radius: 20px;
    max-width: 750px; /* Reduzido para melhor proporção */
    width: 95%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9), 0 0 40px rgba(212, 178, 125, 0.1);
    border: 1px solid var(--royale-border, #3a2f24);
    position: relative;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.news-modal-overlay.active .news-modal {
    transform: translateY(0) scale(1);
}

.news-modal-header {
    background: rgba(212, 178, 125, 0.05);
    padding: 25px 35px;
    border-bottom: 1px solid rgba(212, 178, 125, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.news-modal-header .modal-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--royale-gold-bright, #ffc24c);
    font-family: var(--royale-font-title, 'Outfit', sans-serif);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.news-modal-header .modal-title-box i {
    color: var(--royale-gold, #d4b27d);
    font-size: 20px;
}

.news-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #d4b27d;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.news-modal-close:hover {
    background: #d4b27d;
    color: #1a1510;
    transform: rotate(90deg);
}

.news-modal-body {
    padding: 35px;
    overflow-y: auto;
    flex: 1;
    background: transparent;
}

.news-modal-body::-webkit-scrollbar {
    width: 6px;
}

.news-modal-body::-webkit-scrollbar-thumb {
    background: rgba(212, 178, 125, 0.3);
    border-radius: 10px;
}

.news-modal-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 178, 125, 0.2);
}

.news-modal-title {
    font-family: var(--royale-font-title, 'Outfit', sans-serif);
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #fff;
    line-height: 1.3;
}

.news-modal-date {
    color: #d4b27d;
    font-size: 12px;
    margin-bottom: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(212, 178, 125, 0.1);
    border: 1px solid rgba(212, 178, 125, 0.2);
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-modal-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--royale-text, #9d8f81);
    text-align: justify;
    font-family: var(--royale-font-content, 'Inter', sans-serif);
}

.news-modal-content p {
    margin-bottom: 20px;
}

.news-modal-content strong {
    color: #d4b27d;
}

.news-modal-loading {
    text-align: center;
    padding: 80px 20px;
}

.news-modal-spinner {
    border: 3px solid rgba(212, 178, 125, 0.1);
    border-radius: 50%;
    border-top: 3px solid #d4b27d;
    width: 50px;
    height: 50px;
    animation: spin-modal 1s linear infinite;
    margin: 0 auto 25px;
}

@keyframes spin-modal {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsividade */
@media (max-width: 768px) {
    .news-modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }
    
    .news-modal-body {
        padding: 25px;
    }
    
    .news-modal-title {
        font-size: 24px;
    }
}
