/* ==========================================================================
   VENTABLE — MOBILE & MOTION ENHANCEMENTS
   Inspiration: Ayanip (premium motion) + Lando (touch/accessibility)
   Loads AFTER style.css. Honors the existing "Ventable Luxury" tokens.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reduced-motion guard (Ayanip pattern)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
    }

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

/* --------------------------------------------------------------------------
   2. Modern viewport foundation (notch / safe areas)
   -------------------------------------------------------------------------- */
@supports (padding: max(0px)) {
    .luxury-navbar {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .luxury-footer {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
}

/* --------------------------------------------------------------------------
   3. Smooth, premium transitions everywhere (Lando + Ayanip easing)
   -------------------------------------------------------------------------- */
a, button, input, select, textarea,
.luxury-nav-link, .luxury-action-card, .luxury-property-card,
.btn-luxury-primary, .btn-luxury-secondary,
.navbar-toggler, .luxury-footer-social a,
.featured-carousel-dot {
    transition:
        color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   4. Tactile feedback — active states (Lando 0.98 / Ayanip 0.95)
   -------------------------------------------------------------------------- */
.luxury-action-card:active,
.luxury-property-card:active,
.btn-luxury-primary:active,
.btn-luxury-secondary:active,
.luxury-footer-social a:active,
.navbar-toggler:active,
.featured-carousel-dot:active,
.btn:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}

/* --------------------------------------------------------------------------
   5. Focus-visible accessibility rings (Lando pattern)
   -------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.luxury-action-card:focus-visible,
.luxury-property-card:focus-visible,
.navbar-toggler:focus-visible {
    outline: 3px solid rgba(162, 154, 108, 0.55);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Form fields: gold focus ring layered on existing styling */
.form-control:focus,
.form-select:focus,
.luxury-form-input:focus,
.property-contact-input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(162, 154, 108, 0.18);
    outline: none;
}

/* --------------------------------------------------------------------------
   6. Mobile touch-target sizing (Lando: 48px min / 56px inputs)
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    /* Generous tap targets for nav + footer links */
    .luxury-nav-link {
        display: flex;
        align-items: center;
        min-height: 48px;
        font-size: 1rem;
        letter-spacing: 0.08em;
    }

    .luxury-footer-links a,
    .luxury-footer-social a {
        display: inline-block;
        min-height: 44px;
        line-height: 44px;
    }

    /* Taller form fields for accurate touch */
    .form-control,
    .form-select,
    .luxury-form-input,
    .property-contact-input,
    textarea.form-control {
        min-height: 54px;
        font-size: 16px; /* prevents iOS auto-zoom */
    }

    /* Full-width CTAs on mobile, comfortable padding */
    .btn-luxury-primary,
    .btn-luxury-secondary,
    .btn.btn-primary,
    .properties-filters .btn-primary {
        display: flex;
        width: 100%;
        justify-content: center;
        align-items: center;
        min-height: 54px;
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
        letter-spacing: 0.12em;
    }

    /* Larger hamburger tap target */
    .navbar-toggler {
        min-width: 48px;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   7. Mobile hero optimization (the 921px fixed height is too tall)
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .luxury-hero {
        min-height: 100svh;       /* respects mobile browser chrome */
        height: 100svh;
        padding: 5.5rem 1.25rem 7rem; /* room for content + contact bar */
        /* Push content toward the bottom so the "Quiero Comprar" cards sit
           well below the floating header (away from the top on first load). */
        align-items: flex-end;
        justify-content: flex-end;
    }

    .luxury-hero-content {
        padding: 0;
        margin-bottom: 1.5rem; /* breathing room above the mobile contact bar */
    }

    .luxury-hero-title {
        font-size: clamp(1.9rem, 7vw, 2.5rem);
        margin-bottom: 1.5rem;
        line-height: 1.15;
    }

    .luxury-action-card {
        padding: 1.75rem 1.25rem;
        max-width: 100%;
        gap: 0.25rem;
    }

    .luxury-action-icon .material-symbols-outlined {
        font-size: 3rem !important;
    }

    .luxury-action-title {
        font-size: 1.15rem;
    }
}

/* Smooth carousel item cross-fade */
.carousel-item img {
    transition: transform 8s ease-out;
}

/* --------------------------------------------------------------------------
   7b. Properties filters — legible price labels over the dark hero
   The price slider labels (minPriceLabel / maxPriceLabel) use Bootstrap's
   .text-muted (#6c757d grey), which is nearly invisible on the dark blue
   translucent filter panel. Promote them to bold white with a gold accent
   chip so the euro amounts read clearly.
   -------------------------------------------------------------------------- */
.properties-filters small.text-muted,
.properties-filters #minPriceLabel,
.properties-filters #maxPriceLabel {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(162, 154, 108, 0.55);
    color: #ffffff !important;
    font-family: 'Manrope', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* Make the euro sign a gold accent for emphasis */
.properties-filters #minPriceLabel::first-letter,
.properties-filters #maxPriceLabel::first-letter {
    color: var(--secondary);
}

/* Style the range sliders themselves so the track is visible on dark bg */
.properties-filters .form-range {
    height: 1.5rem;
    margin-top: 0.25rem;
}

.properties-filters .form-range::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.properties-filters .form-range::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.properties-filters .form-range::-webkit-slider-thumb {
    margin-top: -6px;
    background: var(--secondary);
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.properties-filters .form-range::-moz-range-thumb {
    background: var(--secondary);
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Focus ring stays on-brand */
.properties-filters .form-range:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(162, 154, 108, 0.35);
    border-radius: 999px;
}

/* --------------------------------------------------------------------------
   8. Navbar glass intensifies on scroll (Ayanip depth)
   -------------------------------------------------------------------------- */
.luxury-navbar {
    transition:
        background-color 0.4s ease,
        box-shadow 0.4s ease;
    /* Sombra base muy sutil para dar profundidad desde el inicio */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.luxury-navbar.scrolled {
    background-color: rgba(29, 53, 91, 0.92) !important;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
}

@media (max-width: 767.98px) {
    .luxury-navbar.scrolled {
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
    }
}

@media (prefers-reduced-motion: reduce) {
    .luxury-navbar,
    .luxury-navbar.scrolled {
        transition: none;
    }
}

/* Navbar size is constant — no padding/height changes on scroll */

/* Mobile nav panel: refined slide + blur */
@media (max-width: 767.98px) {
    #mobileNav {
        background-color: rgba(15, 28, 44, 0.97);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        margin: 0 -1.5rem;
        padding: 0.5rem 1.5rem 1.75rem;
    }

    #mobileNav .nav {
        gap: 0.25rem !important;
    }

    #mobileNav .luxury-nav-link {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding: 0.4rem 0;
    }
}

/* --------------------------------------------------------------------------
   9. Property card polish (hover depth on pointer / persistent depth on touch)
   -------------------------------------------------------------------------- */
.luxury-property-card {
    will-change: transform;
}

@media (hover: hover) {
    .luxury-property-card:hover {
        box-shadow: 0 24px 48px -16px rgba(2, 31, 69, 0.18);
    }
}

@media (hover: none) {
    .luxury-property-card {
        box-shadow: 0 4px 16px rgba(2, 31, 69, 0.08);
    }
}

/* Featured carousel: peek edges on mobile */
@media (max-width: 767.98px) {
    .featured-carousel-card {
        flex: 0 0 82%;
        max-width: 82%;
    }

    .featured-carousel-track {
        padding: 0 1rem 1.5rem;
    }
}

/* --------------------------------------------------------------------------
   10. Skeleton loader for property images (premium perceived performance)
   -------------------------------------------------------------------------- */
