/* RESET GERAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: white;
    font-family: 'Quicksand', sans-serif;  
    font-weight: 300;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.modal-open {
    overflow: hidden; /* evita rolagem quando o modal está aberto */
}

/* ### TIPOGRAFIA ### */

h1 {
    font-family: "Bangers", sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    font-size: 2.7em;
    color: #002e85;
}

h2 {
    font-family: "Red Hat Display", sans-serif;
    font-weight: 400;
    font-size: 1.5em;
    margin-bottom: 20px;
}

h3 {
    font-family: "Red Hat Display", sans-serif;
    font-weight: 700;
    font-size: 1.2em;
}

h4{
    font-family: "Quicksand", sans-serif;
    font-weight: 300;
    font-size: 1em;
}

p {
    font-family: "Quicksand", sans-serif;
    font-weight: 100;
}

.legenda{
    font-style: italic;
    color: rgb(60, 60, 60);
    font-size: 0.75em;
    text-align: left;
    text-wrap: wrap;
}

a {
    color: orange;
    text-decoration: none;
}

a:hover {
    color: orangered
}

.mensagem-erro{
    color: red;
    font-weight: bold;
    font-size: 0.9em;
}

.fa-brands, .fa-regular, .fa-solid{
    margin-right: 5px;
}

/* ### MENU RESPONSIVO ### */
.navbar {
    width: 100%;
    background-color: #1b5689;
    height: 75px;
    top: 0;
    z-index: 9998;
    align-items: center;

    
    
    /*padding: 15px;*/
    position: relative;
    
    
}

.navbar > div {
    width: 1270px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 1px;
}

.navbar img {
    height: 70px;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 2em;
    color: white;
    margin: 0 0 8px 15px;
}


.nav-links {
    list-style: none;
    display: flex;
    justify-content: space-around;
}

.nav-links li {
    position: relative;
    margin: 15px;
    text-transform: uppercase;
    font-weight: 700;
    
    a {
        color: white;
        text-decoration: none;
    }

    a:hover {
        color: orangered;
    }
}

.nav-links .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1b5689;
    padding: 20px;
    list-style: none;    
    width: 220px;
    z-index:100;
    font-size: 0.8em;

    a{
        font-weight: 400;
        text-transform: none;
    }

    a:hover{
        color: orangered;
    }

}

/* Garante que o submenu está escondido por padrão */
.has-submenu .submenu {
    display: none;
}

/* Quando o submenu estiver ativo, ele será exibido */
.has-submenu.active .submenu {
    display: block;
}

/* No desktop, o submenu aparece ao passar o mouse */
@media screen and (min-width: 769px) {
    .nav-links li:hover .submenu {
        display: block;
    }
}

/* === ESTILO RESPONSIVO (MOBILE) === */

@media screen and (max-width: 768px) {

    .navbar{
        height: 50px;
    }
    
    .navbar > div {
        width: 90vw;
    }

    .navbar img{
        height: 40px;
        margin-left: 15px;
    }
    
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #1b5689;
        text-align: center;
        padding: 10px 0;
    }

    /* Quando o menu é ativado, ele aparece */
    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .nav-links .submenu {
        display: none;
        position: static;
        background: none;
        font-size: 0.8em;
        text-transform: lowercase;
        background-color: #116cbc;
        width: 100%;
        margin: 10px 0;
    }

    .nav-links .has-submenu.active .submenu {
        display: block;
    }

    .nav-links li:hover .submenu {
        display: block;
    }
}

/* Mantém o comportamento de hover apenas no desktop */
@media screen and (min-width: 769px) {
    .nav-links li:hover .submenu {
        display: block;
    }
}

/* No mobile, o submenu é ativado ao clicar */
@media screen and (max-width: 768px) {
    .nav-links .submenu {
        display: none;
        position: static;
        background: none;
        background-color: #597690;

        li{
            padding:5px;
        }
    }

    .nav-links .has-submenu.active .submenu {
        display: block;
    }
}
    

/* ### FOOTER ### */
footer {
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #1b5689;
    color: white;
    font-size: 0.95em;
    font-weight: 700;
    height: 50px;
    position: relative;
}

footer ul {
    list-style: none;
    display: flex;
    justify-content: space-around;
}

footer ul li {
    position: relative;
    text-decoration: none;
    color: white;
    margin: 0 15px;
    text-transform: uppercase;
}
        
footer ul li a {
    display: block;
    transition: color 0.3s;
    text-decoration: none;
    color: white;
    text-transform: lowercase;
}

