/* =============================================
   VerdeTierra v2 — Custom Design System
   Bootstrap 5 Overrides + Custom Components
   ============================================= */

/* ===== CSS VARIABLES (Design Tokens) ===== */
:root {
    /* ── Primitivos: Paleta VerdeTierra ── */
    --vt-green:            #3F6B35;   /* Forest/bottle — patrimonio rural premium */
    --vt-green-light:      rgba(63, 107, 53, 0.14);
    --vt-green-dark:       #2D5016;   /* Hover de botones — hunter green */
    --vt-green-accessible: #2D5016;   /* WCAG AA 7.5:1 sobre blanco — texto pequeño */
    /* Yellow alias → ahora apunta al dorado champagne (un solo lenguaje de "valor") */
    --vt-yellow:           #c9a14a;
    --vt-yellow-light:     rgba(201, 161, 74, 0.15);
    --vt-yellow-dark:      #a8842f;
    /* Neutro cálido — fondos con calidez "casa de campo" */
    --vt-cream:            #F5F1E8;
    --vt-cream-dark:       #EAE3D2;

    /* ── Accent dorado premium (señales de prestigio: VERIFICADO, EXCLUSIVA, 25 años) ── */
    --vt-gold:             #c9a14a;   /* Champagne — equilibrio premium sin ser estridente */
    --vt-gold-light:       rgba(201, 161, 74, 0.12);
    --vt-gold-dark:        #a8842f;
    --vt-gold-soft:        #e8d49a;

    /* ── Primitivos: Escala de Grises ── */
    --vt-gray-100: #f8f9fa;
    --vt-gray-200: #e9ecef;
    --vt-gray-300: #dee2e6;
    --vt-gray-600: #6c757d;
    --vt-gray-800: #333333;
    --vt-gray-900: #0a0a0a;
    --vt-white: #ffffff;

    /* ── Semánticos: Tema (Light Mode) ── */
    --vt-bg: #f8f9fa;
    --vt-bg-card: #ffffff;
    --vt-bg-card-hover: #f1f5f9;
    --vt-text: #1a1a2e;
    --vt-text-muted: #6c757d;
    --vt-border: rgba(0, 0, 0, 0.08);
    --vt-overlay: rgba(0, 0, 0, 0.6);
    --vt-footer-bg: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);

    /* ── Tipografía ── */
    --vt-font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --vt-font-heading: 'Outfit', 'Inter', sans-serif;
    /* Escala modular ratio 1.25 (base 1rem = 16px) */
    --vt-fs-xs:   0.64rem;   /*  ~10px */
    --vt-fs-sm:   0.8rem;    /*  ~13px */
    --vt-fs-base: 1rem;      /*   16px */
    --vt-fs-md:   1.25rem;   /*   20px */
    --vt-fs-lg:   1.563rem;  /*   25px */
    --vt-fs-xl:   1.953rem;  /*   31px */
    --vt-fs-2xl:  2.441rem;  /*   39px */
    --vt-fs-3xl:  3.052rem;  /*   49px */

    /* ── Espaciado (base 4px grid) ── */
    --vt-space-1:  0.25rem;  /*  4px */
    --vt-space-2:  0.5rem;   /*  8px */
    --vt-space-3:  0.75rem;  /* 12px */
    --vt-space-4:  1rem;     /* 16px */
    --vt-space-5:  1.25rem;  /* 20px */
    --vt-space-6:  1.5rem;   /* 24px */
    --vt-space-8:  2rem;     /* 32px */
    --vt-space-10: 2.5rem;   /* 40px */
    --vt-space-12: 3rem;     /* 48px */
    --vt-space-16: 4rem;     /* 64px */

    /* ── Elevación ── */
    --vt-radius-sm: 0.375rem;
    --vt-radius: 0.75rem;
    --vt-radius-lg: 1.25rem;
    --vt-radius-pill: 50rem;

    /* ── Colores semánticos de estado ── */
    /* Éxito */
    --vt-success:        #1a7a4a;
    --vt-success-light:  #d1f0e0;
    --vt-success-icon:   #22c55e;
    /* Peligro */
    --vt-danger:         #b91c1c;
    --vt-danger-light:   #fee2e2;
    --vt-danger-icon:    #ef4444;
    /* Advertencia */
    --vt-warning:        #92400e;
    --vt-warning-light:  #fef3c7;
    --vt-warning-icon:   #f59e0b;
    /* Información */
    --vt-info:           #1e40af;
    --vt-info-light:     #dbeafe;
    --vt-info-icon:      #3b82f6;

    /* ── Sombras en capas (modern layered shadows) ── */
    --vt-shadow:
        0 1px 2px rgba(0,0,0,0.04),
        0 2px 4px rgba(0,0,0,0.04),
        0 4px 8px rgba(0,0,0,0.04);
    --vt-shadow-md:
        0 1px 2px rgba(0,0,0,0.04),
        0 4px 8px rgba(0,0,0,0.06),
        0 8px 16px rgba(0,0,0,0.06),
        0 16px 32px rgba(0,0,0,0.04);
    --vt-shadow-lg:
        0 1px 2px rgba(0,0,0,0.04),
        0 4px 8px rgba(0,0,0,0.06),
        0 8px 16px rgba(0,0,0,0.06),
        0 16px 32px rgba(0,0,0,0.06),
        0 32px 64px rgba(0,0,0,0.04);
    --vt-shadow-green:  0 4px 20px rgba(63, 107, 53, 0.25);
    --vt-shadow-yellow: 0 4px 20px rgba(201, 161, 74, 0.3);

    /* ── Line-height ── */
    --vt-lh-tight:    1.2;   /* Títulos grandes */
    --vt-lh-snug:     1.35;  /* Títulos medianos */
    --vt-lh-body:     1.6;   /* Cuerpo de texto */
    --vt-lh-relaxed:  1.75;  /* Párrafos largos / blog */
    --vt-lh-table:    1.4;   /* Tablas densas */

    /* ── Medida de línea (evitar > 75 chars) ── */
    --vt-measure:     65ch;
    --vt-measure-md:  75ch;

    /* ── Transiciones ── */
    --vt-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --vt-transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* ── Breakpoints (referencia, no usables en CSS nativo como vars) ──
       sm: 480px | md: 768px | lg: 1024px | xl: 1280px                  */
}

/* ===== DARK MODE ===== */
[data-bs-theme="dark"] {
    --vt-bg: #0f1117;
    --vt-bg-card: #1a1d27;
    --vt-bg-card-hover: #22263a;
    --vt-text: #e1e4ea;
    --vt-text-muted: #9ca3af;
    --vt-border: rgba(255, 255, 255, 0.08);
    --vt-overlay: rgba(0, 0, 0, 0.75);
    /* Sin negro puro — gris azulado oscuro con leve tono verde */
    --vt-footer-bg: linear-gradient(180deg, #0f1117 0%, #080d0a 100%);

    /* Colores semánticos adaptados al dark */
    --vt-success:        #22c55e;
    --vt-success-light:  rgba(34, 197, 94, 0.15);
    --vt-danger:         #f87171;
    --vt-danger-light:   rgba(248, 113, 113, 0.15);
    --vt-warning:        #fbbf24;
    --vt-warning-light:  rgba(251, 191, 36, 0.15);
    --vt-info:           #60a5fa;
    --vt-info-light:     rgba(96, 165, 250, 0.15);
}

/* ===== UTILITIES ===== */
.vt-logo {
    height: 45px !important;
    width: auto !important;
    transition: filter var(--vt-transition);
}

[data-bs-theme="dark"] .vt-logo {
    filter: brightness(0) invert(1);
}

/* ===== BASE ===== */
body {
    font-family: var(--vt-font-body);
    font-size: var(--vt-fs-base);
    line-height: var(--vt-lh-body);
    background-color: var(--vt-bg);
    color: var(--vt-text);
    transition: background-color var(--vt-transition), color var(--vt-transition);
    overflow-x: hidden;
    /* Mejora de renderizado de texto */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3,
.vt-heading.display-3,
.vt-heading.display-4,
.vt-heading.display-5 {
    line-height: var(--vt-lh-tight);
}

h4, h5, h6,
.vt-heading {
    font-family: var(--vt-font-heading);
    font-weight: 700;
    line-height: var(--vt-lh-snug);
    color: var(--vt-text);
}

h1, h2, h3 {
    font-family: var(--vt-font-heading);
    font-weight: 700;
    color: var(--vt-text);
}

/* Párrafos largos: limitar ancho para no cansar el ojo */
.vt-prose,
.vt-descripcion {
    max-width: var(--vt-measure);
    line-height: var(--vt-lh-relaxed);
}

/* Lead text en secciones centradas: un poco más ancho */
.lead {
    line-height: var(--vt-lh-body);
}

/* Números tabulares en precios, stats, tablas */
.vt-price,
.vt-stat-number,
[data-count],
td,
.font-tabular {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

img {
    max-width: 100%;
    height: auto;
}

a {
    transition: color var(--vt-transition);
}

/* ===== UTILITY CLASSES ===== */
.text-vt-green {
    /* Accesible: 4.9:1 sobre fondo claro — pasa WCAG AA */
    color: var(--vt-green-accessible) !important;
}

/* Verde decorativo (iconos grandes, bordes): puede ser el brand */
.text-vt-green-brand {
    color: var(--vt-green) !important;
}

/* En dark mode el verde puede ser más brillante (fondo oscuro tiene más margen) */
[data-bs-theme="dark"] .text-vt-green {
    color: var(--vt-green) !important;
}

.text-vt-yellow {
    color: var(--vt-yellow) !important;
}

.bg-vt-green {
    background-color: var(--vt-green) !important;
}

.bg-vt-green-light {
    background-color: var(--vt-green-light) !important;
}

.bg-vt-yellow {
    background-color: var(--vt-yellow) !important;
}

/* ===== BUTTONS ===== */
.btn-vt-green {
    background: linear-gradient(135deg, var(--vt-green-accessible), var(--vt-green-dark));
    border: none;
    color: white;
    font-weight: 600;
    border-radius: var(--vt-radius);
    padding: 0.6rem 1.5rem;
    transition: all var(--vt-transition);
    box-shadow: var(--vt-shadow);
}

.btn-vt-green:hover {
    transform: translateY(-2px);
    box-shadow: var(--vt-shadow-green);
    color: white;
    background: linear-gradient(135deg, var(--vt-green-dark), var(--vt-green-accessible));
}
.btn-vt-green:active {
    transform: scale(0.97) translateY(0);
    box-shadow: none;
}

.btn-vt-yellow {
    background: linear-gradient(135deg, var(--vt-yellow), var(--vt-yellow-dark));
    border: none;
    color: white;
    font-weight: 600;
    border-radius: var(--vt-radius);
    padding: 0.6rem 1.5rem;
    transition: all var(--vt-transition);
    box-shadow: var(--vt-shadow);
}

.btn-vt-yellow:hover {
    transform: translateY(-2px);
    box-shadow: var(--vt-shadow-yellow);
    color: white;
}
.btn-vt-yellow:active {
    transform: scale(0.97) translateY(0);
    box-shadow: none;
}

.btn-vt-outline {
    border: 2px solid var(--vt-green);
    color: var(--vt-green);
    background: transparent;
    font-weight: 600;
    border-radius: var(--vt-radius);
    padding: 0.55rem 1.5rem;
    transition: all var(--vt-transition);
}

.btn-vt-outline:hover {
    background: var(--vt-green);
    color: white;
    transform: translateY(-2px);
}
.btn-vt-outline:active {
    transform: scale(0.97) translateY(0);
}

.btn-vt-green:focus-visible,
.btn-vt-yellow:focus-visible,
.btn-vt-outline:focus-visible {
    outline: 3px solid var(--vt-green);
    outline-offset: 2px;
}

/* ===== NAVBAR ===== */
.vt-navbar {
    backdrop-filter: blur(15px);
    background: rgba(255, 255, 255, 0.9) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--vt-transition);
    padding: 0.5rem 0;
}

[data-bs-theme="dark"] .vt-navbar {
    background: rgba(15, 17, 23, 0.9) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.vt-navbar .nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    padding: 0.5rem 1.2rem !important;
    position: relative;
    color: var(--vt-text) !important;
    transition: color var(--vt-transition);
}

.vt-navbar .nav-link:hover,
.vt-navbar .nav-link.active {
    color: var(--vt-green) !important;
}

.vt-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 3px;
    border-radius: 2px;
    background: var(--vt-green);
    transition: all var(--vt-transition);
    transform: translateX(-50%);
}

.vt-navbar .nav-link:hover::after {
    width: 40%;
}

.vt-navbar.scrolled {
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.04),
        0 4px 8px rgba(0,0,0,0.06),
        0 8px 16px rgba(0,0,0,0.04);
}

