/* Fix for Polaris Transparent Header Overlay */
#header[data-transparent="true"]:not(.sticky-active) {
    position: absolute;
    width: 100%;
    z-index: 1000 !important;
}

.modern-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    background: #000;
    padding: 0 !important;
    margin: 0 !important;
}

.hero-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--hero-transition-speed) ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 20%, rgba(0,0,0,0.2) 80%, rgba(0,0,0,0.6) 100%);
    pointer-events: none;
    z-index: 5;
}

.hero-slide.active .hero-bg {
    animation: kenburns 25s ease-out forwards;
}

@keyframes kenburns {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

/* Content Overlays */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #fff;
    width: 100%;
    max-width: 800px;
    padding: 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out 0.4s;
}

.hero-slide.active .hero-content {
    opacity: 1;
    transform: translateY(0);
}

.hero-logo {
    max-width: 560px;
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.5));
}

.hero-title {
    font-size: clamp(32px, 8vw, 90px);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
    line-height: 1.1;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: clamp(14px, 2vw, 24px);
    margin-bottom: 2rem;
    color: #ffffff;
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    opacity: 0.95;
    letter-spacing: 0.5px;
}

.hero-btn {
    display: inline-block;
    min-width: 250px;
    height: 60px;
    line-height: 60px;
    background-color: #333;
    color: #fff !important;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.hero-btn:hover {
    background-color: #111;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    color: #fff !important;
}

/* Navigation */
.hero-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 100;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.nav-dot:hover {
    background: rgba(255,255,255,0.6);
}

.nav-dot.active {
    background: #fff;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Arrow controls (optional but good for accessibility) */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(0,0,0,0.2);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 20;
}

.hero-arrow:hover {
    background: rgba(0,0,0,0.5);
}

.hero-arrow.prev { left: 30px; }
.hero-arrow.next { right: 30px; }

/* Modern Gallery Structure (Apartments) */
.modern-gallery {
    width: 100%;
    height: auto;
    position: relative;
    background: #111;
    display: flex;
    flex-direction: column;
}

.gallery-main {
    width: 100%;
    height: 70vh;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.gallery-slides {
    height: 100%;
    position: relative;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-in-out;
}

.gallery-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.gallery-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #000;
}

.gallery-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 8px 25px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Thumbnails */
.gallery-thumbs {
    width: 100%;
    height: 100px;
    background: #1a1a1a;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: #333 #1a1a1a;
    -webkit-overflow-scrolling: touch;
}

.gallery-thumbs::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbs::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.gallery-thumb {
    flex: 0 0 120px;
    height: 80px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.gallery-thumb:hover {
    opacity: 0.9;
}

.gallery-thumb.active {
    border-color: rgb(15, 65, 166);
    opacity: 1;
    transform: scale(1.05);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gallery Arrows */
.modern-hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modern-hero-nav:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-50%) scale(1.1);
}

.modern-hero-nav.prev { left: 20px; }
.modern-hero-nav.next { right: 20px; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-logo {
        max-width: 400px;
    }
    .hero-title {
        font-size: 50px;
    }
    .modern-hero-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .gallery-main {
        height: 50vh;
        min-height: 300px;
    }
    .gallery-thumb {
        flex: 0 0 100px;
        height: 60px;
    }
}