/* Estilo para telas menores */
@media screen and (max-width: 768px) {
    footer {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        align-items: center;
        font-size: 0.7em;
        font-weight: 400;
        height: 80px;
        text-align: center;
    }

    footer ul{
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
    }

    footer ul li {
        margin: 0 15px;
    }
            
    footer ul li a {
        margin-bottom:5px;
    }
    
    .fa-brands{
        margin-right: 5px;
    }

}

/* ### SEÇÃO PADRÃO: BANNER ### */
.banner {
    width: 100%;
    display: flex;  
    align-items: center;
    margin-bottom: 50px;
    position: relative;
    padding: 0;
    z-index: 50;
}

.bdir{
    justify-content: flex-end;
}

.besq{
    justify-content: flex-start;
}

.balto{
    height: 700px;

    img{
        height: 500px;
    }
}

.bbaixo{
    margin-top: 75px;
}
.bbaixo::before{
    content: " ";
    background-image: url(/imagens/banner_barra.png);
    width: 100%;
    position: absolute;
    top: -5px;
    height: 56px;
}

.balto::after, .bbaixo::after{
    content: " ";
    background-image: url(/imagens/banner_barra.png);
    width: 100%;
    position: absolute;
    bottom: 0;
    height: 75px;
    -moz-transform: rotate(180deg);
    -o-transform: rotate(180deg);
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
    background-repeat: no-repeat;
}

.bbaixo img{
    height: 250px;
    margin: 60px 150px;
}

#bgamarelo{
    background-image: linear-gradient(to right, #f83600 0%, #f9d423 100%);
}

#bgvermelho{
    background-image: radial-gradient( circle farthest-corner at 7.2% 19%,  rgba(120,0,0,1) 0%, rgba(239,75,75,1) 100.2% );
}

#bgverde{
    background-image: linear-gradient( 109.6deg,  rgba(34,126,34,1) 11.2%, rgba(99,162,17,1) 91.1% );
}

#bgazul{
    background-image: linear-gradient( 89.5deg,  rgba(131,204,255,1) 0.4%, rgba(66,144,251,1) 100.3% );
}

#bgroxo{
    background-image: radial-gradient( circle farthest-corner at 3.2% 49.6%,  rgba(80,12,139,0.87) 0%, rgba(161,10,144,0.72) 83.6% );
}

#bglaranja{
    background-image: radial-gradient( circle 1008px at -0.5% 50.2%,  rgba(255,85,0,1) 0%, rgba(255,246,73,1) 50.4%, rgba(0,233,50,1) 100.2% );
}


#banner-titulos {
    width: 50%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    margin-left: auto;
    text-align: left;

    h1 {
        font-size: 4.5em;
    }
    h2 {
        color: white;
    }

}


@media screen and (max-width: 768px) {
    
    .banner{
        min-height: 82vh;
        max-height: unset;
        flex-direction: column;
        align-items: center;
        position: relative;
        margin-bottom: 30px;
    }

    .balto img{
        height: 450px;
        object-fit: cover;
        object-position: -50% 0px;
        width: 100vw;
    }

    #banner-titulos {
        width: 94vw;
        position: absolute;
        margin-left: 0;
        margin: 0 10px;
        border-radius: 5px;
        top: 10%;
        left: 0;
        text-align: center;
        padding: 20px;

        h1 {
            font-size: 2.9em;
            text-wrap: wrap;
        }
        h2 {
            color: white;
            font-size: 1.4em;
        }
    }

}

/* ### SEÇÃO PADRÃO: CONTEÚDO ### */
.conteudo {
    text-align: center;
    margin: 30px auto 0 auto;
    width: 1280px;
    border-radius: 50px;
    background-color: white;
    flex-grow: 1;
}

@media screen and (max-width: 768px) {
    .conteudo{
        margin: 20px auto;
        width: 92%;

    }
}

/* BARRA SEPARADORA */
hr {
    border: 0;
    height: 1px;
    margin: 25px auto 45px;
    width: 80%;
    background-image: linear-gradient(to right, transparent, #011b48, transparent);
}

@media screen and (max-width: 768px){
    hr{
        margin: 15px auto;
    }
}

/* GRID DE PROVAS - INDEX */

.grid-provas{
    margin: 20px auto;
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, 250px);
    text-align: center;
    justify-content: center;
    gap: 20px;
}

