/* ==========================================
   CONFIGURAÇÕES GERAIS E VARIÁVEIS MAISON
   ========================================== */
:root {
    --color-navy: #0C0D45;
    --color-gold: #c4a747;
    --color-gold-hover: #a88d3a;
    --color-text-dark: #1a1a3a;
    --color-bg-light: #f4f7f9;
    --color-white: #ffffff;
    --color-whatsapp: #25d366;
    --font-main: 'Montserrat', sans-serif;
    --transition: 0.3s ease-in-out;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Base for rem */
}

/* Compensação de header para rolagem */
#sobre,
#contato {
    scroll-margin-top: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    color: var(--color-text-dark);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    /* Acessibilidade e Área de toque miníma em todo link 'solto' */
    display: inline-block;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    padding: 0 20px;
    margin: 0 auto;
}

/* Utilitários Específicos */
.w-100 {
    width: 100%;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.text-center {
    text-align: center;
}

.color-gold {
    color: var(--color-gold);
}

/* ==========================================
   BOTÕES (MOBILE FIRST: TOQUE > 48px)
   ========================================== */
.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    /* Maior área de toque */
    padding: 0 25px;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--color-gold);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-gold-hover);
}

.btn-secondary {
    background-color: var(--color-navy);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: #1a1a3a;
}

.btn-outline {
    border: 2px solid var(--color-gold);
    color: var(--color-gold);
    background: transparent;
}

.btn-outline:hover {
    background: var(--color-gold);
    color: var(--color-white);
}

/* ==========================================
   HEADER MOBILE FIRST E OVERLAY MENU
   ========================================== */
.main-header {
    background-color: var(--color-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
}

.logo img {
    height: 35px;
    object-fit: contain;
}

/* Oculta o menu horizontal no mobile */
.desktop-menu,
.header-action {
    display: none;
}

.mobile-menu-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--color-navy);
    cursor: pointer;
    min-height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* --------- PAINEL LATERAL MOBILE --------- */
.side-panel {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--color-navy);
    z-index: 2000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.5);
}

.side-panel.active {
    left: 0;
}

.side-panel-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.side-panel-header img {
    height: 30px;
    filter: brightness(0) invert(1);
    /* Deixa a logo azul original toda branca */
}

.close-menu-btn {
    background: transparent;
    border: none;
    color: var(--color-white);
    font-size: 1.5rem;
    min-height: 48px;
    min-width: 48px;
    cursor: pointer;
}

.side-nav-links {
    padding: 20px;
    flex-grow: 1;
}

.side-nav-links li {
    margin-bottom: 20px;
}

.side-nav-links a {
    color: var(--color-white);
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    display: block;
    min-height: 48px;
    /* Toque farto */
    line-height: 48px;
}

.side-panel-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.side-panel-footer .social-icons a {
    color: var(--color-white);
    font-size: 1.5rem;
    margin-right: 15px;
}

/* ==========================================
   SCROLLYTELLING HERO SECTION
   ========================================== */
.hero-scrolly-container {
    height: 300vh;
    /* Define o espaço rolável para a animação (3 vezes a altura da tela) */
    position: relative;
    background-color: #000;
}

.sticky-hero {
    position: sticky;
    top: 0;
    /* Começa fixo mas respeita o final do container pai */
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 10;
}

/* Gradient Overlay e Vignette Effect */
.sticky-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.4) 70%, rgba(0, 0, 0, 1) 100%);
    box-shadow: inset 0 0 200px rgba(0, 0, 0, 0.85);
    pointer-events: none;
    z-index: 11;
}

#hero-canvas {
    width: 100vw;
    height: 100vh;
    display: block;
    object-fit: cover;
}

.hero-text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 12;
    text-align: center;
    color: var(--color-white);
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
    width: 90%;
}

.hero-text-overlay h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
}

.hero-text-overlay p {
    font-size: 1rem;
    font-weight: 500;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-white);
    text-align: center;
    font-size: 0.9rem;
    animation: bounce 2s infinite;
    z-index: 12;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

.scroll-indicator i {
    display: block;
    font-size: 1.5rem;
    margin-top: 5px;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* ==========================================
   AUTORIDADE LOPES: BARRA DE BUSCA E MODAL
   ========================================== */
.search-section {
    background-color: var(--color-bg-light);
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
    position: relative;
    z-index: 20;
    /* Fica acima de possíveis sobreposições */
}

/* No mobile exibimos só o botão que abre o modal */
.btn-mobile-filter {
    background-color: var(--color-navy);
    color: var(--color-white);
    min-height: 54px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.desktop-search-form {
    display: none;
    /* Escondido no Mobile */
}

/* Modal do Filtro (Drawer Mobile) */
.filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

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

.filter-modal-content {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: var(--color-white);
    border-radius: 20px 20px 0 0;
    padding: 30px 20px;
    transition: var(--transition);
}

.filter-modal.active .filter-modal-content {
    bottom: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.close-filter-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-dark);
    min-height: 48px;
    min-width: 48px;
}

.mobile-search-form label {
    display: block;
    margin-top: 15px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-navy);
}

.mobile-search-form select,
.mobile-search-form input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 0 15px;
    margin-top: 5px;
    font-size: 1rem;
    color: var(--color-text-dark);
}

/* ==========================================
   CARDS DE IMÓVEIS (Sugestões/Catálogo)
   ========================================== */
.suggestions {
    padding: 60px 0;
}

.section-title {
    font-size: 1.8rem;
    color: var(--color-navy);
    margin-bottom: 30px;
    font-weight: 700;
    text-align: center;
}