[data-bs-theme="dark"] .vt-navbar.scrolled {
    box-shadow: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vt-darkmode-btn {
    font-size: 1.1rem;
    text-decoration: none;
    transition: transform var(--vt-transition);
}

.vt-darkmode-btn:hover {
    transform: rotate(30deg) scale(1.2);
}

/* ── Navbar Admin ─────────────────────────────────────────────────── */
.vt-navbar-admin {
    background: rgba(17, 24, 39, 0.95) !important;   /* gris azulado oscuro — no negro puro */
    border-bottom: 1px solid rgba(63, 107, 53, 0.3);
    transition: border-color var(--vt-transition),
                box-shadow var(--vt-transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.15);
}
@supports (backdrop-filter: blur(16px)) {
    .vt-navbar-admin {
        background: rgba(17, 24, 39, 0.85) !important;
        backdrop-filter: blur(16px) saturate(1.2);
        -webkit-backdrop-filter: blur(16px) saturate(1.2);
    }
}
.vt-navbar-admin .navbar-brand {
    font-size: 0.95rem;
}
.vt-navbar-admin .navbar-brand img {
    height: 35px !important;
    width: auto !important;
    transition: filter 0.2s ease;
}
.vt-navbar-admin .navbar-brand:hover img {
    filter: brightness(1.15);
}
.vt-navbar-admin .nav-link {
    color: rgba(255,255,255,0.7) !important;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.45rem 0.75rem !important;
    border-radius: var(--vt-radius-sm);
    transition: background 0.2s cubic-bezier(0.4,0,0.2,1),
                color 0.2s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    letter-spacing: 0.01em;
}
.vt-navbar-admin .nav-link i {
    opacity: 0.7;
    transition: opacity 0.2s ease, color 0.2s ease;
}
.vt-navbar-admin .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.07) !important;
}
.vt-navbar-admin .nav-link:hover i {
    opacity: 1;
    color: var(--vt-green);
}
/* Active state: bottom highlight line instead of left border */
.vt-navbar-admin .nav-link.active {
    color: #fff !important;
    background: rgba(63, 107, 53, 0.18) !important;
}
.vt-navbar-admin .nav-link.active i {
    opacity: 1;
    color: var(--vt-green);
}
.vt-navbar-admin .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--vt-green);
    border-radius: 2px 2px 0 0;
}
/* Remove any inherited ::after pseudo from .vt-navbar */
.vt-navbar-admin .nav-link::after {
    content: none;
    width: 0;
    height: 0;
}
.vt-navbar-admin .nav-link.active::after {
    content: '';
}
.vt-navbar-admin .nav-link:focus-visible {
    outline: 2px solid var(--vt-green);
    outline-offset: 2px;
}
.vt-navbar-admin .navbar-toggler {
    border-color: rgba(255,255,255,0.2);
}
.vt-navbar-admin .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(63, 107, 53, 0.4);
}
[data-bs-theme="dark"] .vt-navbar-admin {
    background: rgba(13, 17, 23, 0.92) !important;
    border-bottom-color: rgba(63, 107, 53, 0.25);
}

/* ── Page Hero (páginas internas: anuncios, blog, etc.) ───────────── */
.vt-page-hero {
    position: relative;
    margin-top: -76px;
    padding-top: calc(76px + 3.5rem);
    padding-bottom: 4rem;
    background: center/cover no-repeat;
    color: #fff;
}
.vt-page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.6) 100%);
    z-index: 0;
}
.vt-page-hero > * { position: relative; z-index: 1; }
.vt-page-hero .vt-heading,
.vt-page-hero h1,
.vt-page-hero h2 {
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6), 0 4px 24px rgba(0,0,0,0.4);
}
.vt-page-hero .lead {
    color: rgba(255,255,255,0.88) !important;
    text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

/* Float-up card — aparece solapando la parte baja del hero */
.vt-float-up {
    margin-top: -60px;
    position: relative;
    z-index: 2;
}

@media (max-width: 767.98px) {
    .vt-page-hero {
        padding-top: calc(76px + 2rem);
        padding-bottom: 3rem;
    }
    .vt-float-up {
        margin-top: -24px;  /* overlap reducido en mobile */
    }
}
@media (max-width: 575.98px) {
    .vt-page-hero { padding-top: calc(76px + 1.5rem); padding-bottom: 2rem; }
    .vt-float-up { margin-top: 0; }
}

/* ===== HERO ===== */
.vt-hero {
    min-height: 85vh;
    min-height: 85svh; /* mobile-safe: ignora barras dinámicas del browser */
    background: url('../build/img/lago_ranco_hero.png') center/cover no-repeat;
    position: relative;
}

.vt-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(0,0,0,0.50) 0%, rgba(0,0,0,0.30) 40%, rgba(0,0,0,0.65) 100%);
    z-index: 0;
}

.vt-hero-title {
    font-family: var(--vt-font-heading);
    font-size: clamp(1.85rem, 4.5vw + 1rem, 4.5rem);
    color: #ffffff !important;   /* siempre blanco — está sobre foto oscura */
    text-shadow:
        0 2px 4px rgba(0,0,0,0.65),
        0 4px 32px rgba(0,0,0,0.45);
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Todo el hero siempre en blanco, sin importar el tema */
.vt-hero,
.vt-hero .lead,
.vt-hero p {
    color: #ffffff !important;
}

/* Buscador hero: fondo unificado — cada hijo es transparente */
.vt-search-hero {
    border-radius: var(--vt-radius-pill);
    overflow: hidden;
    box-shadow: var(--vt-shadow-lg);
    background: rgba(255,255,255,0.96);
}
/* Todos los hijos transparentes para que el fondo del contenedor mande */
.vt-search-hero .input-group-text,
.vt-search-hero .form-control {
    background: transparent !important;
    border: none !important;
    color: var(--vt-gray-800);
}
.vt-search-hero .form-control::placeholder { color: var(--vt-text-muted); }
.vt-search-hero .form-control:focus { box-shadow: none; }

/* Dark mode: vidrio oscuro en lugar de blanco */
[data-bs-theme="dark"] .vt-search-hero {
    background: rgba(26, 29, 39, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
}
[data-bs-theme="dark"] .vt-search-hero .input-group-text,
[data-bs-theme="dark"] .vt-search-hero .form-control {
    color: rgba(255,255,255,0.85) !important;
}
[data-bs-theme="dark"] .vt-search-hero .form-control::placeholder {
    color: rgba(255,255,255,0.4);
}

.vt-search-results {
    position: absolute;
    top: calc(100% + 4px); /* anclado debajo del input-group, también en mobile vertical */
    left: 0;
    right: 0;
    width: 100%;
    max-height: min(60vh, 360px);
    overflow-y: auto;
    background: var(--vt-bg-card);
    border-radius: var(--vt-radius);
    box-shadow: var(--vt-shadow-md);
    z-index: 100;
    -webkit-overflow-scrolling: touch;
    /* Animación de entrada en lugar de display: none/block */
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition:
        opacity  0.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.vt-search-results.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.vt-search-results a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: var(--vt-text);
    text-decoration: none;
    border-bottom: 1px solid var(--vt-border);
    transition: background var(--vt-transition);
}

.vt-search-results a:hover {
    background: var(--vt-green-light);
}

/* ===== PROPERTY CARDS ===== */
.vt-card {
    background: var(--vt-bg-card);
    border-radius: var(--vt-radius-lg);
    overflow: hidden;
    border: 1px solid var(--vt-border);
    box-shadow: var(--vt-shadow);
    transition:
        transform var(--vt-transition),
        box-shadow var(--vt-transition),
        border-color var(--vt-transition);
}

.vt-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--vt-shadow-md);
    border-color: rgba(63, 107, 53, 0.25);
}

/* Dark mode: bordes luminosos reemplazan sombras */
[data-bs-theme="dark"] .vt-card {
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

[data-bs-theme="dark"] .vt-card:hover {
    box-shadow: none;
    border-color: rgba(63, 107, 53, 0.4);
    background: var(--vt-bg-card-hover);
}

/* Tarjetas mini (similares en anuncio.php) */
.vt-card-hover-mini {
    transition:
        transform var(--vt-transition),
        border-color var(--vt-transition);
    border: 1px solid var(--vt-border);
}

.vt-card-hover-mini:hover {
    transform: translateX(4px);
    border-color: rgba(63, 107, 53, 0.4);
}

[data-bs-theme="dark"] .vt-card-hover-mini {
    border: 1px solid rgba(255, 255, 255, 0.07);
}

[data-bs-theme="dark"] .vt-card-hover-mini:hover {
    border-color: rgba(63, 107, 53, 0.5);
    background: var(--vt-bg-card-hover);
}

.vt-card-img-wrapper {
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/10;
    /* Fallback mientras carga o si falla la imagen */
    background:
        linear-gradient(135deg, rgba(63, 107, 53,0.12) 0%, rgba(63, 107, 53,0.04) 50%, rgba(0,0,0,0.15) 100%),
        var(--bs-tertiary-bg);
}

/* Placeholder visual cuando la imagen no carga */
.vt-card-img-wrapper::before {
    content: "\F425";
    font-family: "bootstrap-icons";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--vt-green);
    opacity: .35;
    z-index: 0;
}

.vt-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--vt-transition-slow), opacity .45s ease;
    position: relative;
    z-index: 1;
    opacity: 0;
    will-change: opacity;
}
.vt-card-img-wrapper img.vt-img-loaded,
.vt-card-img-wrapper img[data-eager] {
    opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
    .vt-card-img-wrapper img { opacity: 1 !important; transition: none; }
}

/* Si la imagen se marca como fallida (onerror), ocultarla para mostrar el placeholder */
.vt-card-img-wrapper img.vt-img-failed {
    display: none;
}

.vt-card:hover .vt-card-img-wrapper img {
    transform: scale(1.08);
}

.vt-card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 3; /* por encima del ::after overlay (z-index:2) */
}

.vt-card-body {
    padding: 1.5rem;
}

.vt-card-body h3 {
    font-family: var(--vt-font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.vt-card-body p {
    color: var(--vt-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.vt-price {
    display: inline-flex;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--vt-green);
    background: var(--vt-green-light);
    padding: 0.3rem 1rem;
    border-radius: var(--vt-radius-pill);
}

.vt-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--vt-border);
    font-size: 0.85rem;
    color: var(--vt-text-muted);
}

.vt-features span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.vt-features i {
    color: var(--vt-green);
}

/* ===== SECTION HEADERS ===== */
.vt-section-title {
    font-family: var(--vt-font-heading);
    font-size: clamp(1.35rem, 2.5vw + 0.8rem, 2rem);
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.vt-section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--vt-green);
    border-radius: 2px;
}

.vt-section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* ===== CTA SECTION ===== */
.vt-cta {
    background: url('../build/img/encuentra.jpg') center/cover no-repeat;
    position: relative;
    border-radius: var(--vt-radius-lg);
    overflow: hidden;
}

.vt-cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(63, 107, 53, 0.35));
}

/* ===== BLOG CARDS ===== */
.vt-blog-card {
    background: var(--vt-bg-card);
    border-radius: var(--vt-radius-lg);
    overflow: hidden;
    border: 1px solid var(--vt-border);
    transition:
        transform var(--vt-transition),
        box-shadow var(--vt-transition),
        border-color var(--vt-transition);
}

.vt-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--vt-shadow-md);
}

.vt-blog-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform var(--vt-transition-slow);
}

.vt-blog-card:hover img {
    transform: scale(1.05);
}

.vt-blog-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--vt-text-muted);
}

/* ===== TESTIMONIALS ===== */
.vt-testimonial {
    background: linear-gradient(135deg, var(--vt-green), var(--vt-green-dark));
    border-radius: var(--vt-radius-lg);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--vt-shadow-green);
}

.vt-testimonial-quote {
    font-family: var(--vt-font-heading);
    font-size: 1.3rem;
    font-style: italic;
    line-height: 1.8;
}

.vt-testimonial-icon {
    font-size: 3rem;
    opacity: 0.2;
    position: absolute;
    top: 1rem;
    left: 1.5rem;
}

/* ===== FORMS ===== */
.vt-form .form-control,
.vt-form .form-select {
    border-radius: var(--vt-radius);
    border: 2px solid var(--vt-border);
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    transition:
        border-color 0.18s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow   0.18s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--vt-bg-card);
    color: var(--vt-text);
    transition: all var(--vt-transition);
}

.vt-form .form-control:focus,
.vt-form .form-select:focus {
    border-color: var(--vt-green);
    box-shadow: 0 0 0 4px var(--vt-green-light);
}

.vt-form label {
    font-weight: 500;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

/* ===== STATS COUNTER ===== */
.vt-stat-card {
    text-align: center;
    padding: 2rem 1rem;
}

.vt-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--vt-green);
    line-height: 1;
}

.vt-stat-label {
    color: var(--vt-text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ===== TEAM CARDS ===== */
.vt-team-card {
    text-align: center;
    background: var(--vt-bg-card);
    border-radius: var(--vt-radius-lg);
    padding: 2rem 1.5rem;
    border: 1px solid var(--vt-border);
    transition: all var(--vt-transition);
}

.vt-team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--vt-shadow-md);
}

.vt-team-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--vt-green-light);
    margin-bottom: 1rem;
}

/* ===== FOOTER ===== */
.vt-footer {
    background: var(--vt-footer-bg);
    border-top: 3px solid var(--vt-green);
}

.vt-footer-links li {
    margin-bottom: 0.5rem;
}

.vt-footer-links a,
.vt-footer-links li {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--vt-transition);
}

.vt-footer-links a:hover {
    color: var(--vt-green);
    padding-left: 4px;
}

.vt-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ===== ALERTS ===== */
.vt-alert {
    border-radius: var(--vt-radius);
    border: none;
    font-weight: 500;
}

/* ==============================================
   FASE 4 — DASHBOARD Y VISUALIZACIÓN DE DATOS
   ============================================== */

/* ── Trend badges ────────────────────────────── */
.vt-trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: var(--vt-fs-xs);
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--vt-radius-pill);
    line-height: 1.6;
}

.vt-trend-up {
    background: var(--vt-green-light);
    color: var(--vt-green-dark);
}

