/* ==========================================================================
   PORTAL AARCA
   PROJECTS.CSS
   Versão 1.0 — Mobile First
   ========================================================================== */


/* ==========================================================================
   1. VARIÁVEIS LOCAIS
   ========================================================================== */

.projects-archive {
    --projects-green-dark: #17351d;
    --projects-green: #2e7d32;
    --projects-green-hover: #256628;
    --projects-green-light: #e8f5e9;
    --projects-text: #4f5f54;
    --projects-text-soft: #6f7d73;
    --projects-border: rgba(23, 53, 29, 0.09);
    --projects-bg: #f7faf7;
    --projects-shadow:
        0 14px 36px rgba(24, 53, 30, 0.08);
    --projects-shadow-hover:
        0 24px 52px rgba(24, 53, 30, 0.14);
}


/* ==========================================================================
   2. ESTRUTURA GERAL
   ========================================================================== */

.projects-archive {
    width: 100%;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f8fbf8 100%
        );
}

.projects-archive .container {
    width: min(92%, 1200px);
    margin: 0 auto;
}


/* ==========================================================================
   3. HERO DOS PROJETOS
   ========================================================================== */

.projects-hero {
    position: relative;
    overflow: hidden;
    padding: 42px 0 30px;
    text-align: center;
    background:
        radial-gradient(
            circle at 15% 10%,
            rgba(76, 175, 80, 0.11),
            transparent 38%
        ),
        radial-gradient(
            circle at 88% 0%,
            rgba(255, 193, 7, 0.10),
            transparent 32%
        ),
        #ffffff;
}

.projects-hero::before {
    content: "";
    position: absolute;
    top: -70px;
    right: -70px;
    width: 170px;
    height: 170px;
    border: 28px solid rgba(46, 125, 50, 0.045);
    border-radius: 50%;
    pointer-events: none;
}

.projects-hero::after {
    content: "";
    position: absolute;
    bottom: -85px;
    left: -85px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: rgba(46, 125, 50, 0.035);
    pointer-events: none;
}

.projects-hero .container {
    position: relative;
    z-index: 2;
}

.projects-hero .section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(46, 125, 50, 0.12);
    border-radius: 999px;
    background: var(--projects-green-light);
    color: var(--projects-green);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.projects-hero h1 {
    max-width: 850px;
    margin: 0 auto 14px;
    color: var(--projects-green-dark);
    font-size: clamp(34px, 10vw, 48px);
    line-height: 1.06;
    letter-spacing: -0.035em;
}

.projects-hero p {
    max-width: 780px;
    margin: 0 auto;
    color: var(--projects-text);
    font-size: 16px;
    line-height: 1.72;
}


/* ==========================================================================
   4. ÁREA DA LISTAGEM
   ========================================================================== */

.projects-page {
    padding: 20px 0 68px;
}

.projects-list-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 28px;
}

.projects-list-heading {
    min-width: 0;
}

.projects-list-label {
    display: block;
    margin-bottom: 7px;
    color: var(--projects-green);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.projects-list-heading h2 {
    margin: 0;
    color: var(--projects-green-dark);
    font-size: clamp(28px, 8vw, 38px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.projects-count {
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--projects-border);
    border-radius: 13px;
    background: #ffffff;
    color: var(--projects-text-soft);
    font-size: 14px;
    line-height: 1.4;
    box-shadow:
        0 8px 22px rgba(23, 53, 29, 0.05);
}

.projects-count strong {
    color: var(--projects-green);
    font-size: 17px;
    font-weight: 850;
}


/* ==========================================================================
   5. GRID DE PROJETOS
   ========================================================================== */

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}


/* ==========================================================================
   6. CARD DO PROJETO
   ========================================================================== */

.project-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--projects-border);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--projects-shadow);
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.project-card:hover,
.project-card:focus-within {
    transform: translateY(-5px);
    border-color: rgba(46, 125, 50, 0.18);
    box-shadow: var(--projects-shadow-hover);
}

.project-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.project-card-link:focus-visible {
    outline: 3px solid rgba(46, 125, 50, 0.32);
    outline-offset: -3px;
}


