﻿.videos-page {
    padding: 0.5rem 0;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Card de vÃ­deo (herda do existente, mas com ajustes) */
.video-card {
    background: var(--card-bg);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(255,107,0,0.12);
    border-color: var(--primary);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    background: var(--bg-elevated);
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #0a0a0a;
    transition: all 180ms cubic-bezier(.4,0,.2,1);
    box-shadow: 0 4px 20px var(--primary-glow);
    opacity: .92;
}

.video-card:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--primary-dark);
    opacity: 1;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    backdrop-filter: blur(2px);
}

.video-info {
    padding: 0.75rem;
}

.video-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-color);
}

.video-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--muted);
}

.video-meta .channel-name {
    color: var(--primary);
    font-weight: 600;
}

/* Responsivo Videos */
@media (max-width: 992px) {
    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}
@media (max-width: 480px) {
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .video-title {
        font-size: 0.85rem;
    }
    .video-thumbnail .play-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* ========== VIDEO MODAL (YouTube) ========== */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0,0,0,.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
.video-modal.active {
    opacity: 1;
    pointer-events: auto;
}
.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}
.video-modal-close {
    position: absolute;
    top: .5rem;
    right: .5rem;
    z-index: 10;
    background: rgba(0,0,0,.6);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.video-modal-close:hover {
    background: rgba(255,255,255,.2);
}
.video-modal-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}
.video-modal-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