.vt-trend-down {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

/* ── Progress bars del dashboard ─────────────── */
/* La animación de ancho se dispara en JS cuando el elemento entra en viewport */
.vt-progress-bar-animated .progress-bar {
    width: 0% !important; /* estado inicial — JS lo actualiza a data-width */
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@media (prefers-reduced-motion: reduce) {
    .vt-progress-bar-animated .progress-bar {
        transition: none !important;
    }
}

/* ── Admin card header sin bg-white (dark-mode safe) ── */
.vt-card .card-header {
    background: var(--vt-bg-card) !important;
    border-bottom: 1px solid var(--vt-border) !important;
}

/* ===================================================================
   ADMIN — Sistema de diseño del panel
   =================================================================== */

/* ── Navbar Admin ─────────────────────────────────────────────────── */
.navbar.navbar-dark.bg-dark {
    background: #0f1117 !important;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 1px 0 rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.2);
    padding-top: .55rem;
    padding-bottom: .55rem;
}
.navbar.navbar-dark.bg-dark .navbar-brand img {
    filter: brightness(0) invert(1);
    height: 28px !important;
}
.navbar.navbar-dark.bg-dark .badge.bg-vt-green {
    background: var(--vt-green) !important;
    color: #fff !important;
    font-size: .6rem;
    padding: .25em .55em;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: .03em;
}
.navbar.navbar-dark.bg-dark .nav-link {
    font-size: .82rem;
    font-weight: 500;
    color: rgba(255,255,255,0.65) !important;
    padding: .35rem .6rem !important;
    border-radius: 6px;
    transition: color .15s, background .15s;
    letter-spacing: .01em;
}
.navbar.navbar-dark.bg-dark .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.07);
}
.navbar.navbar-dark.bg-dark .nav-link.active {
    color: #fff !important;
    background: rgba(63, 107, 53,0.18);
    font-weight: 600;
}
.navbar.navbar-dark.bg-dark .nav-link.text-danger {
    color: #f87171 !important;
}
.navbar.navbar-dark.bg-dark .nav-link.text-danger:hover {
    background: rgba(248,113,113,0.12);
}

/* ── Stat Cards ───────────────────────────────────────────────────── */
.vt-admin-stat-card {
    border-radius: 14px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    padding: 1.4rem 1.5rem;
    transition: transform .2s cubic-bezier(0.16,1,0.3,1), box-shadow .2s;
    position: relative;
    overflow: hidden;
}
.vt-admin-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--vt-green);
    opacity: 0;
    transition: opacity .2s;
    border-radius: 14px 14px 0 0;
}
.vt-admin-stat-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 2px 8px rgba(0,0,0,0.06),
        0 8px 24px rgba(0,0,0,0.08);
}
.vt-admin-stat-card:hover::before {
    opacity: 1;
}
[data-bs-theme="dark"] .vt-admin-stat-card {
    background: #1a1d23;
    border-color: rgba(255,255,255,0.07);
}
[data-bs-theme="dark"] .vt-admin-stat-card:hover {
    box-shadow:
        0 2px 8px rgba(0,0,0,0.3),
        0 8px 24px rgba(0,0,0,0.4);
}

.vt-admin-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ── Tables Admin ─────────────────────────────────────────────────── */
.vt-table {
    border-radius: var(--vt-radius);
    overflow: hidden;
}
.vt-table thead th {
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    border-top: none;
    white-space: nowrap;
}
.vt-table tbody tr {
    transition: background .12s;
    border-bottom: 1px solid var(--bs-border-color);
}
.vt-table tbody tr:last-child { border-bottom: none; }
.vt-table tbody tr:hover {
    background: color-mix(in srgb, var(--vt-green) 5%, transparent);
}
.vt-table td {
    padding: 0.8rem 1rem;
    vertical-align: middle;
    font-size: 0.875rem;
}

/* ── Cards del admin (genérico) ───────────────────────────────────── */
.card.border-0.shadow-sm {
    border-radius: 14px !important;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.04),
        0 4px 12px rgba(0,0,0,0.06) !important;
}
[data-bs-theme="dark"] .card.border-0.shadow-sm {
    background: #1a1d23;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.2),
        0 4px 16px rgba(0,0,0,0.3) !important;
}

/* ── Table header en cards ────────────────────────────────────────── */
.table thead.table-light th {
    background: var(--bs-tertiary-bg) !important;
    color: var(--bs-secondary-color) !important;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    border-bottom: 1px solid var(--bs-border-color);
    padding: .75rem 1rem;
    white-space: nowrap;
}

/* ── Formularios admin ────────────────────────────────────────────── */
.vt-form .form-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .4rem;
}
.vt-form h5.fw-bold.text-vt-green {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
}

/* ── Empty state ──────────────────────────────────────────────────── */
.vt-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--bs-secondary-color);
    text-align: center;
}
.vt-empty-state__icon { font-size: 3rem; opacity: .25; margin-bottom: .75rem; display: block; }
.vt-empty-state__title { font-weight: 600; margin-bottom: .25rem; }
.vt-empty-state__desc  { font-size: .875rem; opacity: .7; }

/* ═══════════════════════════════════════════════════════════════════
   UBICACIÓN — Google Maps Premium Experience
   ═══════════════════════════════════════════════════════════════════ */

.vt-ubicacion {
    --vt-ubic-radius: 18px;
}

/* Wrapper del iframe de Google Maps */
.vt-map-wrapper {
    border-radius: var(--vt-ubic-radius);
    border: 1px solid var(--bs-border-color);
    background: #e8f0e0;
    position: relative;
    isolation: isolate;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.04),
        0 12px 32px rgba(77,122,0,0.08);
    transition: box-shadow .3s cubic-bezier(0.16,1,0.3,1);
}
.vt-map-wrapper:hover {
    box-shadow:
        0 4px 16px rgba(0,0,0,0.06),
        0 20px 48px rgba(77,122,0,0.12);
}
.vt-map-wrapper iframe {
    display: block;
    filter: saturate(1.05);
}
[data-bs-theme="dark"] .vt-map-wrapper iframe {
    filter: saturate(1.05) brightness(0.92);
}

/* Overlay informativo */
.vt-map-overlay {
    position: absolute;
    left: 16px;
    bottom: 16px;
    right: 16px;
    max-width: 440px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: .8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border: 1px solid rgba(0,0,0,0.04);
    color: #333;
    pointer-events: none;
    z-index: 2;
}
.vt-map-overlay i { font-size: 1rem; flex-shrink: 0; }
[data-bs-theme="dark"] .vt-map-overlay {
    background: rgba(26,29,35,0.92);
    color: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,0.08);
}

/* Panel de acciones premium */
.vt-map-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    text-decoration: none;
    color: var(--bs-body-color);
    transition:
        transform .2s cubic-bezier(0.16,1,0.3,1),
        box-shadow .2s,
        border-color .2s;
    cursor: pointer;
    text-align: left;
    min-height: 68px;
}
.vt-map-action > i {
    font-size: 1.5rem;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--vt-green-light);
    color: var(--vt-green-accessible);
    flex-shrink: 0;
    transition: background .2s, transform .2s;
}
.vt-map-action > div {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}
.vt-map-action .fw-semibold {
    font-size: .88rem;
    color: var(--bs-body-color);
}
.vt-map-action small {
    font-size: .7rem;
    display: block;
}
.vt-map-action:hover {
    transform: translateY(-2px);
    border-color: var(--vt-green);
    box-shadow:
        0 4px 12px rgba(77,122,0,0.08),
        0 8px 24px rgba(77,122,0,0.06);
    color: var(--bs-body-color);
}
.vt-map-action:hover > i {
    background: var(--vt-green);
    color: #fff;
    transform: scale(1.05);
}
[data-bs-theme="dark"] .vt-map-action {
    background: #1a1d23;
    border-color: rgba(255,255,255,0.08);
}
[data-bs-theme="dark"] .vt-map-action:hover {
    border-color: var(--vt-green);
    background: #1f2328;
}

@media (max-width: 575.98px) {
    .vt-map-wrapper iframe { height: 340px !important; }
    .vt-map-overlay {
        left: 10px; right: 10px; bottom: 10px;
        font-size: .72rem;
        padding: 8px 10px;
    }
    .vt-map-action {
        padding: 10px 12px;
        min-height: 60px;
    }
    .vt-map-action > i {
        width: 36px; height: 36px;
        font-size: 1.2rem;
    }

    /* Hero search: layout vertical en xs — pill → card */
    .vt-search-hero {
        border-radius: var(--vt-radius-lg);
        flex-direction: column;
    }
    .vt-search-hero .input-group-text {
        border-radius: 0;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        justify-content: center;
    }
    .vt-search-hero .form-control {
        border-bottom: 1px solid rgba(0,0,0,0.1) !important;
    }
    .vt-search-hero .btn-vt-green {
        width: 100%;
        border-radius: 0 !important;
        justify-content: center;
        padding: 0.875rem;
    }

    /* Hero: reducir padding vertical (svh evita que las barras móviles oculten contenido) */
    .vt-hero { min-height: 78vh; min-height: 82svh; padding: 4.5rem 0 2.5rem; }
    .vt-hero-title { font-size: clamp(1.6rem, 7vw, 2.4rem); }
    .vt-hero-pills { gap: 5px; margin-top: 0.75rem !important; }
    .vt-hero-pill { padding: 7px 12px; font-size: .75rem; gap: 5px; }
    .vt-hero-pill i { font-size: .85rem; }
    .vt-hero-pill--all { display: none; } /* "Ver todas" sobra en xs — ya hay navbar */
}

