/* ========================================
   40 HYDE PARK - Premium Enhancements
   Quick Wins para mejorar el diseño al 100%
   ======================================== */

/* ========================================
   1. CURSOR PERSONALIZADO (Desktop only)
   DISABLED - Normal cursor restored
   ======================================== */
.cursor-dot,
.cursor-outline {
    display: none !important;
}

@media (pointer: fine) {
    /* Native cursor stays active by default. */
    body.hp40-enable-custom-cursor .cursor-dot,
    body.hp40-enable-custom-cursor .cursor-outline {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        z-index: 99999;
        pointer-events: none;
        mix-blend-mode: difference;
    }
    
    body.hp40-enable-custom-cursor .cursor-dot {
        width: 8px;
        height: 8px;
        background: var(--accent);
    }
    
    body.hp40-enable-custom-cursor .cursor-outline {
        width: 40px;
        height: 40px;
        border: 2px solid var(--accent);
        transition: width 0.3s, height 0.3s, background-color 0.3s;
    }
    
    body.hp40-enable-custom-cursor .cursor-outline.hover {
        width: 60px;
        height: 60px;
        background: rgba(201, 162, 39, 0.1);
    }
    
    body.hp40-enable-custom-cursor .cursor-outline.click {
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* ========================================
   2. BOTONES CON EFECTO SHINE - SIMPLIFICADO
   ======================================== */
.btn-shine {
    position: relative;
    overflow: hidden;
}

/* ========================================
   3. SKELETON LOADING STATES
   ======================================== */
.skeleton {
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-text:last-child {
    width: 80%;
}

/* ========================================
   4. READING PROGRESS BAR
   ======================================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--progress, 0%);
    height: 3px;
    background: var(--accent-gradient);
    z-index: 10001;
    transition: width 0.1s linear;
}

/* ========================================
   5. SKIP LINKS ACCESIBLES
   ======================================== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--text-white);
    padding: var(--space-3) var(--space-6);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    z-index: 10000;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
    transition: top 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.skip-link:focus {
    top: 0;
}

/* ========================================
   6. TOAST NOTIFICATIONS
   ======================================== */
.toast-container {
    position: fixed;
    top: var(--space-6);
    right: var(--space-6);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
}

.toast {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-6);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    min-width: 300px;
    max-width: 450px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    border-left: 4px solid var(--accent);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success { border-left-color: #22c55e; }
.toast-error { border-left-color: #ef4444; }
.toast-warning { border-left-color: #f59e0b; }
.toast-info { border-left-color: var(--accent); }

.toast i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-success i { color: #22c55e; }
.toast-error i { color: #ef4444; }
.toast-warning i { color: #f59e0b; }
.toast-info i { color: var(--accent); }

.toast span {
    flex: 1;
    color: var(--text-dark);
    font-size: 0.9375rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: var(--space-1);
    transition: color 0.2s;
}

.toast-close:hover {
    color: var(--text-dark);
}

/* ========================================
   7. IMAGE LAZY LOADING CON BLUR
   ======================================== */
.image-lazy-wrapper {
    position: relative;
    overflow: hidden;
    background: var(--bg-light);
}

.image-lazy-wrapper img {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.image-placeholder {
    filter: blur(20px);
    transform: scale(1.1);
    opacity: 1;
}

.image-full {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.image-full.loaded {
    opacity: 1;
}

.image-full.loaded + .image-placeholder,
.image-placeholder.loaded {
    opacity: 0;
}

/* ========================================
   8. CARDS 3D TILT
   ======================================== */
.card-3d {
    transform-style: flat;
    transition: box-shadow 0.25s ease;
}

.card-3d-content {
    transform: translateZ(30px);
}

/* Card 3D shine - REMOVED (causing visual artifacts) */

/* ========================================
   9. NOISE TEXTURE OVERLAY
   ======================================== */
.noise-overlay {
    position: relative;
}

.noise-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
}

/* ========================================
   10. BOTTOM NAVIGATION MOBILE
   ======================================== */
@media (max-width: 768px) {
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-white);
        border-top: 1px solid var(--border-light);
        padding: var(--space-2) 0 calc(var(--space-2) + env(safe-area-inset-bottom));
        display: flex;
        justify-content: space-around;
        z-index: 200;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    }
    
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        color: var(--text-light);
        font-size: 0.6875rem;
        font-weight: 500;
        padding: var(--space-2) var(--space-3);
        transition: color 0.2s;
    }
    
    .mobile-nav-item.active {
        color: var(--accent);
    }
    
    .mobile-nav-item i {
        font-size: 1.25rem;
    }
    
    /* Ajustar contenido para no quedar detrás del nav */
    body {
        padding-bottom: 70px;
    }
}

@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
}

/* ========================================
   11. GLASSMORPHISM AVANZADO
   ======================================== */
.glass-premium {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ========================================
   12. TEXT REVEAL ANIMATION
   ======================================== */
.text-reveal {
    overflow: hidden;
}

.text-reveal-inner {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
    animation: textRevealUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes textRevealUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Stagger delays */
.text-reveal-inner:nth-child(1) { animation-delay: 0s; }
.text-reveal-inner:nth-child(2) { animation-delay: 0.1s; }
.text-reveal-inner:nth-child(3) { animation-delay: 0.2s; }
.text-reveal-inner:nth-child(4) { animation-delay: 0.3s; }

/* ========================================
   13. FOCUS VISIBLE MEJORADO
   ======================================== */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
    box-shadow: 0 0 0 3px var(--accent), 0 0 0 6px rgba(201, 162, 39, 0.3);
}

/* ========================================
   14. SCROLLBAR PERSONALIZADA
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-light);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-medium) var(--bg-light);
}

/* ========================================
   15. SELECTION COLOR
   ======================================== */
::selection {
    background: var(--accent);
    color: var(--primary);
}

::-moz-selection {
    background: var(--accent);
    color: var(--primary);
}

/* ========================================
   16. MAGNETIC BUTTON EFFECT
   ======================================== */
.magnetic-btn {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ========================================
   17. LINK UNDERLINE ANIMATION
   ======================================== */
.link-animated {
    position: relative;
    text-decoration: none;
}

.link-animated::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.link-animated:hover::after {
    width: 100%;
}

/* ========================================
   18. SECTION DIVIDERS
   ======================================== */
.section-divider {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--border-medium),
        transparent
    );
    margin: var(--space-16) 0;
}

/* ========================================
   19. BADGES Y TAGS
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--accent);
    color: var(--primary);
}

.badge-secondary {
    background: var(--primary);
    color: var(--text-white);
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-medium);
}

/* ========================================
   20. HOVER LIFT EFFECT
   ======================================== */
.hover-lift {
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.hover-lift:hover {
    transform: none;
    box-shadow: var(--shadow-lg);
}

/* ========================================
   21. DARK MODE TOGGLE
   ======================================== */
.dark-mode-toggle {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.dark-mode-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    background: var(--accent);
    color: var(--primary);
    box-shadow: var(--shadow-glow);
}

@media (max-width: 768px) {
    .dark-mode-toggle {
        bottom: calc(70px + var(--space-4));
        right: var(--space-4);
        width: 45px;
        height: 45px;
    }
}

/* ========================================
   22. DARK MODE VARIABLES
   ======================================== */
[data-theme="dark"] {
    --bg-white: #0f172a;
    --bg-light: #1e293b;
    --bg-warm: #1e293b;
    --bg-dark: #020617;
    --text-dark: #f8fafc;
    --text-medium: #cbd5e1;
    --text-light: #94a3b8;
    --text-muted: #64748b;
    --border-light: #334155;
    --border-medium: #475569;
    --primary: #1e3a8a;
    --primary-light: #1e40af;
    --primary-dark: #1e3a8a;
}

[data-theme="dark"] .header {
    background: rgba(15, 23, 42, 0.95);
}

[data-theme="dark"] .header.scrolled {
    background: rgba(15, 23, 42, 0.98);
}

[data-theme="dark"] .floorplan-card,
[data-theme="dark"] .unit-card,
[data-theme="dark"] .amenity-card,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .event-card,
[data-theme="dark"] .explore-card {
    background: var(--bg-light);
    border-color: var(--border-light);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
    background: var(--bg-dark);
    border-color: var(--border-medium);
    color: var(--text-dark);
}

[data-theme="dark"] .glass-premium,
[data-theme="dark"] .glass-dynamic {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-light) 25%,
        var(--border-light) 50%,
        var(--bg-light) 75%
    );
}

[data-theme="dark"] .mobile-nav {
    background: var(--bg-light);
    border-color: var(--border-light);
}

[data-theme="dark"] .toast {
    background: var(--bg-light);
    border-color: var(--border-light);
}

[data-theme="dark"] .toast span {
    color: var(--text-dark);
}

/* ========================================
   23. TEXT REVEAL ANIMATION
   ======================================== */
.text-reveal {
    overflow: hidden;
    display: inline-block;
}

.text-reveal-word {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
    animation: textRevealUp 0.8s var(--ease-out) forwards;
}

@keyframes textRevealUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Stagger delays para palabras */
.text-reveal-word:nth-child(1) { animation-delay: 0s; }
.text-reveal-word:nth-child(2) { animation-delay: 0.08s; }
.text-reveal-word:nth-child(3) { animation-delay: 0.16s; }
.text-reveal-word:nth-child(4) { animation-delay: 0.24s; }
.text-reveal-word:nth-child(5) { animation-delay: 0.32s; }
.text-reveal-word:nth-child(6) { animation-delay: 0.40s; }
.text-reveal-word:nth-child(7) { animation-delay: 0.48s; }
.text-reveal-word:nth-child(8) { animation-delay: 0.56s; }
.text-reveal-word:nth-child(9) { animation-delay: 0.64s; }
.text-reveal-word:nth-child(10) { animation-delay: 0.72s; }

/* ========================================
   24. COUNTER ANIMATION
   ======================================== */
.counter {
    font-variant-numeric: tabular-nums;
}

.counter-value {
    display: inline-block;
    min-width: 1ch;
}

/* ========================================
   25. PARALLAX ADVANCED
   ======================================== */
.parallax-container {
    overflow: hidden;
    position: relative;
}

.parallax-layer {
    will-change: transform;
    transform: translateZ(0);
}

.parallax-slow {
    --parallax-speed: 0.2;
}

.parallax-medium {
    --parallax-speed: 0.5;
}

.parallax-fast {
    --parallax-speed: 0.8;
}

/* ========================================
   26. MOBILE BOTTOM NAV
   ======================================== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: var(--space-2) 0 calc(var(--space-2) + env(safe-area-inset-bottom));
    display: none;
    justify-content: space-around;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.mobile-bottom-nav.visible {
    display: flex;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-light);
    font-size: 0.625rem;
    font-weight: 500;
    padding: var(--space-2) var(--space-3);
    transition: color 0.2s;
    text-decoration: none;
    position: relative;
}

.mobile-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--accent);
    border-radius: 0 0 var(--radius-full) var(--radius-full);
    transition: width 0.3s;
}

.mobile-nav-item.active {
    color: var(--accent);
}

.mobile-nav-item.active::before {
    width: 20px;
}

.mobile-nav-item i {
    font-size: 1.25rem;
    transition: transform 0.2s;
}

.mobile-nav-item:active i {
    transform: scale(0.9);
}

/* Ajustar padding del body para el nav móvil */
@media (max-width: 768px) {
    body.has-mobile-nav {
        padding-bottom: 70px;
    }
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }
}


/* ========================================
   HOTFIX - TOUR CTA VISIBILITY + FLOATING UI
   ======================================== */
.virtual-tour-buttons .btn {
    min-width: 260px;
}

.virtual-tour-buttons .btn-outline {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.92);
    color: var(--text-white);
    box-shadow: 0 12px 30px rgba(15, 32, 56, 0.24);
}

.virtual-tour-buttons .btn-outline:hover,
.virtual-tour-buttons .btn-outline:focus-visible {
    background: var(--text-white);
    color: var(--primary);
    border-color: var(--text-white);
    box-shadow: var(--shadow-xl);
}

.virtual-tour-buttons .btn-outline i,
.virtual-tour-buttons .btn-primary i {
    color: inherit;
}

.dark-mode-toggle {
    right: var(--space-8);
    bottom: calc(var(--space-8) + 62px);
}

@media (max-width: 768px) {
    .virtual-tour-buttons .btn {
        width: 100%;
        max-width: 320px;
    }

    .scroll-top {
        right: var(--space-4);
        bottom: calc(70px + var(--space-4));
    }

    .dark-mode-toggle {
        right: var(--space-4);
        bottom: calc(70px + 120px);
        width: 45px;
        height: 45px;
    }
}


/* ========================================
   VIRTUAL TOUR PRO ENHANCEMENTS
   Mejoras profesionales para el tour virtual
   ======================================== */

/* Virtual Tour Modal - Layout mejorado */
.virtual-tour-modal {
    z-index: 10000;
}

.virtual-tour-modal .modal-content {
    display: flex;
    flex-direction: row;
    width: 95vw;
    height: 90vh;
    max-width: 1600px;
    background: var(--bg-dark);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0,0,0,0.6);
}

/* Viewer 360 - Mejoras profesionales */
.viewer-360 {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: grab;
    background: linear-gradient(135deg, #0a0f1a 0%, #1a1f2e 50%, #0a0f1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-360::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(201, 162, 39, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(201, 162, 39, 0.02) 0%, transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.viewer-360:active {
    cursor: grabbing;
}

/* Panorama container mejorado */
.viewer-panorama {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    will-change: transform, width;
    z-index: 2;
}

.viewer-panorama img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center center;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Controles del viewer mejorados */
.viewer-controls {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: rgba(14, 27, 44, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 20;
}

.control-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
}

.control-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn.active {
    background: var(--accent);
    animation: pulse-gold 2s infinite;
}

@keyframes pulse-gold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.5); }
    50% { box-shadow: 0 0 0 12px rgba(201, 162, 39, 0); }
}

