/* ==========================================================================
   Aurelia Estates Core Design System & Global Stylesheet
   ========================================================================== */

/* 1. Imports of Component Modules */
@import url('components/header.css');
@import url('components/hero.css');
@import url('components/search.css');
@import url('components/cards.css');
@import url('components/details.css');
@import url('components/map.css');
@import url('components/lifestyle.css');
@import url('components/ai-concierge.css');
@import url('components/calculator.css');
@import url('components/comparison.css');
@import url('components/footer.css');

/* 2. Global CSS Variables & Theme Setup */
:root {
  /* Editorial Palette: Dark Theme Base */
  --bg-primary: #080808;
  --bg-secondary: #121212;
  --bg-tertiary: #1A1A1A;
  
  --surface-glass: rgba(18, 18, 18, 0.65);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(212, 175, 55, 0.3);
  
  --text-primary: #FFFFFF;
  --text-secondary: #B5B5B5;
  --text-muted: #7E7E7E;
  
  --gold-primary: #D4AF37;
  --gold-secondary: #C5A880;
  --gold-hover: #AA841C;
  --gold-glow: rgba(212, 175, 55, 0.15);
  
  --white: #FFFFFF;
  --black: #000000;
  
  /* Fonts System */
  --font-editorial: 'Playfair Display', serif;
  --font-decorative: 'Cinzel Decorative', cursive;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  
  /* Layout tokens */
  --container-width: 1400px;
  --header-height: 80px;
  --transition-smooth: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: all 0.25s ease;
  
  --shadow-luxury: 0 20px 40px rgba(0, 0, 0, 0.8);
  --shadow-gold: 0 10px 30px rgba(212, 175, 55, 0.08);
}

/* Light Theme overrides when applied */
.light-theme {
  --bg-primary: #F7F5F0;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #EAE5D9;
  
  --surface-glass: rgba(255, 255, 255, 0.7);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-hover: rgba(212, 175, 55, 0.5);
  
  --text-primary: #121212;
  --text-secondary: #4A4A4A;
  --text-muted: #8E8D88;
  
  --gold-glow: rgba(212, 175, 55, 0.1);
  --shadow-luxury: 0 20px 40px rgba(0, 0, 0, 0.06);
}

/* 3. Base Resets & Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.8s ease, color 0.8s ease;
}

/* Custom Luxury Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--gold-secondary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* 4. Luxury Custom Cursor */
.custom-cursor {
  width: 40px;
  height: 40px;
  border: 1px solid var(--gold-primary);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
  transition-timing-function: cubic-bezier(0.1, 0.8, 0.3, 1);
  mix-blend-mode: difference;
}

.custom-cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--gold-primary);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
}

.custom-cursor.hovered {
  width: 60px;
  height: 60px;
  background-color: rgba(212, 175, 55, 0.1);
  border-color: var(--gold-secondary);
}

/* Hide default cursor on desktops */
@media (pointer: fine) {
  body {
    cursor: none;
  }
  a, button, select, input, .collection-menu-item, .insights-tab, .map-continent {
    cursor: none;
  }
}

/* Premium visible keyboard focus states */
a:focus-visible, 
button:focus-visible, 
select:focus-visible, 
input:focus-visible,
.collection-menu-item:focus-visible,
.insights-tab:focus-visible,
.map-continent:focus-visible,
.agent-card:focus-visible,
.property-card:focus-visible,
.map-marker-pin:focus-visible {
  outline: 2px solid var(--gold-primary) !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 15px var(--gold-glow) !important;
}

/* 5. Luxury Initial Loader */
.luxury-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #060606;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 1s cubic-bezier(0.75, 0, 0.25, 1), visibility 1s;
}

.loader-bg-marble {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 30% 20%, rgba(212, 175, 55, 0.03) 0%, transparent 60%),
                    radial-gradient(circle at 80% 70%, rgba(197, 168, 128, 0.03) 0%, transparent 50%);
  opacity: 0.8;
  pointer-events: none;
}