/* ── Etapa CRM badges ─────────────────────────────────────────────── */
.vt-etapa {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.vt-etapa-nuevo           { background: rgba(59,130,246,.12);  color: #1d4ed8; }
.vt-etapa-contactado      { background: rgba(6,182,212,.12);   color: #0891b2; }
.vt-etapa-visita_agendada { background: rgba(234,179,8,.15);   color: #a16207; }
.vt-etapa-en_negociacion  { background: rgba(249,115,22,.12);  color: #c2410c; }
.vt-etapa-cerrado         { background: rgba(34,197,94,.12);   color: #15803d; }
.vt-etapa-descartado      { background: rgba(100,116,139,.12); color: #475569; }

[data-bs-theme="dark"] .vt-etapa-nuevo           { color: #93c5fd; }
[data-bs-theme="dark"] .vt-etapa-contactado      { color: #67e8f9; }
[data-bs-theme="dark"] .vt-etapa-visita_agendada { color: #fde047; }
[data-bs-theme="dark"] .vt-etapa-en_negociacion  { color: #fdba74; }
[data-bs-theme="dark"] .vt-etapa-cerrado         { color: #86efac; }
[data-bs-theme="dark"] .vt-etapa-descartado      { color: #94a3b8; }

/* ── Estado propiedad badges ──────────────────────────────────────── */
.vt-estado {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.vt-estado-disponible { background: rgba(63, 107, 53,.12);   color: var(--vt-green-accessible); }
.vt-estado-reservada  { background: rgba(201, 161, 74,.12);   color: #92400e; }
.vt-estado-vendida    { background: rgba(100,116,139,.12); color: #475569; }
.vt-estado-borrador   { background: rgba(0,0,0,.06);       color: #6b7280; }

[data-bs-theme="dark"] .vt-estado-disponible { color: #a3e635; }
[data-bs-theme="dark"] .vt-estado-reservada  { color: #fbbf24; }
[data-bs-theme="dark"] .vt-estado-vendida    { color: #94a3b8; }
[data-bs-theme="dark"] .vt-estado-borrador   { color: #6b7280; }

/* ── Trend badges ─────────────────────────────────────────────────── */
.vt-trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: .72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
}
.vt-trend-up   { background: rgba(34,197,94,.12); color: #16a34a; }
.vt-trend-down { background: rgba(239,68,68,.12);  color: #dc2626; }
[data-bs-theme="dark"] .vt-trend-up   { color: #4ade80; }
[data-bs-theme="dark"] .vt-trend-down { color: #f87171; }

/* ── Nav pills admin (dark-mode aware) ────────────────────────────── */
/* Evita que clases text-dark hardcodeadas rompan el dark mode          */
.nav-pills .nav-link:not(.active) {
    color: var(--bs-body-color);
}
.nav-pills .nav-link:not(.active):hover {
    background: var(--bs-tertiary-bg);
    color: var(--bs-emphasis-color);
}

/* Badges bg-light text-dark → adaptativos en dark mode */
[data-bs-theme="dark"] .badge.bg-light {
    background: rgba(255,255,255,0.1) !important;
    color: rgba(255,255,255,0.85) !important;
}

/* ── Sidebar-style section headers ───────────────────────────────── */
.vt-card.p-4 h5.vt-heading,
.vt-card.p-4 h5 {
    font-size: .95rem;
    font-weight: 700;
}

/* ── Progress bars del dashboard ─────────────────────────────────── */
/* La animación de ancho se dispara en JS cuando el elemento entra en viewport */
.vt-progress-bar-animated .progress-bar {
    width: 0% !important; /* estado inicial — JS lo actualiza a data-width */
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Entrada suave para resultados de búsqueda */
@keyframes vtSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger: clases de delay para items de grid */
@keyframes vtFadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vt-stagger-item {
    opacity: 0;
    animation: vtFadeSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.vt-stagger-item:nth-child(1)  { animation-delay: 0ms; }
.vt-stagger-item:nth-child(2)  { animation-delay: 60ms; }
.vt-stagger-item:nth-child(3)  { animation-delay: 120ms; }
.vt-stagger-item:nth-child(4)  { animation-delay: 180ms; }
.vt-stagger-item:nth-child(5)  { animation-delay: 240ms; }
.vt-stagger-item:nth-child(6)  { animation-delay: 300ms; }
.vt-stagger-item:nth-child(n+7){ animation-delay: 350ms; }

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity  0.5s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {

    .reveal,
    .reveal.revealed,
    .vt-stagger-item,
    .vt-card,
    .vt-blog-card,
    .vt-team-card,
    .vt-admin-stat-card,
    .btn-vt-green,
    .btn-vt-yellow,
    .btn-vt-outline,
    a {
        transition: none !important;
        transform: none !important;
        animation: none !important;
        opacity: 1 !important;     /* items no quedan invisibles con animation:none */
    }
}

/* ===================================================================
   FASE 9 — FACTOR WOW
   Parallax hero · Shimmer cards · Contadores animados
   =================================================================== */

/* ── Parallax Hero ────────────────────────────────────────────────── */
/* El fondo se desplaza en JS vía transform para efecto depth         */
.vt-hero {
    overflow: hidden; /* contiene el fondo que sobresale */
}
.vt-hero-bg {
    position: absolute;
    inset: -10% 0;          /* 10% extra arriba/abajo para el recorrido */
    background: url('../build/img/header.jpg') center/cover no-repeat;
    will-change: transform;
    transition: transform 0.05s linear; /* suavizar via JS requestAnimationFrame */
}
/* Quitar background directo del contenedor ahora que usamos .vt-hero-bg */
.vt-hero-has-parallax {
    background: none !important;
}

/* ── Shimmer en hover de cards ────────────────────────────────────── */
.vt-card {
    isolation: isolate; /* contiene el pseudo elemento */
}
.vt-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255,255,255,0.06) 50%,
        transparent 60%
    );
    background-size: 200% 100%;
    background-position: 200% 0;
    opacity: 0;
    pointer-events: none;
    transition:
        background-position 0.55s cubic-bezier(0.16,1,0.3,1),
        opacity 0.2s ease;
    z-index: 1;
}
.vt-card:hover::after {
    background-position: -50% 0;
    opacity: 1;
}
[data-bs-theme="dark"] .vt-card::after {
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255,255,255,0.04) 50%,
        transparent 60%
    );
    background-size: 200% 100%;
    background-position: 200% 0;
}

/* ── Contadores animados ──────────────────────────────────────────── */
.vt-counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    transition: opacity 0.3s;
}
.vt-counter[aria-busy="true"] {
    opacity: 0.7;
}

/* ── Highlight de stats en la sección Sobre Nosotros ─────────────── */
.vt-stat-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    box-shadow: var(--vt-shadow-md);
    min-width: 140px;
}
[data-bs-theme="dark"] .vt-stat-badge {
    background: var(--bs-tertiary-bg);
    border-color: rgba(255,255,255,0.1);
}
.vt-stat-badge .vt-stat-number {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    color: var(--vt-green-accessible);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}
[data-bs-theme="dark"] .vt-stat-badge .vt-stat-number {
    color: var(--vt-green);
}
.vt-stat-badge .vt-stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* ── Reduced motion: deshabilitar shimmer y parallax ─────────────── */
@media (prefers-reduced-motion: reduce) {
    .vt-hero-bg {
        transition: none !important;
    }
    .vt-card::after {
        display: none !important;
    }
    .vt-counter[aria-busy="true"] {
        transition: none;
    }
}

/* ── Page fade-in ─────────────────────────────────────────────────── */
@keyframes vtPageIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
body {
    animation: vtPageIn 0.25s ease-out both;
}
@media (prefers-reduced-motion: reduce) {
    body { animation: none; }
}

/* ── Card image: gradient overlay en hover ────────────────────────── */
/* Un velo verde oscuro sube desde la base al hacer hover — crea profundidad */
.vt-card-img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(30, 60, 5, 0.55) 0%,
        rgba(30, 60, 5, 0.15) 40%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 2; /* badges usan z-index:3, imagen usa z-index:1 */
    pointer-events: none;
}
.vt-card:hover .vt-card-img-wrapper::after {
    opacity: 1;
}
/* Cualquier badge/pill dentro del wrapper debe quedar sobre el overlay */
.vt-card-img-wrapper > .badge,
.vt-card-img-wrapper > [class*="position-absolute"] {
    z-index: 3;
}
@media (prefers-reduced-motion: reduce) {
    .vt-card-img-wrapper::after { transition: none; }
}

/* ── Login glassmorphism ───────────────────���──────────────────────── */
.vt-login-bg {
    position: fixed;
    inset: 0;
    background: url('../build/img/header.jpg') center/cover no-repeat;
    z-index: -1;
}
.vt-login-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 30, 5, 0.55);
}
.vt-login-glass {
    max-width: 480px;
    width: 100%;
    padding: 3rem 2.5rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        0 4px 6px rgba(0,0,0,0.05),
        0 16px 48px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.8);
    position: relative;
    z-index: 1;
}
[data-bs-theme="dark"] .vt-login-glass {
    background: rgba(20, 25, 20, 0.82);
    border-color: rgba(255,255,255,0.1);
    box-shadow:
        0 4px 6px rgba(0,0,0,0.2),
        0 16px 48px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

/* =============================================
   FASE 10 — NEURO-PERSUASIÓN Y CONVERSIÓN
   FOMO badges, social proof, skeleton shimmer
   ============================================= */

/* ── Sold / Reserved overlay ──────────────────────────────────── */
.vt-card--sold,
.vt-card--reserved {
    position: relative;
}
.vt-card--sold .vt-card-img-wrapper,
.vt-card--reserved .vt-card-img-wrapper {
    /* Desaturar la imagen ligeramente */
    filter: saturate(0.6) brightness(0.85);
    transition: filter var(--vt-transition);
}
.vt-card--sold:hover .vt-card-img-wrapper,
.vt-card--reserved:hover .vt-card-img-wrapper {
    filter: saturate(0.75) brightness(0.9);
}

/* Overlay oscuro sobre toda la card */
.vt-fomo-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgba(0, 0, 0, 0.30);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    pointer-events: none;
    transition: background var(--vt-transition);
}
.vt-card--sold:hover .vt-fomo-overlay,
.vt-card--reserved:hover .vt-fomo-overlay {
    background: rgba(0, 0, 0, 0.20);
}

/* Badge central — VENDIDO (rojo) */
.vt-fomo-badge {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.5rem 1.5rem;
    border-radius: var(--vt-radius-pill);
    color: #fff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: auto;
}
.vt-fomo-badge--sold {
    background: rgba(220, 38, 38, 0.88);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.35);
}
.vt-fomo-badge--reserved {
    background: rgba(217, 119, 6, 0.88);
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.35);
}

/* Dark mode: mantener contraste */
[data-bs-theme="dark"] .vt-fomo-overlay {
    background: rgba(0, 0, 0, 0.45);
}
[data-bs-theme="dark"] .vt-card--sold:hover .vt-fomo-overlay,
[data-bs-theme="dark"] .vt-card--reserved:hover .vt-fomo-overlay {
    background: rgba(0, 0, 0, 0.35);
}

/* Card link deshabilitado para vendidas */
.vt-card--sold > a {
    pointer-events: none;
}
/* Reservada sigue siendo clickeable */
.vt-card--reserved > a {
    pointer-events: auto;
}

/* ── Views counter (prueba social pasiva) ── */
.vt-views-count {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: var(--vt-text-muted);
    padding: 0.2rem 0.6rem;
    border-radius: var(--vt-radius-pill);
    background: var(--vt-bg);
    border: 1px solid var(--vt-border);
}
.vt-views-count i {
    font-size: 0.7rem;
    color: var(--vt-green);
}

/* ── Skeleton shimmer global ──────────────────────────────────── */
.skeleton-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: vtShimmer 1.5s infinite;
    border-radius: var(--vt-radius-sm);
}
@keyframes vtShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
[data-bs-theme="dark"] .skeleton-shimmer {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
}
@media (prefers-reduced-motion: reduce) {
    .skeleton-shimmer { animation: none; }
}

/* ── FASE 10b: Urgencia activa — badges y señales ─────────────── */

/* Badge "Nueva" — verde vibrante con micro-pulse */
.vt-badge-nueva {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    padding: 0.25rem 0.65rem;
    border-radius: var(--vt-radius-pill);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35);
    animation: vtPulseNew 2s ease-in-out infinite;
}
@keyframes vtPulseNew {
    0%, 100% { box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35); }
    50%      { box-shadow: 0 2px 16px rgba(34, 197, 94, 0.55); }
}
@media (prefers-reduced-motion: reduce) {
    .vt-badge-nueva { animation: none; }
}

/* Badge "Popular" / "🔥 X visitas" */
.vt-badge-popular {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #dc2626);
    padding: 0.25rem 0.65rem;
    border-radius: var(--vt-radius-pill);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

/* Texto temporal — "Hace X días" (sutil) */
.vt-temporal {
    font-size: 0.72rem;
    color: var(--vt-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.vt-temporal i { font-size: 0.65rem; }

/* Badge escasez — "Única disponible" (rojo) y "Solo X" (ámbar) */
.vt-badge-escasez {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.65rem;
    border-radius: var(--vt-radius-pill);
    color: #fff;
}
.vt-badge-escasez--critica {
    background: rgba(220, 38, 38, 0.9);
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.3);
}
.vt-badge-escasez--baja {
    background: rgba(217, 119, 6, 0.88);
    box-shadow: 0 2px 10px rgba(217, 119, 6, 0.25);
}

/* Contador de interesados (en detalle de propiedad) */
.vt-interest-count {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--vt-radius);
    border: 1px solid var(--vt-border);
    background: var(--vt-bg);
}
.vt-interest-count i {
    color: var(--vt-green);
}
.vt-interest-count--alta {
    border-color: rgba(249, 115, 22, 0.3);
    background: rgba(249, 115, 22, 0.06);
    color: #c2410c;
}
.vt-interest-count--alta i {
    color: #f97316;
}
[data-bs-theme="dark"] .vt-interest-count--alta {
    background: rgba(249, 115, 22, 0.1);
    color: #fb923c;
}

/* Barra de escasez en detalle (anuncio.php) */
.vt-scarcity-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.65rem 1rem;
    border-radius: var(--vt-radius);
    border: 1px solid rgba(220, 38, 38, 0.2);
    background: rgba(220, 38, 38, 0.05);
    color: #b91c1c;
}
.vt-scarcity-bar i {
    font-size: 1rem;
    color: #dc2626;
}
.vt-scarcity-bar--baja {
    border-color: rgba(217, 119, 6, 0.2);
    background: rgba(217, 119, 6, 0.05);
    color: #92400e;
}
.vt-scarcity-bar--baja i {
    color: #d97706;
}
[data-bs-theme="dark"] .vt-scarcity-bar {
    background: rgba(220, 38, 38, 0.08);
    color: #f87171;
}
[data-bs-theme="dark"] .vt-scarcity-bar--baja {
    background: rgba(217, 119, 6, 0.08);
    color: #fbbf24;
}

/* Badges extra dentro de las cards — posición */
.vt-card-urgency {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: flex-end;
}

/* Visitas sutil en card body */
.vt-card-views {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    color: var(--vt-text-muted);
    opacity: 0.8;
}
.vt-card-views i { color: var(--vt-green); }

/* ===== RESPONSIVE EXTRAS ===== */

/* ── Tablet (≤ 991px) ────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .vt-hero { min-height: 80vh; }
    .vt-hero .lead { font-size: .95rem; }
    .vt-hero-pills { gap: 8px; }

    .vt-pillar { padding: 1.6rem 1.25rem; }
    .vt-pillar-icon { width: 52px; height: 52px; font-size: 1.5rem; margin-bottom: 1rem; }

    .vt-card-body { padding: 1.1rem; }
    .vt-section-title { margin-bottom: 1.5rem; }

    .vt-categoria-card { padding: 1.4rem 1.25rem; }
    .vt-categoria-icon { width: 48px; height: 48px; font-size: 1.4rem; margin-bottom: 1rem; }
}

/* ── Mobile (≤ 767px) ────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    /* Tipografía: manejada con clamp() — sin overrides planos aquí */
    .vt-hero { min-height: 70vh; }
    .vt-hero .lead { font-size: .875rem; }

    .vt-section-title { margin-bottom: 1rem; }

    .vt-card-body { padding: 1rem; }
    .vt-features {
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    /* Pillars más compactos */
    .vt-pillar { padding: 1.25rem 1rem; }
    .vt-pillar-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    .vt-pillar-title { font-size: .9rem; }
    .vt-pillar-desc { font-size: .78rem; }

    /* Hero pills más compactos */
    .vt-hero-pills { gap: 6px; }
    .vt-hero-eyebrow { font-size: .62rem; padding: 5px 12px; margin-bottom: 0.9rem; }

    /* Categorías: 2 columnas en mobile */
    .vt-categoria-card { padding: 1.1rem 1rem; }
    .vt-categoria-icon { width: 40px; height: 40px; font-size: 1.2rem; margin-bottom: 0.75rem; }
}

/* ==============================================
   FASE 3 — COMPONENTES Y MICRO-INTERACCIONES
   ============================================== */

/* ── Skip to content ─────────────────────────── */
.vt-skip-link {
    position: fixed;          /* fixed = relativo al viewport, no a un ancestor */
    top: -120px;
    left: var(--vt-space-4);
    z-index: 999999;          /* sobre el navbar fixed (z-index ~1030) */
    background: var(--vt-green);
    color: white;
    padding: var(--vt-space-3) var(--vt-space-6);
    border-radius: 0 0 var(--vt-radius) var(--vt-radius);
    font-weight: 700;
    font-size: var(--vt-fs-sm);
    text-decoration: none;
    transition: top 0.2s ease;
}

.vt-skip-link:focus {
    top: 0;
    outline: 3px solid white;
    outline-offset: 2px;
    color: white;
}

/* ── Touch targets mínimos 44×44px (WCAG 2.5.5) ── */
.navbar-toggler,
.vt-darkmode-btn,
.vt-theme-mini,
.vt-toast__close,
.btn-close,
.page-link {
    min-width:  44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Hero pills: target mínimo en mobile */
.vt-hero-pill {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* ── Focus-visible global ────────────────────── */
/* Quitar outline por defecto en mouse/touch, mostrarlo SOLO con teclado */
*:focus { outline: none; }

/* Doble anillo: verde exterior + blanco interior — visible en cualquier fondo */
*:focus-visible {
    outline: 3px solid var(--vt-green-accessible);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgba(63, 107, 53, 0.25);
    border-radius: var(--vt-radius-sm);
}

[data-bs-theme="dark"] *:focus-visible {
    outline-color: var(--vt-green);
    box-shadow: 0 0 0 5px rgba(63, 107, 53, 0.35);
}

/* Inputs y selects: usar box-shadow en lugar de outline para no cortar el borde */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--vt-green-light), 0 0 0 1px var(--vt-green) !important;
}

/* Links del footer sobre fondo oscuro: anillo blanco */
.vt-footer a:focus-visible {
    outline-color: white;
}

/* ── Disabled states ─────────────────────────── */
.btn-vt-green:disabled,
.btn-vt-green[disabled],
.btn-vt-yellow:disabled,
.btn-vt-yellow[disabled],
.btn-vt-outline:disabled,
.btn-vt-outline[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

.vt-form .form-control:disabled,
.vt-form .form-select:disabled {
    background: var(--vt-gray-200);
    opacity: 0.65;
    cursor: not-allowed;
}

/* ── Show/Hide sin display:none (hidden-soft) ── */
/* Uso: agregar .hidden-soft para ocultar, quitar para mostrar */
.hidden-soft {
    max-height: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.35s ease, opacity 0.25s ease !important;
    pointer-events: none;
}

/* ── Skeleton Loaders ────────────────────────── */
@keyframes vt-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}

.vt-skeleton {
    background: linear-gradient(
        90deg,
        var(--vt-gray-200) 25%,
        var(--vt-gray-100) 50%,
        var(--vt-gray-200) 75%
    );
    background-size: 600px 100%;
    animation: vt-shimmer 1.4s infinite linear;
    border-radius: var(--vt-radius-sm);
    display: block;
}

[data-bs-theme="dark"] .vt-skeleton {
    background: linear-gradient(
        90deg,
        #22263a 25%,
        #2a2f45 50%,
        #22263a 75%
    );
    background-size: 600px 100%;
}

/* Variantes de tamaño */
.vt-skeleton-text        { height: 1rem;    width: 100%;  margin-bottom: var(--vt-space-2); }
.vt-skeleton-text-sm     { height: 0.75rem; width: 70%;   margin-bottom: var(--vt-space-2); }
.vt-skeleton-title       { height: 1.4rem;  width: 60%;   margin-bottom: var(--vt-space-3); }
.vt-skeleton-badge       { height: 1.4rem;  width: 4rem;  border-radius: var(--vt-radius-pill); }
.vt-skeleton-img         { width: 100%;     aspect-ratio: 4/3; border-radius: var(--vt-radius-lg) var(--vt-radius-lg) 0 0; }
.vt-skeleton-price       { height: 1.8rem;  width: 8rem;  border-radius: var(--vt-radius-pill); }
.vt-skeleton-avatar      { width: 40px;     height: 40px; border-radius: 50%; flex-shrink: 0; }

/* ── Tarjeta skeleton completa (para grid de propiedades) ── */
.vt-card-skeleton {
    background: var(--vt-bg-card);
    border-radius: var(--vt-radius-lg);
    border: 1px solid var(--vt-border);
    overflow: hidden;
}

.vt-card-skeleton-body {
    padding: var(--vt-space-6);
    display: flex;
    flex-direction: column;
    gap: var(--vt-space-2);
}

/* ── Toast Notifications ─────────────────────── */
#vt-toast-container {
    position: fixed;
    bottom: var(--vt-space-6);
    right: var(--vt-space-6);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--vt-space-3);
    pointer-events: none;
    max-width: 360px;
    width: calc(100vw - var(--vt-space-8));
}

.vt-toast {
    background: var(--vt-bg-card);
    border-radius: var(--vt-radius);
    box-shadow: var(--vt-shadow-lg);
    border-left: 4px solid var(--vt-green);
    padding: var(--vt-space-4) var(--vt-space-5);
    display: flex;
    align-items: flex-start;
    gap: var(--vt-space-3);
    pointer-events: all;
    /* Entrada */
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.vt-toast.vt-toast--visible {
    opacity: 1;
    transform: translateX(0);
}

.vt-toast.vt-toast--hide {
    opacity: 0;
    transform: translateX(30px);
}

.vt-toast--success { border-left-color: var(--vt-green); }
.vt-toast--error   { border-left-color: #dc3545; }
.vt-toast--warning { border-left-color: var(--vt-yellow); }
.vt-toast--info    { border-left-color: #0dcaf0; }

.vt-toast__icon {
    font-size: 1.2rem;
    line-height: 1;
    margin-top: 2px;
    flex-shrink: 0;
}

.vt-toast--success .vt-toast__icon { color: var(--vt-green); }
.vt-toast--error   .vt-toast__icon { color: #dc3545; }
.vt-toast--warning .vt-toast__icon { color: var(--vt-yellow); }
.vt-toast--info    .vt-toast__icon { color: #0dcaf0; }

.vt-toast__body {
    flex: 1;
    font-size: var(--vt-fs-sm);
    color: var(--vt-text);
    line-height: 1.5;
}

.vt-toast__title {
    font-weight: 700;
    font-size: var(--vt-fs-base);
    margin-bottom: 2px;
    display: block;
}

.vt-toast__close {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--vt-text-muted);
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
    transition: color var(--vt-transition);
}

.vt-toast__close:hover { color: var(--vt-text); }

/* ── Empty States ────────────────────────────── */
.vt-empty-state {
    text-align: center;
    padding: var(--vt-space-16) var(--vt-space-8);
    color: var(--vt-text-muted);
}

.vt-empty-state__icon {
    font-size: 4rem;
    opacity: 0.2;
    display: block;
    margin-bottom: var(--vt-space-6);
    color: var(--vt-text);
}

.vt-empty-state__title {
    font-family: var(--vt-font-heading);
    font-size: var(--vt-fs-md);
    font-weight: 700;
    color: var(--vt-text);
    margin-bottom: var(--vt-space-3);
}

.vt-empty-state__desc {
    font-size: var(--vt-fs-sm);
    max-width: 380px;
    margin: 0 auto var(--vt-space-6);
}

/* ── Active state en cards clicables ─────────── */
.vt-card a:active .vt-card,
.vt-card:active {
    transform: translateY(-4px) scale(0.99);
}

/* ── Ajuste reduced-motion para toasts ────────── */
@media (prefers-reduced-motion: reduce) {
    .vt-toast,
    .vt-toast.vt-toast--visible,
    .vt-toast.vt-toast--hide {
        transition: none !important;
        transform: none !important;
    }
    .vt-skeleton {
        animation: none !important;
        background: var(--vt-gray-200) !important;
    }
}

/* =============================================
   FASE 6 — ESTADOS COMPLETOS DEL SISTEMA
   ============================================= */

/* Banner offline/online global */
.vt-offline-banner {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%) translateY(calc(100% + 2rem));
    z-index: 9999;
    padding: 0.75rem 1.5rem;
    border-radius: var(--vt-radius-pill);
    font-size: var(--vt-fs-sm);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--vt-shadow-lg);
}

.vt-offline-banner--visible {
    transform: translateX(-50%) translateY(0);
}

.vt-offline-banner--offline {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
}

.vt-offline-banner--online {
    background: var(--vt-success-icon, #22c55e);
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .vt-offline-banner {
        transition: none;
    }
}

/* Estado sesión expirada en login */
.vt-session-alert {
    background: var(--vt-warning-light);
    border: 1px solid var(--vt-warning-icon);
    color: var(--vt-warning);
    border-radius: var(--vt-radius);
    padding: 0.75rem 1rem;
    font-size: var(--vt-fs-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* =============================================
   FASE 7 — WINDOWS HIGH CONTRAST MODE
   forced-colors preserva bordes y no rompe layout
   ============================================= */
@media (forced-colors: active) {
    /* Bordes visibles en HCM */
    .vt-card,
    .vt-card-hover-mini,
    .btn-vt-green,
    .btn-vt-yellow,
    .btn-vt-outline {
        border: 2px solid ButtonText !important;
        forced-color-adjust: none;
    }

    /* Overlay no bloquea contenido */
    .vt-hero-overlay,
    .vt-cta-overlay {
        display: none;
    }

    /* Focus super visible */
    *:focus-visible {
        outline: 3px solid Highlight !important;
        outline-offset: 2px !important;
    }

    /* Skeleton loaders no parpadeen */
    .vt-skeleton {
        animation: none !important;
        background: ButtonFace !important;
        border: 1px solid ButtonText !important;
    }

    /* Badges legibles */
    .badge {
        border: 1px solid ButtonText !important;
        forced-color-adjust: none;
    }
}

/* =============================================
   FASE 5 — ELEVACIÓN SISTEMA Z
   ============================================= */

/* Nivel 1: Tarjetas normales → --vt-shadow (ya en .vt-card) */
/* Nivel 2: Dropdowns, popovers */
.dropdown-menu {
    box-shadow: var(--vt-shadow-md) !important;
    border: 1px solid var(--vt-border) !important;
    border-radius: var(--vt-radius) !important;
}

[data-bs-theme="dark"] .dropdown-menu {
    box-shadow: none !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    background: var(--vt-bg-card) !important;
}

/* Nivel 3: Modales → elevación máxima */
.modal-content {
    box-shadow: var(--vt-shadow-lg) !important;
    border: 1px solid var(--vt-border) !important;
    border-radius: var(--vt-radius-lg) !important;
}

[data-bs-theme="dark"] .modal-content {
    box-shadow: none !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    background: var(--vt-bg-card) !important;
}

/* Sidebar agente (sticky): elevación media */
.sticky-top .vt-card {
    box-shadow: var(--vt-shadow-md);
}

[data-bs-theme="dark"] .sticky-top .vt-card {
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.1);
}

/* =============================================
   FASE 7 — ACCESIBILIDAD PROFUNDA
   prefers-reduced-motion global (WCAG 2.3.3)
   ============================================= */

/* Cobertura global: frena cualquier transición/animación no listada arriba */
@media (prefers-reduced-motion: reduce) {
    /* Scroll suave → instantáneo */
    html { scroll-behavior: auto !important; }

    /* Hero pills */
    .vt-hero-pill,
    .vt-hero-pill:hover {
        transition: none !important;
        transform: none !important;
    }

    /* Scroll indicator animation */
    .vt-hero-scroll span {
        animation: none !important;
        opacity: 1 !important;
    }

    /* Trust pillars */
    .vt-pillar,
    .vt-pillar::before,
    .vt-pillar-icon,
    .vt-pillar:hover,
    .vt-pillar:hover .vt-pillar-icon {
        transition: none !important;
        transform: none !important;
    }

    /* Categorías */
    .vt-categoria-card,
    .vt-categoria-card::after,
    .vt-categoria-icon,
    .vt-categoria-card:hover,
    .vt-categoria-card:hover .vt-categoria-icon {
        transition: none !important;
        transform: none !important;
        animation: none !important;
    }

    /* Galería / lightbox */
    .vt-gallery-item,
    .vt-gallery-item img,
    #imgPrincipal {
        transition: none !important;
        transform: none !important;
    }

    /* Navbar */
    .vt-navbar,
    .vt-navbar-admin {
        transition: none !important;
    }

    /* Offline banner */
    .vt-offline-banner {
        transition: none !important;
    }
}

/* ── Contraste WCAG AA — texto muted sobre fondo claro ── */
/* #6c757d sobre blanco = 4.48:1 (falla por 0.02). Uso token ligeramente más oscuro */
:root {
    --vt-text-muted-aa: #666e75; /* 4.6:1 sobre blanco — WCAG AA compliant */
}
/* Aplicar solo en contextos donde el fondo es claro y el tamaño es < 18px */
.vt-pillar-desc,
.vt-categoria-desc,
.vt-blog-meta,
.vt-card-meta,
.vt-footer-text {
    color: var(--vt-text-muted-aa);
}

/* =============================================
   FASE 2 — IMPRIMIBILIDAD
   Optimizado para anuncio.php (detalle propiedad)
   ============================================= */
@media print {
    /* Ocultar elementos de navegación e interacción */
    nav,
    .vt-navbar,
    .vt-skip-link,
    footer,
    #formContacto,
    .btn,
    .d-grid,
    .breadcrumb,
    #galleryModal,
    .vt-search-hero,
    [data-bs-toggle],
    .vt-toast-container,
    .no-print {
        display: none !important;
    }

    /* Reset de colores para impresión */
    * {
        color: #000 !important;
        background: #fff !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        font-size: 11pt;
        font-family: Georgia, serif;
        line-height: 1.5;
    }

    a {
        color: #000 !important;
        text-decoration: none !important;
    }

    /* Mostrar URL de enlaces importantes */
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #555 !important;
    }

    /* Precio destacado en print */
    .vt-price,
    .text-vt-green {
        color: #000 !important;
        font-weight: bold !important;
    }

    /* Imagen principal visible en print */
    .vt-card-img-wrapper img,
    #imgPrincipal {
        max-height: 280px;
        width: 100%;
        object-fit: cover;
        border: 1px solid #ccc;
    }

    /* Sidebar al 100% en print (columna única) */
    .col-lg-8,
    .col-lg-4 {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Características en fila */
    .bg-body-secondary {
        background: #f5f5f5 !important;
        border: 1px solid #ddd !important;
    }

    /* Datos del agente legibles */
    .card,
    .vt-card {
        border: 1px solid #ddd !important;
        page-break-inside: avoid;
    }

    /* Evitar cortes en medio de secciones */
    section,
    .mb-5 {
        page-break-inside: avoid;
    }

    /* Badge de tipo con borde visible */
    .badge {
        border: 1px solid #999 !important;
        color: #000 !important;
        background: #eee !important;
    }

    /* Footer de print con info del sitio */
    body::after {
        content: "Verde Tierra Propiedades — " attr(data-print-url);
        display: block;
        text-align: center;
        font-size: 9pt;
        color: #777 !important;
        border-top: 1px solid #ccc;
        margin-top: 2rem;
        padding-top: .5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   HOME PREMIUM — Pillars, Categorías, Stats, Testimonials
   ═══════════════════════════════════════════════════════════════════ */

/* ── HERO enhancements ────────────────────────────────────────────── */
.vt-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .2em;
    color: #fff !important;
    background: rgba(63, 107, 53,0.35);
    border: 1px solid rgba(63, 107, 53,0.65);
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
    box-shadow: 0 2px 12px rgba(63, 107, 53,0.2);
}

.vt-hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.vt-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.18);   /* más opaco — visible en dark mode */
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none !important;     /* override Bootstrap's a { underline } */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all .25s cubic-bezier(0.16,1,0.3,1);
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.vt-hero-pill i { font-size: 1rem; opacity: .9; }
.vt-hero-pill:hover {
    background: var(--vt-green);
    border-color: var(--vt-green);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(63, 107, 53,0.4);
}
.vt-hero-pill--all {
    background: rgba(255,255,255,0.92);
    color: #1a1a1a;
    border-color: rgba(255,255,255,0.92);
    font-weight: 600;
}
.vt-hero-pill--all:hover {
    background: #fff;
    color: var(--vt-green-accessible);
    border-color: #fff;
}

/* Scroll indicator */
.vt-hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 14px;
    text-decoration: none;
    transition: opacity .2s;
    z-index: 2;
}
.vt-hero-scroll span {
    position: absolute;
    top: 8px; left: 50%;
    width: 4px; height: 8px;
    background: #fff;
    border-radius: 2px;
    transform: translateX(-50%);
    animation: vtScrollDown 1.8s ease-in-out infinite;
}
.vt-hero-scroll:hover { opacity: .8; }
@keyframes vtScrollDown {
    0%   { transform: translate(-50%, 0);  opacity: 1; }
    70%  { transform: translate(-50%, 14px); opacity: 0; }
    100% { transform: translate(-50%, 0);  opacity: 0; }
}
@media (max-width: 767.98px) {
    .vt-hero-scroll { display: none; }
    .vt-hero-pill { padding: 8px 14px; font-size: .8rem; }
}

/* ── TRUST PILLARS ────────────────────────────────────────────────── */
.vt-pillar {
    background: var(--vt-bg-card);
    border: 1px solid var(--vt-border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    height: 100%;
    text-align: center;
    transition: transform .3s cubic-bezier(0.16,1,0.3,1), box-shadow .3s, border-color .3s;
    position: relative;
    overflow: hidden;
}
.vt-pillar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--vt-green), var(--vt-yellow));
    opacity: 0;
    transition: opacity .3s;
}
.vt-pillar:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(77,122,0,0.1), 0 4px 12px rgba(0,0,0,0.05);
    border-color: transparent;
}
.vt-pillar:hover::before { opacity: 1; }
.vt-pillar-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(63, 107, 53,0.12), rgba(63, 107, 53,0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--vt-green-accessible);
    transition: transform .3s cubic-bezier(0.16,1,0.3,1);
}
.vt-pillar:hover .vt-pillar-icon {
    transform: scale(1.08) rotate(-3deg);
}
.vt-pillar-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: .5rem;
    color: var(--vt-text);
}
.vt-pillar-desc {
    font-size: .82rem;
    color: var(--vt-text-muted);
    line-height: 1.55;
    margin: 0;
}
[data-bs-theme="dark"] .vt-pillar {
    background: #1a1d23;
    border-color: rgba(255,255,255,0.07);
}
[data-bs-theme="dark"] .vt-pillar-title { color: #fff; }

/* ── CATEGORÍAS (Explora por tipo) ────────────────────────────────── */
.vt-categoria-card {
    display: flex;
    flex-direction: column;
    background: var(--vt-bg-card);
    border: 1px solid var(--vt-border);
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    height: 100%;
    text-decoration: none;
    color: var(--vt-text);
    transition: transform .3s cubic-bezier(0.16,1,0.3,1), box-shadow .3s, border-color .3s;
    position: relative;
    overflow: hidden;
}
.vt-categoria-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(63, 107, 53,0.06) 100%);
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}
.vt-categoria-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(77,122,0,0.12), 0 4px 12px rgba(0,0,0,0.05);
    border-color: var(--vt-green);
    color: var(--vt-text);
}
.vt-categoria-card:hover::after { opacity: 1; }
.vt-categoria-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--vt-green), var(--vt-green-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 6px 16px rgba(77,122,0,0.25);
    transition: transform .3s;
}
.vt-categoria-card:hover .vt-categoria-icon { transform: scale(1.06); }
.vt-categoria-body { flex: 1; }
.vt-categoria-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: .25rem;
}
.vt-categoria-desc {
    font-size: .85rem;
    color: var(--vt-text-muted);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}