/* Zoom level mejorado */
.zoom-level {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--text-white);
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 100px;
}

.zoom-bar {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.zoom-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #e8c96a);
    border-radius: var(--radius-full);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(201, 162, 39, 0.5);
}

.control-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
}

/* Hotspots mejorados */
.hotspot {
    position: absolute;
    z-index: 10;
    cursor: pointer;
}

.hotspot-marker {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hotspot-marker i {
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    animation: hotspot-pulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.7);
}

@keyframes hotspot-pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.7);
        transform: scale(1);
    }
    70% { 
        box-shadow: 0 0 0 20px rgba(201, 162, 39, 0);
        transform: scale(1.1);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(201, 162, 39, 0);
        transform: scale(1);
    }
}

.hotspot-label {
    position: absolute;
    left: 32px;
    background: rgba(14, 27, 44, 0.95);
    color: var(--text-white);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.hotspot:hover .hotspot-label {
    opacity: 1;
    transform: translateX(0);
}

/* Area info mejorada */
.area-info {
    position: absolute;
    top: var(--space-6);
    left: var(--space-6);
    background: rgba(14, 27, 44, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 300px;
    z-index: 15;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.area-info h4 {
    color: var(--text-white);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.area-info h4::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

.area-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin: 0;
}

/* Tour Sidebar mejorado */
.tour-sidebar {
    width: 380px;
    background: var(--bg-white);
    display: flex;
    flex-direction: column;
    max-height: 100%;
    border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.tour-header {
    padding: var(--space-8) var(--space-6);
    background: linear-gradient(135deg, var(--primary) 0%, #2a4a6f 100%);
    color: var(--text-white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tour-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.tour-logo {
    margin-bottom: var(--space-4);
    position: relative;
    z-index: 1;
}

.tour-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-1);
    position: relative;
    z-index: 1;
}

.tour-header p {
    font-size: 1rem;
    opacity: 0.85;
    position: relative;
    z-index: 1;
}

/* Tour Navigation */
.tour-nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-6);
}

.tour-nav h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: var(--space-4);
    padding-left: var(--space-2);
}

.tour-locations {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.location-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background: var(--bg-light);
}

.location-item:hover {
    background: rgba(201, 162, 39, 0.08);
    transform: translateX(4px);
}

.location-item.active {
    background: rgba(201, 162, 39, 0.12);
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(201, 162, 39, 0.15);
}

.location-thumb {
    position: relative;
    width: 80px;
    height: 60px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-dark);
}

.location-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.location-item:hover .location-thumb img {
    transform: scale(1.08);
}

.location-thumb .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.25s ease;
}