.skeleton {
    background: linear-gradient(
        100deg,
        rgba(241, 244, 249, 0.6) 30%,
        rgba(226, 230, 238, 0.9) 50%,
        rgba(241, 244, 249, 0.6) 70%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Smooth lazy image reveal */
img.lazy-image {
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

img.lazy-image.loaded {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   12. Back-to-top floating button
   -------------------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1040;
    width: 48px;
    height: 48px;
    display: none;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 24px rgba(2, 31, 69, 0.28);
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease,
        background-color 0.3s ease;
}

.back-to-top.is-visible {
    display: inline-flex;
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--secondary);
}

@media (max-width: 767.98px) {
    .back-to-top {
        bottom: 1.25rem;
        right: 0.75rem;
        width: 44px;
        height: 44px;
    }
}

/* --------------------------------------------------------------------------
   12b. Botón flotante de WhatsApp (contacto directo, patrón inmobiliario)
   Visible en móvil/tablet. En la ficha de propiedad no se inyecta (ya hay
   barra de acción). Se apila bajo el botón "volver arriba".
   -------------------------------------------------------------------------- */
.vt-wa-fab {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1039;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #25d366;            /* verde WhatsApp: canal reconocible al instante */
    color: #fff;
    font-size: 1.7rem;
    text-decoration: none;
    box-shadow: 0 10px 28px -6px rgba(37, 211, 102, 0.55);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.vt-wa-fab:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 32px -6px rgba(37, 211, 102, 0.6); }
.vt-wa-fab:active { transform: scale(0.94); }
.vt-wa-fab:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Solo en móvil/tablet (en escritorio el contacto está en la nav) */
@media (min-width: 992px) {
    .vt-wa-fab { display: none; }
}

/* En la ficha, la barra de acción inferior solo es visible en móvil (<768px);
   ahí ocultamos el FAB para no duplicar el contacto. En tablet (768-991px) la
   barra está oculta, así que el FAB SÍ se muestra (atajo de contacto presente). */
@media (max-width: 767.98px) {
    body:has(.detail-action-bar) .vt-wa-fab { display: none; }
}

/* Cuando el FAB existe, el botón "volver arriba" se sitúa encima de él */
body:has(.vt-wa-fab) .back-to-top { bottom: 5rem; }
@media (max-width: 767.98px) {
    body:has(.vt-wa-fab) .back-to-top { bottom: 5.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    .vt-wa-fab { transition: none; }
}

/* --------------------------------------------------------------------------
   13. Section reveal helper (JS IntersectionObserver fallback when no AOS)
   -------------------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal[style*="--reveal-delay"] {
    transition-delay: var(--reveal-delay);
}

/* --------------------------------------------------------------------------
   14. Refined scrollbar (Lando style)
   -------------------------------------------------------------------------- */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(162, 154, 108, 0.5) transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(29, 53, 91, 0.35);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(162, 154, 108, 0.7);
    background-clip: content-box;
}

/* --------------------------------------------------------------------------
   15. GLightbox theme — aligned with Ventable brand
   -------------------------------------------------------------------------- */
.glightbox-clean .gslide-description {
    background: rgba(29, 53, 91, 0.92);
}

.glightbox-clean .gslide-title {
    font-family: 'Fraunces', serif;
    color: #fff;
}

.glightbox-clean .gslide-desc {
    color: rgba(255, 255, 255, 0.75);
    font-family: 'Manrope', sans-serif;
}

.glightbox-clean .gclose,
.glightbox-clean .gnext,
.glightbox-clean .gprev {
    background-color: rgba(29, 53, 91, 0.85);
    border: 1px solid rgba(162, 154, 108, 0.4);
}

.glightbox-clean .gclose:hover,
.glightbox-clean .gnext:hover,
.glightbox-clean .gprev:hover {
    background-color: var(--secondary);
}

.gloader {
    border-color: var(--secondary) transparent transparent;
}

/* --------------------------------------------------------------------------
   16. AOS — soften default distance for the quiet-luxury feel
   -------------------------------------------------------------------------- */
[data-aos="fade-up"] {
    transform: translateZ(0) translateY(24px);
}

[data-aos] {
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important;
    transition-duration: 700ms !important;
}

/* --------------------------------------------------------------------------
   17. Polish: selection, tap highlight, dynamic viewport on iOS
   -------------------------------------------------------------------------- */
::selection {
    background: rgba(162, 154, 108, 0.28);
    color: #021f45;
}

html {
    -webkit-tap-highlight-color: rgba(162, 154, 108, 0.18);
}

img {
    -webkit-user-drag: none;
}

@supports (height: 100dvh) {
    @media (max-width: 767.98px) {
        .luxury-hero { height: 100dvh; min-height: 100dvh; }
    }
}

/* ==========================================================================
   18. FLOATING NAVBAR — detached header with rounded corners (top offset)
   Overrides the sticky full-width navbar from style.css with a floating,
   rounded, glassy bar that sits with padding from the viewport top.
   ========================================================================== */
:root {
    --vt-nav-offset: 1rem;       /* gap from viewport top + sides */
    --vt-nav-radius: 20px;       /* rounded corner size */
    --vt-nav-maxw: 1320px;       /* max width on large screens */
    --vt-nav-h: 8.75rem;         /* reserved space below the floating bar */
    --vt-nav-glass: 0.82;        /* base background opacity */
    --vt-nav-glass-scrolled: 0.95;
    /* Navbar color — Oxford blue #1d355b = rgb(29, 53, 91) */
    --vt-nav-color: 29, 53, 91;
}

@media (max-width: 767.98px) {
    :root {
        --vt-nav-offset: 0.75rem;
        --vt-nav-radius: 16px;
        --vt-nav-h: 7rem;
    }
}

/* --- Floating bar geometry ---------------------------------------------- */
.luxury-navbar {
    position: fixed !important;
    top: var(--vt-nav-offset) !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%);
    width: calc(100% - (2 * var(--vt-nav-offset))) !important;
    max-width: var(--vt-nav-maxw);
    margin: 0 !important;

    padding: 0.8rem 1.75rem !important;

    border-radius: var(--vt-nav-radius) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;

    background-color: rgba(var(--vt-nav-color), var(--vt-nav-glass)) !important;
    backdrop-filter: saturate(170%) blur(18px);
    -webkit-backdrop-filter: saturate(170%) blur(18px);

    box-shadow:
        0 12px 32px -10px rgba(var(--vt-nav-color), 0.42),
        0 4px 12px rgba(var(--vt-nav-color), 0.16) !important;

    /* Clip the mobile panel so it follows the rounded shape */
    overflow: hidden;

    z-index: 1000;
}

/* The inner .luxury-container must fill the floating bar (it has an inline
   max-width:1280px on each page that would double-restrict the width). */
.luxury-navbar .luxury-container {
    max-width: 100% !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

/* Keep the horizontal centering transform through state changes.
   NOTE: on scroll we ONLY change opacity + shadow — never padding or logo
   height — so the header keeps a constant size (no jump). */
.luxury-navbar.scrolled {
    transform: translateX(-50%);
    background-color: rgba(var(--vt-nav-color), var(--vt-nav-glass-scrolled)) !important;
    box-shadow:
        0 18px 38px -10px rgba(var(--vt-nav-color), 0.48),
        0 6px 14px rgba(var(--vt-nav-color), 0.18) !important;
}

/* Logo keeps a constant height whether scrolled or not */

/* Desktop: barra flotante más baja (logo + padding más compactos) */
@media (min-width: 768px) {
    :root { --vt-nav-h: 7.5rem; }
    .luxury-navbar { padding: 0.5rem 1.75rem !important; }
    .luxury-brand-img { height: 64px; }
}

/* --- Reserve space so content is never hidden behind the bar ------------- */
body {
    padding-top: var(--vt-nav-h);
}

/* Home + properties listing have full-bleed heroes: the bar floats on top */
body.page-index,
body.page-propiedades {
    padding-top: 0;
}

/* Push the properties hero's inner content down so the title isn't covered */
body.page-propiedades .properties-hero-section {
    padding-top: calc(var(--vt-nav-h) + 1.5rem);
}

/* Give the detail page's first section breathing room under the bar */
body.page-propiedades .property-detail-section,
body.page-propiedades main > section:first-child {
    padding-top: calc(var(--vt-nav-h) + 1rem);
}

/* --- Mobile refinements ------------------------------------------------- */
@media (max-width: 767.98px) {
    .luxury-navbar {
        padding: 0.55rem 1rem !important;
    }

    /* Mobile panel continues the rounded silhouette of the floating bar */
    #mobileNav {
        margin: 0 -1rem !important;
        padding: 0.5rem 1rem 1.25rem !important;
        background-color: rgba(var(--vt-nav-color), 0.55) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
}

/* Lift the floating bar above the mobile contact bar if they ever overlap */
@media (max-width: 767.98px) {
    .luxury-navbar { z-index: 1060; }
}

/* The hero content should start below the floating bar (not under it) */
@media (min-width: 768px) {
    body.page-index .luxury-hero-content {
        padding-top: 2rem;
    }
}

/* --------------------------------------------------------------------------
   19. Property DETAIL — mobile gallery (filmstrip) & cinematic reveal
   detalle.js renders: .property-image-main (hero img),
   #thumbnailRow > .col-4 > .thumbnail-container.active-thumb > img.thumbnail-img
   Goal: phone-friendly, swipeable gallery like premium listing apps,
   keeping the Ventable luxury tokens (gold accent, sharp edges).
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    /* Hero image: cinematic but not screen-hogging; soft rise-in on load */
    .property-image-main {
        height: 58vh !important;
        min-height: 300px;
        max-height: 480px;
        animation: vt-img-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    /* Thumbnails: cramped 3-col grid -> horizontal swipe filmstrip */
    #thumbnailRow {
        display: flex !important;
        flex-wrap: nowrap;
        gap: 0.5rem;
        margin: 0.75rem 0 0 !important;
        padding-bottom: 0.35rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

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

    #thumbnailRow > [class*="col-"] {
        flex: 0 0 30%;
        max-width: 30%;
        width: 30%;
        padding: 0 !important;
        scroll-snap-align: start;
    }

    #thumbnailRow .thumbnail-img {
        height: 88px !important;
    }
}

