/* ====== Espaço vazio no início da página ====== */
main div.void {
    background-color: var(--background-color);
    width: 100%;
    height: 6.5rem;
}

/* ====== Bloqueia scroll quando modal aberto ====== */
body.modal-open {
    overflow: hidden;
}

/* ====== Main como container flexível ====== */
main {
    flex: 1;
}

/* ====== Navbar: espaçamento entre itens ====== */
.nav-list {
    gap: 3rem;
}

/* ====== Título da página ====== */
main div.title {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #fff;
    width: 100%;
    height: 30rem;
    padding:  9rem;
}

.title div {
    overflow: hidden;
    box-sizing: border-box;
    white-space: nowrap;
    width: 100%;
}

/* ====== Subtítulo ====== */
.subtitle {
    overflow: hidden;
    line-height: 1.75rem;
    font-size: 1.5rem;
    color: var(--tertiary-color);
}



/* ====== Wrapper dos cards ====== */
.card-wrapper {
    padding: 2.5rem 5rem 5rem 5rem;
}

/* ====== Lista de cards ====== */
.card-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.40rem;
}

/* ====== Card individual ====== */
.card-item {
    position: relative;
    list-style: none;
    width: auto;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.card-item.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* ====== Link do card ====== */
.card-link {
    user-select: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--tertiary-color);
    border-radius: 15px;
    text-decoration: none;
    border: 1px solid #005548;
    box-shadow: 0 10px 10px rgb(0 0 0 / 5%);
    transition: 0.2s ease;
}

.card-link:hover {
    border-color: #35dfc5;
    transform: scale(1.02);
    cursor: pointer;
}

/* ====== Conteúdo do card ====== */
.card-content {
    text-align: start;
    
    padding: 5.70px;
}

.description {
    color: var(--primary-color);
    line-height: 20px;
}


/* ====== Imagem do card ====== */
.card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
    
    margin: 0;
}

/* ====== Badges ====== */
.badges {
    display: flex;
    justify-content: flex-start;
    gap: 0.75rem;
}

.badge {
    color: var(--background-color);
    padding: 0.25rem 0.75rem;
    margin: 1rem 0 1.1rem;
    margin-left: -3px;
    background: var(--tertiary-color);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    width: fit-content;
    border-radius: 15px;
    transition: 0.2s ease;
}

/* ====== Título do card ====== */
.card-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* ====== Popover/modal ====== */
.popover {
    user-select: none;
    position: fixed;
    place-self: center;
    height: 80%;
    width: 70rem;
    background: var(--background-color);
    border-radius: 1rem;
    outline: none;
    border: 2px solid #fff0;
    box-shadow: 0 10px 10px #00443a;
}

.popover .content {
    display: flex;
    width: 100%;
    height: 100%;
}

.content .info {
    width: 80%;
    padding: 3rem;
}

.info .heading {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.heading .title {
    color: var(--primary-color);
    font-size: 3rem;
    font-weight: 700;
}

.heading .subtitle {
    color: var(--quaternary-color);
    line-height: 30px;
}

.info .divider {
    margin: 2rem 0;
}

.info .data {
    display: flex;
    flex-direction: column;
}

.info .data p {
    color: var(--primary-color);
    font-size: 1rem;
    line-height: 1.75rem;
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--highlight-color);
}

/* ====== Botões do popover ====== */
.buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.buttons a {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--tertiary-color);
    color: var(--primary-color);
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: 7.5px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: 0.2s ease;
}

.buttons a:hover {
    transform: scale(1.035);
}

/* ====== Tecnologias dentro do popover ====== */
.data .technologies {
    display: flex;
    gap: 1rem;
}

.technologies img {
    aspect-ratio: 1 / 1;
    height: 40px;
}

/* ====== Botão de fechar ====== */
.popover .icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(255, 0, 0, 0);
    border: none;
    cursor: pointer;
}

/* ====== Imagem lateral do popover ====== */
.popover .img {
    height: 100%;
    width: 40%;
    background-color: #252a2e;
    background-repeat: no-repeat;
    background-size: cover;
    place-self: end;
}

/* ====== Imagens específicas dentro do card ====== */
#img1 { background-image: url(../../assets/img/FundoB.jpeg); background-position: 45%; }
#img2 { background-image: url(../../assets/img/FundoB.jpeg); background-position: 45%; }
#img3 { background-image: url(../../assets/img/FundoB.jpeg); background-position: 45%; }
#img4 { background-image: url(../../assets/img/FundoB.jpeg); background-position: 45%; }

/* ====== Fundo do modal ====== */
.popover::backdrop {
    background-color: rgba(0, 24, 24, 0.6);
    backdrop-filter: blur(10px);
}

/* ====== Responsividade ====== */
@media (max-width: 1330px) {
    .card-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1150px) and (orientation: portrait) {
    main div.title { padding: 0 5rem; }
    .popover .content { flex-direction: column; }
    .content .info { width: 100%; }
    .popover .img { height: 100%; width: 100%; background-repeat: no-repeat; background-size: cover; }
    #img1 { background-image: url(../../assets/img/FundoB.jpeg); }
    #img2 { background-image: url(../../assets/img/FundoB.jpeg); }
    #img3 { background-image: url(../../assets/img/FundoB.jpeg); }
    #img4 { background-image: url(../../assets/img/FundoB.jpeg); }
}

@media (max-width: 1020px) {

    .card-list { 
        
        grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {

    .nav-list { gap: 1rem; }

    .subtitle { white-space: normal; }
}

@media (max-width: 680px) {

    main div.title { padding: 0 2rem; }

    .subtitle { font-size: 1.2rem; }

    .display { font-size: 3.5rem; }

    main .filter { justify-content: center; }

    .card-list { grid-template-columns: repeat(1, 1fr); }

    .card-wrapper { padding: 2.5rem 2.5rem 5rem 2.5rem; }

}

@media (max-width: 360px) {
    
    .card-wrapper { padding: 2.5rem 1rem 1rem 1rem; }
}
