/**
 * Residence Hero Section - Additional Styles
 * 
 * This file contains ONLY residence-specific elements:
 * - Video player controls
 * - Address display
 * - Logo switching
 * 
 * All core hero styling (title, subtitle, features, buttons) 
 * is inherited from /static/css/components/hero.css
 */

:root {
    --luxury-gold: #d4af37;
    --luxury-gold-transparent: rgba(212, 175, 55, 0.7);
}

/* ==========================================================================
   Base Hero Section
   ========================================================================== */

/* Base residence hero styles - fullscreen behavior handled by global hero.css */
.residence-hero-section {
    /* All fullscreen behavior (height, margin-top, padding-top) is handled by global hero.css */
    margin-bottom: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1 !important; /* Ensure hero stays below navbar (navbar is 10000) */
}

.residence-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.5) 30%,
        rgba(0, 0, 0, 0.3) 60%,
        rgba(0, 0, 0, 0.2) 100%);
    z-index: 2; /* Within hero section only, below navbar */
    pointer-events: none;
}

/* ==========================================================================
   Video Hero
   ========================================================================== */

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center var(--hero-image-offset-y, 60%);
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
    z-index: 1;
}

.video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center var(--hero-image-offset-y, 60%);
    z-index: 1;
}

.video-controls {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 1rem;
    z-index: 5;
}

.video-controls button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    backdrop-filter: blur(10px);
}

.video-controls button:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

/* ==========================================================================
   Image Hero (Swiper)
   ========================================================================== */

.residence-hero-swiper {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: relative;
    width: 100%;
    height: var(--vh, 100dvh);
    min-height: 600px;
    background-size: cover;
    background-position: center var(--hero-image-offset-y, 60%);
    background-repeat: no-repeat;
}

/* Gold accent line */
.hero-slide::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--luxury-gold) 50%, transparent 100%);
    z-index: 2;
}

.hero-single-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center var(--hero-image-offset-y, 60%);
    background-repeat: no-repeat;
    z-index: 1;
}

/* Gold accent line for single image */
.hero-single-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--luxury-gold) 50%, transparent 100%);
    z-index: 2;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, 
        rgba(0, 0, 0, 0.7) 0%, 
        rgba(0, 0, 0, 0.5) 30%, 
        rgba(0, 0, 0, 0.3) 60%, 
        rgba(0, 0, 0, 0.2) 100%);
    z-index: 2;
}

/* Hide slide-specific content - using main hero content instead */
.slide-content { 
    display: none; 
}

/* ==========================================================================
   Hero Content Overlay
   ========================================================================== */

.residence-hero-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    /* Allow clicks to pass through to video controls while keeping
       CTA buttons clickable */
    pointer-events: none;
}

.hero-content {
    max-width: 980px;
    text-align: center;
    padding: 0 2rem;
    pointer-events: none;
}

.residence-logos {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 2rem;
}

.residence-logo {
    max-height: 120px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.4)) 
            drop-shadow(0 8px 32px rgba(0, 0, 0, 0.2));
}

.residence-logo-light {
    opacity: 0;
    transform: scale(0.95);
}

.residence-logo-dark {
    opacity: 1;
    transform: scale(1);
}

/* Light theme adjustments */
[data-theme="light"] .residence-logo-light {
    opacity: 1;
}

[data-theme="light"] .residence-logo-dark {
    opacity: 0;
}

/* Hero title and subtitle styles inherited from main hero.css */

.residence-address {
    display: inline-flex;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 400;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.residence-address:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.residence-address i {
    margin-right: 0.75rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Features styling is inherited from css/components/hero.css */

/* Enable clicks on interactive elements (needed due to parent pointer-events: none) */
.hero-cta .btn,
.hero-features {
    pointer-events: auto;
}

/* ==========================================================================
   Scroll Down Indicator
   ========================================================================== */

.scroll-down {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    animation: float 3s ease-in-out infinite;
}

.scroll-down a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 400;
    transition: all 0.4s ease;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    pointer-events: auto; /* Keep scroll indicator clickable */
}

.scroll-down a:hover {
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.scroll-down i {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    opacity: 0.8;
}

@keyframes float {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-8px);
    }
}


/* ==========================================================================
   Swiper Navigation
   ========================================================================== */

