/* ==========================================================================
   CONSTRUTORA - PORTFOLIO SUBPAGE STYLESHEET
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. PORTFOLIO HERO
   -------------------------------------------------------------------------- */

.portfolio-hero {
    position: relative;
    z-index: 10;
    padding: 160px 6vw 60px;
    background-color: var(--color-bg-dark);
    text-align: center;
}

.portfolio-hero-container {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.subpage-badge {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--color-green-primary);
    text-transform: uppercase;
}

.portfolio-hero-title {
    font-size: clamp(2.5rem, 4.5vw, 3.8rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.portfolio-hero-subtitle {
    font-size: clamp(1.0rem, 1.4vw, 1.2rem);
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
    line-height: 1.55;
}

/* --------------------------------------------------------------------------
   2. CATEGORIES & PROJECTS SHOWCASE
   -------------------------------------------------------------------------- */

.portfolio-showcase-section {
    position: relative;
    z-index: 20;
    background-color: var(--color-bg-white);
    color: #111622;
    padding: 80px 6vw 120px;
    width: 100%;
}

.portfolio-showcase-container {
    max-width: 1260px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.category-tabs-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.category-tab {
    background-color: #FFFFFF;
    border: 1px solid #DFDBD7;
    border-radius: 100px;
    padding: 12px 28px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #55504C;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    user-select: none;
}

.category-tab.active {
    background-color: #141414;
    color: #ffffff;
    border-color: #141414;
    box-shadow: 0 8px 24px rgba(20, 20, 20, 0.18);
}

.category-tab:hover:not(.active) {
    background-color: #DFDBD7;
    color: #141414;
}

.portfolio-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    width: 100%;
}

.portfolio-item-card {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #F1EEEB;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, opacity 0.3s ease;
}

.portfolio-item-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

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

.item-img-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10.5;
    background-color: #FFFFFF;
    overflow: hidden;
}

.item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-item-card:hover .item-img {
    transform: scale(1.05);
}

.item-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    background-color: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 6px 14px;
    border-radius: 100px;
}

.item-tag-featured {
    left: auto;
    right: 14px;
    background-color: #f59e0b;
    color: #141414;
}

/* Links que envolvem o card inteiro (antes eram estilos inline no JS) */
.card-link-full {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.card-link-plain {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* O link interno do card de imóvel precisa manter o mesmo contexto flex do
   .imovel-body — senão o `gap` deixa de valer entre título, localização e
   especificações, e o margin-top negativo de .imovel-location joga o texto
   por cima do título. */
.imovel-body .card-link-plain {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Estado vazio / carregando das grades dinâmicas */
.grid-empty-state {
    grid-column: 1 / -1;
    padding: 48px 24px;
    text-align: center;
    color: #67625E;
    font-size: 0.95rem;
    background-color: #FFFFFF;
    border: 1px dashed #DFDBD7;
    border-radius: 12px;
}

.item-info {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.item-name {
    font-size: 1.08rem;
    font-weight: 700;
    color: #141414;
}

.item-area {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-green-dark);
}

.item-desc {
    font-size: 0.84rem;
    color: #67625E;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   3. ALGUNS IMÓVEIS (FEATURED DEVELOPMENTS)
   -------------------------------------------------------------------------- */

.imoveis-section {
    position: relative;
    z-index: 20;
    background-color: #FFFFFF;
    color: #141414;
    padding: 110px 6vw;
    width: 100%;
    border-top: 1px solid #DFDBD7;
}

.imoveis-container {
    max-width: 1260px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    max-width: 720px;
    margin: 0 auto;
}

.section-badge {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--brand-deep);
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(2.0rem, 3.4vw, 2.8rem);
    font-weight: 800;
    color: #141414;
    letter-spacing: -0.02em;
}

.section-desc {
    font-size: 0.95rem;
    color: #67625E;
    line-height: 1.55;
}

.imoveis-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.imovel-card {
    background-color: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #DFDBD7;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.imovel-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.09);
}

.imovel-img-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

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

.imovel-status-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 6px 14px;
    border-radius: 100px;
    color: #ffffff;
}

.status-pronto { background-color: var(--brand-deep); }
.status-obras { background-color: #3b82f6; }

.imovel-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

.imovel-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #141414;
}

.imovel-location {
    font-size: 0.84rem;
    color: #67625E;
    margin-top: -10px;
}

.imovel-specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid #F1EEEB;
    border-bottom: 1px solid #F1EEEB;
    text-align: center;
}

.spec-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: #141414;
    display: block;
}

.spec-lbl {
    font-size: 0.72rem;
    color: #8E8884;
    display: block;
}

.imovel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.imovel-price {
    font-size: 0.92rem;
    font-weight: 700;
    color: #141414;
}

.btn-imovel-action {
    text-decoration: none;
    background-color: #141414;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 10px 20px;
    border-radius: 100px;
    transition: all 0.25s ease;
}

.btn-imovel-action:hover {
    background-color: var(--color-green-primary);
    color: var(--color-green-text);
}

/* --------------------------------------------------------------------------
   4. COMO COMPRAR TIMELINE
   -------------------------------------------------------------------------- */

.timeline-section {
    position: relative;
    z-index: 20;
    background-color: var(--color-bg-white);
    color: #141414;
    padding: 120px 6vw;
    width: 100%;
}

.timeline-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.timeline-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
}

