/* ========================================
   MODAL PARA LER MATÉRIAS COMPLETAS
   ======================================== */

.news-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.news-modal.active {
    display: flex;
}

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

.news-modal-content {
    position: relative;
    background: white;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    z-index: 10001;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.news-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #c0392b;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.news-modal-close:hover {
    background: #c0392b;
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.news-modal-header {
    position: relative;
}

.news-modal-image {
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.news-modal-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.news-modal-meta {
    position: absolute;
    bottom: 20px;
    left: 30px;
    right: 30px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    z-index: 2;
}

.news-modal-meta span {
    background: rgba(255, 255, 255, 0.95);
    color: #2c3e50;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.news-modal-meta i {
    color: #d4af37;
}

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

.news-modal-body::-webkit-scrollbar {
    width: 8px;
}

.news-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.news-modal-body::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 4px;
}

.news-modal-body::-webkit-scrollbar-thumb:hover {
    background: #0d4d2d;
}

.news-modal-body h2 {
    color: #0d4d2d;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 25px;
    line-height: 1.3;
}

.modal-text-content {
    color: #2c3e50;
    font-size: 1.1rem;
    line-height: 1.8;
}

.modal-text-content p {
    margin-bottom: 20px;
}

/* ========================================
   CORREÇÃO DO PLAYER DE ÁUDIO
   ======================================== */

.audio-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
}

.audio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.audio-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.audio-icon.azul {
    background: linear-gradient(135deg, #1e5a9e, #2980b9);
}

.audio-icon.verde {
    background: linear-gradient(135deg, #0d4d2d, #1a5c3a);
}

.audio-icon.dourado {
    background: linear-gradient(135deg, #d4af37, #ffd700);
}

.audio-icon.vermelho {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
}

.audio-icon.cinza {
    background: linear-gradient(135deg, #6c757d, #95a5a6);
}

.audio-info {
    flex: 1;
}

.audio-info h3 {
    color: #0d4d2d;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.audio-info p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.audio-player {
    margin-bottom: 10px;
}

.audio-player audio {
    width: 100%;
    height: 40px;
    border-radius: 20px;
    outline: none;
}

/* Estilização customizada do player de áudio */
.audio-player audio::-webkit-media-controls-panel {
    background: linear-gradient(135deg, #0d4d2d, #1a5c3a);
}

.audio-player audio::-webkit-media-controls-play-button,
.audio-player audio::-webkit-media-controls-mute-button {
    background-color: #d4af37;
    border-radius: 50%;
}

.audio-player audio::-webkit-media-controls-current-time-display,
.audio-player audio::-webkit-media-controls-time-remaining-display {
    color: white;
}

.audio-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
}

.audio-time i {
    color: #d4af37;
}

/* Mensagem de erro para áudios */
.audio-error {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.audio-error i.fa-exclamation-triangle {
    color: #ff9800;
    font-size: 1.5rem;
}

.audio-error span {
    color: #856404;
    font-weight: 600;
}

.audio-fallback-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0d4d2d;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.audio-fallback-link:hover {
    background: #1a5c3a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 77, 45, 0.3);
}

/* Video Play Overlay */
.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
    transition: all 0.3s ease;
    pointer-events: none;
}

.video-thumbnail:hover .video-play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.video-thumbnail:hover::before {
    background: rgba(0, 0, 0, 0.5);
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 2;
}

/* Responsivo */
@media (max-width: 768px) {
    .news-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .news-modal-image {
        height: 250px;
    }
    
    .news-modal-body {
        padding: 25px;
        max-height: calc(95vh - 250px);
    }
    
    .news-modal-body h2 {
        font-size: 1.5rem;
    }
    
    .modal-text-content {
        font-size: 1rem;
    }
    
    .news-modal-meta {
        left: 15px;
        right: 15px;
        bottom: 15px;
    }
    
    .news-modal-meta span {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .audio-card {
        flex-direction: column;
        text-align: center;
    }
    
    .audio-icon {
        width: 70px;
        height: 70px;
        font-size: 1.7rem;
    }
}