.vt-categoria-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--vt-border);
}
.vt-categoria-count {
    font-size: .78rem;
    font-weight: 600;
    color: var(--vt-green-accessible);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.vt-categoria-arrow {
    font-size: 1.1rem;
    color: var(--vt-green);
    transition: transform .25s;
}
.vt-categoria-card:hover .vt-categoria-arrow { transform: translateX(4px); }
[data-bs-theme="dark"] .vt-categoria-card {
    background: #1a1d23;
    border-color: rgba(255,255,255,0.07);
    color: #fff;
}
[data-bs-theme="dark"] .vt-categoria-meta { border-top-color: rgba(255,255,255,0.08); }

/* ── STATS STRIP ──────────────────────────────────────────────────── */
.vt-stats-strip {
    background: linear-gradient(135deg, #2D5016 0%, #1F3A0F 100%);
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    box-shadow: 0 20px 50px rgba(77,122,0,0.2);
    position: relative;
    overflow: hidden;
}
.vt-stats-strip::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.05) 0%, transparent 40%);
    pointer-events: none;
}
.vt-stats-item {
    text-align: center;
    padding: 1rem;
    position: relative;
    z-index: 1;
}
.vt-stats-item + .vt-stats-item::before {
    content: '';
    position: absolute;
    left: 0; top: 25%;
    height: 50%;
    width: 1px;
    background: rgba(255,255,255,0.15);
}
.vt-stats-number {
    display: block;
    font-family: var(--vt-font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: .5rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.vt-stats-label {
    display: block;
    font-size: .78rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    letter-spacing: .08em;
}
@media (max-width: 767.98px) {
    .vt-stats-item:nth-child(3)::before,
    .vt-stats-strip .col-6:nth-child(3) .vt-stats-item::before { display: none; }
    .vt-stats-item { padding: .75rem .5rem; }
}

/* ── CTA ENHANCED ─────────────────────────────────────────────────── */
.vt-cta-eyebrow {
    display: inline-flex;
    align-items: center;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .2em;
    color: #fff;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 16px;
    border-radius: 20px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
}

/* ── TESTIMONIALS CAROUSEL ────────────────────────────────────────── */
.vt-testimonial-carousel { position: relative; }
.vt-testimonial-carousel .carousel-item {
    transition: opacity .6s ease-in-out;
}
.vt-testimonial-indicators {
    position: static;
    margin: 1rem 0 0 0;
    justify-content: center;
    gap: 6px;
}
.vt-testimonial-indicators button {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50%;
    background: var(--vt-border) !important;
    border: 0 !important;
    opacity: 1 !important;
    transition: all .25s;
    margin: 0 !important;
}
.vt-testimonial-indicators button.active {
    background: var(--vt-green) !important;
    width: 28px !important;
    border-radius: 4px;
}
[data-bs-theme="dark"] .vt-testimonial-indicators button { background: rgba(255,255,255,0.2) !important; }
[data-bs-theme="dark"] .vt-testimonial-indicators button.active { background: var(--vt-green) !important; }

/* ════════════════════════════════════════════════════════════════════
   FASE 12 — PULIDO ÉLITE RESPONSIVE
   ──────────────────────────────────────────────────────────────────
   Reglas pensadas como sistema, no como parches sueltos:
     · Sin scroll horizontal accidental
     · Tap targets ≥ 44px (WCAG 2.5.5 AAA)
     · Inputs ≥ 16px en mobile (anti-zoom iOS)
     · Safe-area-inset (notch / home-indicator)
     · Fluid type vía clamp() en headings clave
     · Imágenes lazy con CLS = 0
     · Focus visible reforzado en teclado
   ════════════════════════════════════════════════════════════════════ */

/* ── 1. CIMIENTO GLOBAL ─────────────────────────────────────────── */

/* Safety-net: que NUNCA aparezca scroll horizontal en mobile. */
html, body { overflow-x: clip; }

/* Safe-area-inset (iPhone con notch / home indicator). */
body {
    padding-left:  env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Imágenes responsive por defecto — sin distorsión cuando faltan attrs. */
img { max-width: 100%; height: auto; }

/* Performance: evita reflow en imágenes lazy fuera de viewport. */
img[loading="lazy"] { content-visibility: auto; }

/* Foco accesible global (teclado) — anillos consistentes. */
:focus-visible {
    outline: 3px solid var(--vt-green);
    outline-offset: 3px;
    border-radius: 4px;
}
.vt-card a:focus-visible,
.vt-categoria-card:focus-visible {
    outline-offset: -2px;
    box-shadow: 0 0 0 3px var(--vt-green);
}

/* Anti-zoom iOS: cualquier input debe medir ≥ 16px en mobile. */
@media (max-width: 575.98px) {
    input, select, textarea, .form-control, .form-select {
        font-size: 16px !important;
    }
}

/* Tap-targets accesibles en mobile (Apple HIG: 44pt; WCAG: 44×44 CSS).
   Sólo aplicamos a botones realmente clickeables — NO a nav-link/footer
   genéricos (rompen layout vertical). Allí se controla con padding. */
@media (max-width: 767.98px) {
    .btn,
    .navbar-toggler,
    .vt-darkmode-btn,
    .vt-hero-pill {
        min-height: 44px;
    }
    /* Pagination: padding es suficiente — no forzar inline-flex. */
    .pagination .page-link {
        min-width: 44px;
        text-align: center;
    }
}

/* ── 2. NAVBAR MOBILE — colapsado prolijo ────────────────────────── */
@media (max-width: 991.98px) {
    .vt-navbar { padding: 0.4rem 0; }
    .vt-navbar .navbar-collapse {
        margin-top: 0.5rem;
        padding: 0.75rem 0;
        border-top: 1px solid var(--vt-border);
    }
    .vt-navbar .nav-link {
        padding: 0.85rem 1rem !important;
        border-radius: var(--vt-radius-sm);
    }
    .vt-navbar .nav-link.active {
        background: var(--vt-green-light);
    }
    /* Underline animado no aplica en stack vertical — desactivar. */
    .vt-navbar .nav-link::after { display: none; }
    /* Toggler: borde visual + tap zone. */
    .vt-navbar .navbar-toggler {
        padding: 0.5rem 0.65rem;
        border-radius: var(--vt-radius-sm);
    }
    .vt-navbar .navbar-toggler:focus-visible {
        box-shadow: 0 0 0 3px var(--vt-green-light);
    }
    /* Dark mode toggle: separado del menú con margin top. */
    .vt-darkmode-btn {
        margin-top: 0.5rem !important;
        margin-left: 1rem !important;
    }
}

/* ── 3. HERO — pills con scroll horizontal suave en xs ──────────── */
/* En lugar de wrap apretado, scroll horizontal con snap. */
@media (max-width: 575.98px) {
    .vt-hero-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        justify-content: flex-start;
        padding: 4px 16px 8px;
        margin: 0.75rem -16px 0 !important;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .vt-hero-pills::-webkit-scrollbar { display: none; }
    .vt-hero-pill {
        flex-shrink: 0;
        scroll-snap-align: start;
    }
    .vt-hero-pill--all { display: inline-flex !important; }
    /* Hero title más equilibrado (override del mobile xs anterior). */
    .vt-hero-title {
        margin-bottom: 0.5rem !important;
    }
    .vt-hero .lead {
        font-size: 0.95rem;
        margin-bottom: 1.25rem !important;
    }
    .vt-hero-eyebrow {
        font-size: 0.65rem !important;
        padding: 5px 12px !important;
    }
}

/* ── 4. BUSCADOR HERO — dropdown anclado bonito ─────────────────── */
@media (max-width: 575.98px) {
    .vt-search-results {
        top: calc(100% + 6px);
        max-height: 50vh;
        font-size: .9rem;
        border-radius: var(--vt-radius);
    }
    .vt-search-results a {
        padding: .75rem .85rem;
        gap: .75rem;
        min-height: 56px;
    }
    .vt-search-results img {
        width: 44px !important;
        height: 44px !important;
    }
}
.vt-search-results img {
    flex-shrink: 0;
    background: var(--vt-bg-tertiary, #f1f5f9);
}

/* ── 5. FILTROS DE LISTADO — refinado mobile ────────────────────── */
@media (max-width: 767.98px) {
    /* Card del formulario: padding más compacto. */
    #formFiltros { row-gap: 0.75rem !important; }

    /* Selects/inputs cómodos sin perder elegancia. */
    #formFiltros .form-select-lg,
    #formFiltros .form-control {
        font-size: 1rem;
        padding: 0.65rem 0.85rem;
    }
    #formFiltros label.form-label {
        margin-bottom: 0.25rem;
        font-size: 0.7rem !important;
    }

    /* Botón Buscar: ancho completo, sticky, prominente. */
    #formFiltros .col-md-2 #btnFiltrar {
        position: sticky;
        bottom: 0.5rem;
        z-index: 10;
        box-shadow: 0 10px 28px rgba(77,122,0,0.35);
        font-weight: 600;
    }

    /* Chips de filtros activos: scroll horizontal suave. */
    #chipsContainer {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    #chipsContainer .badge {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* "Filtros avanzados": collapse con espaciado correcto. */
    #filtrosAvanzados .row { row-gap: 0.65rem !important; }
}

/* ── 6. CARDS DE PROPIEDAD — refinado mobile ────────────────────── */
@media (max-width: 767.98px) {
    /* Aspect-ratio más vertical en cards apiladas (mejor uso del ancho). */
    .vt-card-img-wrapper { aspect-ratio: 16/10; }
    .vt-card-body { padding: 1.1rem !important; }
    .vt-card-body h3 { font-size: 1.05rem !important; }
    .vt-features { font-size: 0.85rem; }
    .vt-features .d-flex.gap-3 { gap: 0.85rem !important; }
    /* Precio compacto. */
    .vt-price { font-size: 1.1rem !important; padding: 0.35rem 0.85rem !important; }
}
@media (max-width: 575.98px) {
    /* En xs, una columna centrada con margen lateral mínimo. */
    .vt-card-img-wrapper { aspect-ratio: 4/3; }
}

/* Imagen rota: oculta el <img>, ::before muestra ícono fallback. */
.vt-card-img-wrapper img.vt-img-failed { opacity: 0 !important; }

/* ── 7. MODAL — full-height seguro en mobile ────────────────────── */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0.75rem;
        max-width: calc(100% - 1.5rem);
    }
    .modal-dialog-centered {
        min-height: calc(100% - 1.5rem);
    }
    .modal-content {
        max-height: calc(100dvh - 1.5rem);
        max-height: calc(100vh - 1.5rem); /* fallback */
        border-radius: var(--vt-radius) !important;
    }
    .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .modal-header {
        padding: 1rem 1.1rem 0.5rem;
    }
}

