/* ════════════════════════════════════════════════════════════════
   TOPDREAMS EDITORIAL LUXURY ARCHITECTURAL DESIGN SYSTEM
   Universal Light & Dark Mode Override Engine
   ════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-section: #0B0B0B;
    --text-primary: #F7F5F0;
    --text-muted: #A6A6A6;
    --border-subtle: rgba(255, 255, 255, 0.12);
    --gold-accent: #C9A45C;
    --card-bg: #121212;
}

html.light {
    --bg-section: #ffffff !important;
    --text-primary: #111827 !important;
    --text-muted: #4b5563 !important;
    --border-subtle: rgba(0, 0, 0, 0.15) !important;
    --card-bg: #f9f9f9 !important;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-section) !important;
    color: var(--text-primary) !important;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif !important;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Force light mode overrides on legacy class backgrounds when html.light is active */
html.light body,
html.light section,
html.light .cinematic-section,
html.light footer,
html.light div[class*="bg-[#"],
html.light div[class*="bg-slate-"],
html.light div[class*="bg-zinc-"] {
    background-color: #ffffff !important;
    color: #111827 !important;
}

html.light .editorial-card {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
}

/* Light Mode Automatic Text & Border Inversion for White Elements */
html.light .text-white,
html.light [class*="text-[#F7F5F0]"],
html.light [class*="text-slate-100"],
html.light [class*="text-zinc-100"] {
    color: #111827 !important;
}

html.light .text-[#A6A6A6],
html.light .text-slate-400,
html.light .text-zinc-400 {
    color: #4b5563 !important;
}

html.light [class*="border-white/"] {
    border-color: rgba(0, 0, 0, 0.15) !important;
}

/* ── Typography Hierarchy ── */
.font-editorial {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: normal;
}

.text-gold {
    color: var(--gold-accent);
}

.bg-gold {
    background-color: var(--gold-accent);
}

.border-gold {
    border-color: rgba(201, 164, 92, 0.3);
}

/* ── Editorial Containers ── */
.editorial-container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

@media (min-width: 768px) {
    .editorial-container {
        padding-left: 48px;
        padding-right: 48px;
    }
}

/* ── Header Navigation Bar (Theme Adaptive) ── */
.editorial-nav {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding-left: 0 !important;
    padding-right: 24px !important;
}

html.dark .editorial-nav {
    background: #0B0B0B !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .editorial-nav {
        padding-right: 48px !important;
    }
}

.editorial-nav .editorial-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Brand Logo Image */
.brand-logo-img {
    height: 56px;
    width: auto;
    border-radius: 0 10px 10px 0;
    object-fit: contain;
    background: transparent;
    padding: 2px 14px 2px 6px;
    transition: transform 0.3s ease;
}

@media (min-width: 768px) {
    .brand-logo-img {
        height: 64px;
    }
}

.brand-logo-img:hover {
    transform: scale(1.05);
}

/* Header Navigation Links */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 220px;
    background: #121212;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1050;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: block;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #f4f4f5;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.nav-dropdown-item:hover {
    background: rgba(201, 164, 92, 0.15);
    color: var(--gold-accent);
    padding-left: 18px;
}

.editorial-nav a.nav-link-floating {
    color: #111827 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

html.dark .editorial-nav a.nav-link-floating {
    color: #ffffff !important;
}

.editorial-nav a.nav-link-floating:hover {
    color: var(--gold-accent) !important;
}

/* Post Property Button in Header (Theme Adaptive) */
.post-property-btn {
    border-color: #111827 !important;
    color: #111827 !important;
}
html.dark .post-property-btn {
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}
.post-property-btn:hover {
    background-color: #111827 !important;
    color: #ffffff !important;
}
html.dark .post-property-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* Single-Line Install Button Styling on Desktop */
#navInstallBtn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

/* ── SCROLL-TRIGGERED ANIMATIONS ── */
.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-animate.animated {
    opacity: 1;
    transform: translateY(0);
}

.scroll-zoom {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-zoom.animated {
    opacity: 1;
    transform: scale(1);
}

/* Loading Bar Animation */
.search-loading-bar {
    width: 0%;
    height: 3px;
    background: var(--gold-accent);
    transition: width 0.4s ease;
}

/* ── Fullscreen Cinematic Sections ── */
.cinematic-section {
    min-height: 100vh;
    scroll-snap-align: start;
}

/* ── Mobile Slide-In Scrollable Menu Drawer ── */
#mobileSlideMenu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 380px;
    background: #0B0B0B;
    border-left: 1px solid var(--border-subtle);
    z-index: 10010;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 28px;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

#mobileSlideMenu.open {
    transform: translateX(0);
}

#mobileSlideMenuOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    z-index: 10005;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#mobileSlideMenuOverlay.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-item {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-nav-item:hover, .mobile-nav-item.active {
    color: var(--text-primary);
    padding-left: 6px;
}

.btn-single-line {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-single-line:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.5);
}
