/**
 * Seção de Vídeos - Dia de Campo C.Vale
 * CSS isolado com prefixo .videos-section
 */

/* ========================================
   NAVEGAÇÃO DE CATEGORIAS
======================================== */
.videos-section .videos-nav .nav-link {
    margin: 0 5px;
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all var(--transition-normal);
    border: none;
}

.videos-section .videos-nav .nav-link:not(.active):hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    transform: translateY(-2px);
}

.videos-section .videos-nav .nav-link.active {
    background-color: var(--bs-primary);
    color: white;
}

.videos-section .videos-nav .nav-link i {
    margin-right: 6px;
}

/* ========================================
   CARDS DE VÍDEO
======================================== */
.videos-section .video-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-normal);
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.videos-section .video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Vídeo em destaque (maior) */
.videos-section .video-main {
    height: 100%;
}

.videos-section .video-main .video-info h4 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.videos-section .video-main .video-info p {
    font-size: 1rem;
    line-height: 1.6;
}

/* ========================================
   THUMBNAIL E OVERLAY
======================================== */
.videos-section .video-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.videos-section .video-placeholder {
    cursor: pointer;
    display: block;
    height: 100%;
}

.videos-section .video-thumbnail {
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
    aspect-ratio: 16 / 9;
}

.videos-section .video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.videos-section .video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

/* ========================================
   PLAY OVERLAY
======================================== */
.videos-section .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.videos-section .video-card:hover .play-overlay {
    opacity: 1;
}

.videos-section .play-button {
    width: 70px;
    height: 70px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    transition: all var(--transition-normal);
    border: 3px solid white;
}

.videos-section .play-button--small {
    width: 50px;
    height: 50px;
    font-size: 20px;
    border-width: 2px;
}

.videos-section .play-button:hover {
    background: rgb(255, 0, 0);
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

/* ========================================
   BADGES E METADADOS
======================================== */
.videos-section .video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.videos-section .video-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ffc107;
    color: #000;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.videos-section .video-badge i {
    font-size: 10px;
}

/* ========================================
   INFORMAÇÕES DO VÍDEO
======================================== */
.videos-section .video-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.videos-section .video-info h4,
.videos-section .video-info h6 {
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
}

.videos-section .video-info h6 {
    font-size: 1.1rem;
    font-weight: 600;
}

.videos-section .video-info p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
    flex: 1;
}

.videos-section .video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: #888;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.videos-section .video-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.videos-section .video-meta i {
    font-size: 12px;
}

.videos-section .video-category {
    color: var(--bs-primary);
    font-weight: 500;
}

.videos-section .video-views {
    color: #666;
}

/* ========================================
   ESTADO VAZIO
======================================== */
.videos-section .videos-empty-state {
    padding: 80px 20px;
    text-align: center;
}

.videos-section .videos-empty-state i {
    color: #ccc;
    margin-bottom: 20px;
}

.videos-section .videos-empty-state h4 {
    color: #999;
    margin-bottom: 10px;
}

.videos-section .videos-empty-state p {
    color: #aaa;
    font-size: 0.95rem;
}

/* ========================================
   MODAL DE VÍDEO
======================================== */
#videoModal .modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

#videoModal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 15px 20px;
}

#videoModal .modal-title {
    font-weight: 600;
    color: #333;
}

#videoModal .modal-body {
    padding: 0;
    background-color: #000;
}

#videoModal .ratio {
    background-color: #000;
}

#videoModal iframe {
    border: none;
}

/* ========================================
   ANIMAÇÕES
======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.videos-section .animate-fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* ========================================
   RESPONSIVIDADE
======================================== */

/* Tablet Landscape (≤991px) */
@media (max-width: 991px) {
    .videos-section .video-main .video-info h4 {
        font-size: 1.3rem;
    }
    
    .videos-section .play-button {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

/* Tablet Portrait (≤768px) */
@media (max-width: 768px) {
    .videos-section .videos-nav {
        flex-wrap: wrap;
        gap: 5px;
        justify-content: center;
    }
    
    .videos-section .videos-nav .nav-link {
        font-size: 13px;
        padding: 8px 14px;
        margin: 3px;
    }
    
    .videos-section .videos-nav .nav-link i {
        display: none;
    }
    
    .videos-section .video-main {
        margin-bottom: 20px;
    }
    
    .videos-section .video-main .video-info h4 {
        font-size: 1.2rem;
    }
    
    .videos-section .video-info {
        padding: 15px;
    }
    
    .videos-section .video-meta {
        font-size: 12px;
        gap: 10px;
    }
}

/* Mobile (≤576px) */
@media (max-width: 576px) {
    .videos-section .videos-nav .nav-link {
        font-size: 12px;
        padding: 6px 12px;
        margin: 2px;
    }
    
    .videos-section .video-card {
        margin-bottom: 20px;
    }
    
    .videos-section .play-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
        border-width: 2px;
    }
    
    .videos-section .play-button--small {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .videos-section .video-duration {
        font-size: 11px;
        padding: 3px 6px;
        bottom: 8px;
        right: 8px;
    }
    
    .videos-section .video-badge {
        font-size: 10px;
        padding: 4px 8px;
        top: 8px;
        left: 8px;
    }
    
    .videos-section .video-info h6 {
        font-size: 1rem;
    }
    
    .videos-section .video-info p {
        font-size: 0.85rem;
    }
    
    .videos-section .videos-empty-state {
        padding: 60px 15px;
    }
    
    #videoModal .modal-dialog {
        margin: 10px;
    }
}

/* ========================================
   ACESSIBILIDADE
======================================== */
@media (prefers-reduced-motion: reduce) {
    .videos-section .video-card,
    .videos-section .video-thumbnail img,
    .videos-section .play-button,
    .videos-section .play-overlay,
    .videos-section .videos-nav .nav-link {
        transition: none !important;
    }
    
    .videos-section .animate-fade-in {
        animation: none !important;
    }
}

/* Focus states para navegação por teclado */
.videos-section .video-placeholder:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 2px;
}

.videos-section .videos-nav .nav-link:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {
    .videos-section .play-overlay,
    .videos-section .video-badge,
    .videos-section .videos-nav {
        display: none !important;
    }
    
    .videos-section .video-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}