/* Active / inactive thumbnail framing — antique gold (all viewports) */
.thumbnail-container {
    position: relative;
    cursor: pointer;
    opacity: 0.7;
    outline: 2px solid transparent;
    outline-offset: -2px;
    transition: opacity 0.25s ease, outline-color 0.25s ease;
}

.thumbnail-container.active-thumb {
    opacity: 1;
    outline-color: var(--secondary);
}

@media (hover: hover) {
    .thumbnail-container:hover { opacity: 1; }
}

@keyframes vt-img-rise {
    from { opacity: 0; transform: scale(1.04); }
    to   { opacity: 1; transform: scale(1); }
}

/* --------------------------------------------------------------------------
   19. Property LISTING cards — mobile legibility & touch affordance
   script.js renders .luxury-property-card with .luxury-property-header
   (title + price), .luxury-property-details (.luxury-property-detail-item >
   .luxury-property-detail-value + label). On touch the hover overlay never
   fires, so we add a persistent "Ver detalle" cue + clearer stat hierarchy.
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .luxury-property-content {
        padding: 1.1rem 1.25rem 1.35rem;
    }

    /* Title + price: price becomes the clear focal point (size + weight) */
    .luxury-property-header {
        gap: 0.15rem;
        margin-bottom: 0.6rem;
    }

    .luxury-property-title {
        font-size: 1.2rem;
        line-height: 1.25;
    }

    .luxury-property-price {
        font-size: 1.5rem;
        font-weight: 600;
        letter-spacing: -0.01em;
    }

    .luxury-property-location {
        font-size: 0.95rem;
        margin-bottom: 0.85rem;
    }

    /* Stats: the NUMBER leads, the unit label sits quietly beneath it */
    .luxury-property-details {
        gap: 0;
        justify-content: space-between;
        padding-top: 0.9rem;
    }

    .luxury-property-detail-item {
        flex: 1;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.05rem;
    }

    .luxury-property-detail-value {
        font-family: 'Fraunces', serif;
        font-size: 1.2rem !important;
        font-weight: 500;
        color: var(--primary);
        line-height: 1;
    }

    /* Touch affordance: hover overlay won't trigger — show a standing cue */
    .luxury-property-image-wrapper::after {
        content: "Ver detalle";
        position: absolute;
        right: 0.7rem;
        bottom: 0.7rem;
        z-index: 3;
        background: rgba(2, 31, 69, 0.82);
        color: #fff;
        font-family: 'Manrope', sans-serif;
        font-size: 0.6rem;
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        padding: 0.4rem 0.7rem;
        pointer-events: none;
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
    }

    /* Tactile image nudge when the card is pressed */
    .luxury-property-card:active .luxury-property-image {
        transform: scale(1.03);
    }
}

/* --------------------------------------------------------------------------
   21. Detail swipe gallery — photo counter + slide-in transition
   Built by initDetailSwipeGallery(). Counter overlays the main image;
   the image fades/slides when paged by swipe.
   -------------------------------------------------------------------------- */
.gallery-counter {
    position: absolute;
    right: 0.85rem;
    bottom: 0.85rem;
    z-index: 3;
    display: none;
    padding: 0.3rem 0.7rem;
    background: rgba(2, 31, 69, 0.78);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    pointer-events: none;
}

@keyframes vt-slide-r {
    from { opacity: 0.4; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes vt-slide-l {
    from { opacity: 0.4; transform: translateX(-16px); }
    to   { opacity: 1; transform: translateX(0); }
}

.property-image-main.gallery-slide-r { animation: vt-slide-r 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
.property-image-main.gallery-slide-l { animation: vt-slide-l 0.45s cubic-bezier(0.16, 1, 0.3, 1); }

/* --------------------------------------------------------------------------
   22. Collapsible listing filters (mobile) — built by initMobileFilters()
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .filters-toggle {
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
    }

    .filters-toggle h5 {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        font-family: 'Fraunces', serif;
    }

    .filters-toggle > a {
        font-family: 'Manrope', sans-serif;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    .filters-count {
        display: none;
        align-items: center;
        justify-content: center;
        min-width: 1.3rem;
        height: 1.3rem;
        padding: 0 0.4rem;
        background: var(--secondary);
        color: #fff;
        font-family: 'Manrope', sans-serif;
        font-size: 0.7rem;
        font-weight: 700;
        line-height: 1;
    }

    .filters-chevron {
        font-size: 0.8rem;
        color: var(--secondary);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    #filterForm:not(.filters-collapsed) .filters-chevron {
        transform: rotate(180deg);
    }

    /* Collapsed: only the toggle header stays visible */
    #filterForm.filters-collapsed > *:not(.filters-toggle) {
        display: none !important;
    }

    #filterForm.filters-collapsed .filters-toggle {
        margin-bottom: 0 !important;
    }
}

/* --------------------------------------------------------------------------
   23. Detail key-stat icons — built by initDetailStats()
   -------------------------------------------------------------------------- */