.location-thumb .play-icon i {
    color: var(--primary);
    font-size: 10px;
    margin-left: 2px;
}

.location-item:hover .location-thumb .play-icon {
    background: var(--accent);
    transform: translate(-50%, -50%) scale(1.1);
}

.location-item:hover .location-thumb .play-icon i {
    color: var(--text-white);
}

.location-info {
    flex: 1;
    min-width: 0;
}

.location-name {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9375rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-type {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Tour Actions */
.tour-actions {
    padding: var(--space-6);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    background: var(--bg-white);
}

.tour-actions .btn {
    width: 100%;
    justify-content: center;
    padding: var(--space-4);
    font-weight: 600;
}

.tour-actions .btn-outline {
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--text-dark);
}

.tour-actions .btn-outline:hover {
    border-color: var(--accent);
    background: rgba(201, 162, 39, 0.05);
}

/* Navigation arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(14, 27, 44, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20;
    font-size: 18px;
}

.nav-arrow:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 4px 16px rgba(201, 162, 39, 0.4);
}

.nav-prev {
    left: var(--space-6);
}

.nav-next {
    right: calc(var(--space-6) + 380px);
}

/* Loading spinner */
.viewer-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 25;
}

.spinner-360 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    color: var(--text-white);
}

.spinner-360 i {
    font-size: 48px;
    color: var(--accent);
    animation: spin 1s linear infinite;
}

