/* ==========================================================================
   CONSTRUTORA - PROPERTY DETAILS PAGE STYLESHEET (IMOVEL.CSS)
   ========================================================================== */

/* Breadcrumbs */
.breadcrumb-container {
    padding: 130px 6vw 20px;
    background-color: var(--color-bg-dark);
    position: relative;
    z-index: 10;
}

.breadcrumb-nav {
    max-width: 1260px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumb-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-nav a:hover {
    color: var(--color-green-primary);
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.3);
}

.breadcrumb-current {
    color: var(--color-green-primary);
    font-weight: 600;
}

/* Imóvel Hero Header */
.imovel-hero-section {
    position: relative;
    z-index: 10;
    padding: 10px 6vw 50px;
    background-color: var(--color-bg-dark);
    color: #ffffff;
}

.imovel-hero-container {
    max-width: 1260px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.imovel-badge-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.imovel-cat-badge {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 6px 16px;
    border-radius: 100px;
    text-transform: uppercase;
}

.imovel-status-tag {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 6px 16px;
    border-radius: 100px;
    color: #ffffff;
    text-transform: uppercase;
}

.imovel-hero-title {
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: #ffffff;
}

.imovel-location-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
}

.imovel-location-icon {
    color: var(--color-green-primary);
}

/* Quick Specs Bar */
.imovel-specs-bar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 24px 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 24px;
    margin-top: 10px;
}

.quick-spec-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quick-spec-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.55);
}

.quick-spec-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
}

.quick-spec-highlight {
    color: var(--color-green-primary);
}

/* Main Content Area */
.imovel-content-section {
    position: relative;
    z-index: 20;
    background-color: var(--color-bg-white);
    color: #141414;
    padding: 70px 6vw 120px;
    width: 100%;
}

.imovel-content-container {
    max-width: 1260px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 48px;
}

/* Item de grid nasce com min-width:auto e se recusa a encolher abaixo do
   conteúdo — era o que empurrava a página 11px para o lado em telas de
   320px, apesar da coluna já estar em 1fr. */
.imovel-main-col,
.imovel-sidebar {
    min-width: 0;
}

/* Left Main Column */
.imovel-main-col {
    display: flex;
    flex-direction: column;
    gap: 56px;
}

/* Gallery Component */
.imovel-gallery-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gallery-main-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    background-color: #141414;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    position: relative;
    cursor: pointer;
}

.gallery-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-main-frame:hover .gallery-main-img {
    transform: scale(1.03);
}

.gallery-zoom-badge {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gallery-thumbs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.thumb-item {
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    opacity: 0.7;
}

.thumb-item.active, .thumb-item:hover {
    border-color: var(--color-green-dark);
    opacity: 1;
    transform: translateY(-2px);
}

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

/* Sections inside Main Column */
.imovel-block-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #141414;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.imovel-block-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: linear-gradient(to bottom, var(--color-green-light), var(--color-green-dark));
    border-radius: 4px;
}

.imovel-text-body {
    font-size: 1.02rem;
    color: #55504C;
    line-height: 1.75;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Highlights Grid */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 10px;
}

.highlight-card {
    background-color: #FFFFFF;
    border: 1px solid #DFDBD7;
    border-radius: 14px;
    padding: 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.highlight-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: var(--brand-accent-soft);
    color: var(--color-green-dark);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.highlight-info h4 {
    font-size: 1.02rem;
    font-weight: 700;
    color: #141414;
    margin-bottom: 4px;
}

.highlight-info p {
    font-size: 0.86rem;
    color: #67625E;
    line-height: 1.45;
}

/* Technical Datasheet Table */
.datasheet-table-container {
    background-color: #ffffff;
    border-radius: 14px;
    border: 1px solid #DFDBD7;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.03);
}

.datasheet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.datasheet-table tr {
    border-bottom: 1px solid #F1EEEB;
}

.datasheet-table tr:last-child {
    border-bottom: none;
}

.datasheet-table tr:nth-child(even) {
    background-color: #FFFFFF;
}

.datasheet-label {
    padding: 16px 24px;
    font-weight: 700;
    color: #3F3B38;
    width: 38%;
    background-color: rgba(241, 245, 249, 0.5);
}

.datasheet-value {
    padding: 16px 24px;
    color: #141414;
    font-weight: 500;
}

/* Right Sticky Sidebar */
.imovel-sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.sidebar-card {
    background-color: #ffffff;
    border: 1px solid #DFDBD7;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 110px;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #141414;
    margin-bottom: 8px;
}

.sidebar-subtitle {
    font-size: 0.88rem;
    color: #67625E;
    margin-bottom: 24px;
    line-height: 1.45;
}

.sidebar-cta-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.btn-sidebar-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 16px 24px;
    border-radius: 100px;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    text-align: center;
}

