/* css/videos-section.css */
/* SEÇÃO DE VÍDEOS - FORJADOS MINISTÉRIO */
/* Mobile-first completamente responsivo */

:root {
    --gold: #d4af37;
    --gold-light: #ffd966;
    --gold-dark: #b8860b;
    --dark-bg: #0a0a0a;
    --dark-card: #111111;
    --dark-overlay: rgba(0, 0, 0, 0.85);
    --transition: all 0.3s ease;
}

.videos-section {
    background: linear-gradient(180deg, var(--dark-bg) 0%, #0f0f0f 100%);
    padding: clamp(2rem, 8vw, 5rem) 0;
    position: relative;
    overflow: hidden;
}

/* Elemento decorativo de fundo */
.videos-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.videos-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

/* Grid de vídeos */
.videos-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 coluna no mobile */
    gap: 1.5rem;
    margin: 2rem 0;
}

@media (min-width: 640px) {
    .videos-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colunas em tablets */
        gap: 1.8rem;
    }
}

@media (min-width: 1024px) {
    .videos-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 colunas em desktop */
        gap: 2rem;
    }
}

/* Card de vídeo */
.video-card {
    background: var(--dark-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
    border: 1px solid rgba(212, 175, 55, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-8px);
    border-color: var(--gold);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.2);
}

/* Container do vídeo com proporção 16:9 */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    overflow: hidden;
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

/* Overlay de play personalizado (fallback para vídeos locais) */
.video-overlay-play {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    cursor: pointer;
}

.video-wrapper:hover .video-overlay-play {
    opacity: 1;
}

.video-overlay-play i {
    font-size: 3rem;
    color: var(--gold);
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.5));
    transform: scale(1);
    transition: var(--transition);
}

.video-overlay-play:hover i {
    transform: scale(1.1);
    color: var(--gold-light);
}

/* Informações do vídeo */
.video-info {
    padding: 1.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.video-title {
    color: #fff;
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.video-description {
    color: #aaa;
    font-size: clamp(0.85rem, 3vw, 0.95rem);
    margin-bottom: 1rem;
    line-height: 1.5;
    flex-grow: 1;
}

.video-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--gold);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.8rem;
}

.video-duration {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.video-duration i {
    font-size: 0.8rem;
}

.video-views {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Botão de play para vídeos locais */
.play-local-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
    transition: var(--transition);
}

.play-local-video i {
    color: #000;
    font-size: 1.2rem;
    margin-left: 3px; /* Ajuste para o ícone de play */
}

.play-local-video:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--gold-light);
}

/* Loading state */
.video-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.video-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(212, 175, 55, 0.3);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Controles personalizados para vídeo local */
.custom-video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: var(--transition);
    z-index: 10;
}

.video-wrapper:hover .custom-video-controls {
    opacity: 1;
}

.custom-video-controls button {
    background: none;
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.custom-video-controls button:hover {
    background: rgba(212, 175, 55, 0.3);
    color: var(--gold);
}

.custom-video-controls input[type="range"] {
    flex-grow: 1;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
}

.custom-video-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--gold);
    border-radius: 50%;
    cursor: pointer;
}

/* Responsividade para toques em mobile */
@media (max-width: 768px) {
    .custom-video-controls {
        opacity: 1; /* Sempre visível no mobile */
        background: rgba(0, 0, 0, 0.7);
        padding: 8px;
    }
    
    .custom-video-controls button {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
    
    .custom-video-controls input[type="range"] {
        height: 6px; /* Mais fácil de tocar */
    }
    
    .video-overlay-play {
        opacity: 1;
        background: rgba(0, 0, 0, 0.2);
    }
    
    .video-overlay-play i {
        font-size: 2.5rem;
    }
}

/* Botão de ação central */
.btn-videos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
    padding: 0.8rem 2rem;
    font-size: clamp(0.9rem, 4vw, 1.1rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    transition: var(--transition);
    text-decoration: none;
    margin-top: 1.5rem;
}

.btn-videos:hover {
    background: var(--gold);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.btn-videos i {
    transition: var(--transition);
}

.btn-videos:hover i {
    transform: translateX(5px);
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.video-card:nth-child(1) { animation-delay: 0.1s; }
.video-card:nth-child(2) { animation-delay: 0.2s; }
.video-card:nth-child(3) { animation-delay: 0.3s; }
.video-card:nth-child(4) { animation-delay: 0.4s; }