* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Barlow, Roboto, sans-serif;
}

:root {
    --bacgorund-color: #f2f2f2;
    --text-color: #494949;
    --primary-color: #324001;
    --secundary-color: #465902;
    --third-color: #f2937e;
    --button-color: #A6174B;
    --title-font-size: 300px;
    --sub-title-font-size: 20px;
    --paragraph-font-size: 18px;
    --text-gradient: linear-gradient(30deg, rgb(76, 83, 2)40%, rgb(78, 78, 7)40%, rgb(174, 174, 5));
    ;
    --icon-gradient: linear-gradient(35deg, rgb(44, 69, 1), rgb(55, 111, 2), rgb(187, 255, 0));
}

body {
    background-color: var(--bacgorund-color);
}

.border {
    display: block;
    margin: 0 auto 20px;
    width: 200px;
    border-bottom: 5px solid black;
    border-image: linear-gradient(35deg, rgb(44, 69, 1), rgb(55, 111, 2), rgb(187, 255, 0)) 1;

}

/* Nav */
.nav-wrapper {
    background-color: olivedrab;

}

.nav-wrapper a {
    color: white;
    font-size: 16px;
    font-family: Barlow, Roboto;
    font-weight: 500;
}

.nav-wrapper li {
    list-style: none;
}

.nav-wrapper img {
    height: auto;
    vertical-align: middle;

}

/* Title */
.title-container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
    padding: 30px 0;
    justify-content: center;
    background-color: transparent;
}

.title-container img {
    width: 200px;
    background-color: transparent;
}

.title {
    font-size: 40px;
    color: var(--text-color);
    margin: 10px 15px;
    font-family: barlow, roboto;
    font-weight: 700;
    text-transform: capitalize;
    background-color: transparent;
    color: transparent;
    background-image: var(--icon-gradient);
    -webkit-background-clip: text;
}

.adress {
    font-size: var(--sub-title-font-size);
    color: var(--primary-color);
    margin: 10px 0 20px 15px;
    margin-right: 10px;
    font-family: barlow, roboto;
    font-weight: 600;
    text-transform: capitalize;
    background-color: transparent;
}

.sub-icons {
    display: flex;
    flex-direction: row;
    margin-left: 15px;
}

.sub-icons i {
    margin-right: 8px;
    font-size: 30px;
    color: transparent;
    -webkit-background-clip: text;
    background-image: var(--icon-gradient);
}

.sub-icons p {
    display: flex;
    font-weight: 500;
    margin-right: 15px;
    color: var(--primary-color);
    align-items: center;
}

/* Seção da infra */
.folha2 {
    width: 100%;
    position: absolute;
    transform: scale(0.5) translateX(-50%) translateY(-50%);
    z-index: -4;
    filter: drop-shadow(1rem 1rem 1rem rgba(0, 0, 0, 0.494));
    background-color: transparent;
}

.folha3 {
    width: 100%;
    position: absolute;
    overflow: hidden;
    transform: rotateZ(180deg) rotateX(180deg) scale(0.5) translateX(-50%) translateY(-50%);
    z-index: -4;
    filter: drop-shadow(1rem 1rem 1rem rgba(0, 0, 0, 0.494));

}

.infra-title {
    font-size: 34px;
    padding-bottom: 20px;
    font-family: Barlow;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--secundary-color);
    background-color: transparent;
}

.subtitle-infra {
    font-size: var(--sub-title-font-size);
    padding-bottom: 20px;
    font-family: Barlow, Roboto;
    font-weight: 500;
    color: var(--primary-color);
    line-height: 1.2;
    background-color: transparent;
}

.amenities-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
    background-color: var(--bacgorund-color);
    width: 80%;
    padding-bottom: 60px;
    background-color: transparent;
}

.amenity {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 120px;
}

.amenity .material-icons {
    font-size: 40px;
    color: transparent;
    -webkit-background-clip: text;
    background-image: var(--icon-gradient);
    margin-bottom: 8px;
    cursor: pointer;
}

.amenity p {
    font-size: 14px;
    color: var(--primary-color);
    font-family: barlow, roboto;
    font-weight: 700;
    margin: 0;
    cursor: pointer;
}

/* Estilo do modal */
.modal {
    display: none;
    /* Modal invisível por padrão */
    position: fixed;
    top: 35%;
    left: 0;
    width: auto;
    height: auto;
    background-color: white;
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border-radius: 10px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.modal-content .close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    font-weight: 700;
    cursor: pointer;
    color: #333;
}

.modal-content h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-family: barlow;
    font-weight: 700;
}

.modal-content p {
    font-size: 16px;
    font-weight: 600;
    color: #555;
}

