/**
 * 4TALE - News System Styles
 * Additional styles for dynamic news system
 */

/* ========================================
   NEWS FILTERS
   ======================================== */
.news-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(26, 15, 10, 0.4);
    border-radius: 12px;
    border: 2px solid rgba(201, 169, 97, 0.3);
}

.news-filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(43, 24, 16, 0.6);
    border: 2px solid rgba(201, 169, 97, 0.3);
    border-radius: 8px;
    color: #f4e4c1;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-filter-btn:hover {
    background: rgba(201, 169, 97, 0.2);
    border-color: #c9a961;
    transform: translateY(-2px);
}

.news-filter-btn.active {
    background: linear-gradient(135deg, #c9a961, #cd7f32);
    border-color: #d4af37;
    color: #1a0f0a;
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.4);
}

.news-filter-btn i {
    margin-right: 0.5rem;
}

/* ========================================
   NEWS LOADING/ERROR STATES
   ======================================== */
.news-loading-state,
.news-error-state,
.news-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(26, 15, 10, 0.4);
    border-radius: 12px;
    border: 2px solid rgba(201, 169, 97, 0.3);
}

.news-loading-state i {
    font-size: 3rem;
    color: #d4af37;
    margin-bottom: 1rem;
}

.news-error-state i {
    font-size: 3rem;
    color: #ff4757;
    margin-bottom: 1rem;
}

.news-empty-state i {
    font-size: 3rem;
    color: #c8b896;
    margin-bottom: 1rem;
}

.news-loading-state p,
.news-error-state p,
.news-empty-state p {
    font-size: 1.2rem;
    color: #c8b896;
    margin: 1rem 0;
}

.btn-retry {
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #c9a961, #cd7f32);
    border: 2px solid #d4af37;
    color: #1a0f0a;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* ========================================
   NEWS CARD ENHANCEMENTS
   ======================================== */
.novidade-card {
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.novidade-card.fade-in-active {
    opacity: 1;
    transform: translateY(0);
}

.novidade-featured {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d4af37, #c9a961);
    border-radius: 50%;
    color: #1a0f0a;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.5);
    z-index: 2;
    animation: pulse-star 2s ease-in-out infinite;
}

@keyframes pulse-star {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(212, 175, 55, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(212, 175, 55, 0.7);
    }
}

.novidade-author {
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(201, 169, 97, 0.3);
}

.btn-read-more {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #c9a961, #cd7f32);
    border: 2px solid #d4af37;
    color: #1a0f0a;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* Badge for maintenance type */
.novidade-badge.novidade-manutencao {
    background: linear-gradient(135deg, #ff9ff3, #feca57);
}

/* ========================================
   NEWS MODAL
   ======================================== */
#newsModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

#newsModal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

#newsModal .modal-content {
    position: relative;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    background: linear-gradient(180deg, rgba(43, 24, 16, 0.98), rgba(26, 15, 10, 0.98));
    border: 3px solid #d4af37;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    overflow: hidden;
}

#newsModal .modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 71, 87, 0.9);
    border: 2px solid #ff4757;
    color: #ffffff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

#newsModal .modal-close:hover {
    background: #ff4757;
    transform: rotate(90deg);
}

.news-modal-header {
    position: relative;
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(26, 15, 10, 0.5), rgba(43, 24, 16, 0.9));
}

.news-modal-image {
    width: 100%;
    height: auto;
    display: block;
}

.news-modal-header .novidade-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
}

.news-modal-header .badge-featured {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #d4af37, #c9a961);
    color: #1a0f0a;
    font-weight: 700;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.5);
}

.news-modal-body {
    padding: 2rem;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

.news-modal-title {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: #d4af37;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.news-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 1.5rem;
    background: rgba(10, 10, 20, 0.5);
    border-radius: 8px;
    border-left: 4px solid #c9a961;
    margin-bottom: 2rem;
}

.news-modal-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f4e4c1;
    font-size: 0.95rem;
}

.news-modal-meta-item i {
    color: #d4af37;
    font-size: 1.1rem;
}

.news-modal-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #c8b896;
    padding: 1.5rem;
    background: rgba(10, 10, 20, 0.3);
    border-radius: 8px;
}

.news-modal-content br {
    margin-bottom: 0.5rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .news-filters {
        gap: 0.5rem;
        padding: 1rem;
    }

    .news-filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .news-modal-title {
        font-size: 1.8rem;
    }

    .news-modal-meta {
        gap: 1rem;
    }

    .news-modal-body {
        padding: 1.5rem;
    }

    .news-modal-content {
        font-size: 1rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .news-modal-title {
        font-size: 1.5rem;
    }

    .news-modal-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .novidade-author {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        margin-top: 0.5rem;
        display: block;
    }
}

/* ========================================
   CUSTOM SCROLLBAR FOR MODAL
   ======================================== */
.news-modal-body::-webkit-scrollbar {
    width: 8px;
}

.news-modal-body::-webkit-scrollbar-track {
    background: rgba(26, 15, 10, 0.5);
    border-radius: 4px;
}

.news-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c9a961, #cd7f32);
    border-radius: 4px;
}

.news-modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #d4af37, #c9a961);
}