.grid-provas__item{
    cursor: pointer;
    border-radius: 15px;
    box-shadow: 0px 2px 70px 0px rgba(110,130,208,0.18);
    color: white;
    padding: 0;
    min-height: 120px;
    border: 0;
    align-content: center;

    h3, h4{
        color:#002e85;
        
    }
}

#header_materia{
    width: 100%;
    border-radius: 15px 15px 0 0;
    object-fit: cover;
}

@media screen and (max-width: 768px){

    .grid-provas{
        grid-template-columns: repeat(2, 50%);
        gap: 10px;
        align-items: stretch;
    }
    
    .grid-provas__item{
        height: auto;
        margin: 0;
       
    }

    h3, h4{
        font-size: 0.9em;
    }
}

.cor-1 {
    background: linear-gradient(45deg, rgba(0,0,255,1) 0%, rgba(0,200,255,1) 100%);
}
.cor-2 {
    background: linear-gradient(45deg, rgba(20,140,90,1) 0%, rgba(40,220,40,1) 100%);
}
.cor-3{
    background: linear-gradient(45deg, rgba(255,0,0,1) 0%, rgba(255,0,120,1) 100%);
}
.cor-4{
    background: linear-gradient(45deg, rgba(253, 253, 9, 0.918) 0%, rgb(208, 163, 3) 100%);
}
.cor-5{
    background: linear-gradient(45deg, rgba(255,0,255,1) 0%, rgba(180,0,255,1) 100%);
}
.cor-0{
    background: linear-gradient(45deg, rgba(255,102,0,1) 0%, rgba(255,175,0,1) 100%);
}

/* ### PARCEIROS ### */

.parceiros{
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px auto 0 auto;
    padding: 15px 5%;
    width: 100%;
    gap: 50px;
}

.parceiros h2{
    font-size: 1.2em;
    font-weight: bold;
    margin: 15px;
    color: #c5daff;
    border: 1px solid #c5daff;
    padding: 10px; 
}

.logos-parceiros{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.parceiros img{
    max-height: 75px;
}

@media screen and (max-width: 768px){
    
    .parceiros{
        flex-direction: column;
        gap: 8px;
        padding: 8px;
        margin-top: 25px;
    }

    .logos-parceiros{
        display: flex;
        flex-direction: row;
        justify-content: space-evenly;
        width: 100%;
    }

    .parceiros h2{
        font-size: 1em;
        margin: 8px;
        padding: 5px 10px;
    }

    .parceiros img{
        max-height: 35px;
    }
}

/* TABELAS */

table{
    width: 100%;
    margin: 20px 0;
    font-size: 0.9em;
    border-radius: 5px;
    padding: 10px;
    border-spacing: 0 15px;
}

thead th{
    border-bottom: 1px solid rgb(83, 83, 83);
    color: orangered;
    padding: 6px;
}

th a {
    color: orangered;
    text-decoration: none;
}

th a:hover{
    color: rgb(123, 33, 0);
    text-decoration: none;
}

tbody tr{
    box-shadow: 0px 0px 2px rgb(170, 170, 170);
    transition: background-color 0.3s ease;
}

tbody tr:hover {
    background-color: rgb(170, 170, 170);
    cursor: pointer;
}

td{
    padding: 6px;
}

td:nth-of-type(2){
    text-align: left;
}

#excluir{
    margin: 0;
}

.icone-lixeira {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: red;
}

.icone-lixeira:hover {
    color: darkred;
}


@media screen and (max-width: 768px) {
    tbody td{
        display:block;
        text-align: left;
    }

    tbody tr td:nth-of-type(2){
        font-weight: bold;
        color: orange;
    }

    tbody tr td:not(:nth-of-type(2)){
        font-size: 0.8em;
    }

    thead {
        display: none;
    }

    tbody tr td:first-of-type {
        display: none;
    }
}


/* FILTROS */

    .mobile-filter {
        display: inline-block;
    }

    .filter-modal, .sort-modal{
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        justify-content: center;
        align-items: center;
        z-index: 9999;
    }
    .filter-content, .sort-content {
        background: white;
        padding: 20px;
        border-radius: 8px;
        width: 80%;
        max-width: 400px;
        text-align: left;
        position: relative;

        select{
            margin: 10px;
        }
    }

    button.mobile-filter, .filter-modal button,
    button.mobile-sort, .sort-modal button{
        border: 1px solid orangered;
        color: orangered;
        padding: 5px;
        margin-left: 5px;
    }

    .icone-fechar{
        position: absolute;
        display: block;
        top: 0;
        right: 0;
        margin: 10px;
    }