.spinner-360 span {
    font-size: 0.9375rem;
    font-weight: 500;
    opacity: 0.9;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1024px) {
    .virtual-tour-modal .modal-content {
        width: 98vw;
        height: 95vh;
    }
    
    .tour-sidebar {
        width: 320px;
    }
    
    .nav-next {
        right: calc(var(--space-6) + 320px);
    }
    
    .area-info {
        max-width: 250px;
        padding: var(--space-4);
    }
}

@media (max-width: 768px) {
    .virtual-tour-modal {
        align-items: stretch;
        justify-content: stretch;
        padding: 0;
        overscroll-behavior: contain;
    }

    .virtual-tour-modal .modal-content {
        flex-direction: column;
        width: 100vw;
        height: calc(var(--hp-tour-vh, 1vh) * 100);
        min-height: calc(var(--hp-tour-vh, 1vh) * 100);
        max-width: 100vw;
        max-height: calc(var(--hp-tour-vh, 1vh) * 100);
        border-radius: 0;
    }
    
    .viewer-360 {
        flex: 0 0 clamp(260px, 44vh, 420px);
        min-height: clamp(260px, 44vh, 420px);
        touch-action: pan-x;
    }
    
    .tour-sidebar {
        width: 100%;
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        overflow: hidden;
    }
    
    .tour-header {
        padding: 16px 16px 14px;
    }

    .tour-header h3 {
        font-size: 1.125rem;
    }

    .tour-header p {
        font-size: 0.875rem;
    }
    
    .tour-nav {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 14px 16px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .tour-nav h4 {
        margin-bottom: 12px;
        padding-left: 0;
    }

    .tour-locations {
        gap: 10px;
    }

    .location-item {
        padding: 10px;
        gap: 12px;
    }

    .location-thumb {
        width: 72px;
        height: 54px;
    }

    .location-name {
        font-size: 0.9rem;
    }

    .location-type {
        font-size: 0.78rem;
    }
    
    .tour-actions {
        position: sticky;
        bottom: 0;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        flex-direction: row;
        gap: 10px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }
    
    .tour-actions .btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 12px 10px;
        font-size: 0.8125rem;
        line-height: 1.2;
    }

    .tour-actions .btn i {
        margin-right: 6px;
    }
    
    .nav-prev {
        left: 12px;
    }

    .nav-next {
        right: 12px;
    }
    
    .nav-arrow {
        top: auto;
        bottom: 86px;
        transform: none;
        width: 42px;
        height: 42px;
        font-size: 15px;
        background: rgba(14, 27, 44, 0.88);
    }
    
    .nav-arrow:hover {
        transform: scale(1.04);
    }

    .viewer-controls {
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        width: calc(100% - 24px);
        max-width: 340px;
        padding: 10px 12px;
        gap: 8px;
        justify-content: center;
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
    }

    .zoom-level {
        min-width: 0;
        gap: 8px;
        font-size: 0.8125rem;
    }
    
    .zoom-bar {
        width: 54px;
    }

    .control-divider {
        height: 22px;
    }
    
    .area-info {
        top: 12px;
        left: 12px;
        right: 12px;
        max-width: none;
        padding: 12px 14px;
    }

    .area-info h4 {
        font-size: 0.95rem;
        margin-bottom: 4px;
    }

    .area-info p {
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .hotspot {
        display: none;
    }

    .modal-close {
        top: max(12px, env(safe-area-inset-top, 0px));
        right: 12px;
        width: 38px;
        height: 38px;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    }
}

/* Fullscreen mode */
.virtual-tour-modal:fullscreen .modal-content {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    border-radius: 0;
}

.virtual-tour-modal:fullscreen .nav-next {
    right: calc(var(--space-6) + 380px);
}

@media (max-width: 768px) {
    .virtual-tour-modal:fullscreen .modal-content {
        height: calc(var(--hp-tour-vh, 1vh) * 100);
        min-height: calc(var(--hp-tour-vh, 1vh) * 100);
        max-height: calc(var(--hp-tour-vh, 1vh) * 100);
    }

    .virtual-tour-modal:fullscreen .nav-next {
        right: 12px;
    }

    .virtual-tour-modal:fullscreen .nav-prev {
        left: 12px;
    }
}


/* Corporate mode: keep motion restrained */
.card-3d,
.card-3d:hover,
.magnetic-btn,
.magnetic-btn:hover,
.btn-shine,
.btn-shine:hover,
.ripple-trigger,
.ripple-trigger:hover {
    transform: none !important;
}

.card-3d-shine,
.ripple {
    display: none !important;
}


/* Floorplan cards may use a restrained shine for a more premium corporate feel */
.floorplan-card .card-3d-shine,
.unit-card .card-3d-shine {
    display: block !important;
}