/* ── 8. ANUNCIO — galería + thumbnails + acciones móvil ─────────── */
@media (max-width: 767.98px) {
    /* Portada del anuncio: aspecto adecuado al ancho mobile. */
    .vt-map-wrapper iframe { height: 320px !important; }
    /* Thumbnails con scroll-snap suave. */
    .custom-scrollbar {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .vt-thumb-img {
        scroll-snap-align: start;
        width: 96px !important;
        height: 64px !important;
    }
}

/* ── 9. FOOTER — stack mobile prolijo + safe-area ────────────────── */
.vt-footer {
    padding-bottom: env(safe-area-inset-bottom);
}
@media (max-width: 575.98px) {
    .vt-footer-top .row { row-gap: 1.5rem !important; }
    .vt-footer-top h2 {
        font-size: 0.7rem !important;
        letter-spacing: 0.05em;
    }
    .vt-footer-links li { margin-bottom: 0.65rem; }
    .vt-footer-links a {
        padding: 0.25rem 0; /* tap-target sin mover layout */
        display: inline-block;
    }
    .vt-footer .social-icons,
    .vt-footer .d-flex.gap-3 { gap: 1.25rem !important; }
    .vt-footer-bottom { font-size: 0.72rem; }
}

/* ── 10. PAGINACIÓN — botones grandes legibles ──────────────────── */
@media (max-width: 575.98px) {
    .pagination { flex-wrap: wrap; gap: 0.25rem; justify-content: center; }
    .pagination .page-item { margin: 0; }
    .pagination .page-link {
        min-width: 44px;
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* ── 11. TESTIMONIOS — altura controlada en mobile ──────────────── */
@media (max-width: 991.98px) {
    .vt-testimonial-carousel .carousel-item { min-height: auto; }
    .vt-testimonial { padding: 1.5rem !important; }
    .vt-testimonial-quote { font-size: 0.95rem; line-height: 1.55; }
}

/* ── 12. STATS-STRIP — mejor jerarquía en xs ────────────────────── */
@media (max-width: 575.98px) {
    .vt-stats-strip { padding: 1.75rem 1rem !important; }
    .vt-stats-number { font-size: 1.85rem !important; }
    .vt-stats-label  { font-size: 0.66rem !important; }
}

/* ── 13. CTA SECTION — proporciones mobile ──────────────────────── */
@media (max-width: 575.98px) {
    .vt-cta { padding: 2rem 1.25rem !important; }
    .vt-cta h2.display-5 { font-size: 1.75rem !important; }
    .vt-cta .lead { font-size: 0.95rem; }
    .vt-cta .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        width: 100%;
    }
    .vt-cta .d-flex.gap-3 { gap: 0.65rem !important; flex-direction: column; }
}

/* ── 14. FLUID TYPE — escalas que respiran ──────────────────────── */
.vt-section-title {
    font-size: clamp(1.5rem, 4vw + 0.5rem, 2.25rem);
}
.vt-heading.display-5 {
    font-size: clamp(1.75rem, 5vw + 0.5rem, 3rem);
}

/* ===== TRUST BAR (bajo navbar, todas las páginas) ===== */
.vt-trustbar {
    background: linear-gradient(180deg, var(--vt-gray-100) 0%, var(--vt-bg) 100%);
    border-bottom: 1px solid var(--vt-border);
    padding: 0.55rem 0;
    font-size: 0.75rem;
}
[data-bs-theme="dark"] .vt-trustbar {
    background: linear-gradient(180deg, rgba(15,17,23,0.8) 0%, rgba(15,17,23,1) 100%);
    border-bottom-color: rgba(255,255,255,0.06);
}
.vt-trustbar-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 1.75rem;
    color: var(--vt-text-muted);
}
.vt-trustbar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: 0.01em;
    font-weight: 500;
    white-space: nowrap;
}
.vt-trustbar-item i {
    color: var(--vt-gold);
    font-size: 0.85rem;
}
.vt-trustbar-item--accent {
    color: var(--vt-gold-dark);
    font-weight: 600;
}
[data-bs-theme="dark"] .vt-trustbar-item--accent {
    color: var(--vt-gold-soft);
}
@media (max-width: 575.98px) {
    .vt-trustbar { padding: 0.45rem 0; font-size: 0.7rem; }
    .vt-trustbar-strip { gap: 0.4rem 1rem; }
    .vt-trustbar-item:not(.vt-trustbar-item--accent) { display: none; }
}

