/* =============================================
   MÍDIA INSTITUCIONAL - VÍDEO E INFOGRÁFICOS
   ============================================= */

/* ===========================================
   1. VARIÁVEIS
   =========================================== */
:root {
    --video-overlay-dark: rgba(0, 0, 0, 0.6);
    --video-overlay-gradient: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.85) 100%);
}

/* ===========================================
   2. HERO COM VÍDEO DE FUNDO
   =========================================== */

.video-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #1a1a2e;
}

.video-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-hero-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--video-overlay-gradient);
    z-index: 2;
}

.video-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: 2.5rem;
    max-width: 800px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 16px;
}

.video-hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.video-hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.video-hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Botão para assistir com áudio */
.btn-watch-video {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-watch-video:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
    transform: translateY(-2px);
    color: white;
}

.btn-watch-video i {
    font-size: 1.25rem;
}

/* ===========================================
   3. MODAL DE VÍDEO
   =========================================== */

.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.video-modal.active {
    display: flex !important;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-modal-content video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    transition: transform 0.3s ease;
    z-index: 10001;
}

.video-modal-close:hover {
    transform: scale(1.1);
}

/* ===========================================
   4. CARD DE VÍDEO (EMBED COMPACTO)
   =========================================== */

.video-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #1a1a2e;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.video-card-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.video-card-thumbnail video,
.video-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.video-card:hover .video-card-thumbnail video,
.video-card:hover .video-card-thumbnail img {
    transform: scale(1.05);
}

.video-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.video-card:hover .video-card-play {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

.video-card-play i {
    font-size: 2rem;
    color: var(--nga-primary-color, #667eea);
    margin-left: 4px; /* Ajuste visual para centralizar o ícone de play */
}

.video-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
}

.video-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.video-card-duration {
    font-size: 0.875rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===========================================
   5. SEÇÃO DE VÍDEO INSTITUCIONAL
   =========================================== */

.video-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 0;
    margin: 3rem 0;
    border-radius: 20px;
}

.video-section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.video-section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 0.5rem;
}

.video-section-header p {
    color: #666;
    font-size: 1.125rem;
}

.video-section-content {
    max-width: 900px;
    margin: 0 auto;
}

/* ===========================================
   6. GALERIA DE INFOGRÁFICOS
   =========================================== */

.infografico-section {
    padding: 4rem 0;
}

.infografico-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.infografico-section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 0.5rem;
}

.infografico-section-header p {
    color: #666;
    font-size: 1.125rem;
}

.infografico-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.infografico-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.infografico-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.infografico-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.infografico-card:hover img {
    transform: scale(1.02);
}

.infografico-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.infografico-card:hover .infografico-overlay {
    background: rgba(0, 0, 0, 0.3);
}

.infografico-zoom {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.infografico-card:hover .infografico-zoom {
    opacity: 1;
    transform: scale(1);
}

.infografico-zoom i {
    font-size: 1.5rem;
    color: #333;
}

/* Infográfico único (centralizado) */
.infografico-single {
    max-width: 800px;
    margin: 0 auto;
}

/* ===========================================
   7. LIGHTBOX PARA INFOGRÁFICOS
   =========================================== */

.infografico-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.infografico-lightbox.active {
    display: flex !important;
}

.infografico-lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.infografico-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.infografico-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 0.75rem;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.infografico-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Navegação do lightbox */
.infografico-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.infografico-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

.infografico-lightbox-prev {
    left: 20px;
}

.infografico-lightbox-next {
    right: 20px;
}

/* ===========================================
   8. BANNER DE VÍDEO (PARA DASHBOARDS)
   =========================================== */

.video-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.video-banner-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.video-banner-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.video-banner-text h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.video-banner-text p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
}

.video-banner-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.video-banner .btn-watch {
    background: white;
    color: #667eea;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-banner .btn-watch:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.video-banner .btn-dismiss {
    background: transparent;
    color: white;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.video-banner .btn-dismiss:hover {
    opacity: 1;
}

/* ===========================================
   9. ANIMAÇÕES
   =========================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulsePlay {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    }
}

.video-card-play {
    animation: pulsePlay 2s infinite;
}

/* ===========================================
   10. RESPONSIVIDADE
   =========================================== */

@media (max-width: 992px) {
    .video-hero {
        min-height: 400px;
    }

    .video-hero-content h1 {
        font-size: 2.25rem;
    }

    .video-hero-content p {
        font-size: 1.125rem;
    }

    .infografico-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .video-hero {
        min-height: 350px;
    }

    /* Em mobile, mostrar imagem estática ao invés do vídeo */
    .video-hero-background video {
        display: none;
    }

    .video-hero-background {
        background-image: var(--video-poster, none);
        background-size: cover;
        background-position: center;
    }

    .video-hero-content h1 {
        font-size: 1.75rem;
    }

    .video-hero-content p {
        font-size: 1rem;
    }

    .video-hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn-watch-video {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .video-modal-content {
        width: 95%;
        border-radius: 8px;
    }

    .video-modal-close {
        top: -40px;
        font-size: 1.5rem;
    }

    .video-card-play {
        width: 60px;
        height: 60px;
    }

    .video-card-play i {
        font-size: 1.5rem;
    }

    .video-section {
        padding: 2rem 0;
        margin: 2rem 0;
        border-radius: 12px;
    }

    .video-section-header h2,
    .infografico-section-header h2 {
        font-size: 1.5rem;
    }

    .infografico-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .infografico-card {
        border-radius: 12px;
    }

    .infografico-lightbox-content img {
        max-height: 80vh;
    }

    .infografico-lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    .infografico-lightbox-prev {
        left: 10px;
    }

    .infografico-lightbox-next {
        right: 10px;
    }

    /* Banner responsivo */
    .video-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .video-banner-content {
        flex-direction: column;
    }

    .video-banner-actions {
        flex-direction: column;
        width: 100%;
    }

    .video-banner .btn-watch {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .video-hero {
        min-height: 300px;
    }

    .video-hero-content {
        padding: 1rem;
    }

    .video-hero-content h1 {
        font-size: 1.5rem;
    }

    .video-card-overlay {
        padding: 1.5rem 1rem 1rem;
    }

    .video-card-title {
        font-size: 1rem;
    }

    .infografico-zoom {
        width: 50px;
        height: 50px;
    }

    .infografico-zoom i {
        font-size: 1.25rem;
    }
}

/* ===========================================
   11. ACESSIBILIDADE
   =========================================== */

.video-card:focus,
.infografico-card:focus,
.btn-watch-video:focus {
    outline: 2px solid var(--nga-primary-color, #667eea);
    outline-offset: 4px;
}

.video-modal:focus,
.infografico-lightbox:focus {
    outline: none;
}

/* Preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    .video-hero-background video {
        display: none;
    }

    .video-card-play {
        animation: none;
    }

    .video-card,
    .infografico-card,
    .video-card-thumbnail video,
    .video-card-thumbnail img,
    .infografico-card img {
        transition: none;
    }
}

/* ===========================================
   12. TEMA ESCURO (OPCIONAL)
   =========================================== */

@media (prefers-color-scheme: dark) {
    .video-section {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }

    .video-section-header h2,
    .infografico-section-header h2 {
        color: #f1f1f1;
    }

    .video-section-header p,
    .infografico-section-header p {
        color: #aaa;
    }

    .infografico-card {
        background: #2a2a3e;
    }
}