/* ==========================================================================
   7. IMAGEM DO PROJETO
   ========================================================================== */

.project-image {
    position: relative;
    width: 100%;
    height: 245px;
    overflow: hidden;
    background:
        linear-gradient(
            135deg,
            #edf5ee,
            #f8faf8
        );
}

.project-image::after {
    content: "";
    position: absolute;
    inset: 45% 0 0;
    z-index: 1;
    background:
        linear-gradient(
            180deg,
            transparent,
            rgba(10, 30, 15, 0.32)
        );
    pointer-events: none;
}

.project-card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.55s ease;
}

.project-card:hover .project-card-image,
.project-card:focus-within .project-card-image {
    transform: scale(1.055);
}

.project-card-placeholder {
    object-position: center;
}

.project-image-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 13px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(23, 53, 29, 0.80);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}


/* ==========================================================================
   8. CONTEÚDO DO CARD
   ========================================================================== */

.project-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px;
}

.project-content-main {
    flex: 1;
}

.project-eyebrow {
    display: block;
    margin-bottom: 9px;
    color: var(--projects-green);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.4;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.project-title {
    margin: 0 0 12px;
    color: var(--projects-green-dark);
    font-size: 23px;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.project-excerpt {
    margin: 0 0 22px;
    color: var(--projects-text);
    font-size: 15px;
    line-height: 1.68;
}

.project-action {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    margin-top: auto;
    border: 1px solid rgba(46, 125, 50, 0.14);
    border-radius: 13px;
    background: #f6faf6;
    color: var(--projects-green);
    font-size: 15px;
    font-weight: 800;
    transition:
        gap 0.3s ease,
        background 0.3s ease,
        color 0.3s ease;
}

.project-action-arrow {
    font-size: 19px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.project-card:hover .project-action,
.project-card:focus-within .project-action {
    background: var(--projects-green);
    color: #ffffff;
}

.project-card:hover .project-action-arrow,
.project-card:focus-within .project-action-arrow {
    transform: translateX(4px);
}


/* ==========================================================================
   9. PAGINAÇÃO
   ========================================================================== */

.projects-pagination {
    margin-top: 46px;
}

.projects-pagination .page-numbers {
    margin: 0;
    padding: 0;
    list-style: none;
}

.projects-pagination ul.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.projects-pagination li {
    margin: 0;
}

.projects-pagination a,
.projects-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 9px 13px;
    border: 1px solid #dce5dd;
    border-radius: 12px;
    background: #ffffff;
    color: #34463a;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease;
}

.projects-pagination a:hover,
.projects-pagination a:focus-visible {
    transform: translateY(-2px);
    border-color: var(--projects-green);
    background: var(--projects-green);
    color: #ffffff;
}

.projects-pagination .current {
    border-color: var(--projects-green);
    background: var(--projects-green);
    color: #ffffff;
}


/* ==========================================================================
   10. SEM PROJETOS
   ========================================================================== */

.empty-projects {
    padding: 48px 20px;
    border: 1px solid var(--projects-border);
    border-radius: 22px;
    background:
        linear-gradient(
            145deg,
            #f5faf5,
            #ffffff
        );
    text-align: center;
    box-shadow:
        0 14px 34px rgba(23, 53, 29, 0.06);
}

.empty-projects-icon {
    margin-bottom: 12px;
    font-size: 42px;
    line-height: 1;
}

.empty-projects h2 {
    margin: 0 0 12px;
    color: var(--projects-green-dark);
    font-size: 28px;
    line-height: 1.2;
}

.empty-projects p {
    max-width: 600px;
    margin: 0 auto 22px;
    color: var(--projects-text);
    font-size: 16px;
    line-height: 1.7;
}

.empty-projects .btn {
    min-height: 48px;
}


/* ==========================================================================
   11. CELULARES MUITO PEQUENOS
   ========================================================================== */

@media (max-width: 359px) {

    .projects-hero h1 {
        font-size: 31px;
    }

    .project-image {
        height: 220px;
    }

    .project-content {
        padding: 19px;
    }

    .project-title {
        font-size: 21px;
    }

}


/* ==========================================================================
   12. CELULAR GRANDE
   ========================================================================== */

@media (min-width: 521px) {

    .projects-hero {
        padding: 50px 0 34px;
    }

    .projects-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 22px;
    }

    .project-image {
        height: 225px;
    }

}


/* ==========================================================================
   13. TABLET
   ========================================================================== */

@media (min-width: 769px) {

    .projects-hero {
        padding: 62px 0 42px;
    }

    .projects-hero h1 {
        font-size: clamp(42px, 6vw, 58px);
    }

    .projects-hero p {
        font-size: 17px;
    }

    .projects-page {
        padding: 28px 0 84px;
    }

    .projects-list-header {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 24px;
        margin-bottom: 34px;
    }

    .projects-count {
        flex: 0 0 auto;
    }

    .projects-grid {
        gap: 26px;
    }

    .project-content {
        padding: 24px;
    }

}


/* ==========================================================================
   14. DESKTOP
   ========================================================================== */

@media (min-width: 1024px) {

    .projects-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
        gap: 30px;
    }

    .project-image {
        height: 240px;
    }

    .project-title {
        font-size: 24px;
    }

}