.timeline-step {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    background-color: #FFFFFF;
    border: 1px solid #DFDBD7;
    border-radius: 14px;
    padding: 32px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.timeline-step:hover {
    transform: translateX(6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
    border-color: #C9C4C0;
}

.step-number-badge {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-green-dark);
    background-color: var(--brand-accent-soft);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.step-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #141414;
}

.step-desc {
    font-size: 0.9rem;
    color: #67625E;
    line-height: 1.55;
}

/* --------------------------------------------------------------------------
   5. CTA BANNER
   -------------------------------------------------------------------------- */

.cta-banner-section {
    position: relative;
    z-index: 20;
    background-color: var(--color-bg-white);
    padding: 0 6vw 100px;
    width: 100%;
}

.cta-banner-container {
    max-width: 1260px;
    margin: 0 auto;
    background: linear-gradient(135deg, #141414 0%, #2D2D2D 100%);
    border-radius: 20px;
    padding: 60px 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    box-shadow: 0 25px 60px rgba(20, 20, 20, 0.25);
}

.cta-title {
    font-size: clamp(1.8rem, 2.8vw, 2.4rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.cta-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
}

.btn-cta-green {
    text-decoration: none;
    background: linear-gradient(135deg, var(--color-green-light), var(--color-green-dark));
    color: var(--color-green-text);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 18px 40px;
    border-radius: 100px;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-cta-green:hover {
    transform: translateY(-2px) scale(1.04);
}

/* --------------------------------------------------------------------------
   6. FAQ ACCORDION
   -------------------------------------------------------------------------- */

.faq-section {
    position: relative;
    z-index: 20;
    background-color: var(--color-bg-white);
    color: #141414;
    padding: 0 6vw 140px;
    width: 100%;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background-color: #FFFFFF;
    border: 1px solid #DFDBD7;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.25s ease;
}

.faq-item.active {
    border-color: #141414;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 22px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.02rem;
    font-weight: 700;
    font-family: var(--font-primary);
    color: #141414;
    text-align: left;
    cursor: pointer;
    outline: none;
}

.faq-icon {
    font-size: 1.4rem;
    font-weight: 400;
    color: #67625E;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--color-green-dark);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s ease;
    padding: 0 28px;
}

.faq-item.active .faq-answer {
    max-height: 250px;
    padding: 0 28px 22px;
}

.faq-answer p {
    font-size: 0.9rem;
    color: #55504C;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
    .portfolio-projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .imoveis-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .cta-banner-container {
        flex-direction: column;
        text-align: center;
        padding: 40px 24px;
    }

    .timeline-step {
        flex-direction: column;
        gap: 16px;
        padding: 24px;
    }
}

@media (max-width: 650px) {
    .portfolio-projects-grid {
        grid-template-columns: 1fr;
    }

    .imoveis-grid {
        grid-template-columns: 1fr;
    }

    .category-tabs-wrapper {
        gap: 8px;
    }

    .category-tab {
        padding: 10px 18px;
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   AJUSTES DE TOQUE E LEGIBILIDADE NO MOBILE
   ========================================================================== */

@media (max-width: 900px) {
    /* Etiquetas sobre as fotos ficavam com 10–11px */
    .item-tag,
    .imovel-status-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .item-desc,
    .imovel-location {
        font-size: 0.88rem;
    }

    /* "Ver portfólio completo" tinha 18px de altura */
    .btn-view-all {
        display: inline-block;
        padding: 12px 0;
    }

    /* Filtros de categoria: rolagem lateral em vez de quebrar em 3 linhas */
    .category-tabs-wrapper {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .category-tabs-wrapper::-webkit-scrollbar {
        display: none;
    }

    .category-tab {
        flex: 0 0 auto;
        min-height: 44px;
    }

    .btn-imovel-action {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .faq-question {
        min-height: 56px;
    }
}

@media (max-width: 380px) {
    .portfolio-showcase-section,
    .imoveis-section,
    .timeline-section,
    .faq-section,
    .cta-banner-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .portfolio-hero-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .item-info,
    .imovel-body {
        padding: 18px;
    }

    /* 3 colunas de especificação não cabem em 320px */
    .imovel-specs {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .spec-lbl {
        font-size: 0.72rem;
    }
}

/* ==========================================================================
   AÇÕES DO CARD DE IMÓVEL (detalhes + WhatsApp)
   ========================================================================== */

.imovel-botoes {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-imovel-zap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #25d366;
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 100px;
    white-space: nowrap;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease;
}

.btn-imovel-zap:hover {
    background-color: #1da851;
    transform: translateY(-2px);
}

@media (max-width: 900px) {
    .imovel-botoes {
        gap: 6px;
    }

    .btn-imovel-zap {
        min-height: 44px;
        padding: 10px 12px;
    }
}

@media (max-width: 380px) {
    .imovel-footer {
        flex-wrap: wrap;
        gap: 10px;
    }

    .imovel-botoes {
        width: 100%;
    }

    .imovel-botoes > * {
        flex: 1;
        justify-content: center;
    }
}


/* Botões desta página no verde de ação; o resto segue o terracota */
.btn-cta-green,
.btn-imovel-action {
    background: var(--btn-cor);
    color: var(--btn-texto);
    box-shadow: none;
}

.btn-cta-green:hover,
.btn-imovel-action:hover {
    background: var(--btn-cor-hover);
    box-shadow: none;
}
