@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

body {
    background: #1b1c1e;
}

h1,
button {
    font-family: "Fira Code", monospace;
}

main {
    display: flex;
    flex-direction: column;
    padding: 4rem 8rem;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

h1 {
    color: #0abab5;
    font-size: 2rem;
}

#difficulty-filter {
    background: transparent;
    color: #0abab5;
    border: 1px solid #0abab5;
    padding: 0.5rem;
    font-family: inherit;
    cursor: pointer;
}

#difficulty-filter option {
    background-color: #1b1c1e;
}


.challenge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding-top: 2rem;
}

.challenge-card {
    border: 2px solid #0abab5;
    max-width: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out;
}

.challenge-card:hover {
    transform: scale(1.1);
    /* transform: translateY(-5px); */
    /* Efeito de elevação ao passar o mouse */
}

.card-image-container {
    aspect-ratio: 16 / 9;
    /* Mantém a proporção da imagem */
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Faz a imagem preencher o espaço sem distorcer */
}

.card-content {
    padding: 1.25rem;
    flex-grow: 1;
    /* Faz o conteúdo preencher o espaço vertical */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.card-title {
    color: #0abab5;
    margin-top: 0;
    font-size: 1.25rem;
}

.card-tags {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.tech-tags {
    display: flex;
    gap: 0.5rem;
}

.tag {
    color: #fefdfb;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.tag.html {
    background-color: #e34c26;
}

.tag.css {
    background-color: #264de4;
}

.tag.js {
    background-color: #f0db4f;
}

.project-difficulty {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #1b1c1e;
    font-weight: 600;
    text-transform: uppercase;
}

.project-difficulty.newbie {
    background-color: #05B6D4;
}

.project-difficulty.junior {
    background-color: #33D399;
}

.project-difficulty.intermediate {
    background-color: #FBBF24;
}

.project-difficulty.advanced {
    background-color: #F97316;
}

.project-difficulty.guru {
    background-color: #E11D49;
}

.card-links {
    display: flex;
    /* justify-content: space-between; */
    gap: 1rem;
    margin-top: auto;
}

.card-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #0abab5;
    /* Links em Teala (Ref 1) */
    text-decoration: none;
    font-size: 0.9rem;
    transition: transform 0.2s ease-in-out;
}

.card-link:hover {
    font-weight: 600;
    font-style: italic;
}

/* .icon-link img {
    width: 1.1em;
    height: 1.1em;
    filter: invert(1);
} */

.challenge-card.hidden {
    display: none !important;
}

@media screen and (max-width:768px) {
    main {
        padding: 2rem 1rem;
    }
}