/* ================ Google FONTES ================ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat+Alternates:wght@400;500;600&display=swap');

:root {
    --header-height: 3.5rem;

    /* ====== COLORS ====== */

    --first-hue: 207;
    --sat: 90%;
    --lig: 72%;
    --second-hue: 219; 

    --first-color: hsl(var(--first-hue), var(--sat), var(--lig));
    --title-color: hsl(var(--second-hue), 15%, 95%);
    --text-color: hsl(var(--second-hue), 8%, 75%);
    --text-color-light: hsl(var(--second-hue), 8%, 65%);
    --body-color: hsl(var(--second-hue), 48%, 8%);
    --container-color: hsl(var(--second-hue), 32%, 12%);

    /* ====== Font and typography ====== */
    --body-font: "Montserrat Alternates", sans-serif;
    --biggest-font-size: 1.75rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;

    /* ====== Font Weight ====== */
    --font-medium: 500;
    --font-semibold: 600;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: var(--body-font);
    background-color: var(--body-color);
    color: var(--text-color);
    transition: .4s;
}

h1, h3 {
    color: var(--title-color);
    font-weight: var(--font-semibold);
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ================ REUSABLE CSS CLASSES ================ */
.container {
    max-width: 968px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.grid {
    display: grid;
    gap: 1.25rem;
}

.main {
    overflow: hidden;
}

.section {
    padding: 4.5rem 0 1rem;
}

.section-title,
.section-subtitle {
    text-align: center;
}

.section-title {
    font-size: var(--biggest-font-size);
    color: var(--first-color);
    margin-bottom: 2rem;
}

.section-subtitle {
    display: block;
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

.work-container {
    width: 100%;
    padding-top: 1rem;
    justify-content: center;
    grid-template-columns: 1fr;
}

.work-card {
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    background-color: var(--container-color);
    padding: 1rem;
    border-radius: 1rem;
    transition: .3s;
}

.work-card:hover {
    transform: translateY(-.25rem);
}

.work-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: .75rem;
}

.work-title {
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    margin-bottom: .25rem;
}

.work-button {
    width: max-content;
    color: var(--first-color);
    font-size: var(--small-font-size);
    display: flex;
    align-items: center;
    column-gap: .25rem;
}

.work-button:hover .work-icon {
    transform: translateY(-.25rem);
}

.work-icon {
    font-size: 1rem;
    transition: .4s;
}

/* ================ TABLET ================ */
@media screen and (min-width: 576px) {
    .work-container {
        grid-template-columns: repeat(2, 295px);
        gap: 2rem;
    }

    .work-card {
        max-width: 295px;
    }
}

/* ================ DESKTOP ================ */
@media screen and (min-width: 992px) {
    .section {
        padding: 3.5rem 0 1rem;
    }

    .section-title {
        margin-bottom: 3.5rem;
    }

    .work-container {
        grid-template-columns: repeat(3, 295px);
        gap: 3rem;
    }

    .work-card {
        max-width: 295px;
        padding: 1.25rem;
    }

    .work-img {
        margin-bottom: 1rem;
    }

    .work-title {
        margin-bottom: .5rem;
    }
}

/* Ajuste geral dos cards */
.work-container {
    justify-content: center;
}

.work-card {
    overflow: hidden;
}

.work-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* Desktop: 3 colunas centralizadas */
@media screen and (min-width: 992px) {
    .container {
        max-width: 1100px;
    }

    .work-container {
        grid-template-columns: repeat(3, 295px);
        justify-content: center;
        gap: 3rem;
    }

    .work-card {
        width: 295px;
    }

    /* Centraliza o 4º card na segunda linha */
    .work-card:nth-child(4) {
        grid-column: 2;
    }

}