/* Galeria */
.gallery-title {
    font-size: 30px;
    padding: 50px 0 15px 0;
    font-family: Barlow, roboto;
    font-weight: 700;
    text-transform: uppercase;
    color: transparent;
    -webkit-background-clip: text;
    background-image: var(--icon-gradient);
}

.gallery-subtitle {
    font-size: var(--sub-title-font-size);
    color: var(--primary-color);
    padding: 0 0 30px 0;
    font-family: Barlow, Roboto;
    font-weight: 500;
}

.slider.container {
    width: 80%;
    margin: 0 auto;
}

/* Permite posicionar as setas dentro da galeria */
.slider { position: relative; }

/* Buttons */
#prev {
    display: flex;
    position: absolute;
    top: 50%;
    left: 16px; /* próximo da margem esquerda */
    transform: translateY(-50%);
    border-radius: 50%;
    border: none;
    width: 50px;
    height: 50px;
    z-index: 3;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
}

#prev i {
    font-size: 60px;
    filter: drop-shadow(0.2rem 0.2rem rgba(0, 0, 0, 0.5));
}

#next {
    display: flex;
    position: absolute;
    top: 50%;
    right: 16px; /* próximo da margem direita */
    transform: translateY(-50%);
    border-radius: 50%;
    border: none;
    background-color: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    z-index: 3;
    justify-content: center;
    align-items: center;
}

#next i {
    font-size: 60px;
    filter: drop-shadow(0.2rem 0.2rem rgba(0, 0, 0, 0.5));
}

.caption {
    filter: drop-shadow(0.2rem 0.2rem rgba(0, 0, 0, 0.5));
    text-transform: capitalize;
}

.caption h5,
.caption h3 {
    font-weight: 600;
}

/* Raio X */
.raiox {
    display: flex;
    flex-direction: row;
    width: 80%;
    margin: 50px auto;
    align-content: center;
    justify-content: space-between; /* mantém colunas alinhadas nas bordas */
    align-items: center;
    gap: 40px; /* espaço consistente entre imagem e texto */
    max-width: 1280px;
}

.raiox-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    vertical-align: middle;
    padding: 0 24px; /* reduz padding para alinhar melhor com a imagem */
}

/* Garante 50/50 entre imagem e texto e imagens fluídas */
.raiox > .raiox-text,
.raiox > .raiox-image {
    flex: 1 1 50%;
}

.raiox-image img {
    width: 100%;
    height: auto;
    display: block;
}

.raiox-text ul {
    list-style-type: circle;
    font-size: 25px;
    color: var(--primary-color);
    font-family: Barlow, Roboto;
    font-weight: 500;
}

.raiox-title {
    font-size: 28px;
    color: transparent;
    text-transform: uppercase;
    font-family: Barlow, Roboto;
    -webkit-background-clip: text;
    background-image: linear-gradient(35deg, rgb(44, 69, 1)13%, rgb(55, 111, 2)13%, rgb(187, 255, 0));
    font-weight: 800;
}

/* Footer */
.row li {
    list-style: none;
}

/* ===== Imóvel: Galeria em grade ===== */
.imovel-page {
    padding: 20px 0 40px;
}

.imovel-page .imovel-gallery-grid {
    width: 90%;
    margin: 0 auto;
}

.imovel-gallery-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

.imovel-gallery-grid .grid-main,
.imovel-gallery-grid .grid-tile {
    border: none;
    padding: 0;
    margin: 0;
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #f4f6f4;
}

.imovel-gallery-grid .grid-main {
    aspect-ratio: 16/10;
}

.imovel-gallery-grid .grid-tile {
    aspect-ratio: 16/9;
}

.imovel-gallery-grid .grid-main img,
.imovel-gallery-grid .grid-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}

.imovel-gallery-grid .grid-main:hover img,
.imovel-gallery-grid .grid-tile:hover img {
    transform: scale(1.03);
}

