/* =========================================================
   PORTFÓLIO DREAMCRAFT
   CSS COMPLETO E CORRIGIDO
   ========================================================= */
/* =========================================================
   1. VARIÁVEIS DA IDENTIDADE VISUAL
   ========================================================= */

:root {
    /*
    * IMPORTANTE:
    * Estas cores foram definidas para preservar a identidade
    * verde da DreamCraft.
    *
    * Caso o verde exato da sua marca seja diferente,
    * podemos ajustar posteriormente em um único lugar.
    */

    --dc-green: #3f7d58;
    --dc-green-dark: #2e6043;
    --cor-principal: #6f8f70;
    --cor-fundo: #a8c6a9;   
    --cor-fundo-claro: #c2e7c3;
    --dc-green-light: #eaf4ed;

    --dc-white: #ffffff;
    --dc-off-white: #f8faf8;

    --dc-text: #2c2c2c;
    --dc-text-light: #666666;

    --dc-border: rgba(63, 125, 88, 0.12);

    --dc-shadow-soft:
        0 8px 30px rgba(0, 0, 0, 0.06);

    --dc-shadow-header:
        0 5px 25px rgba(0, 0, 0, 0.08);

    --dc-radius: 14px;

    --dc-transition:
        0.35s ease;
}

/* =========================================================
   HERO
   ========================================================= */

.portfolio-page-hero {
    width: 100%;
    padding: 100px 20px 80px;

    background: linear-gradient(
        180deg,
        --cor-fundo 0%,
        #e8f5e8 100%
    );

    text-align: center;
}

.portfolio-page-hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.portfolio-page-hero .section-tag {
    display: inline-block;
    margin-bottom: 20px;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #4f7253;
}

.portfolio-page-hero h1 {
    margin: 0 0 20px;

    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.1;

    color: #263b2a;
}

.portfolio-page-hero h1 span {
    color: #6f8f70;
}

.portfolio-page-hero p {
    max-width: 700px;
    margin: 0 auto;

    font-size: 18px;
    line-height: 1.7;

    color: #536456;
}


/* =========================================================
   SEÇÃO PRINCIPAL
   ========================================================= */

.portfolio-page-section {
    width: 100%;
    padding: 80px 20px;

    background: var(--cor-fundo-claro);
}

.portfolio-page-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}


/* =========================================================
   FILTROS
   ========================================================= */

.portfolio-filters {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 50px;
}

.portfolio-filter {
    appearance: none;
    padding: 12px 24px;
    border: 1px solid #b8d6ba;
    border-radius: 30px;
    background: var(--cor-fundo-claro);
    color: #557258;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease;
}

.portfolio-filter:hover {
    background: #e5f3e6;
    border-color: #6f8f70;
    transform: translateY(-2px);
}

.portfolio-filter.active {
    background: #6f8f70;
    border-color: #6f8f70;
    color: #ffffff;
}


/* =========================================================
   GRID DA GALERIA (Masonry / Encaixada)
   ========================================================= */

.portfolio-full-grid {
    column-count: 3; /* 3 colunas em telas grandes */
    column-gap: 25px; /* Espaço lateral entre colunas */
    width: 100%;
}


/* =========================================================
   CARD
   ========================================================= */

.portfolio-card {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    margin-bottom: 25px; /* Espaçamento abaixo do card para o efeito Masonry */
    break-inside: avoid; /* Evita que o card corte entre as colunas */
    overflow: hidden;
    border-radius: 18px;
    background: transparent; /* Transparente para remover o fundo verde que sobravam */
    box-shadow: 0 8px 25px rgba(60, 90, 65, 0.10);
    opacity: 1;
    transition:
        opacity 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(60, 90, 65, 0.18);
}


/* =========================================================
   CARDS FILTRADOS (ESCONDIDOS)
   ========================================================= */

.portfolio-card.portfolio-hidden {
    display: none;
}