/* PÁGINA PROVA */

.prova{
    margin: 50px;
    padding: 50px;
    text-align: left;
    border: 1px solid #bfbfbf;
    box-shadow: 5px 5px 5px #aaaaaa;
    background-color: white;
    display: flex;
    flex-direction: column;
}

.questoes{
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 15px 0;
}

.questoes__item{
    border: dotted 1px grey;
    padding: 10px;
    text-align: left;
}

.alternativa-oculta {
    display: none;
}

.toggle-respostas {
    float: right;
    font-size: 1.2rem;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    color: #007bff;
}

.alternativas-ocultas {
    display: none !important; /* Força esconder mesmo se inline */
    margin-top: 15px;
    padding: 10px;
    border-left: 4px solid #ccc;
    background-color: #f9f9f9;
}

.pergunta{
    font-weight: bold !important;
    font-style: normal;
    margin: 10px;
}

.questao{
    font-weight: bold !important;
    font-style: normal;
}

.questoes__item label{
    margin-left: auto;
}

.respostas{
    display: flex;
    gap: 10px;
    flex-direction: column;
    margin-left: 15px;

    label{
        margin:0
    }
}

.correta {
    color: green;
    font-weight: bold;
}
.errada {
    color: red;
    text-decoration: line-through;
}

[data-contexto="desativado"]{ /* classe resultado oculta */
    display: none;
}
[data-contexto="ativado"]{ /* classe resultado aparente */
    border: 1px dashed #bfbfbf;
    border-radius: 5px;
    padding: 20px;
    margin: 50px 30px 0 30px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    background-color: #dadada;
}

.resultado__esquerda{
    font-weight: bold;
    color: #1b5689;
    line-height: 1.5em;
    width: 40%;
    font-size: 1.3em;
    align-items: center;
    margin: auto 0;
}

.resultado__direita{
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    width: 60%;

    p{
        font-size: 2em;
        color: darkgreen;
        font-weight: bold;
        margin: 15px;
    }
}

.nota_destaque{
    font-size: 5em;
    font-weight: 900;
    color: rgb(6, 72, 6);

}

.admins, .padrao, .admins form{
    display: flex;
    flex-direction: column;
    margin: 20px auto;
    gap: 20px;

    h1{
        margin-bottom: 20px;
    }
}

#prova{
    padding: 3%;
    border: 1px solid #597690;
    box-shadow: 2px 2px 2px #aaaaaa;
}

/* ### RESULTADO PROVA ### */
/* Fundo escurecido */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 999;
}

/* Modal */
.modal-resultado {
    position: fixed;
    bottom: 50%;
    right: 50%;
    transform: translate(130%, 15%);
    background: white;
    border-radius: 10px;
    padding: 30px;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    max-width: 90%;
    width: 400px;
    text-align: center;
    font-family: 'Red Hat Display', sans-serif;
}

/* Botão de fechar */
.fechar-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

/* Resultado estilizado */
.modal-resultado .nota_destaque {
    font-size: 2em;
    font-weight: bold;
    color: green;
}

.modal-resultado .botao-verde {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #3cba54;
    color: white;
    transition: background-color 0.3s ease;
}

.modal-resultado .botao-verde:hover {
    background-color: #2a9a3d;
}
@media screen and (max-width: 768px){
    .modal-resultado {
        transform: translate(50%, 135%);
    }
}

@media screen and (max-width: 768px){
    .admins, .padrao{

        h1{
            font-size: 1.8em;
        }

        h2{
            font-size: 1.2em;
        }
    }

    .pergunta, .respostas{
        font-size: 0.9em;
    }
    
    .questoes h1{
        font-size: 2em;
    }
}

.admins{
    width: 60%;
}

.padrao{
    width: 100%;
}

.admins__item{
    border: 1px dotted gray;
    padding: 15px;
    border-radius: 5px;
}

.grid-2{
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 20px;
    margin: 20px 0;
}

.grid-3{
    display: grid;
    grid-template-columns: 1.5fr 2.5fr 1fr;
    gap: 20px;
    margin: 20px 0;
}




.grid-3 > div{
        grid-column: 3;
        grid-row: 1 / span 9;
        align-content: end;
    }

.grid-4{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
    margin: 20px auto;
}