.stat-icon {
    font-size: 1.05rem;
    line-height: 1;
    color: var(--secondary);
    vertical-align: middle;
    margin-right: 0.3rem;
    position: relative;
    top: -1px;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

/* --------------------------------------------------------------------------
   24. Listing skeleton cards — shimmer placeholders (uses .skeleton from §10)
   -------------------------------------------------------------------------- */
.skeleton-card {
    background: #fff;
    overflow: hidden;
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: block;
}

.skeleton-body {
    padding: 1.1rem 1.25rem 1.35rem;
}

.skeleton-line {
    height: 0.8rem;
}

.skeleton-line + .skeleton-line {
    margin-top: 0.6rem;
}

.skeleton-line.sk-w1 { width: 70%; }
.skeleton-line.sk-w2 { width: 42%; }
.skeleton-line.sk-w3 { width: 88%; margin-top: 1.15rem; }

/* --------------------------------------------------------------------------
   25. Compact mobile footer — was ~930px tall (links stacked at 44px each).
   Tighten spacing, kill the oversized tap-tall links, and place
   Navegación + Síguenos side by side with Contacto full-width below.
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    /* Tighten the oversized vertical gutters between footer blocks */
    .luxury-footer .row.g-5 { --bs-gutter-y: 1.5rem; }
    .luxury-footer .col-lg-8 > .row { --bs-gutter-y: 1.25rem; }

    .luxury-footer-description {
        margin-bottom: 0;
        max-width: none;
    }

    .luxury-footer-heading {
        margin-bottom: 0.6rem;
    }

    /* Link lists: remove the 44px tap-tall stacking that ballooned the height */
    .luxury-footer-links {
        margin-bottom: 0;
    }

    .luxury-footer-links li {
        margin-bottom: 0.15rem;
    }

    .luxury-footer-links a {
        min-height: 0 !important;
        line-height: 1.65 !important;
        display: inline-block !important;
    }

    /* Navegación (1) + Síguenos (3) on one row; Contacto (2) full width below */
    .luxury-footer .col-lg-8 > .row > .col-md-4:nth-child(1),
    .luxury-footer .col-lg-8 > .row > .col-md-4:nth-child(3) {
        width: 50%;
        max-width: 50%;
        flex: 0 0 50%;
    }

    .luxury-footer .col-lg-8 > .row > .col-md-4:nth-child(1) { order: 1; }
    .luxury-footer .col-lg-8 > .row > .col-md-4:nth-child(3) { order: 2; }

    .luxury-footer .col-lg-8 > .row > .col-md-4:nth-child(2) {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        order: 3;
    }

    /* Contacto items can sit a touch tighter */
    .luxury-footer .col-lg-8 > .row > .col-md-4:nth-child(2) .luxury-footer-links li {
        margin-bottom: 0.35rem;
    }

    /* Copyright row: less top space */
    .luxury-footer .border-top {
        margin-top: 1rem !important;
        padding-top: 1.5rem !important;
    }
}

/* --------------------------------------------------------------------------
   26. Property card — allys.mu-inspired overlay style (listing + featured)
   Built by script.js / featured-properties.js. Full-bleed image with a navy
   gradient, serif title + price in white, gold dash badge, gold CTA. Keeps
   the Ventable tokens (Oxford Blue, Antique Gold, sharp corners).
   -------------------------------------------------------------------------- */
.vt-prop-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0f1c2c;
    color: #fff;
    text-decoration: none;
    isolation: isolate;
}

@media (min-width: 768px) {
    .vt-prop-card { aspect-ratio: 4 / 5; }
}

.vt-prop-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

@media (hover: hover) {
    .vt-prop-card:hover .vt-prop-img { transform: scale(1.06); }
}

.vt-prop-grad {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top,
        rgba(2, 31, 69, 0.94) 0%,
        rgba(2, 31, 69, 0.70) 26%,
        rgba(2, 31, 69, 0.12) 55%,
        rgba(2, 31, 69, 0) 78%);
}

.vt-prop-tags {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem 1.1rem;
}

.vt-prop-cat {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: 'Manrope', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.vt-prop-cat::before {
    content: "";
    width: 1.6rem;
    height: 2px;
    background: var(--secondary);
}

.vt-prop-op {
    font-family: 'Manrope', sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(2, 31, 69, 0.5);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 0.4rem 0.7rem;
    white-space: nowrap;
}

.vt-prop-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 1.4rem 1.2rem 1.35rem;
}

.vt-prop-loc {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0 0 0.45rem;
    font-family: 'Manrope', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.82);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vt-prop-loc .material-symbols-outlined {
    font-size: 1rem;
    flex: 0 0 auto;
    color: var(--secondary);
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

.vt-prop-title {
    margin: 0 0 0.9rem;
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.15;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vt-prop-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.85rem;
    margin-bottom: 1.05rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.vt-prop-price {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #fff;
}

.vt-prop-feats {
    font-family: 'Manrope', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.74);
}

.vt-prop-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.15rem;
    background: var(--secondary);
    color: #021f45;
    font-family: 'Manrope', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: gap 0.3s ease, background-color 0.3s ease;
}

.vt-prop-cta .material-symbols-outlined {
    font-size: 1.05rem;
}

@media (hover: hover) {
    .vt-prop-card:hover .vt-prop-cta {
        gap: 0.8rem;
        background: #b4ab7c;
    }
}

.vt-prop-card:active {
    transform: scale(0.992);
}

/* --- Galería deslizable dentro de la tarjeta (scroll-snap nativo) ---------- */
.vt-prop-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.vt-prop-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
}
.vt-prop-track::-webkit-scrollbar { display: none; }
.vt-prop-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

/* Indicador segmentado tipo "stories" en el borde superior */
.vt-prop-segs {
    position: absolute;
    top: 0.6rem;
    left: 0.75rem;
    right: 0.75rem;
    z-index: 4;
    display: flex;
    gap: 4px;
    pointer-events: none;
}
.vt-prop-segs span {
    flex: 1 1 0;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: background-color 0.3s ease;
}
.vt-prop-segs span.is-active { background: var(--secondary); }

/* Con galería, baja un poco los tags para no chocar con el indicador */
.vt-prop-card:has(.vt-prop-segs) .vt-prop-tags { padding-top: 1.5rem; }

/* Flechas para pasar foto pulsando (además del swipe) */
.vt-prop-arrow {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    z-index: 6;          /* por encima del gradiente (1) y el cuerpo (2) del card */
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(2, 31, 69, 0.45);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.25s ease, background-color 0.2s ease;
}
.vt-prop-arrow--prev { left: 0.55rem; }
.vt-prop-arrow--next { right: 0.55rem; }
.vt-prop-arrow .material-symbols-outlined { font-size: 1.35rem; }
.vt-prop-arrow:hover { background: rgba(2, 31, 69, 0.7); }
.vt-prop-arrow:active { transform: translateY(-50%) scale(0.92); }
.vt-prop-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 2px; opacity: 1; }

/* Visibles al pasar el ratón (escritorio) y siempre en táctil (móvil) */
.vt-prop-card:hover .vt-prop-arrow { opacity: 1; }
@media (hover: none) {
    .vt-prop-arrow { opacity: 0.9; }
}

/* --------------------------------------------------------------------------
   27. Rounded corners — brand refresh (client preference, replaces sharp 0px)
   Applied site-wide: cards, panels, media, buttons, inputs, chips.
   -------------------------------------------------------------------------- */
:root {
    --vt-radius: 16px;
    --vt-radius-sm: 10px;
}

/* Cards, panels & media containers */
.vt-prop-card,
.luxury-property-card,
.luxury-testimonial-card,
.luxury-service-card,
.luxury-action-card,
.featured-carousel-card,
.skeleton-card,
.skeleton-img,
.sticky-contact,
.properties-filters,
.luxury-valuation-modal,
.modal-content,
.luxury-about-image,
.property-image-main,
.property-location-map,
.thumbnail-container,
.luxury-property-image-wrapper {
    border-radius: var(--vt-radius) !important;
}

