/* Base e Tipografia Sob Medida */
        body {
            background-color: #0a0a0f;
            color: #f1f5f9;
            font-family: 'Plus Jakarta Sans', sans-serif;
            overflow-x: hidden;
            -webkit-tap-highlight-color: transparent;
        }

        /* Cartões de Alto Padrão - Renderização Ultra Leve (Zero Jank no Scroll) */
        .luxury-card {
            background: #14141f;
            border: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
            transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.3s ease;
            transform: translate3d(0, 0, 0);
        }

        .luxury-card:hover {
            border-color: rgba(139, 92, 246, 0.5);
            transform: translate3d(0, -6px, 0);
            box-shadow: 0 18px 38px -10px rgba(0, 0, 0, 0.7), 0 0 20px -5px rgba(124, 58, 237, 0.25);
        }

        /* Efeito Flutuante Suave e Leve ao Rolar (Scroll Reveal Otimizado) */
        .reveal {
            opacity: 0;
            transform: translate3d(0, 32px, 0);
            transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
            will-change: opacity, transform;
        }

        .reveal.active {
            opacity: 1;
            transform: translate3d(0, 0, 0);
        }

        /* Stagger Delays para Efeito Flutuante em Cascata */
        .delay-100 { transition-delay: 0.08s; }
        .delay-200 { transition-delay: 0.16s; }
        .delay-300 { transition-delay: 0.24s; }
        .delay-400 { transition-delay: 0.32s; }

        /* Header Dinâmico com Transição Suave */
        .nav-transparent {
            background: rgba(10, 10, 15, 0.65);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            transition: all 0.3s ease;
        }

        .nav-scrolled {
            background: rgba(10, 10, 15, 0.94) !important;
            backdrop-filter: blur(16px) !important;
            -webkit-backdrop-filter: blur(16px) !important;
            border-bottom: 1px solid rgba(139, 92, 246, 0.25) !important;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
        }

        /* Botão Nobre Bravani */
        .btn-bravani {
            background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
            border: 1px solid rgba(192, 132, 252, 0.3);
            color: #ffffff;
            font-weight: 600;
            transition: all 0.25s ease;
            box-shadow: 0 4px 18px rgba(109, 40, 217, 0.35);
        }

        .btn-bravani:hover {
            background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
            border-color: rgba(255, 255, 255, 0.4);
            box-shadow: 0 6px 24px rgba(124, 58, 237, 0.55);
            transform: translateY(-2px);
        }

        /* Botão Translúcido / Outline */
        .btn-outline-luxury {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.12);
            color: #e2e8f0;
            transition: all 0.25s ease;
        }

        .btn-outline-luxury:hover {
            background: rgba(139, 92, 246, 0.15);
            border-color: rgba(139, 92, 246, 0.45);
            color: #ffffff;
            transform: translateY(-2px);
        }

        /* Gradiente Tipográfico Sofisticado */
        .bravani-title-gradient {
            background: linear-gradient(135deg, #ffffff 10%, #f3e8ff 50%, #c084fc 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        /* Scrollbar customizada */
        ::-webkit-scrollbar {
            width: 7px;
            height: 7px;
        }
        ::-webkit-scrollbar-track {
            background: #0a0a0f;
        }
        ::-webkit-scrollbar-thumb {
            background: #1e1e2d;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }
        ::-webkit-scrollbar-thumb:hover {
            background: #7c3aed;
        }

        /* Sliders de Simulação */
        input[type=range] {
            -webkit-appearance: none;
            width: 100%;
            background: #1e1e2d;
            height: 6px;
            border-radius: 4px;
            outline: none;
        }
        input[type=range]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #a855f7;
            cursor: pointer;
            box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
            border: 2px solid #ffffff;
            transition: transform 0.15s ease;
        }
        input[type=range]::-webkit-slider-thumb:hover {
            transform: scale(1.15);
        }
        /* =========================================================
           RESPONSIVIDADE AVANÇADA — CELULAR / TABLET / DESKTOP / 4K
           ========================================================= */

        /* Evita qualquer rolagem horizontal acidental */
        html, body {
            width: 100%;
            max-width: 100%;
            overflow-x: hidden;
        }

        *, *::before, *::after {
            box-sizing: border-box;
        }

        img, svg, video, canvas {
            max-width: 100%;
        }

        input, select, textarea, button {
            max-width: 100%;
            font: inherit;
        }

        /* Áreas clicáveis confortáveis em telas touch */
        @media (pointer: coarse) {
            button, a, select, input[type="range"] {
                -webkit-tap-highlight-color: transparent;
            }

            button, a {
                min-height: 42px;
            }
        }

        /* ---------- CELULARES ---------- */
        @media (max-width: 639px) {
            body {
                font-size: 14px;
                padding-bottom: 64px;
            }

            header#mainHeader {
                padding-top: max(0.65rem, env(safe-area-inset-top));
                padding-bottom: 0.65rem;
            }

            #mainHeader > div {
                padding-left: 0.75rem;
                padding-right: 0.75rem;
            }

            #mainHeader svg {
                height: 2.15rem;
                max-width: 4rem;
            }

            #brandHeaderName {
                font-size: 0.92rem;
                letter-spacing: 0.14em;
            }

            #mainHeader .gap-3\.5 {
                gap: 0.5rem;
            }

            /* Hero */
            #home {
                min-height: auto;
                padding-top: 7.25rem;
                padding-bottom: 4rem;
            }

            #home h1 {
                font-size: clamp(2rem, 9vw, 2.8rem);
                line-height: 1.08;
                word-break: normal;
            }

            #home p {
                font-size: 0.82rem;
            }

            #home .luxury-card {
                padding: 0.7rem;
            }

            #home .luxury-card > div,
            #home .luxury-card select,
            #home .luxury-card input {
                min-height: 44px;
            }

            #categoryFilterButtons {
                width: 100%;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
            }

            #categoryFilterButtons::-webkit-scrollbar {
                display: none;
            }

            /* Catálogos */
            #publicPropertyGrid,
            #featuredPropertyGrid {
                grid-template-columns: minmax(0, 1fr) !important;
            }

            /* Textos longos não estouram o card */
            h1, h2, h3, h4, p, span, a, button, label {
                overflow-wrap: anywhere;
            }

            /* Formulários */
            #contato form,
            #vipModal > div,
            #adminLoginModal > div {
                width: 100%;
            }

            #contato input,
            #contato textarea,
            #vipModal input,
            #adminLoginModal input {
                min-width: 0;
                width: 100%;
            }

            /* Modal de imóvel */
            #propertyDetailModal {
                align-items: flex-start;
                padding: 0.5rem;
            }

            #propertyDetailModal > div {
                width: 100%;
                max-height: calc(100dvh - 1rem);
                margin-top: max(0.25rem, env(safe-area-inset-top));
                margin-bottom: max(0.25rem, env(safe-area-inset-bottom));
                border-radius: 1.25rem;
            }

            #propertyDetailModal .overflow-y-auto {
                padding: 1rem;
            }

            #propertyDetailModal .h-64 {
                height: 14rem;
            }

            #propertyDetailModal .sm\:h-96 {
                height: 14rem;
            }

            #propertyDetailModal .p-6 {
                padding: 1rem;
            }

            /* Botões dos modais sempre cabem na largura */
            #propertyDetailModal .shrink-0,
            #vipModal > div,
            #adminLoginModal > div {
                min-width: 0;
            }

            /* Painel administrativo */
            #adminPanelModal {
                padding: 0.5rem;
                align-items: flex-start;
            }

            #adminPanelModal > div {
                width: 100%;
                max-width: 100%;
                max-height: calc(100dvh - 1rem);
                border-radius: 1.25rem;
            }

            /* Barra inferior respeitando área segura do iPhone */
            body > div.fixed.bottom-0 {
                padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
            }

            /* Evita que elementos decorativos criem overflow */
            #home .w-\[600px\] {
                width: 110vw;
                max-width: 110vw;
            }
        }

        /* ---------- CELULAR PEQUENO ---------- */
        @media (max-width: 380px) {
            #mainHeader svg {
                height: 1.9rem;
                max-width: 3.5rem;
            }

            #brandHeaderName {
                font-size: 0.82rem;
            }

            #mainHeader .flex.items-center.gap-3 {
                gap: 0.35rem;
            }

            #home h1 {
                font-size: 1.85rem;
            }

            #home .grid-cols-2 {
                gap: 0.65rem;
            }

            #home .grid-cols-2 > div {
                min-width: 0;
            }

            #home .grid-cols-2 > div span {
                font-size: 0.63rem;
            }

            #mobileDrawer {
                width: min(88vw, 330px);
            }
        }

        /* ---------- TABLETS ---------- */
        @media (min-width: 640px) and (max-width: 1023px) {
            #home {
                min-height: 760px;
            }

            #publicPropertyGrid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            #featuredPropertyGrid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            #servicos .grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            #servicos .grid > :last-child {
                grid-column: 1 / -1;
            }

            #mainHeader > div {
                padding-left: 1.25rem;
                padding-right: 1.25rem;
            }

            #home h1 {
                font-size: clamp(2.75rem, 6vw, 4rem);
            }
        }

        /* ---------- NOTEBOOKS / DESKTOPS ---------- */
        @media (min-width: 1024px) {
            #publicPropertyGrid,
            #featuredPropertyGrid {
                min-width: 0;
            }

            #publicPropertyGrid > *,
            #featuredPropertyGrid > *,
            #servicos .grid > *,
            #simulador .grid > *,
            #contato form .grid > * {
                min-width: 0;
            }

            /* Mantém o conteúdo elegante em monitores grandes */
            .max-w-7xl {
                width: min(100% - 2rem, 80rem);
            }
        }

        /* ---------- MONITORES GRANDES / 2K / 4K ---------- */
        @media (min-width: 1536px) {
            body {
                font-size: 16px;
            }

            .max-w-7xl {
                width: min(100% - 4rem, 90rem);
                max-width: 90rem;
            }

            #home h1 {
                font-size: clamp(4rem, 4.2vw, 5.4rem);
            }

            #home {
                min-height: min(900px, 92vh);
            }

            #publicPropertyGrid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }

        /* ---------- TELAS BAIXAS / CELULAR DEITADO ---------- */
        @media (max-height: 620px) and (orientation: landscape) {
            #home {
                min-height: auto;
                padding-top: 6rem;
                padding-bottom: 3rem;
            }

            #mobileDrawer {
                overflow-y: auto;
            }

            #vipModal,
            #adminLoginModal,
            #propertyDetailModal,
            #adminPanelModal {
                align-items: flex-start;
            }
        }

        /* ---------- REDUZ ANIMAÇÕES SE O SISTEMA PEDIR ---------- */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                scroll-behavior: auto !important;
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }

            .reveal {
                opacity: 1;
                transform: none;
            }
        }


        /* =========================================================
           RESPONSIVIDADE UNIVERSAL — AJUSTE FINAL
           Complementa o CSS existente sem alterar a identidade visual.
           ========================================================= */

        :root {
            --page-gutter: clamp(0.75rem, 3vw, 2rem);
            --section-space: clamp(3.5rem, 7vw, 6rem);
        }

        html {
            width: 100%;
            max-width: 100%;
            overflow-x: clip;
            scroll-padding-top: 5.5rem;
        }

        body {
            width: 100%;
            min-width: 0;
            overflow-x: clip;
        }

        /* Nada pode forçar o layout além da viewport */
        main, header, footer, section, article, aside, nav, form, div {
            min-width: 0;
        }

        img, video, iframe, svg, canvas {
            display: block;
            max-width: 100%;
        }

        button, a, input, select, textarea {
            min-width: 0;
        }

        /* Containers fluidos em qualquer resolução */
        .max-w-7xl {
            width: min(100% - (var(--page-gutter) * 2), 80rem);
        }

        /* Evita títulos gigantes em monitores ultrawide */
        h1 {
            font-size: clamp(2rem, 4.6vw, 4.8rem);
        }

        h2 {
            font-size: clamp(1.65rem, 3vw, 3rem);
        }

        /* Busca do hero: nunca ultrapassa a tela */
        #home .luxury-card {
            width: 100%;
            min-width: 0;
        }

        #home .luxury-card > * {
            min-width: 0;
        }

        #heroSearchQuery,
        #heroFilterType,
        #heroFilterPurpose {
            min-width: 0;
            max-width: 100%;
        }

        /* Cards dinâmicos e conteúdo vindo do banco */
        #publicPropertyGrid > *,
        #featuredPropertyGrid > *,
        #adminTableBody td,
        .luxury-card {
            min-width: 0;
            max-width: 100%;
        }

        #publicPropertyGrid img,
        #featuredPropertyGrid img {
            max-width: 100%;
            object-fit: contain;
            background-color: #08080f;
        }

        /* Tabelas administrativas podem rolar horizontalmente sem quebrar a página */
        #adminPanelModal table {
            width: 100%;
            min-width: 680px;
        }

        #adminPanelModal .overflow-x-auto {
            max-width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        /* Modais: ocupam a viewport disponível */
        #propertyDetailModal,
        #vipModal,
        #adminLoginModal,
        #adminPanelModal {
            width: 100%;
            max-width: 100vw;
            max-height: 100dvh;
            overscroll-behavior: contain;
        }

        #propertyDetailModal > div,
        #vipModal > div,
        #adminLoginModal > div,
        #adminPanelModal > div {
            max-width: min(96vw, 1100px);
            min-width: 0;
        }

        /* Inputs longos não criam overflow em iOS */
        input, select, textarea {
            width: 100%;
            max-width: 100%;
            font-size: max(12px, 0.75rem);
        }

        textarea {
            resize: vertical;
        }

        /* Touch e acessibilidade */
        @media (pointer: coarse) {
            button, a, select, input, textarea {
                touch-action: manipulation;
            }
        }

        /* ---------- 320–479px: celulares pequenos ---------- */
        @media (max-width: 479px) {
            :root {
                --page-gutter: 0.75rem;
            }

            body {
                font-size: 13px;
                padding-bottom: 4.5rem;
            }

            #mainHeader {
                padding-top: max(0.5rem, env(safe-area-inset-top));
                padding-bottom: 0.5rem;
            }

            #mainHeader > div {
                width: 100%;
                padding-left: 0.75rem;
                padding-right: 0.75rem;
                gap: 0.5rem;
            }

            #mainHeader > div > a {
                min-width: 0;
                flex: 1 1 auto;
                max-width: 58%;
            }

            #mainHeader > div > a > div:last-child {
                min-width: 0;
            }

            #mainHeader svg {
                width: 2.8rem;
                height: 2rem;
            }

            #brandHeaderName {
                font-size: clamp(0.72rem, 3.5vw, 0.9rem);
                letter-spacing: 0.1em;
            }

            #mainHeader .flex.items-center.gap-3 {
                gap: 0.35rem;
                flex-shrink: 0;
            }

            #mainHeader button {
                min-height: 38px;
            }

            #home {
                min-height: auto;
                padding-top: 6.5rem;
                padding-bottom: 3.25rem;
            }

            #home h1 {
                font-size: clamp(1.9rem, 10vw, 2.5rem);
                line-height: 1.05;
            }

            #home .reveal.inline-flex {
                max-width: 100%;
                text-align: left;
            }

            #home .reveal.inline-flex span:last-child {
                white-space: normal;
                line-height: 1.35;
            }

            #home .luxury-card {
                padding: 0.65rem;
                border-radius: 1rem;
            }

            #home .luxury-card > div {
                width: 100%;
            }

            #home .luxury-card select,
            #home .luxury-card input {
                min-height: 42px;
            }

            #home .grid.grid-cols-2 {
                gap: 0.75rem;
            }

            #home .grid.grid-cols-2 > div {
                min-width: 0;
            }

            #home .grid.grid-cols-2 > div > div:last-child {
                min-width: 0;
            }

            #home .grid.grid-cols-2 span {
                overflow-wrap: anywhere;
            }

            #categoryFilterButtons {
                flex-wrap: nowrap;
                overflow-x: auto;
            }

            #catalogo,
            #destaques,
            #servicos,
            #simulador,
            #contato {
                scroll-margin-top: 5rem;
            }

            section {
                padding-top: var(--section-space);
                padding-bottom: var(--section-space);
            }

            /* Mantém botões do contato empilhados */
            #contato form > div:last-child {
                width: 100%;
            }

            /* Barra mobile não invade a área segura do iPhone */
            body > div.fixed.bottom-0 {
                padding-left: max(0.5rem, env(safe-area-inset-left));
                padding-right: max(0.5rem, env(safe-area-inset-right));
                padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
            }

            body > div.fixed.bottom-0 a,
            body > div.fixed.bottom-0 button {
                min-width: 0;
                padding-left: 0.65rem;
                padding-right: 0.65rem;
                white-space: nowrap;
            }

            /* Drawer realmente cabe em 320px */
            #mobileDrawer {
                width: min(88vw, 330px);
                padding: 1rem;
            }

            /* Modais */
            #propertyDetailModal,
            #vipModal,
            #adminLoginModal,
            #adminPanelModal {
                padding: 0.4rem;
            }

            #propertyDetailModal > div,
            #vipModal > div,
            #adminLoginModal > div,
            #adminPanelModal > div {
                width: 100%;
                max-width: 100%;
                border-radius: 1rem;
            }

            #propertyDetailModal .overflow-y-auto {
                padding: 0.9rem;
            }

            #propertyDetailModal .h-64,
            #propertyDetailModal .sm\:h-96 {
                height: min(52vw, 14rem);
                min-height: 10rem;
            }
        }

        /* ---------- 480–767px: celulares grandes / phablets ---------- */
        @media (min-width: 480px) and (max-width: 767px) {
            #home {
                min-height: auto;
                padding-top: 7.5rem;
            }

            #publicPropertyGrid,
            #featuredPropertyGrid {
                grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
            }

            #featuredPropertyGrid {
                gap: 1rem;
            }
        }

        /* ---------- 768–1023px: tablets ---------- */
        @media (min-width: 768px) and (max-width: 1023px) {
            :root {
                --page-gutter: 1.25rem;
            }

            #mainHeader > div {
                width: min(100% - 2rem, 70rem);
            }

            #home {
                min-height: 720px;
            }

            #home .max-w-3xl {
                max-width: 48rem;
            }

            #publicPropertyGrid,
            #featuredPropertyGrid {
                grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
            }

            #servicos .grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            #servicos .grid > :last-child {
                grid-column: 1 / -1;
            }
        }

        /* ---------- 1024–1439px: notebooks / desktops ---------- */
        @media (min-width: 1024px) and (max-width: 1439px) {
            :root {
                --page-gutter: 1.25rem;
            }

            #mainHeader nav {
                gap: 1.25rem;
            }

            #home h1 {
                font-size: clamp(3rem, 5vw, 4.25rem);
            }

            #publicPropertyGrid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }

        /* ---------- 1440–1919px: desktop amplo ---------- */
        @media (min-width: 1440px) {
            :root {
                --page-gutter: 2rem;
            }

            .max-w-7xl {
                width: min(100% - 4rem, 90rem);
            }

            #home h1 {
                font-size: clamp(3.5rem, 4.2vw, 5rem);
            }
        }

        /* ---------- 1920px+: 2K / 4K / ultrawide ---------- */
        @media (min-width: 1920px) {
            :root {
                --page-gutter: 3rem;
            }

            .max-w-7xl {
                width: min(100% - 6rem, 100rem);
                max-width: 100rem;
            }

            #home h1 {
                font-size: clamp(4rem, 4vw, 5.75rem);
            }

            #home {
                min-height: min(950px, 92vh);
            }

            #publicPropertyGrid {
                grid-template-columns: repeat(4, minmax(0, 1fr));
            }

            #featuredPropertyGrid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        /* ---------- Celular em paisagem / telas com pouca altura ---------- */
        @media (max-height: 650px) and (orientation: landscape) {
            #home {
                min-height: auto;
                padding-top: 6rem;
                padding-bottom: 2.5rem;
            }

            #home .space-y-6 {
                gap: 1rem;
            }

            #mobileDrawer {
                overflow-y: auto;
                padding-top: 1rem;
                padding-bottom: 1rem;
            }
        }

        /* ---------- Preferência por menos movimento ---------- */
        @media (prefers-reduced-motion: reduce) {
            .luxury-card:hover,
            .btn-bravani:hover,
            .btn-outline-luxury:hover {
                transform: none !important;
            }
        }

        /* Corrige possíveis palavras/URLs gigantes vindas do conteúdo dinâmico */
        .luxury-card *,
        #publicPropertyGrid *,
        #featuredPropertyGrid *,
        #adminPanelModal * {
            overflow-wrap: anywhere;
        }