/*
 * ==========================================================================
 * PROJETOS - COMPONENTE REUTILIZÁVEL
 * ==========================================================================
 *
 * Componente:
 * includes/projetos.php
 *
 * Este arquivo é exclusivo do componente de projetos.
 * Não depende de projetos.css, home.css ou outros estilos de página.
 * ==========================================================================
 */


/* ==========================================================================
   01. SEÇÃO
   ========================================================================== */

.projetos-componente {
    width: 100%;
    padding: 80px 0 88px;
    background: var(--cor-fundo);
    color: var(--cor-primaria);
    box-sizing: border-box;
}


/* ==========================================================================
   02. CONTAINER
   ========================================================================== */

.projetos-componente__container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    box-sizing: border-box;
}


/* ==========================================================================
   03. CABEÇALHO
   ========================================================================== */

.projetos-componente__heading {
    max-width: 760px;
    margin: 0 0 44px;
}


.projetos-componente__label {
    display: block;

    margin-bottom: 10px;

    color: var(--cor-agua-escura);

    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    line-height: 1.4;
    text-transform: uppercase;
}


.projetos-componente__title {
    margin: 0 0 16px;

    color: var(--cor-primaria);

    font-size: clamp(
        2rem,
        3.5vw,
        2.65rem
    );

    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.025em;
}


.projetos-componente__description {
    max-width: 720px;
    margin: 0;

    color: var(--cor-agua-escura);

    font-size: 1rem;
    line-height: 1.7;
}


/* ==========================================================================
   04. GRID
   ========================================================================== */

.projetos-componente__grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 24px;

    width: 100%;
}


/* ==========================================================================
   05. CARD
   ========================================================================== */

.projetos-componente__card {
    display: flex;
    flex-direction: column;

    min-width: 0;
    overflow: hidden;

    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: var(--raio-medio);

    background: var(--cor-fundo-claro);

    box-shadow: var(--sombra-card);

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}


.projetos-componente__card:hover {
    transform: translateY(-6px);

    box-shadow:
        0 18px 40px rgba(0, 0, 0, .12);
}


/* ==========================================================================
   06. IMAGEM
   ========================================================================== */

.projetos-componente__image {
    position: relative;

    display: block;

    width: 100%;
    height: 250px;

    overflow: hidden;

    background: var(--cor-fundo-bege);

    color: inherit;
    text-decoration: none;
}


.projetos-componente__image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform .55s ease;
}


.projetos-componente__card:hover
.projetos-componente__image img {
    transform: scale(1.045);
}


/* ==========================================================================
   07. OVERLAY DA IMAGEM
   ========================================================================== */

.projetos-componente__overlay {
    position: absolute;
    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    background: rgba(25, 55, 41, .28);

    opacity: 0;

    pointer-events: none;

    transition:
        opacity .3s ease;
}


.projetos-componente__card:hover
.projetos-componente__overlay {
    opacity: 1;
}


.projetos-componente__overlay-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    border-radius: 50%;

    background: rgba(255, 255, 255, .95);

    color: var(--cor-agua-escura);

    font-size: .95rem;

    transform: translateY(8px);

    transition:
        transform .3s ease;
}


.projetos-componente__card:hover
.projetos-componente__overlay-icon {
    transform: translateY(0);
}


/* ==========================================================================
   08. PLACEHOLDER
   ========================================================================== */

.projetos-componente__placeholder {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    background:
        linear-gradient(
            135deg,
            var(--cor-fundo-claro),
            var(--cor-fundo-bege)
        );

    color: var(--cor-agua);

    font-size: 2rem;
}


/* ==========================================================================
   09. CONTEÚDO
   ========================================================================== */

.projetos-componente__content {
    display: flex;
    flex-direction: column;

    flex: 1;

    padding: 23px 24px 25px;
}


/* ==========================================================================
   10. CATEGORIA
   ========================================================================== */

.projetos-componente__category {
    display: inline-block;

    width: fit-content;

    margin-bottom: 11px;

    color: var(--cor-agua-escura);

    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.4;

    text-transform: uppercase;
}


/* ==========================================================================
   11. TÍTULO
   ========================================================================== */

.projetos-componente__card-title {
    margin: 0;

    color: var(--cor-primaria);

    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.015em;
}


/* ==========================================================================
   12. RESUMO
   ========================================================================== */

.projetos-componente__excerpt {
    display: -webkit-box;

    overflow: hidden;

    margin: 13px 0 22px;

    color: var(--cor-agua-escura);

    font-size: .94rem;
    line-height: 1.65;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
}