/* Modals need clipping so the header corners round too */
.modal-content,
.luxury-valuation-modal {
    overflow: hidden;
}

/* Buttons & form controls */
.btn,
.btn-luxury-primary,
.btn-luxury-secondary,
.vt-prop-cta,
.form-control,
.form-select,
.luxury-form-input,
.property-contact-input {
    border-radius: var(--vt-radius-sm) !important;
}

/* Pills / status chips */
.vt-prop-op,
.luxury-property-badge,
.filters-count,
.luxury-property-overlay-text,
.luxury-step-number {
    border-radius: 999px !important;
}

/* --------------------------------------------------------------------------
   28. Listing toolbar — results summary + Grid/List view toggle (allys.mu)
   Built by initListingToolbar() in script.js.
   -------------------------------------------------------------------------- */
.vt-listing-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.vt-listing-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-family: 'Manrope', sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.75);
}

.vt-listing-stats strong {
    color: #fff;
    font-weight: 700;
}

.vt-stat-sep {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--secondary);
}

.vt-view-toggle {
    display: inline-flex;
    gap: 0.4rem;
}

.vt-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    border-radius: var(--vt-radius-sm);
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.vt-view-btn .material-symbols-outlined {
    font-size: 1.2rem;
}

.vt-view-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.vt-view-btn.is-active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #021f45;
}

.vt-view-btn:active {
    transform: scale(0.94);
}

/* List view: full-width wide banner cards (reuses .vt-prop-card overlay) */
#properties-grid.vt-view-list > [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

#properties-grid.vt-view-list .vt-prop-card {
    aspect-ratio: 3 / 2;
}

@media (min-width: 768px) {
    #properties-grid.vt-view-list .vt-prop-card {
        aspect-ratio: 22 / 7;
    }
}

/* ==========================================================================
   29. PROPERTY DETAIL — full gallery moved to the BOTTOM of the page.
   The hero (#mainPropertyImage) stays at the top; #thumbnailRow is relocated
   into <section.property-gallery> at the end and laid out as a responsive
   wrap-grid (2 / 3 / 4 cols) instead of the old under-hero filmstrip (§19).
   Tapping a tile opens GLightbox at that photo (initDetailLightbox).
   ========================================================================== */
.property-gallery-head {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.property-gallery-folio {
    font-family: 'Manrope', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    color: rgba(162, 154, 108, 0.55);
    font-variant-numeric: tabular-nums;
}

.property-gallery-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    font-weight: 600;
    line-height: 1.1;
    color: #fff;
    margin: 0;
}

.property-gallery-hint {
    font-family: 'Manrope', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-left: auto;
    align-self: center;
}

@media (max-width: 575.98px) {
    .property-gallery-hint { margin-left: 0; flex-basis: 100%; }
}

/* Grid layout — CSS Grid forces N columns regardless of the .col-4 Bootstrap
   widths / the old §19 filmstrip rules. 2 cols (mobile) → 3 → 4. */
.property-gallery #thumbnailRow {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    overflow: visible !important;
    scroll-snap-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (min-width: 576px) {
    .property-gallery #thumbnailRow { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 992px) {
    .property-gallery #thumbnailRow { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
}

/* Neutralize the Bootstrap .col-4 sizing so each tile fills its grid cell */
.property-gallery #thumbnailRow > [class*="col-"] {
    flex: none !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    scroll-snap-align: none !important;
}

/* Equal, calm tiles — no "active" dimming/outline in the bottom gallery */
.property-gallery .thumbnail-container {
    opacity: 1;
    outline: none;
    height: 100%;
}

.property-gallery .thumbnail-container.active-thumb {
    opacity: 1;
    outline-color: transparent;
}

.property-gallery #thumbnailRow .thumbnail-img,
.property-gallery #thumbnailRow .property-image-main {
    height: auto !important;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    cursor: zoom-in;
    filter: none !important;
    animation: none !important;   /* don't replay the hero's vt-img-rise on every tile */
}

@media (hover: hover) {
    .property-gallery .thumbnail-container {
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .property-gallery .thumbnail-container:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 34px -14px rgba(2, 31, 69, 0.55);
    }
    .property-gallery .thumbnail-container:hover .thumbnail-img {
        opacity: 1;
        transform: none;
    }
}

.property-gallery .thumbnail-container:active {
    transform: scale(0.98);
}

/* ==========================================================================
   30. EDITORIAL HOME — "Revista de Jerez" (index.html / .page-index)
   Magazine-cover language: oversized ragged-left masthead with ONE gold-italic
   word, gold folio numbers (00 / 01 / 02) tucked above section titles,
   self-drawing gold hairlines, asymmetric hero action cards and a slow Ken
   Burns on the hero carousel. Strictly the existing tokens (Oxford blue /
   antique gold / off-white, Noto Serif + Manrope). All motion is
   transform/opacity; the reduced-motion block at the end holds a static layout.
   ========================================================================== */