/* ==========================================================================
   15. DESKTOP GRANDE
   ========================================================================== */

@media (min-width: 1280px) {

    .projects-grid {
        gap: 32px;
    }

    .project-image {
        height: 255px;
    }

}


/* ==========================================================================
   16. ACESSIBILIDADE E REDUÇÃO DE MOVIMENTO
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .project-card,
    .project-card-image,
    .project-action,
    .project-action-arrow,
    .projects-pagination a {
        scroll-behavior: auto;
        transition: none;
    }

    .project-card:hover,
    .project-card:focus-within,
    .project-card:hover .project-card-image,
    .project-card:focus-within .project-card-image,
    .projects-pagination a:hover {
        transform: none;
    }

}


/* ==========================================================================
   17. IMPRESSÃO
   ========================================================================== */

@media print {

    .projects-archive {
        background: #ffffff;
    }

    .project-card,
    .empty-projects {
        box-shadow: none;
    }

    .project-card,
    .empty-projects {
        break-inside: avoid;
    }

    .projects-pagination {
        display: none;
    }

}

/* =========================================================
   AARCA — HOME / PROJETOS
   Complemento para a seção "Nossos Projetos" da página inicial.
   Cole no final do CSS carregado na home ou em projects.css.
   ========================================================= */

.home-page .home-projects{
    padding:70px 0;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f8fbf8 100%
        );
}

.home-page .home-projects .section-title{
    max-width:760px;
    margin:0 auto 34px;
    text-align:center;
}

.home-page .home-projects .section-title span{
    display:block;
    margin-bottom:8px;
    color:#2e7d32;
    font-size:13px;
    font-weight:850;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.home-page .home-projects .section-title h2{
    margin:0;
    color:#17351d;
    font-size:clamp(34px,5vw,48px);
    line-height:1.08;
    letter-spacing:-.035em;
}

.home-page .home-projects .section-title p{
    max-width:680px;
    margin:14px auto 0;
    color:#5f6e63;
    font-size:16px;
    line-height:1.7;
}

.home-page .home-projects .projects-grid{
    align-items:stretch;
}

.home-page .home-projects .project-card{
    height:100%;
}

.home-page .home-projects .project-card-link{
    height:100%;
}

.home-page .home-projects .project-content{
    min-height:260px;
}

.home-page .home-projects .project-title{
    color:#17351d;
}

.home-page .home-projects .home-projects-action{
    display:flex;
    justify-content:center;
    margin-top:34px;
}

.home-page .home-projects .home-projects-action .btn{
    min-width:220px;
    text-align:center;
}

@media(max-width:768px){
    .home-page .home-projects{
        padding:54px 0;
    }

    .home-page .home-projects .section-title{
        margin-bottom:26px;
    }

    .home-page .home-projects .project-content{
        min-height:0;
    }
}