/* ====================================================
   ARQUIVO: estilo.css
   Descrição: Estilos globais para Componentes da CBSA
   ==================================================== */

/* ====================================================
   1. POPUP DE INFORMAÇÕES / AVISOS
   ==================================================== */
.popup {
    position: absolute;
    background-color: #F4F4F4;
    top: 1%;
    padding: 30px 50px;
    border-radius: 8px;
    text-align: center;
    width: 500px;
    box-sizing: border-box;
    transition: all .4s;
    z-index: -1;
    transform: scale(.4);
    opacity: 0;
}

.popup.opened {
    z-index: 999;
    top: 1%;
    transform: scale(1);
    opacity: 1;
    height: 38em;
}

.popup img {
    width: 100%;
}

.popup h2.title {
    color: #ee404c;
}

.popup p.desc {
    color: #FFF;
}

.popup-button,
.popup .close-popup-button {
    background-color: #ee404c;
    border: none;
    padding: 8px 30px;
    border-radius: 16px;
    color: #FFF;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all .4s;
    margin: 12px 0;
}

.popup-button:hover,
.popup .close-popup-button:hover {
    opacity: .8;
}

.popup-button:active,
.popup .close-popup-button:active {
    transform: scale(.8);
}

@media screen and (max-width: 768px) {
    .popup {
        left: 50%;
        transform: translateX(-50%) scale(0.4);
        width: 90%;
        padding: 20px;
    }

    .popup.opened {
        transform: translateX(-50%) scale(1);
        height: auto;
    }
}


/* ====================================================
   2. SEÇÃO DE VÍDEOS (NA MÍDIA)
   ==================================================== */
.img-video {
    width: 376px;
    height: 319px;
    cursor: pointer;
}

.container-videos {
    padding: 0.5rem 0;
    gap: 1.5rem;
}

.title-video {
    margin-top: 16px;
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 20px;
    color: #fff;
}

video {
    object-fit: cover;
}

/* Scrollbar personalizada para os vídeos */
.container-videos::-webkit-scrollbar {
    height: 7px;
}

.container-videos::-webkit-scrollbar-track {
    background-color: #d6d6d6;
    border-radius: 5px;
}

.container-videos::-webkit-scrollbar-thumb {
    cursor: pointer;
    background-color: rgba(51, 79, 146, 0.7);
    border-radius: 5px;
}

.container-videos::-webkit-scrollbar-thumb:hover {
    background-color: rgba(51, 79, 146, 1);
    opacity: 1 !important;
}

@media screen and (min-width: 920px) {
    .container-videos {
        display: flex;
        justify-content: flex-start;
    }
}

@media screen and (max-width: 919px) {
    .container-videos {
        display: grid;
    }
}


/* ====================================================
   3. GALERIA DE FOTOS
   ==================================================== */
.gallery {
    width: 100%;
    display: flex;
    overflow-x: scroll;
    -ms-overflow-style: none;
    /* IE e Edge */
    scrollbar-width: none;
    /* Firefox */
}

.gallery div {
    display: grid;
    grid-template-columns: auto-fill auto auto;
    grid-gap: 20px;
    padding: 10px;
    flex: none;
}

.gallery div img {
    width: 150px;
    height: fit-content;
    filter: grayscale(100%);
    transition: transform 0.5s, filter 0.5s;
}

.gallery div img:hover {
    filter: grayscale(0);
    cursor: pointer;
    transform: scale(1.1);
}

.gallery-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10% auto;
}

#backButton,
#nextButton {
    width: 50px;
    cursor: pointer;
    margin: 40px;
}

@media(max-width: 991px) {

    #backButton,
    #nextButton,
    .gallery-wrap {
        display: none;
    }

    .gallery {
        scrollbar-width: auto;
    }
}


/* ====================================================
   4. COMPONENTES GERAIS / TAGS / UTILITÁRIOS
   ==================================================== */
.socialMediasB {
    display: flex;
    justify-content: space-evenly;
}

.fechar {
    cursor: pointer;
    display: flex;
}

.tag-item-inter {
    background-color: #CE3838;
    color: #FFFFFF;
    text-transform: uppercase;
    width: 125px;
    height: 35px;
    position: relative;
    top: 180%;
    left: 10%;
    z-index: 900;
}

.tag-item-inter p {
    color: #FFFFFF;
    font-size: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    text-align: center;
    text-transform: uppercase;
}

.noticia {
    justify-content: center;
}

.col-8-Dois {
    width: 70%;
}

@media screen and (max-width: 768px) {
    .col-8-Dois {
        flex: 0 0 100%;
        max-width: 100%;
    }
}


/* ====================================================
   TRAVA DE SEGURANÇA GLOBAL (Evita Scroll X)
   ==================================================== */
html, body {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}

/* DEPOIS PODE DELETAR AQUELA REGRA DO .row-events COM MARGIN -200px */
@media screen and (max-width: 450px) {
    .row-events {
        margin-left: 0 !important; /* Corrigido */
        justify-content: center;
        display: flex;
    }
}

/* ====================================================
   5. CARROSSEL DE IMAGENS LEGADO (ANTIGO)
   ==================================================== */
.slide {
    width: 700px;
    height: 300px;
    overflow: hidden;
    border-radius: 15px;
    transition: all 0.4s;
}

.slides {
    width: fit-content;
    display: flex;
}

.imageSli img {
    width: 640px;
    height: 246px;
}

#atual {
    transition: all 2s;
}

.btn {
    position: absolute;
    color: #fff;
    padding: 10px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s;
    font-size: 1.7em;
    margin-top: -5px;
}

.btn:hover {
    transform: scale(1.5);
}

#voltar {
    top: 30%;
    right: 80%;
}

#next {
    top: 30%;
    left: 95%;
}

.balls {
    position: absolute;
    width: auto;
    display: flex;
    justify-content: center;
    margin-top: -25px;
    left: 50%;
}

.balls div {
    transition: all 0.5s;
    border: 1px solid #fff;
    padding: 4px;
    border-radius: 50%;
    margin-right: 15px;
    cursor: pointer;
}

.balls div:hover {
    background: #fff;
}

.imgAtual {
    transition: all 0.5s;
    background: #fff;
}

.imageSlis {
    z-index: 1;
}

.ball {
    z-index: 1000;
}

/* ====================================================
   CENTRALIZAÇÃO DO SLIDESHOW PRINCIPAL (DCU)
   ==================================================== */
.section-news-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Garante que o slider e as colunas laterais fiquem no centro */
    align-items: flex-start;
}

.news-slider-content {
    width: 100%;
    margin: 0 auto 30px auto; /* Margem automática nas laterais faz o container centralizar */
    display: flex;
    justify-content: center;
    overflow: hidden; /* Blinda contra vazamento de imagens no eixo X */
}

swiper-container.mySwiper {
    width: 100%;
    max-width: 100%;
}

/* Ajuste Fino para o Celular não quebrar as imagens do slide */
@media (max-width: 768px) {
    .news-slider-content {
        max-width: 100vw;
        padding: 0 10px;
    }
    
    swiper-slide {
        width: 90vw !important; /* Faz o slide se adaptar à tela do celular deixando uma borda */
        max-width: 545px !important; 
    }

    swiper-slide img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }
}