/* ==========================================================================
   13. LINK
   ========================================================================== */

.projetos-componente__link {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    width: fit-content;

    margin-top: auto;

    color: var(--cor-agua-escura);

    font-size: .9rem;
    font-weight: 800;

    line-height: 1;

    text-decoration: none;

    transition:
        color .25s ease,
        gap .25s ease;
}


.projetos-componente__link i {
    font-size: .78rem;

    transition:
        transform .25s ease;
}


.projetos-componente__link:hover {
    color: var(--cor-agua);
}


.projetos-componente__link:hover i {
    transform: translateX(4px);
}


/* ==========================================================================
   14. BOTÃO TODOS OS PROJETOS
   ========================================================================== */

.projetos-componente__action {
    display: flex;

    justify-content: center;

    margin-top: 38px;
}


.projetos-componente__button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 9px;

    min-height: 48px;

    padding: 0 24px;

    border: 1px solid rgba(49, 91, 69, .18);
    border-radius: 8px;

    background: var(--cor-agua);

    color: #ffffff;

    font-family: inherit;
    font-size: .86rem;
    font-weight: 800;

    line-height: 1;

    text-decoration: none;

    box-shadow:
        0 7px 20px rgba(0, 0, 0, .07);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        background .25s ease;
}


.projetos-componente__button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 11px 26px rgba(0, 0, 0, .11);

    background: var(--cor-agua-escura);
}


.projetos-componente__button i {
    font-size: .78rem;
}


/* ==========================================================================
   15. ESTADO VAZIO
   ========================================================================== */

.projetos-componente__empty {
    max-width: 680px;

    margin: 20px auto 0;

    padding: 55px 30px;

    text-align: center;

    border-radius: var(--raio-medio);

    background: var(--cor-fundo-claro);

    box-shadow: var(--sombra-card);
}


.projetos-componente__empty p {
    margin: 0;

    color: var(--cor-agua-escura);

    font-size: 1rem;
    line-height: 1.7;
}


/* ==========================================================================
   16. RESPONSIVO - TABLET
   ========================================================================== */

@media (max-width: 1000px) {

    .projetos-componente__grid {
        gap: 20px;
    }


    .projetos-componente__image {
        height: 220px;
    }

}


/* ==========================================================================
   17. RESPONSIVO - TABLET MENOR
   ========================================================================== */

@media (max-width: 850px) {

    .projetos-componente {
        padding: 68px 0 76px;
    }


    .projetos-componente__container {
        width: min(
            100% - 32px,
            760px
        );
    }


    .projetos-componente__grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* ==========================================================================
   18. RESPONSIVO - CELULAR
   ========================================================================== */

@media (max-width: 650px) {

    .projetos-componente {
        padding: 56px 0 66px;
    }


    .projetos-componente__heading {
        margin-bottom: 32px;
    }


    .projetos-componente__title {
        font-size: 2rem;
    }


    .projetos-componente__description {
        font-size: .96rem;
    }


    .projetos-componente__grid {
        grid-template-columns: 1fr;

        gap: 22px;
    }


    .projetos-componente__image {
        height: 230px;
    }


    .projetos-componente__card-title {
        font-size: 1.25rem;
    }

}


/* ==========================================================================
   19. RESPONSIVO - CELULAR PEQUENO
   ========================================================================== */

@media (max-width: 480px) {

    .projetos-componente {
        padding: 48px 0 58px;
    }


    .projetos-componente__container {
        width: calc(100% - 24px);
    }


    .projetos-componente__title {
        font-size: 1.8rem;
    }


    .projetos-componente__description {
        font-size: .94rem;
    }


    .projetos-componente__image {
        height: 210px;
    }


    .projetos-componente__content {
        padding: 19px 19px 21px;
    }


    .projetos-componente__card-title {
        font-size: 1.2rem;
    }


    .projetos-componente__excerpt {
        font-size: .93rem;
    }


    .projetos-componente__action {
        margin-top: 30px;
    }


    .projetos-componente__button {
        width: 100%;
    }


    .projetos-componente__empty {
        padding: 45px 20px;
    }

}


/* ==========================================================================
   20. ACESSIBILIDADE
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .projetos-componente__card,
    .projetos-componente__image img,
    .projetos-componente__overlay,
    .projetos-componente__overlay-icon,
    .projetos-componente__link,
    .projetos-componente__link i,
    .projetos-componente__button {
        transition: none;
    }

}