.loader-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.loader-logo {
  font-family: var(--font-decorative);
  font-size: 3rem;
  letter-spacing: 0.8rem;
  color: var(--white);
  font-weight: 400;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.loader-tagline {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.6rem;
  color: var(--gold-secondary);
  font-weight: 500;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.loader-line-container {
  width: 180px;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 0 auto 1rem;
  position: relative;
  overflow: hidden;
}

.loader-line {
  width: 0%;
  height: 100%;
  background-color: var(--gold-primary);
  position: absolute;
  top: 0;
  left: 0;
  transition: width 0.1s linear;
}

.loader-number {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.2rem;
}

/* Loader fade state */
.luxury-loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 6. Announcement Bar Ticker Styles */
.announcement-bar {
  background-color: #030303;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  font-size: 0.7rem;
  font-family: var(--font-sans);
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  color: var(--gold-secondary);
  overflow: hidden;
  position: relative;
  z-index: 101;
}

.ticker-wrap {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.ticker {
  display: inline-block;
  animation: ticker-scrolling 30s linear infinite;
  padding-left: 100%;
}

.ticker-item {
  display: inline-block;
  padding: 0 4rem;
}

.ticker-item i {
  color: var(--gold-primary);
  margin-right: 8px;
}

@keyframes ticker-scrolling {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* 7. Structural Layout Shell */
.section-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 80px 4% 80px 4%;
  position: relative;
}

.section-container-full {
  width: 100%;
  padding: 80px 0;
  position: relative;
}

.spa-view {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.spa-view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* 8. Editorial & Magazine Typographic Headers */
.section-header-editorial {
  text-align: center;
  margin-bottom: 60px;
}

.editorial-subtitle {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.35rem;
  color: var(--gold-primary);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 600;
}

.editorial-title {
  font-family: var(--font-editorial);
  font-size: 2.8rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02rem;
  max-width: 800px;
  margin: 0 auto 20px;
}

@media(max-width: 768px) {
  .editorial-title {
    font-size: 2.1rem;
  }
}

/* Premium Page Headers (Left-Aligned, magazine style) */
.listings-page-header {
  text-align: left;
  margin-bottom: 45px;
  position: relative;
  padding-top: 140px; /* Clear fixed sticky header and announcement ticker */
}

.listings-page-header .editorial-subtitle {
  text-align: left;
  margin-bottom: 12px;
}

.listings-page-header .editorial-title {
  margin: 0 0 16px 0 !important; /* Force override centered margins */
  text-align: left;
  max-width: 900px;
}

.listings-subtitle-desc {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0;
  font-weight: 300;
  letter-spacing: 0.02rem;
}


.editorial-divider {
  width: 80px;
  height: 1px;
  background-color: var(--gold-secondary);
  margin: 0 auto;
  position: relative;
}

.editorial-divider::after {
  content: '';
  width: 6px;
  height: 6px;
  background-color: var(--gold-primary);
  border-radius: 50%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* 9. Premium Button UI Design Elements */
.luxury-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.luxury-btn.primary-gold {
  background-color: var(--gold-primary);
  color: var(--black);
}

.luxury-btn.primary-gold:hover {
  background-color: transparent;
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  box-shadow: var(--shadow-gold);
}

.luxury-btn.secondary-glass {
  background-color: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.luxury-btn.secondary-glass:hover {
  background-color: var(--text-primary);
  color: var(--black);
  border-color: var(--text-primary);
}

.luxury-btn .btn-arrow {
  margin-left: 12px;
  transition: transform 0.3s ease;
}

.luxury-btn:hover .btn-arrow {
  transform: translateX(6px);
}

.luxury-btn .btn-icon {
  margin-left: 10px;
}

/* Luxury Link Buttons */
.luxury-link-btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-primary);
  position: relative;
  padding-bottom: 6px;
  transition: var(--transition-fast);
}

.luxury-link-btn::after {
  content: '';
  width: 100%;
  height: 1px;
  background-color: var(--gold-primary);
  position: absolute;
  bottom: 0;
  left: 0;
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.luxury-link-btn:hover {
  color: var(--white);
}

.luxury-link-btn:hover::after {
  transform: scaleX(1);
  background-color: var(--white);
}

.luxury-link-btn i {
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.luxury-link-btn:hover i {
  transform: translateX(6px);
}

.section-footer-cta {
  text-align: center;
  margin-top: 50px;
}

/* Empty State Styling */
.empty-state-container {
  padding: 80px 4%;
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
}

.empty-state-container i {
  font-size: 3rem;
  color: var(--gold-secondary);
  margin-bottom: 24px;
}

.empty-state-container h3 {
  font-family: var(--font-editorial);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 12px;
}

.empty-state-container p {
  color: var(--text-secondary);
  margin-bottom: 30px;
}