.residence-hero-swiper .swiper-button-next,
.residence-hero-swiper .swiper-button-prev {
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.residence-hero-swiper .swiper-button-next::after,
.residence-hero-swiper .swiper-button-prev::after {
    font-size: 16px;
    font-weight: 600;
}

.residence-hero-swiper .swiper-button-next:hover,
.residence-hero-swiper .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.residence-hero-swiper .swiper-pagination {
    bottom: 6rem;
}

.residence-hero-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    opacity: 1;
    transition: all 0.3s ease;
}

.residence-hero-swiper .swiper-pagination-bullet-active {
    background: white;
    border-color: white;
    transform: scale(1.2);
}

/* ==========================================================================
   Fullscreen Video Support
   ========================================================================== */

.residence-hero-section.fullscreen-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999; /* Above navbar when in fullscreen mode only */
    background: black;
}

.residence-hero-section.fullscreen-video .hero-video {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
}

.residence-hero-section.fullscreen-video .video-controls {
    bottom: 4rem;
    right: 4rem;
}

.fullscreen-exit-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.fullscreen-exit-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    /* Fullscreen behavior (height, margin-top, padding-top) handled by global hero.css */
    /* Only residence-specific content styling here */
    
    .residence-hero-content {
        padding: 2rem 0;
    }
    
    /* Title/subtitle responsive handled by main hero.css */
    
    .residence-address {
        justify-content: center;
        margin-bottom: 2.5rem;
        font-size: 1rem;
    }
    
    /* Features responsive styling handled by main hero.css */
    
    /* CTA buttons responsive handled by main hero.css */
    
    .residence-logos {
        justify-content: center;
        margin-bottom: 2.5rem;
    }
    
    .residence-logo {
        max-height: 110px;
    }
    
    .video-controls {
        bottom: 1.25rem;
        right: 1.25rem;
        gap: 0.75rem;
    }
    
    .video-controls button {
        width: 44px;
        height: 44px;
        font-size: 0.875rem;
    }
    
    .slide-content {
        bottom: 2rem;
        left: 1rem;
        right: 1rem;
    }
    
    .slide-title {
        font-size: 1.5rem;
    }
    
    .slide-description {
        font-size: 0.875rem;
    }
    
    .residence-logos .residence-logo {
        max-height: 60px;
    }
}

/* ========================================================================== 
   Residence Map (full-screen capable)
   ========================================================================== */

.residence-map-section {
    background: var(--color-background-secondary, #0b1220);
}

.residence-map-wrapper {
    position: relative;
}

.residence-map-container {
    width: 100%;
    height: 70vh;
    min-height: 420px;
}

.residence-map-wrapper.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #000;
}

.residence-map-wrapper.fullscreen .residence-map-container {
    height: 100vh;
}

.residence-map-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.residence-map-controls .map-control {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.5);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.residence-map-controls .map-control:hover {
    background: rgba(0,0,0,0.75);
}

.residence-map-controls .map-type-selector {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 480px) {
    /* Fullscreen behavior (height, margin-top, padding-top) handled by global hero.css */
    /* Only residence-specific content styling here */
    
    .residence-address {
        font-size: 1rem;
        justify-content: center;
        text-align: center;
    }
    
    .scroll-down {
        bottom: 1rem;
    }
    
    .residence-hero-swiper .swiper-pagination {
        bottom: 4rem;
    }
}

/* ==========================================================================
   Dark/Light Theme Support
   ========================================================================== */

/* Dark theme adjustments for hero content */
/* Hero title/subtitle theming handled by main hero.css */

[data-theme="dark"] .residence-address {
    color: rgba(248, 249, 250, 0.8);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Features theming handled by main hero.css */

/* CTA button theming is handled by the main hero.css */

[data-theme="dark"] .scroll-down a {
    color: rgba(248, 249, 250, 0.7);
}

[data-theme="dark"] .scroll-down a:hover {
    color: rgba(248, 249, 250, 0.9);
}

/* Light theme specific adjustments */
/* Light theme hero handled by main hero.css */

[data-theme="light"] .residence-address {
    color: rgba(255, 255, 255, 0.85);
}

/* Light theme features handled by main hero.css */

/* Light theme CTA buttons handled by main hero.css */

[data-theme="light"] .scroll-down a {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="light"] .scroll-down a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   Theme Specific Adjustments
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .scroll-down {
        animation: none;
    }
    
    .video-controls button {
        transition: none;
    }
    /* Button transition handled by main hero.css */
}