.imovel-gallery-grid .grid-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.imovel-gallery-grid .see-more {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

@media (max-width: 900px) {
    /* Remover espaçamento superior no mobile para colar na navbar */
    .imovel-page {
        padding-top: 0;
    }

    /* A galeria vira um carrossel horizontal no mobile */
    .imovel-gallery-grid { display: none; }
}

/* ===== Imóvel: Carrossel Mobile ===== */
.imovel-gallery-carousel { display: none; margin: 0; }

/* helper para full-bleed (100vw) dentro de .container */
.full-bleed {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

@media (max-width: 900px) {
    .imovel-gallery-carousel { display: block; }
    .imovel-gallery-carousel .carousel {
        position: relative;
        width: 100%;
        aspect-ratio: 16/9;
        background: #f4f6f4;
    }
    .imovel-gallery-carousel .carousel-slide {
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
        opacity: 0;
        transition: opacity .4s ease;
        border: 0; padding: 0; background: transparent;
    }
    .imovel-gallery-carousel .carousel-slide img {
        width: 100%; height: 100%;
        object-fit: cover; display: block;
    }
    .imovel-gallery-carousel .carousel-slide.active { opacity: 1; z-index: 1; }
    .imovel-gallery-carousel .carousel-prev,
    .imovel-gallery-carousel .carousel-next {
        position: absolute;
        top: 50%; transform: translateY(-50%);
        z-index: 3; width: 36px; height: 36px;
        border-radius: 50%; border: none;
        background: rgba(0,0,0,0.35); color: #fff;
        cursor: pointer; display: flex; align-items: center; justify-content: center;
    }
    .imovel-gallery-carousel .carousel-prev { left: 10px; }
    .imovel-gallery-carousel .carousel-next { right: 10px; }
}

/* ===== Imóvel: Modal/Carrossel ===== */
/* Impede scroll do body quando modal está aberto */
body.imovel-modal-open {
    overflow: hidden;
    height: 100vh;
}

.imovel-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    width: 100vw;
    height: 100vh;
}

.imovel-modal.shown {
    display: block;
}

.imovel-modal_backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .95); /* Fundo mais escuro para tela cheia */
}

.imovel-modal_dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0; /* Remove margens para tela cheia */
    background: #111;
    border-radius: 0; /* Remove bordas arredondadas */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.imovel-modal_close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 3;
    background: rgba(0, 0, 0, .7);
    color: #fff;
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 22px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.imovel-modal_close:hover {
    background: rgba(0, 0, 0, .9);
    transform: scale(1.1);
}

.imovel-modal_carousel {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0; /* Permite que o flex funcione corretamente */
}

.imovel-modal_img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 140px);
    width: auto;
    height: auto;
    object-fit: contain;
    background: transparent;
    /* Otimização: aceleração de hardware para mudanças de src */
    transform: translate3d(0, 0, 0);
    /* Removido transições que causavam lentidão */
}

.imovel-modal_prev,
.imovel-modal_next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, .7);
    color: #fff;
    border: 0;
    width: 60px;
    height: 60px;
    border-radius: 30px;
    font-size: 24px;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.imovel-modal_prev:hover,
.imovel-modal_next:hover {
    background: rgba(0, 0, 0, .9);
    transform: translateY(-50%) scale(1.1);
}

.imovel-modal_prev {
    left: 30px;
}

.imovel-modal_next {
    right: 30px;
}

.imovel-modal_thumbs {
    display: flex;
    gap: 8px;
    padding: 15px 20px;
    background: #0d0d0d;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    scroll-behavior: smooth;
    /* Oculta a barra de scroll mas mantém funcionalidade */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    min-height: 100px; /* Altura mínima para as miniaturas */
    flex-shrink: 0; /* Impede que a área de miniaturas encolha */
}

/* Oculta barra de scroll no Chrome/Safari */
.imovel-modal_thumbs::-webkit-scrollbar {
    display: none;
}

.imovel-thumb {
    border: 0;
    padding: 0;
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: .6;
    /* Otimização: removido transform transition que causava lentidão */
    transition: opacity 0.15s ease;
    flex-shrink: 0;
    position: relative;
    /* Otimização: usar will-change para elementos que mudam frequentemente */
    will-change: opacity;
}

.imovel-thumb:hover {
    opacity: 0.8;
    /* Removido transform scale que causava reflow */
}

.imovel-thumb.current {
    outline: 2px solid #7fd650;
    opacity: 1;
    /* Removido transform scale para performance */
    z-index: 2;
}

.imovel-thumb img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 6px;
    /* Usar transform3d para ativar aceleração de hardware */
    transform: translate3d(0, 0, 0);
}