.cards-grid {
    display: flex;
    flex-direction: column;
    /* Mobile: 1 por linha (Stack) */
    gap: 30px;
}

.card {
    position: relative;
    background: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
    transition: transform var(--transition), box-shadow var(--transition);
    width: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* Etiquetas/Badges sobre a foto */
.card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    color: var(--color-white);
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.badge-lancamento {
    background-color: var(--color-navy);
}

.badge-pronto {
    background-color: #2e7d32;
}

/* Verde para prontos */
.badge-oportunidade {
    background-color: var(--color-gold);
    color: var(--color-text-dark);
}

.card-info {
    padding: 20px;
}

.card-info .price {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-gold);
    margin-bottom: 5px;
}

.card-info h3 {
    font-size: 1.2rem;
    color: var(--color-navy);
    margin-bottom: 10px;
}

.summary-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
}

.icons-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--color-text-dark);
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    margin-bottom: 20px;
}

.icons-info i {
    color: var(--color-gold);
    margin-right: 5px;
}

/* ==========================================
   SOBRE & CONTATO
   ========================================== */
.about {
    background-color: var(--color-navy);
    color: var(--color-white);
    padding: 80px 0;
}

.about-content {
    display: flex;
    flex-direction: column;
    /* Mobile first stack */
    text-align: center;
    gap: 30px;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    border: 4px solid var(--color-gold);
    border-radius: 16px;
    margin: 0 auto;
}

.about-text h2 {
    color: var(--color-gold);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.contact {
    padding: 80px 0;
}

.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.contact-info h2 {
    color: var(--color-navy);
    margin-bottom: 15px;
}

.contact-methods i {
    width: 20px;
    margin-right: 10px;
}

.glass-form {
    background-color: var(--color-bg-light);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
}

.glass-form h3 {
    text-align: center;
    color: var(--color-navy);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 700;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-navy);
    text-align: left;
}

.contact-form input,
.contact-form textarea {
    padding: 15px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
}

.contact-form textarea {
    resize: none;
    min-height: 120px;
}

/* ==========================================
   FOOTER E WHATSAPP FLUTUANTE
   ========================================== */
footer {
    background-color: var(--color-navy);
    color: var(--color-white);
    padding: 32px 0 16px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-logo img {
    height: 32px;
}

.footer-content .social-icons a {
    color: var(--color-white);
    font-size: 1.44rem;
    margin: 0 8px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
}

footer p {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 10px;
}

/* WhatsApp Estrela */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 20px;
    /* Evitando canto extremo no mobile */
    background-color: var(--color-whatsapp);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    z-index: 999;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
}

/* Efeito Pulsante para o WhatsApp */
.pulse-anim {
    animation: pulsar 2s infinite;
}

@keyframes pulsar {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ==========================================
   ANIMAÇÕES SCROLL-TRIGGERED VINCULADAS AO JS
   ========================================== */
.animate-on-scroll {
    visibility: hidden;
    /* Evita flash antes do JS carregar */
}

/* Fade In */
.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    visibility: visible;
}

/* Slide Up */
.slide-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* ==========================================
   MEDIA QUERIES (ADAPTAÇÕES PARA DESKTOP)
   ========================================== */
@media (min-width: 768px) {

    /* Container base maior */
    .container {
        max-width: 1200px;
    }

    /* HEADER */
    .mobile-menu-btn {
        display: none;
    }

    .desktop-menu {
        display: flex;
        gap: 30px;
    }

    .desktop-menu a {
        font-weight: 700;
        font-size: 0.9rem;
        color: var(--color-navy);
    }

    .desktop-menu a:hover,
    .desktop-menu a.active {
        color: var(--color-gold);
    }

    .header-action {
        display: block;
    }

    /* HERO */
    .hero-text-overlay h1 {
        font-size: 3rem;
    }

    .hero-text-overlay p {
        font-size: 1.2rem;
    }

    /* SEARCH BAR (PADRÃO LOPES) */
    .btn-mobile-filter {
        display: none;
    }

    .search-section {
        padding: 30px 0;
    }

    .desktop-search-form {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--color-white);
        padding: 15px 20px;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        gap: 15px;
    }

    .desktop-search-form .form-group {
        flex: 1;
        position: relative;
    }

    .desktop-search-form select,
    .desktop-search-form input {
        width: 100%;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 12px 15px;
        font-size: 0.95rem;
        color: var(--color-text-dark);
        background: #fdfdfd;
        min-height: 48px;
    }

    .desktop-search-form .input-search {
        flex: 2;
    }

    .input-search i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #999;
    }

    .input-search input {
        padding-left: 40px;
    }

    /* CARDS GRID */
    .cards-grid {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .card {
        width: calc(33.333% - 20px);
    }

    /* SOBRE */
    .about-content {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }

    .about-image {
        flex: 1;
    }

    .about-text {
        flex: 1;
    }

    .about-image img {
        margin: 0;
    }

    /* CONTATO */
    .contact-grid {
        flex-direction: row;
        align-items: center;
    }

    .contact-info,
    .contact-form {
        flex: 1;
    }

    /* FOOTER */
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    footer p {
        margin-top: 0;
    }
}

@media (min-width: 1024px) {

    /* WHATSAPP FLOAT RIGHT/BOTTOM NO DESKTOP */
    .whatsapp-float {
        bottom: 40px;
        right: 40px;
        width: 70px;
        height: 70px;
        font-size: 38px;
    }
}