/* ===== STATS STRIP (counters animados) ===== */
.vt-stats-strip {
    background: linear-gradient(135deg, var(--vt-gray-900) 0%, #1a1a1a 100%);
    color: #fff;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}
.vt-stats-strip::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(63, 107, 53,0.12) 0%, transparent 40%),
        radial-gradient(circle at 80% 50%, rgba(201,161,74,0.10) 0%, transparent 40%);
    pointer-events: none;
}
.vt-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 1;
}
.vt-stat-card {
    text-align: center;
    padding: 1rem;
    border-right: 1px solid rgba(255,255,255,0.08);
}
.vt-stat-card:last-child { border-right: none; }
.vt-stat-num {
    font-family: var(--vt-font-heading);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--vt-gold-soft) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.vt-stat-suffix {
    color: var(--vt-gold);
    font-weight: 700;
    margin-left: 0.1rem;
    -webkit-text-fill-color: var(--vt-gold);
}
.vt-stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.55);
    font-weight: 500;
}
.vt-stat-icon {
    color: var(--vt-gold);
    font-size: 1.4rem;
    margin-bottom: 0.7rem;
    opacity: 0.85;
}
@media (max-width: 767.98px) {
    .vt-stats-strip { padding: 2.5rem 0; }
    .vt-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .vt-stat-card {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        padding-bottom: 1.25rem;
    }
    .vt-stat-card:nth-last-child(-n+2) { border-bottom: none; padding-bottom: 0; }
}

/* ===== PRUEBA SOCIAL en anuncio.php ===== */
.vt-social-proof {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: var(--vt-gold-light);
    border-left: 3px solid var(--vt-gold);
    color: var(--vt-text);
    padding: 0.65rem 0.9rem;
    border-radius: 0 8px 8px 0;
    font-size: 0.82rem;
    margin-bottom: 1rem;
}
.vt-social-proof i {
    color: var(--vt-gold-dark);
    font-size: 1.1rem;
}
.vt-social-proof-num {
    color: var(--vt-gold-dark);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
[data-bs-theme="dark"] .vt-social-proof-num {
    color: var(--vt-gold-soft);
}
.vt-social-proof-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
    animation: vt-pulse-dot 2s infinite;
    flex-shrink: 0;
}
@keyframes vt-pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
@media (prefers-reduced-motion: reduce) {
    .vt-social-proof-pulse { animation: none; }
}

/* ===== NAVBAR CTA "PUBLICAR PROPIEDAD" ===== */
.vt-nav-cta {
    border-radius: 50px;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    transition: transform .2s, box-shadow .2s;
}
.vt-nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(74,154,85,0.35);
}
@media (max-width: 991.98px) {
    .vt-nav-cta { margin-top: 0.5rem; display: inline-flex; }
}

/* ===== WHATSAPP FLOTANTE ===== */
.vt-wa-fab {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: #25d366;
    color: #fff;
    border-radius: 50px;
    padding: 0.7rem 1.1rem 0.7rem 0.9rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
    transition: transform .25s ease, box-shadow .25s ease, padding .25s ease;
    overflow: hidden;
    max-width: 3.2rem;
}
.vt-wa-fab:hover,
.vt-wa-fab:focus-visible {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.55);
    max-width: 12rem;
    padding-right: 1.3rem;
}
.vt-wa-fab__label {
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    max-width: 0;
    transition: opacity .2s ease .05s, max-width .25s ease;
    letter-spacing: 0.01em;
}
.vt-wa-fab:hover .vt-wa-fab__label,
.vt-wa-fab:focus-visible .vt-wa-fab__label {
    opacity: 1;
    max-width: 8rem;
}
@media (max-width: 767.98px) {
    .vt-wa-fab { bottom: 1.1rem; right: 1.1rem; }
}
@media print { .vt-wa-fab { display: none !important; } }

/* ===== INDICADORES ECONÓMICOS FOOTER ===== */
.vt-footer-indicators {
    background: rgba(0, 0, 0, 0.35);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0.55rem 0;
}
.vt-indicators-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 2rem;
}
.vt-indicator-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.02em;
}
.vt-indicator-label {
    color: var(--vt-green);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.vt-indicator-val {
    font-variant-numeric: tabular-nums;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
}
.vt-indicator-sep {
    width: 1px;
    height: 14px;
    background: rgba(255,255,255,0.12);
}
@media (max-width: 575.98px) {
    .vt-indicators-strip { gap: 0.4rem 1.2rem; }
    .vt-indicator-sep { display: none; }
}

/* ===== BADGE REBAJADA / DESTACADA ===== */
.vt-badge-rebajada {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    z-index: 2;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 2px 8px rgba(239,68,68,0.4);
}
.vt-badge-destacada {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 2;
    background: var(--vt-green);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(74,154,85,0.4);
}
.vt-precio-anterior {
    font-size: 0.8rem;
    color: var(--vt-muted);
    text-decoration: line-through;
    opacity: 0.7;
}
.vt-descuento-pct {
    font-size: 0.7rem;
    font-weight: 700;
    color: #ef4444;
    margin-left: 0.3rem;
}

/* ── 15. PRINT — pequeño detalle: oculta sticky filtros ────────── */
@media print {
    #btnFiltrar, .vt-darkmode-btn, .vt-skip-link { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   CALCULADORA HIPOTECARIA — sidebar de anuncio.php
   ═══════════════════════════════════════════════════════════════ */
.vt-mortgage {
    background: linear-gradient(180deg, var(--vt-bg-card) 0%, var(--vt-cream) 100%);
    border: 1px solid var(--vt-cream-dark);
    overflow: hidden;
}
[data-bs-theme="dark"] .vt-mortgage {
    background: linear-gradient(180deg, var(--vt-bg-card) 0%, rgba(201,161,74,0.08) 100%);
    border-color: rgba(201,161,74,0.25);
}
.vt-mortgage-header {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--vt-cream-dark);
}
.vt-mortgage-header i {
    font-size: 1.5rem;
    color: var(--vt-gold-dark);
    background: var(--vt-gold-light);
    width: 44px; height: 44px;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.vt-mortgage-body { padding: 1.25rem; }
.vt-mortgage-row { margin-bottom: 1rem; }
.vt-mortgage-range {
    accent-color: var(--vt-green);
    height: .35rem;
}
.vt-mortgage-range::-webkit-slider-thumb {
    background: var(--vt-green);
}
.vt-mortgage-result {
    margin-top: 1.25rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--vt-green) 0%, var(--vt-green-dark) 100%);
    border-radius: 12px;
    text-align: center;
    color: #fff;
    box-shadow: 0 6px 20px rgba(63,107,53,0.25);
}
.vt-mortgage-result-label {
    display: block;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .85;
    margin-bottom: .35rem;
}
.vt-mortgage-result-value {
    display: block;
    font-size: 1.85rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, #fff 0%, var(--vt-gold-soft) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: .5rem;
}
.vt-mortgage-disclaimer {
    display: block;
    font-size: .68rem;
    opacity: .75;
    margin-top: .35rem;
}

/* ═══════════════════════════════════════════════════════════════
   COMPARADOR FLOTANTE — drawer inferior
   ═══════════════════════════════════════════════════════════════ */