/* =========================================================
   LINK DO CARD
   ========================================================= */

.portfolio-lightbox-port,
.portfolio-card-media {
    position: relative;
    display: block;
    width: 100%;
    height: auto; /* Altura automática ajustada à imagem */
    overflow: hidden;
    text-decoration: none;
}


/* =========================================================
   IMAGENS DOS CARDS
   ========================================================= */

.portfolio-card-media img,
.portfolio-lightbox-port img {
    display: block !important;
    width: 100% !important;
    height: auto !important; /* Mantém a proporção real de cada foto */
    max-width: 100% !important;
    border-radius: 18px;
    object-fit: cover;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 1;
    transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-card-media img,
.portfolio-card:hover .portfolio-lightbox-port img {
    transform: scale(1.05); /* Efeito suave de zoom ao passar o mouse */
}


/* =========================================================
   OVERLAY (HOVER NO CARD)
   ========================================================= */

.portfolio-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    background: rgba(38, 59, 42, 0.55);
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.portfolio-card:hover .portfolio-card-overlay {
    opacity: 1;
}

.portfolio-card-overlay span {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #ffffff;
    color: #6f8f70;
    font-size: 20px;
}

.portfolio-card-overlay strong {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
}


/* =========================================================
   LIGHTBOX MODAL (JANELA DE ZOOM)
   ========================================================= */

.portfolio-lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background: rgba(0, 0, 0, 0.88);
}

.portfolio-lightbox-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 95vw;
    max-height: 95vh;
}

.portfolio-lightbox-content img {
    display: block;
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.portfolio-lightbox-content p {
    margin: 15px 0 0;
    color: #ffffff;
    font-size: 16px;
    text-align: center;
}


/* =========================================================
   BOTÃO FECHAR LIGHTBOX
   ========================================================= */

.portfolio-lightbox-close {
    position: absolute;
    top: -45px;
    right: -10px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #333333;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.portfolio-lightbox-close:hover {
    transform: scale(1.1);
    background: #c2e7c3;
}


/* =========================================================
   CTA
   ========================================================= */

.portfolio-cta {
    width: 100%;
    padding: 90px 20px;
    background: linear-gradient(
        135deg,
        --cor-fundo 0%,
        #eaf6ea
    );
    text-align: center;
}

.portfolio-cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.portfolio-cta .section-tag {
    display: inline-block;
    margin-bottom: 20px;
    color: #4f7253;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
}

.portfolio-cta h2 {
    margin: 0 0 20px;
    color: #263b2a;
    font-size: clamp(32px, 5vw, 50px);
    line-height: 1.2;
}

.portfolio-cta h2 span {
    color: #6f8f70;
}

.portfolio-cta p {
    max-width: 650px;
    margin: 0 auto 30px;
    color: #536456;
    font-size: 17px;
    line-height: 1.7;
}

.portfolio-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 30px;
    background: #6f8f70;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    transition:
        transform 0.3s ease,
        background 0.3s ease;
}

.portfolio-cta-button:hover {
    background: #557258;
    transform: translateY(-3px);
}


/* =========================================================
   RESPONSIVIDADE
   ========================================================= */

@media (max-width: 600px) {
    .portfolio-page-hero {
        padding: 70px 20px 60px;
    }

    .portfolio-page-section {
        padding: 60px 15px;
    }

    .portfolio-full-grid {
        column-count: 1; /* 1 coluna no celular */
    }

    .portfolio-filters {
        gap: 8px;
    }

    .portfolio-filter {
        padding: 10px 18px;
        font-size: 14px;
    }

    .portfolio-lightbox-modal {
        padding: 15px;
    }

    .portfolio-lightbox-content img {
        display: block;
        width: auto;
        height: auto;
        max-width: 90vw;
        max-height: 82vh;
        object-fit: contain;
        border-radius: 10px;
        box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    }

    .portfolio-lightbox-close {
        top: -50px;
        right: 0;
    }
}