.grid__item{
    border: 1px dotted gray;
    padding: 15px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

label{
    margin-left: auto;
}

input[type='text'], input[type='password'], input[type='email']{
    width: 100%;
    margin-right: auto;
}

.grid__item:first-of-type{
    grid-column: 1 / span 3;
    width: 100%;
    display: flex;
    flex-direction: column;

    label{
        margin-right: 20px;
    }

    p{
        font-size: 0.7em;
    }
}

.grid__form{
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    
    label{
        text-wrap: nowrap;
        text-align: left;
    }
}

.grid-4 > .botoes{
    grid-column: 1 / span 4;
    width: 100%;
}

.questoes > .botoes{
    display: flex;
}

.grid__item:not(:first-of-type){
    label, input{
        margin:0;
    }
}

@media screen and (max-width: 768px) {
    
    .grid-3{
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin: 10px 0;
    }

    .questoes__item label{
        margin-left: unset
    }

    .questoes textarea{
        font-family: 'Quicksand', sans-serif;
        font-size: 0.9em;
    }

    .grid-4{
        display: flex;
        flex-direction: column;
        gap: 10px
    }

    .grid__item{
        font-size: 0.9em;
        padding: 8px;
        font-weight: bold;
        color: orange;
    }

    label.custom-radio{
        font-weight: 300 !important;
        color: black;
    }

    .grid__item:first-of-type{
        display: flex;
        flex-direction: column;
        justify-content: flex-start;

        label{
            margin-left: unset;
        }
    }
    
}


/* SOBRE */

.sobre{
    text-align: left;
    font-size: 1.1em;
}

.sobre > p{
    line-height: 1.5em;
    margin: 10px 0;
}

.sobre > ul li{
    list-style: none;
    margin: 40px;
}

.sobre span{
    font-weight: 700;
    text-transform: capitalize;
}

/* RADIO BUTTON PERSONALIZADO */

input[type='radio']:hover, label {
    cursor: pointer;

}

.custom-radio input{   /* Esconder o input padrão */
    display: none;
}

.radio-button {   /* Criar o círculo do rádio */
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid black;
    border-radius: 20%;
    position: relative;
    vertical-align: middle;
    margin-right: 8px;
    cursor: pointer;
}

.custom-radio input:not(:checked) + .radio-button {   /* Estilizar quando não estiver selecionado */
    background-color: #9bd0ff;
}

.custom-radio input:checked + .radio-button {   /* Criar o efeito de "ponto" quando estiver selecionado */
    background-color: #007bff;
    border-color: #007bff;
}

.custom-radio input:checked + .radio-button::after {   /* Criar um ponto interno para indicar que foi selecionado */
    content: "";
    width: 10px;
    height: 10px;
    background: #04213f;
    border-radius: 20%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


/* BOTÕES */



.direita{
    text-align: right;
    justify-content: flex-end;
    flex-direction: row;
}

.esquerda{
    margin-right:  auto;
}

.centro{
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.botao-verde{
    text-align: center;
    padding: 12px 17px;
    border-radius: 5px;
    border: 0;
    font-weight: bold;
    text-decoration: none;
    background-color: green;
    margin-top: 20px;
    margin-bottom: 20px;
    color: white;
    font-size: 0.9em;
    font-family: Quicksand, sans-serif;
    cursor: pointer;
    width: 200px;
    transition: background-color 0.3s, color 0.3s;
    max-height: 70px;
}

.botao-verde:hover {
    background-color: lightgreen;
    color: rgb(4, 60, 4);
}

.botoes:has(.botao-voltar){
    margin-bottom: 40px;
}

.botao-voltar{
    text-align: center;
    padding: 10px 15px;
    border-radius: 5px;
    border: 0;
    font-weight: bold;
    text-decoration: none;
    background-color: rgb(135, 135, 135);
    margin-top: 15px;
    margin-bottom: 40px;
    color: rgb(87, 87, 87);
    font-size: 0.8em;
    font-family: Quicksand, sans-serif;
    cursor: pointer;
    width: 150px;
    transition: background-color 0.3s, color 0.3s;
    max-height: 50px;
}

.botao-voltar:hover {
    background-color: rgb(174, 174, 174);
    color: rgb(148, 148, 148);
}



/* ### SENHA OCULTA / VISIVEL ### */

.campo-senha {
    position: relative;
    display: flex;
    align-items: center;
}

.campo-senha input[type="password"],
.campo-senha input[type="text"] {
    width: 100%;
    padding-right: 40px;
}

.toggle-senha {
    position: absolute;
    right: 10px;
    cursor: pointer;
    font-size: 18px;
    color: #555;
    user-select: none;
}

.toggle-senha:hover {
    color: #000;
}