.vt-compare-drawer {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%) translateY(calc(100% + 2rem));
    z-index: 1040;
    background: var(--vt-bg-card);
    border: 1px solid var(--vt-gray-300);
    box-shadow: 0 10px 40px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 16px;
    padding: .75rem 1rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    max-width: calc(100vw - 2rem);
    transition: transform .35s cubic-bezier(0.4,0,0.2,1), opacity .25s;
    opacity: 0;
    pointer-events: none;
}
.vt-compare-drawer.is-active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
[data-bs-theme="dark"] .vt-compare-drawer { border-color: rgba(255,255,255,0.1); }
.vt-compare-slot {
    width: 60px; height: 60px;
    border-radius: 10px;
    background: var(--vt-gray-200);
    border: 2px dashed var(--vt-gray-300);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--vt-gray-600);
    font-size: 1.5rem;
    position: relative;
    overflow: hidden;
}
.vt-compare-slot--filled {
    border-style: solid;
    border-color: var(--vt-green);
    background: var(--vt-bg-card);
}
.vt-compare-slot img {
    width: 100%; height: 100%; object-fit: cover;
}
.vt-compare-slot-remove {
    position: absolute;
    top: 2px; right: 2px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem;
    cursor: pointer;
}
.vt-compare-slot-remove:hover { background: #dc3545; }
.vt-compare-cta { white-space: nowrap; }
.vt-compare-toggle {
    position: absolute;
    top: -10px; right: -10px;
    background: var(--vt-gold-dark); color: #fff;
    border: 0;
    width: 26px; height: 26px;
    border-radius: 50%;
    font-size: .85rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
}
@media (max-width: 575px) {
    .vt-compare-drawer { padding: .5rem .75rem; gap: .5rem; }
    .vt-compare-slot { width: 48px; height: 48px; }
    .vt-compare-cta .btn { padding: .35rem .75rem; font-size: .85rem; }
}

/* Botón comparar en cards */
.vt-card-compare {
    position: absolute;
    top: 12px; right: 12px;
    z-index: 3;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    border: 0;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--vt-gray-800);
    font-size: 1rem;
    cursor: pointer;
    transition: all .2s;
    backdrop-filter: blur(4px);
}
.vt-card-compare:hover {
    background: #fff;
    color: var(--vt-green-dark);
    transform: scale(1.08);
}
.vt-card-compare.is-added {
    background: var(--vt-green);
    color: #fff;
}
@media (prefers-reduced-motion: reduce) {
    .vt-card-compare { transition: none; }
    .vt-card-compare:hover { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   FAVORITOS — heart button en cards + badge navbar
   ═══════════════════════════════════════════════════════════════ */
.vt-card-fav {
    position: absolute;
    top: 12px; left: 12px;
    z-index: 3;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    border: 0;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--vt-gray-800);
    font-size: 1rem;
    cursor: pointer;
    transition: all .2s;
    backdrop-filter: blur(4px);
}
.vt-card-fav:hover {
    background: #fff;
    color: #dc3545;
    transform: scale(1.08);
}
.vt-card-fav.is-fav { color: #dc3545; }
.vt-card-fav.is-fav i { animation: vt-fav-pop .35s ease; }
@keyframes vt-fav-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}
.vt-fav-pulse { animation: vt-fav-shake .4s; }
@keyframes vt-fav-shake {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}

.vt-fav-link { text-decoration: none; }
.vt-fav-badge {
    position: absolute;
    top: -2px; right: -4px;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #dc3545;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center; justify-content: center;
    line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
    .vt-card-fav { transition: none; }
    .vt-card-fav:hover { transform: none; }
    .vt-card-fav.is-fav i,
    .vt-fav-pulse { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════
   SEARCH CHIPS — autocomplete inteligente
   ═══════════════════════════════════════════════════════════════ */
.vt-search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding: .75rem;
    border-bottom: 1px solid var(--vt-gray-200);
    background: linear-gradient(180deg, var(--vt-cream) 0%, var(--vt-bg-card) 100%);
}
[data-bs-theme="dark"] .vt-search-chips {
    background: rgba(201,161,74,0.06);
    border-bottom-color: rgba(255,255,255,0.08);
}
.vt-search-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .7rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--vt-gray-300);
    color: var(--vt-gray-800);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 500;
    transition: all .15s;
    text-transform: capitalize;
}
.vt-search-chip:hover {
    background: var(--vt-green);
    color: #fff;
    border-color: var(--vt-green-dark);
    transform: translateY(-1px);
}
.vt-search-chip i {
    font-size: .85rem;
    color: var(--vt-green);
}
.vt-search-chip:hover i { color: #fff; }
.vt-search-chip--tipo i { color: var(--vt-gold-dark); }
.vt-search-chip-count {
    background: var(--vt-gray-200);
    color: var(--vt-gray-800);
    font-size: .68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: .15rem;
}
.vt-search-chip:hover .vt-search-chip-count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}
[data-bs-theme="dark"] .vt-search-chip {
    background: var(--vt-bg-card);
    color: #e9ecef;
    border-color: rgba(255,255,255,0.12);
}
@media (prefers-reduced-motion: reduce) {
    .vt-search-chip { transition: none; }
    .vt-search-chip:hover { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   PWA INSTALL BANNER
   ═══════════════════════════════════════════════════════════════ */
.vt-pwa-banner {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%) translateY(calc(100% + 2rem));
    z-index: 1045;
    background: var(--vt-bg-card);
    border: 1px solid var(--vt-cream-dark);
    box-shadow: 0 12px 36px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 16px;
    padding: .85rem 1rem;
    display: flex;
    align-items: center;
    gap: .85rem;
    max-width: calc(100vw - 2rem);
    width: 420px;
    transition: transform .35s cubic-bezier(0.4,0,0.2,1);
}
.vt-pwa-banner.is-visible {
    transform: translateX(-50%) translateY(0);
}
[data-bs-theme="dark"] .vt-pwa-banner {
    border-color: rgba(255,255,255,0.12);
}
.vt-pwa-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--vt-green-light);
    color: var(--vt-green-dark);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.vt-pwa-text { flex: 1; min-width: 0; line-height: 1.25; }
.vt-pwa-text strong { display: block; font-size: .92rem; }
.vt-pwa-text small { color: var(--vt-gray-600); font-size: .75rem; }
@media (max-width: 480px) {
    .vt-pwa-banner { width: auto; left: 1rem; right: 1rem; transform: translateY(calc(100% + 2rem)); }
    .vt-pwa-banner.is-visible { transform: translateY(0); }
    .vt-pwa-text small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .vt-pwa-banner { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN DASHBOARD — Patrón de Impacto Visual v3.0
   Fases: 1 (Ruido), 3 (Colores), 4 (Tipografía), 5 (Sombras),
          6 (Estados), 7 (Accesibilidad), 8 (Motion), 9 (WOW)
   ═══════════════════════════════════════════════════════════════ */

/* ── Admin Stat Icon (icono cuadrado redondeado en cards de acceso) ── */
.vt-admin-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--vt-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.4,0,0.2,1);
}
.vt-admin-stat-icon:hover {
    transform: scale(1.08);
}

/* ── Trend Badge (indicador ↑↓ semanal en KPIs) ── */
.vt-trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: var(--vt-radius-pill);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    line-height: 1.4;
    white-space: nowrap;
}
.vt-trend-badge i { font-size: 0.7rem; }

.vt-trend-up {
    background: var(--vt-success-light);
    color: var(--vt-success);
}
.vt-trend-down {
    background: var(--vt-danger-light);
    color: var(--vt-danger);
}

/* ── Empty State (Fase 6 — estado vacío profesional) ── */
.vt-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
    gap: 0.5rem;
}
.vt-empty-state__icon {
    font-size: 3rem;
    color: var(--vt-green);
    opacity: 0.4;
    margin-bottom: 0.5rem;
}
.vt-empty-state__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bs-body-color, var(--vt-text));
    margin: 0;
}
.vt-empty-state__desc {
    font-size: 0.875rem;
    color: var(--bs-secondary-color, var(--vt-text-muted));
    margin: 0;
    max-width: 28ch;
    line-height: 1.5;
}
.vt-empty-state__action {
    margin-top: 0.75rem;
}

/* ── Etapa Badges (Pipeline CRM stages) ── */
.vt-etapa {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    border-radius: var(--vt-radius-pill);
    letter-spacing: 0.03em;
    text-transform: capitalize;
    white-space: nowrap;
    line-height: 1.6;
}
.vt-etapa-nuevo {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}
.vt-etapa-contactado {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
}
.vt-etapa-visita_agendada {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}
.vt-etapa-en_negociacion {
    background: rgba(201, 161, 74, 0.15);
    color: var(--vt-yellow-dark);
}
.vt-etapa-cerrado {
    background: var(--vt-success-light);
    color: var(--vt-success);
}
.vt-etapa-descartado {
    background: rgba(107, 114, 128, 0.12);
    color: #6b7280;
}

/* Dark mode etapas — ajustar luminosidad */
[data-bs-theme="dark"] .vt-etapa-nuevo        { background: rgba(59, 130, 246, 0.2);  color: #60a5fa; }
[data-bs-theme="dark"] .vt-etapa-contactado    { background: rgba(14, 165, 233, 0.2);  color: #38bdf8; }
[data-bs-theme="dark"] .vt-etapa-visita_agendada { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
[data-bs-theme="dark"] .vt-etapa-en_negociacion { background: rgba(201, 161, 74, 0.2);  color: var(--vt-gold-soft); }
[data-bs-theme="dark"] .vt-etapa-cerrado       { background: rgba(34, 197, 94, 0.2);   color: #4ade80; }
[data-bs-theme="dark"] .vt-etapa-descartado    { background: rgba(107, 114, 128, 0.2);  color: #9ca3af; }

/* ── Admin Data Tables (Fase 4 — dense, scannable) ── */
.vt-table {
    font-size: 0.875rem;
    line-height: var(--vt-lh-table);
}
.vt-table thead th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bs-secondary-color, var(--vt-text-muted));
    border-bottom: 2px solid var(--vt-border);
    padding: 0.65rem 1rem;
    white-space: nowrap;
}
.vt-table tbody td {
    padding: 0.65rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--vt-border);
}
.vt-table tbody tr:last-child td {
    border-bottom: none;
}
.vt-table tbody tr {
    transition: background-color 0.15s ease;
}
.vt-table tbody tr:hover {
    background-color: var(--vt-green-light) !important;
}
[data-bs-theme="dark"] .vt-table thead th {
    border-bottom-color: rgba(255,255,255,0.1);
}
[data-bs-theme="dark"] .vt-table tbody td {
    border-bottom-color: rgba(255,255,255,0.06);
}
[data-bs-theme="dark"] .vt-table tbody tr:hover {
    background-color: rgba(63, 107, 53, 0.1) !important;
}
/* Override Bootstrap's table-light for admin dark mode */
[data-bs-theme="dark"] .vt-table .table-light {
    --bs-table-bg: rgba(255,255,255,0.04);
    --bs-table-border-color: rgba(255,255,255,0.08);
    color: var(--vt-text);
}

/* ── Admin Stat Cards (legacy class support) ── */
.vt-admin-stat-card {
    background: var(--vt-bg-card);
    border: 1px solid var(--vt-border);
    border-radius: var(--vt-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--vt-shadow);
    transition:
        transform 0.2s cubic-bezier(0.4,0,0.2,1),
        box-shadow 0.2s cubic-bezier(0.4,0,0.2,1);
}
.vt-admin-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--vt-shadow-md);
}
[data-bs-theme="dark"] .vt-admin-stat-card {
    box-shadow: none;
    border-color: rgba(255,255,255,0.08);
}
[data-bs-theme="dark"] .vt-admin-stat-card:hover {
    box-shadow: none;
    border-color: rgba(63, 107, 53, 0.35);
    background: var(--vt-bg-card-hover);
}

/* ── Skip Link (Fase 7 — accesibilidad) ── */
.vt-skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: 0.5rem 1rem;
    background: var(--vt-green);
    color: #fff;
    border-radius: 0 0 var(--vt-radius-sm) var(--vt-radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: top 0.15s ease;
}
.vt-skip-link:focus {
    top: 0;
    outline: 3px solid var(--vt-green);
    outline-offset: 2px;
}

/* ── Dashboard Animations (Fase 8 — Motion UX) ── */
@media (prefers-reduced-motion: no-preference) {
    /* Stagger animation for KPI cards */
    .vt-dash-section .row > [class*="col"] {
        opacity: 0;
        transform: translateY(12px);
        animation: vtDashFadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    .vt-dash-section .row > [class*="col"]:nth-child(1) { animation-delay: 0.05s; }
    .vt-dash-section .row > [class*="col"]:nth-child(2) { animation-delay: 0.1s; }
    .vt-dash-section .row > [class*="col"]:nth-child(3) { animation-delay: 0.15s; }
    .vt-dash-section .row > [class*="col"]:nth-child(4) { animation-delay: 0.2s; }
    .vt-dash-section .row > [class*="col"]:nth-child(5) { animation-delay: 0.25s; }

    @keyframes vtDashFadeUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Counter animation helper */
    [data-count] {
        transition: opacity 0.3s ease;
    }
}

/* Disable all admin animations when reduced-motion is requested */
@media (prefers-reduced-motion: reduce) {
    .vt-admin-stat-card,
    .vt-admin-stat-icon,
    .vt-kpi,
    .vt-dash-section .row > [class*="col"] {
        transition: none !important;
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .vt-admin-stat-card:hover,
    .vt-kpi:hover {
        transform: none !important;
    }
}

/* ── Responsive adjustments for admin dashboard ── */
@media (max-width: 991.98px) {
    /* Pipeline columns stack to 2-per-row */
    .vt-dash-section .row > .col {
        flex: 0 0 calc(50% - 0.5rem);
    }
}
@media (max-width: 575.98px) {
    .vt-dash-section .row > .col {
        flex: 0 0 100%;
    }
    .vt-dash-header {
        flex-direction: column;
        align-items: flex-start !important;
    }
    .vt-dash-section-head {
        flex-wrap: wrap;
    }
    .vt-dash-section-meta {
        flex-basis: 100%;
        margin-left: 0 !important;
        margin-top: 0.25rem;
    }
}

/* ── Print Stylesheet (Fase 2 — Imprimibilidad) ── */
@media print {
    nav, aside, .btn, .no-print,
    .vt-navbar-admin, .vt-pwa-banner,
    .vt-darkmode-btn, .vt-skip-link { display: none !important; }
    body { font-size: 11pt; color: #000 !important; background: #fff !important; }
    a { color: #000 !important; text-decoration: underline; }
    .vt-card, .vt-kpi, .vt-admin-stat-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        break-inside: avoid;
    }
    .page-break { page-break-before: always; }
    table { page-break-inside: auto; }
    tr { page-break-inside: avoid; page-break-after: auto; }
}