.btn-sidebar-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6);
}

.btn-sidebar-pdf {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background-color: #FFFFFF;
    color: #141414;
    border: 1px solid #C9C4C0;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 14px 24px;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-sidebar-pdf:hover {
    background-color: #141414;
    color: #ffffff;
    border-color: #141414;
}

.engineer-mini-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid #F1EEEB;
}

.engineer-avatar {
    width: 52px;
    height: 52px;
    border-radius: 100px;
    object-fit: cover;
    border: 2px solid var(--color-green-primary);
}

.engineer-info {
    display: flex;
    flex-direction: column;
}

.engineer-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #141414;
}

.engineer-role {
    font-size: 0.78rem;
    color: #67625E;
}

/* Related Projects Section */
.related-projects-section {
    position: relative;
    z-index: 20;
    background-color: #FFFFFF;
    border-top: 1px solid #DFDBD7;
    padding: 90px 6vw 120px;
}

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

.related-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.related-title {
    font-size: 2.0rem;
    font-weight: 800;
    color: #141414;
}

.btn-view-all {
    text-decoration: none;
    color: var(--color-green-dark);
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.btn-view-all:hover {
    color: #141414;
}

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

/* Image Modal Lightbox */
.modal-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img-frame {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.btn-close-lightbox {
    position: absolute;
    top: 24px;
    right: 32px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.btn-close-lightbox:hover {
    color: var(--color-green-primary);
}

/* Responsive Rules */
@media (max-width: 1050px) {
    .imovel-content-container {
        grid-template-columns: 1fr;
    }

    .sidebar-card {
        position: static;
    }

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

@media (max-width: 700px) {
    .highlights-grid {
        grid-template-columns: 1fr;
    }

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

    .gallery-thumbs-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .datasheet-label {
        width: 45%;
        padding: 12px 16px;
    }

    .datasheet-value {
        padding: 12px 16px;
    }
}

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

@media (max-width: 900px) {
    /* O breadcrumb apertava 3 links de 17px de altura numa linha só */
    .breadcrumb-nav {
        flex-wrap: wrap;
        row-gap: 2px;
        font-size: 0.85rem;
    }

    .breadcrumb-nav a {
        display: inline-block;
        padding: 10px 0;
    }

    .imovel-cat-badge,
    .imovel-status-tag,
    .quick-spec-label {
        font-size: 0.78rem;
    }

    /* Barra de especificações: 2 colunas em vez de espremer 5 */
    .imovel-specs-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        padding: 20px 22px;
    }

    .sidebar-card {
        padding: 26px 22px;
    }

    .btn-sidebar-whatsapp,
    .btn-sidebar-pdf {
        min-height: 52px;
    }

    /* O "×" do lightbox tinha 23px de largura: quase impossível de acertar */
    .btn-close-lightbox {
        top: 14px;
        right: 14px;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

    /* A tabela da ficha técnica rola sozinha se o conteúdo for largo */
    .datasheet-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* O botão flutuante de WhatsApp fica no canto inferior direito e cobria
       o aviso "Clique para Ampliar" — no mobile ele vai para a esquerda. */
    .gallery-zoom-badge {
        right: auto;
        left: 14px;
        bottom: 14px;
    }
}

@media (max-width: 380px) {
    /* Reduz o respiro da seção em vez de somar padding no container interno,
       que só deixava a coluna útil ainda mais estreita. */
    .imovel-hero-section,
    .imovel-content-section,
    .related-projects-section,
    .breadcrumb-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .imovel-specs-bar {
        grid-template-columns: 1fr 1fr;
        padding: 18px 16px;
        gap: 14px;
    }

    .gallery-thumbs-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .imovel-hero-title {
        font-size: 1.85rem;
    }
}

/* Caixa do ícone dos diferenciais: agora recebe SVG, não emoji */
.highlight-icon-box {
    background-color: #FFFFFF;
    border: 1px solid #DFDBD7;
    color: var(--brand-primary);
    font-size: 0;
}

.imovel-location-row .ico-local {
    color: var(--brand-primary);
}

/* Botões da barra lateral sem brilho */
.btn-sidebar-whatsapp,
.btn-sidebar-pdf {
    box-shadow: none;
}


/* Botões da barra lateral no verde de ação */
.btn-sidebar-whatsapp {
    background: var(--btn-cor);
    color: var(--btn-texto);
    box-shadow: none;
}

.btn-sidebar-whatsapp:hover {
    background: var(--btn-cor-hover);
}