/* Indicadores de scroll para as miniaturas (opcional) */
.imovel-modal_thumbs::before,
.imovel-modal_thumbs::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.imovel-modal_thumbs::before {
    left: 0;
    background: linear-gradient(to right, #0d0d0d, transparent);
}

.imovel-modal_thumbs::after {
    right: 0;
    background: linear-gradient(to left, #0d0d0d, transparent);
}

.imovel-modal_thumbs.has-scroll-left::before {
    opacity: 1;
}

.imovel-modal_thumbs.has-scroll-right::after {
    opacity: 1;
}

/* Responsividade para as miniaturas */
@media (max-width: 768px) {
    .imovel-thumb img {
        width: 100px;
        height: 66px;
    }
    
    .imovel-modal_thumbs {
        gap: 6px;
        padding: 12px 15px;
    }
    
    .imovel-modal_prev,
    .imovel-modal_next {
        width: 50px;
        height: 50px;
        border-radius: 25px;
        font-size: 20px;
    }
    
    .imovel-modal_prev {
        left: 15px;
    }
    
    .imovel-modal_next {
        right: 15px;
    }
    
    .imovel-modal_close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        border-radius: 20px;
        font-size: 22px;
    }
    
    .imovel-modal_img {
        max-height: calc(100vh - 120px);
    }
}

@media (max-width: 480px) {
    .imovel-thumb img {
        width: 80px;
        height: 53px;
    }
    
    .imovel-modal_thumbs {
        gap: 4px;
        padding: 10px 12px;
    }
    
    .imovel-modal_prev,
    .imovel-modal_next {
        width: 44px;
        height: 44px;
        border-radius: 22px;
        font-size: 18px;
    }
    
    .imovel-modal_prev {
        left: 10px;
    }
    
    .imovel-modal_next {
        right: 10px;
    }
    
    .imovel-modal_img {
        max-height: calc(100vh - 100px);
    }
}

/* Adiciona proteção contra overflow em dispositivos muito pequenos */
@media (max-height: 600px) {
    .imovel-modal_img {
        max-height: calc(100vh - 80px);
    }
    
    .imovel-modal_thumbs {
        padding: 8px 12px;
        min-height: 80px;
    }
}

/* ===== Imóvel: Bloco de informações ===== */
.imovel-page .imovel-info {
    width: 90%;
    margin: 24px auto 64px;
    color: var(--text-color);
    font-size: 17px;
    line-height: 1.6;
}

.imovel-info .info-topline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.imovel-info .photos-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #e3e3e3;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.imovel-info .photos-badge .material-icons {
    font-size: 18px;
    color: #666;
    background-image: none;
    background-clip: initial;
    -webkit-background-clip: initial;
}

.imovel-info .info-code {
    color: #848484;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: .2px;
    margin-bottom: 8px;
}

.imovel-info .info-title {
    font-size: 30px;
    font-weight: 800;
    color: #000;
    margin: 4px 0 12px;
    line-height: 1.25;
}

.imovel-info .info-price {
    font-weight: 800;
    color: #388e3c;
    font-size: 28px;
    margin: 6px 0 10px;
}

/* Linha do preço com botão de ação */
.imovel-info .info-price-row {
    display: flex;
    align-items: center;
    gap: 25px;
}
.imovel-info .info-price-row .info-price {
    margin: 6px 0 10px; /* mantém o espaçamento vertical do preço */
}

/* Botão Agendar Visita nos tons de verde do site */
.imovel-info .btn-agendar-visita {
    display: inline-block;
    text-align: center;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 700;
    transition: all 0.2s;
    background: #4caf50; /* verde principal (consistente com cards) */
    color: #fff;
    text-decoration: none;
}
.imovel-info .btn-agendar-visita:hover {
    background: #43a047; /* variação mais escura no hover */
}

.imovel-info .chips-line {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 6px 0 16px;
}

.imovel-info .chip {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    background: #f2f4f2;
    border: 1px solid #e3e3e3;
}

.imovel-info .info-metrics {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin: 8px 0 18px;
    padding: 0;
}

.imovel-info .info-metrics li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secundary-color);
    font-weight: 700;
}

.imovel-info .info-metrics li img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: grayscale(100%) contrast(1.1);
}

.imovel-info .info-metrics li strong {
    font-size: 20px;
    color: var(--primary-color);
}

/* Linha auxiliar para métricas com gap ajustado */
.imovel-info .info-metrics.gap-15 {
    gap: 15px;
}

/* Valor com peso regular para métricas de preço (ex.: Condomínio/IPTU) */
.imovel-info .info-metrics .metric-value {
    font-weight: 600;
}

.imovel-info .info-description {
    display: grid;
    gap: 10px;
    margin: 50px 0 12px;
}

.imovel-info .info-description p {
    color: var(--primary-color);
    line-height: 1.65;
    font-family: Barlow, Roboto;
    font-size: 20px;
    font-weight: 500;
}

/* Título do aviso importante dentro da descrição */
.imovel-info .info-description .warning-title {
    font-weight: 800;
    color: var(--primary-color);
}

/* Garantir peso 800 mesmo dentro de <strong> */
.imovel-info .info-description .warning-title strong {
    font-weight: 800;
    color: var(--primary-color);
}

/* Título "Descrição" dentro do bloco de descrição do imóvel */
.imovel-info .info-description .desc-title {
    font-weight: 800;
}

.imovel-info .info-meta {
    color: #6f6f6f;
    font-size: 13px;
    margin-top: 6px;
}

@media (max-width: 900px) {
    .imovel-page .imovel-info {
        width: 100%;
        padding: 0 14px;
        margin-bottom: 40px;
    }

    .imovel-info .info-code {
        font-size: 13px;
    }

    .imovel-info .info-title {
        font-size: 24px;
    }

    .imovel-info .info-price {
        font-size: 20px;
    }

    .imovel-info .info-metrics li strong {
        font-size: 18px;
    }
}