@keyframes vt-rise {
    from { opacity: 0; transform: translateY(0.55em); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes vt-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* --- Folio numbers (00 / 01 / 02) ---------------------------------------- */
.vt-folio {
    display: block;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    color: rgba(162, 154, 108, 0.5);
    font-variant-numeric: tabular-nums;
}

/* --- HERO: editorial masthead, bottom-anchored, ragged-left -------------- */
.page-index .luxury-hero-content.vt-hero {
    text-align: left;
    width: 100%;
    max-width: 720px;
    margin-right: auto;
    padding: 0 0 0 1.4rem;
    border-left: 1px solid rgba(162, 154, 108, 0.45);  /* the gold "spine" */
}

.vt-folio--hero {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 1rem;
    opacity: 0;
    animation: vt-rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.05s forwards;
}

.vt-masthead {
    text-align: left !important;
    margin: 0 0 1.75rem !important;
    opacity: 1 !important;        /* override .luxury-hero-title's 0.95 */
    text-wrap: balance;
}

.vt-masthead .vt-mh-line {
    display: block;
    font-family: 'Fraunces', serif;
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.025em;
    font-size: clamp(2.4rem, 11vw, 4.5rem);
    color: #fff;
    opacity: 0;
    animation: vt-rise 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.vt-masthead .vt-mh-line:nth-child(1) { animation-delay: 0.12s; }
.vt-masthead .vt-mh-line:nth-child(2) { animation-delay: 0.24s; }
.vt-masthead .vt-mh-line:nth-child(3) { animation-delay: 0.36s; }

.vt-masthead .vt-mh-line em {
    font-style: italic;
    font-weight: 500;
    color: var(--secondary);     /* the single gold-italic word */
}

/* --- HERO actions: keep the ORIGINAL glass action cards (client preference);
   .vt-hero-actions only lays them out — stacked on mobile, side-by-side on
   desktop. The base .luxury-action-card glass styling + data-aos entrance are
   untouched. --------------------------------------------------------------- */
.vt-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    align-items: stretch;
}

@media (min-width: 768px) {
    /* Escritorio: el hero se centra de verdad (sin el "spine" izquierdo) para
       que textos y tarjetas queden equilibrados en el eje horizontal. */
    .page-index .luxury-hero-content.vt-hero {
        max-width: 820px;
        margin: 0 auto;
        text-align: center;
        padding-left: 0;
        border-left: none;
    }
    .page-index .vt-folio--hero,
    .page-index .vt-masthead {
        text-align: center !important;
    }
    .vt-hero-actions {
        flex-direction: row;
        align-items: stretch;
        justify-content: center;
        gap: 1.5rem;
    }
}

/* MOBILE fix: the bottom-anchored hero had a FIXED height (100svh), so the
   taller editorial masthead + the two stacked cards overflowed UPWARD and
   "Quiero Comprar" got clipped behind the floating navbar. Let the hero grow
   (min-height instead of fixed height) and tighten the masthead a touch so it
   fits comfortably above the fold on a phone. */
@media (max-width: 767.98px) {
    .page-index .luxury-hero {
        height: auto !important;
        min-height: 100svh;
        padding-top: 6.5rem;     /* clears the floating navbar */
        padding-bottom: 2.5rem;
    }

    .vt-folio--hero { margin-bottom: 0.7rem; }

    .vt-masthead { margin: 0 0 1.4rem !important; }

    .vt-masthead .vt-mh-line {
        font-size: clamp(1.9rem, 8.6vw, 2.6rem);
        line-height: 1.06;
    }

    .vt-hero-actions { gap: 0.85rem; }
}

@supports (height: 100dvh) {
    @media (max-width: 767.98px) {
        .page-index .luxury-hero { min-height: 100dvh; height: auto !important; }
    }
}

/* --- SECTION heads: folio + ragged-left title + self-drawing hairline ----- */
.vt-section-head {
    position: relative;
    text-align: left;
}
.vt-section-head .vt-folio {
    font-size: clamp(2rem, 9vw, 2.75rem);
    margin-bottom: -0.28em;
}
.vt-section-head .luxury-section-title {
    position: relative;
    text-align: left;
}
.vt-section-head .luxury-section-description {
    margin-top: 1rem;
}

/* 1px gold hairline that draws itself in on scroll (via the §13 .reveal observer) */
.vt-rule {
    display: block;
    height: 1px;
    width: 100%;
    max-width: 4.5rem;
    margin: 1.1rem 0 0;
    background: rgba(162, 154, 108, 0.55);
    transform-origin: left center;
}
.vt-rule.reveal {
    opacity: 1;
    transform: scaleX(0);
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.vt-rule.reveal.is-visible { transform: scaleX(1); }

/* --- Ken Burns: slow zoom on the ACTIVE hero slide (uses §7's 8s transition) */
.luxury-hero .carousel-item img { transform: scale(1); }
.luxury-hero .carousel-item.active img { transform: scale(1.08); }

/* --- Reduced motion: hold a clean static layout -------------------------- */
@media (prefers-reduced-motion: reduce) {
    .vt-folio--hero,
    .vt-masthead .vt-mh-line,
    .page-index .luxury-action-card.vt-action {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
    .vt-rule.reveal { transform: scaleX(1) !important; }
    .luxury-hero .carousel-item img,
    .luxury-hero .carousel-item.active img { transform: none !important; }
}

/* --------------------------------------------------------------------------
   Aire lateral — propiedades + propiedad-detalle (ambas usan .page-propiedades).
   Los contenedores quedaban pegados a los bordes en pantallas medias/pequeñas.
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    body.page-propiedades .container,
    body.page-propiedades main.properties-main {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    /* El panel de filtros tiene su propio container interno a ancho completo */
    body.page-propiedades .properties-filters .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

@media (max-width: 575.98px) {
    body.page-propiedades .container,
    body.page-propiedades main.properties-main {
        padding-left: 1.15rem !important;
        padding-right: 1.15rem !important;
    }
}

/* ==========================================================================
   31. PREMIUM SECTION TRANSITIONS & SCROLL MOTION
   "Animaciones entre secciones": barra de progreso de lectura, entrada de
   página, reveals direccionales (izq/dcha/zoom/blur), cascadas escalonadas en
   grids, parallax sutil de imágenes y filetes decorativos en los bordes de
   cada sección. Todo es transform/opacity (GPU), respeta prefers-reduced-motion
   y se afina para móvil (duraciones/distancias más cortas, parallax apagado).
   ========================================================================== */

/* --- 31a. Barra de progreso de lectura (gold, 2px, fixed top) -------------- */
.vt-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    z-index: 1100;
    background: linear-gradient(90deg, var(--secondary), #b4ab7c);
    box-shadow: 0 0 8px rgba(162, 154, 108, 0.55);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.vt-scroll-progress.is-active { opacity: 1; }

/* En móvil, la barra flota sobre la navbar redondeada sin tapar contenido */
@media (max-width: 767.98px) {
    .vt-scroll-progress { z-index: 1065; }
}

/* --- 31b. Entrada de página: el <main> "llega" suavemente al cargar --------- */
@keyframes vt-page-enter {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.vt-page-enter main,
.vt-page-enter .luxury-hero {
    animation: vt-page-enter 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
/* El hero ya tiene su propia animación de masthead; que no se duplique */
.vt-page-enter .luxury-hero { animation-name: vt-fade; animation-duration: 0.5s; }

/* --- 31c. Reveals direccionales (alternar variedad entre secciones) --------- */
/* Se asignan vía data-vt-reveal="left|right|zoom|blur" o clases .reveal-* */
.reveal,
[data-vt-reveal] {
    opacity: 0;
    will-change: opacity, transform;
}
[data-vt-reveal="left"]  { transform: translateX(-32px); }
[data-vt-reveal="right"] { transform: translateX(32px); }
[data-vt-reveal="zoom"]  { transform: scale(0.94); }
[data-vt-reveal="blur"]  { filter: blur(8px); transform: translateY(12px); }

.reveal.is-visible,
[data-vt-reveal].is-visible {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition:
        opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- 31d. Cascadas escalonadas en grids de tarjetas ------------------------ */
/* .vt-cascade en el contenedor; los hijos entran en secuencia */
.vt-cascade > * {
    opacity: 0;
    transform: translateY(26px);
    transition:
        opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.vt-cascade.is-visible > * { opacity: 1; transform: none; }
.vt-cascade.is-visible > *:nth-child(1) { transition-delay: 0.00s; }
.vt-cascade.is-visible > *:nth-child(2) { transition-delay: 0.09s; }
.vt-cascade.is-visible > *:nth-child(3) { transition-delay: 0.18s; }
.vt-cascade.is-visible > *:nth-child(4) { transition-delay: 0.27s; }
.vt-cascade.is-visible > *:nth-child(5) { transition-delay: 0.36s; }
.vt-cascade.is-visible > *:nth-child(6) { transition-delay: 0.45s; }
.vt-cascade.is-visible > *:nth-child(7) { transition-delay: 0.54s; }
.vt-cascade.is-visible > *:nth-child(8) { transition-delay: 0.63s; }

/* --- 31e. Parallax sutil (asignado a imágenes y medios) -------------------- */
/* JS ajusta --vt-parallax-y; sólo activo en (hover:hover) + pantallas grandes
   para no causar jank en móvil. En móvil se reduce a una entrada zoom-fade. */
@media (hover: hover) and (min-width: 768px) {
    .vt-parallax {
        transform: translate3d(0, var(--vt-parallax-y, 0px), 0);
        transition: transform 0.15s linear;
        will-change: transform;
    }
}

/* --- 31f. Filete decorativo en el borde superior de cada sección ----------- */
/* Línea gold fina que se "dibuja" al entrar la sección (centrada, máx 120px) */
.vt-section-rule {
    position: relative;
}
.vt-section-rule::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    max-width: 120px;
    height: 1px;
    background: rgba(162, 154, 108, 0.6);
    transform: translateX(-50%);
    transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
    pointer-events: none;
}
.vt-section-rule.in-view::before { width: 60%; }

/* --- 31g. Zoom-fade de imágenes al entrar en viewport ---------------------- */
.vt-img-reveal {
    opacity: 0;
    transform: scale(1.06);
    transition:
        opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.vt-img-reveal.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* --- 31h. Count-up para números (detalle + stats) -------------------------- */
.vt-count { font-variant-numeric: tabular-nums; }

/* --- 31i. Pulido de motion para móvil -------------------------------------- */
/* En pantallas pequeñas: distancias y duraciones más cortas + sin parallax
   lateral (el desplazamiento horizontal se siente mal en scroll vertical). */
@media (max-width: 767.98px) {
    [data-vt-reveal="left"]  { transform: translateX(0) translateY(20px); }
    [data-vt-reveal="right"] { transform: translateX(0) translateY(20px); }
    [data-vt-reveal="zoom"]  { transform: scale(0.97); }
    [data-vt-reveal="blur"]  { filter: blur(4px); transform: translateY(10px); }

    [data-vt-reveal].is-visible,
    .reveal.is-visible {
        transition-duration: 0.5s !important;
    }

    .vt-cascade > * {
        transform: translateY(18px);
        transition-duration: 0.5s;
    }
    /* En móvil la cascada es más rápida para no retrasar el scroll */
    .vt-cascade.is-visible > *:nth-child(n) { transition-delay: 0s; }

    .vt-img-reveal { transform: scale(1.03); }
}

/* --- 31j. Reduced motion: layout estático limpio --------------------------- */
@media (prefers-reduced-motion: reduce) {
    .vt-scroll-progress { display: none; }
    .vt-page-enter main,
    .vt-page-enter .luxury-hero,
    .vt-img-reveal,
    .vt-cascade > *,
    [data-vt-reveal],
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        animation: none !important;
        transition: none !important;
    }
    .vt-section-rule::before { width: 60% !important; transition: none !important; }
}

/* --------------------------------------------------------------------------
   Aire lateral — propiedades + propiedad-detalle (ambas usan .page-propiedades).
   Los contenedores quedaban pegados a los bordes. Aplicamos margen base a todos.
   -------------------------------------------------------------------------- */
/* Desktop: margen lateral visible en pantallas medianas (evita contenido al borde) */
@media (min-width: 1400px) {
    body.page-propiedades .container {
        padding-left: 2.5rem !important;
        padding-right: 2.5rem !important;
    }
}

/* Tablet: margen más generoso */
@media (max-width: 991.98px) {
    body.page-propiedades .container {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
    /* El panel de filtros tiene su propio container interno a ancho completo */
    body.page-propiedades .properties-filters .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Móvil: margen medio pero suficiente para no tocar bordes */
@media (max-width: 575.98px) {
    body.page-propiedades .container {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

/* ==========================================================================
   NOSOTROS — galería editorial en mosaico (Nosotros1..5)
   Mosaico asimétrico (una imagen grande + acompañantes + banda ancha) con
   esquinas rectas, zoom sutil al hover y lightbox a pantalla completa.
   ========================================================================== */
.nosotros-gallery {
    margin-top: 5rem;
}

/* El fondo de la página es oscuro: el título de sección debe ir en claro */
.page-nosotros .nosotros-gallery .luxury-section-title {
    color: #fff;
}

/* La banda inferior encuadra mostrando algo más de la parte superior */
.nosotros-gallery-item:nth-child(5) img {
    object-position: center 28%;
}

.nosotros-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 12px;
}

.nosotros-gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    background-color: #e9e6df;
    cursor: zoom-in;
}

.nosotros-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Velo dorado sutil al pasar el ratón (coherente con el acento de marca) */
.nosotros-gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(29, 53, 91, 0.18);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.nosotros-gallery-item:hover img { transform: scale(1.06); }
.nosotros-gallery-item:hover::after { opacity: 1; }
.nosotros-gallery-item:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 3px;
}

/* Mosaico: 1 grande, 2 medianas, 1 mediana, 1 banda ancha */
.nosotros-gallery-item:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
.nosotros-gallery-item:nth-child(2) { grid-column: 3 / 5; grid-row: 1 / 2; }
.nosotros-gallery-item:nth-child(3) { grid-column: 3 / 4; grid-row: 2 / 3; }
.nosotros-gallery-item:nth-child(4) { grid-column: 4 / 5; grid-row: 2 / 3; }
.nosotros-gallery-item:nth-child(5) { grid-column: 1 / 5; grid-row: 3 / 4; }

/* Escritorio: la banda inferior un poco más alta para que no corte cabezas */
@media (min-width: 992px) {
    .nosotros-gallery-grid {
        grid-template-rows: 220px 220px 320px;
    }
}

/* Tablet: dos columnas, la grande y la banda ocupan el ancho */
@media (max-width: 991.98px) {
    .nosotros-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }
    .nosotros-gallery-item:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 2; }
    .nosotros-gallery-item:nth-child(2) { grid-column: 1 / 2; grid-row: 2 / 3; }
    .nosotros-gallery-item:nth-child(3) { grid-column: 2 / 3; grid-row: 2 / 3; }
    .nosotros-gallery-item:nth-child(4) { grid-column: 1 / 2; grid-row: 3 / 4; }
    .nosotros-gallery-item:nth-child(5) { grid-column: 2 / 3; grid-row: 3 / 4; }
}

/* Móvil: el mosaico se sustituye por el carrusel de la sección de cabecera
   (mismas imágenes), así que aquí lo ocultamos para no duplicar. */
@media (max-width: 767.98px) {
    .nosotros-gallery { display: none; }
}

/* --- Carrusel de Nosotros (solo móvil) --------------------------------- */
.nosotros-carousel {
    margin-top: 2rem;
    border-radius: 16px;
    overflow: hidden;
}
.nosotros-carousel .carousel-inner {
    border-radius: 16px;
}
.nosotros-carousel .carousel-item img {
    width: 100%;
    height: 62vh;
    max-height: 460px;
    object-fit: cover;
    display: block;
}
.nosotros-carousel .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.55);
}
.nosotros-carousel .carousel-indicators .active {
    background-color: var(--secondary);
}
.nosotros-carousel .carousel-control-prev,
.nosotros-carousel .carousel-control-next {
    width: 14%;
}

/* ==========================================================================
   FICHA DE PROPIEDAD — barra de acción fija inferior (solo móvil)
   Patrón estándar en inmobiliarias (Idealista/Fotocasa/Rightmove): el contacto
   siempre accesible sin tener que buscar el formulario. Llamar + WhatsApp.
   ========================================================================== */
.detail-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background-color: rgba(255, 255, 255, 0.12);
    padding-bottom: env(safe-area-inset-bottom); /* respeta la barra del iPhone */
    box-shadow: 0 -8px 24px -12px rgba(2, 31, 69, 0.45);
}

.detail-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 1.05rem 1rem;
    font-family: 'Manrope', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: #fff;
    transition: filter 0.2s ease, transform 0.1s ease;
}
.detail-action-btn .material-symbols-outlined { font-size: 1.4rem; }
.detail-action-btn:active { transform: translateY(1px); }
.detail-action-btn:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }

.detail-action-btn--call { background-color: #021f45; color: #fff; }
.detail-action-btn--call:hover { filter: brightness(1.12); color: #fff; }

.detail-action-btn--wa { background-color: var(--secondary); color: #021f45; }
.detail-action-btn--wa:hover { filter: brightness(1.06); color: #021f45; }

/* Deja sitio para que la barra no tape el footer (solo en páginas que la usan) */
@media (max-width: 767.98px) {
    body:has(.detail-action-bar) { padding-bottom: 4.5rem; }
}

/* --- Botón "Compartir" de la ficha (Web Share API) ------------------------ */
.vt-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    background: transparent;
    border: 1px solid rgba(162, 154, 108, 0.6);
    color: var(--secondary);
    font-family: 'Manrope', sans-serif;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 999px;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.1s ease;
}
.vt-share-btn .material-symbols-outlined { font-size: 1.05rem; }
.vt-share-btn:hover { background: var(--secondary); color: #021f45; }
.vt-share-btn:active { transform: scale(0.96); }
.vt-share-btn:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }

/* Aviso breve (fallback al copiar enlace) */
.vt-toast {
    position: fixed;
    left: 50%;
    bottom: 5.5rem;
    transform: translateX(-50%) translateY(12px);
    z-index: 1200;
    max-width: calc(100% - 2rem);
    padding: 0.7rem 1.15rem;
    background: #021f45;
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 0.82rem;
    border-radius: 10px;
    box-shadow: 0 12px 30px -8px rgba(2, 31, 69, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.vt-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
    .vt-toast { transition: opacity 0.3s ease; }
}

/* ==========================================================================
   33. HERO ACTION CARDS — enhanced staggered entrance (mobile-first)
   Replaces the basic AOS fade-up on .vt-hero-actions cards with a richer
   scale + rise + stagger. AOS attributes are stripped by JS so there's no
   conflict; the animation starts after the masthead lines finish.
   ========================================================================== */
.vt-hero-action {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    animation: vt-hero-action-in 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.vt-hero-action:nth-child(1) { animation-delay: 0.55s; }
.vt-hero-action:nth-child(2) { animation-delay: 0.75s; }

@keyframes vt-hero-action-in {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 767.98px) {
    .vt-hero-action {
        transform: translateY(28px) scale(0.96);
    }
}

@media (prefers-reduced-motion: reduce) {
    .vt-hero-action {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

/* ==========================================================================
   34. SERVICE CARDS — 3D touch tilt + icon pulse on viewport entry
   Applied to .luxury-service-card on servicios.html. The tilt follows the
   touch point; the icon pulses once when the card first scrolls into view.
   ========================================================================== */
.luxury-service-card {
    transform-style: preserve-3d;
    perspective: 800px;
    transition:
        transform 0.15s ease-out,
        background-color 0.4s ease,
        box-shadow 0.4s ease;
}

.luxury-service-card.vt-tilted {
    transition: transform 0.08s ease-out;
}

.luxury-service-card .luxury-service-icon {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center center;
    display: inline-block;
}

.luxury-service-card.vt-icon-pulsed .luxury-service-icon {
    animation: vt-icon-pulse 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vt-icon-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.22); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .luxury-service-card .luxury-service-icon {
        animation: none !important;
    }
}

/* ==========================================================================
   33. MÓVIL — Menú desplegable con entrada escalonada (header al abrirse)
   El collapse de Bootstrap solo anima la altura: los enlaces aparecían de
   golpe. Aquí el panel hace un fade + los items caen en cascada cada vez que
   se abre (la clase .show se re-añade en cada apertura, así que re-dispara).
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    #mobileNav.collapsing,
    #mobileNav.show {
        animation: vt-nav-panel-in 0.34s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    }

    #mobileNav .nav > li {
        opacity: 0;
        transform: translateY(-10px);
    }

    #mobileNav.show .nav > li {
        animation: vt-nav-item-in 0.46s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    }

    #mobileNav.show .nav > li:nth-child(1) { animation-delay: 0.06s; }
    #mobileNav.show .nav > li:nth-child(2) { animation-delay: 0.12s; }
    #mobileNav.show .nav > li:nth-child(3) { animation-delay: 0.18s; }
    #mobileNav.show .nav > li:nth-child(4) { animation-delay: 0.24s; }
    #mobileNav.show .nav > li:nth-child(5) { animation-delay: 0.30s; }
    #mobileNav.show .nav > li:nth-child(6) { animation-delay: 0.36s; }

    /* Subrayado gold que se desliza al tocar/activar un enlace del menú */
    #mobileNav .luxury-nav-link {
        position: relative;
        transition: color 0.25s ease, padding-left 0.25s ease;
    }
    #mobileNav .luxury-nav-link::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -1px;
        width: 0;
        height: 2px;
        background: var(--secondary, #a29a6c);
        transition: width 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
    }
    #mobileNav .luxury-nav-link.active::after,
    #mobileNav .luxury-nav-link:active::after {
        width: 2.25rem;
    }
    #mobileNav .luxury-nav-link:active {
        padding-left: 0.35rem;
        color: var(--secondary, #a29a6c);
    }
}

@keyframes vt-nav-panel-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes vt-nav-item-in {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   34. MÓVIL — Transición de secciones más viva
   Las secciones de contenido entran como un bloque (rise + fade suave) además
   del stagger interno de AOS, dando sensación de "capas" al hacer scroll.
   Solo móvil/tablet; el desktop conserva su comportamiento actual.
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    main > section.vt-section-rule {
        opacity: 0;
        transform: translateY(26px);
        transition:
            opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
            transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
        will-change: opacity, transform;
    }
    main > section.vt-section-rule.in-view {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    #mobileNav.show .nav > li,
    #mobileNav.collapsing,
    #mobileNav.show {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    main > section.vt-section-rule {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ==========================================================================
   35. MÓVIL — Ajustes finos: tarjeta de contacto, espacio superior y logo
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    /* 35a. El email largo se salía de la tarjeta de contacto.
       Dejamos que el bloque de texto encoja y el correo parta de línea. */
    .luxury-contact-info .contact-info-item > div {
        min-width: 0;
    }
    .luxury-contact-info .contact-info-item > div > div {
        min-width: 0;
        flex: 1;
    }
    .luxury-contact-info a {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .luxury-contact-info {
        padding: 1.75rem 1.5rem;
    }

    /* 35b. Demasiado aire arriba al entrar en Contacto / Nosotros / Servicios.
       Reducimos el padding superior de <main class="py-48"> en móvil. */
    main.py-48 {
        padding-top: 2rem !important;
        padding-bottom: 3rem !important;
    }
    /* Menos altura reservada bajo la barra flotante (logo más pequeño abajo) */
    :root {
        --vt-nav-h: 6rem;
    }

    /* 35c. Logo del header un poco más pequeño en móvil */
    .luxury-brand-img {
        height: 44px;
    }
}

/* ==========================================================================
   PROPIEDADES — refinamiento de tarjetas en móvil estrecho
   - Tarjetas verticales (3/4) con detalle legible en 1 columna.
   - Refinamos padding del body, escalas tipográficas y sombra tintada.
   ========================================================================== */
@media (max-width: 575.98px) {
    /* En móvil estrecho forzamos 1 columna para que el detalle se vea bien */
    #properties-grid {
        row-gap: 1.1rem !important;
    }
    .vt-prop-card { aspect-ratio: 4 / 5; }

    .vt-prop-body {
        padding: 1.1rem 1rem 1.05rem;
    }
    .vt-prop-title {
        font-size: 1.15rem;
        margin-bottom: 0.7rem;
    }
    .vt-prop-price {
        font-size: 1.2rem;
        font-variant-numeric: tabular-nums;
    }
    .vt-prop-feats {
        font-size: 0.62rem;
    }
    .vt-prop-loc {
        font-size: 0.66rem;
    }
    .vt-prop-cta {
        padding: 0.6rem 1rem;
        font-size: 0.6rem;
    }
    /* Sombra tintada (azul profundo), no negra genérica */
    .vt-prop-card {
        box-shadow: 0 12px 28px -14px rgba(2, 8, 20, 0.8);
    }

    /* Stats de la toolbar con números tabulares */
    .vt-listing-stats strong { font-variant-numeric: tabular-nums; }

    /* Padding reducido en filtros para aprovechar el ancho */
    .properties-filters { padding: 1rem; }
    .properties-filters .row { --bs-gutter-y: 0.75rem; }
}

/* Respeto del movimiento reducido: sin hover-scale ni active-scale */
@media (prefers-reduced-motion: reduce) {
    .vt-prop-card,
    .vt-prop-card:active,
    .vt-prop-card:hover .vt-prop-img,
    .vt-btn-primary:active {
        transform: none !important;
    }
}
