/* Web pública — adaptación móvil, tablet, desktop y pantallas grandes (hasta 4K) */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

.web-body {
    overflow-x: clip;
    min-height: 100vh;
    min-height: 100dvh;
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
}

.web-body .container {
    width: min(100% - 2rem, 1320px);
    max-width: 100%;
}

@media (min-width: 1400px) {
    .web-body .container {
        width: min(100% - 3rem, 1440px);
    }
}

@media (min-width: 1920px) {
    .web-body .container {
        width: min(100% - 4rem, 1600px);
    }
}

@media (min-width: 2560px) {
    .web-body .container {
        width: min(92vw, 1800px);
    }

    .web-hero h1 {
        font-size: clamp(3rem, 3.5vw, 4.5rem);
    }

    .section-title {
        font-size: clamp(2.25rem, 2.2vw, 3rem);
    }
}

/* Hero: altura fluida en móvil y escritorio */
.web-hero {
    min-height: clamp(520px, 92svh, 900px);
    min-height: clamp(520px, 92dvh, 900px);
}

@supports not (min-height: 100dvh) {
    .web-hero {
        min-height: 88vh;
    }
}

.web-hero-img {
    background-size: cover;
    background-position: center;
}

@media (max-width: 767.98px) {
    .web-hero-img--3 {
        background-position: 62% center;
    }
}

/* Imágenes y vídeos responsivos */
.web-body img,
.web-body video,
.web-body iframe {
    max-width: 100%;
    height: auto;
}

.web-body .inmueble-hero-img {
    max-height: min(520px, 60vh);
}

/* Formularios y botones táctiles (iOS / Android) */
.web-body .btn,
.web-body .nav-link,
.web-body .form-control,
.web-body .form-select {
    min-height: 44px;
}

.web-body .btn-sm {
    min-height: 38px;
}

.web-search-box {
    width: 100%;
}

.web-search-form .btn-gold {
    min-height: 48px;
}

/* Navbar móvil */
@media (max-width: 991.98px) {
    .web-navbar .navbar-collapse {
        padding: 1rem 0 1.25rem;
        border-top: 1px solid rgba(201, 169, 98, 0.2);
        margin-top: 0.75rem;
    }

    .web-navbar .nav-link {
        padding: 0.65rem 0.5rem !important;
    }

    .web-navbar .btn-gold {
        width: 100%;
        margin-top: 0.5rem;
    }

    .web-logo,
    .footer-logo {
        height: 52px;
        max-height: 52px;
        max-width: min(260px, 62vw);
    }
}

/* Footer en pantallas pequeñas */
@media (max-width: 767.98px) {
    .web-footer .footer-copy,
    .web-footer .footer-legal {
        text-align: center !important;
    }

    .web-footer .footer-legal {
        margin-bottom: 0.75rem;
    }
}

/* Chatbot: safe area en iPhone */
#chatbot-widget {
    bottom: max(24px, env(safe-area-inset-bottom, 24px));
    right: max(16px, env(safe-area-inset-right, 16px));
}

@media (max-width: 575.98px) {
    #chatbot-panel {
        width: calc(100vw - 24px);
        max-width: none;
        max-height: min(85dvh, calc(100dvh - 80px));
        border-radius: 12px 12px 4px 4px;
    }

    #chatbot-body {
        max-height: none;
    }

    #chatbot-toggle {
        width: 52px;
        height: 52px;
    }
}

/* Tarjetas y grids */
.landing-zone-pill {
    margin: 0.25rem;
}

.property-card img,
.inmueble-card img {
    width: 100%;
    object-fit: cover;
}

/* Evitar desbordes en tablas o filtros */
.filters-premium,
.web-search-box {
    max-width: 100%;
}

/* Preferencia movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
