/* ===== SPMC LUXURY REAL ESTATE — CUSTOM STYLES ===== */

/* --- Base & Typography --- */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

::selection { background: #C9A96E; color: #fff; }

/* --- Page Transition --- */
.page-enter { animation: fadeInUp 0.6s ease both; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Scroll Animations --- */
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.animate-visible { opacity: 1; transform: translateY(0); }
.stagger > *:nth-child(1) { transition-delay: 0s; }
.stagger > *:nth-child(2) { transition-delay: 0.1s; }
.stagger > *:nth-child(3) { transition-delay: 0.18s; }
.stagger > *:nth-child(4) { transition-delay: 0.24s; }
.stagger > *:nth-child(5) { transition-delay: 0.3s; }
.stagger > *:nth-child(6) { transition-delay: 0.36s; }

/* --- Hero --- */
.hero-overlay {
  background: linear-gradient(180deg, rgba(10,10,10,0.7) 0%, rgba(10,10,10,0.4) 40%, rgba(10,10,10,0.75) 100%);
}
.hero-bg {
  animation: heroZoom 20s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

/* --- Navigation --- */
.nav-scrolled {
  background: rgba(10, 10, 10, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #C9A96E;
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* --- Cards --- */
.property-card {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
}
.property-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.property-card .card-img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.property-card:hover .card-img {
  transform: scale(1.06);
}

/* --- Division Cards --- */
.division-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.5s ease;
}
.division-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(10,10,10,0.85) 100%);
  z-index: 1;
  transition: background 0.4s ease;
}
.division-card:hover::before {
  background: linear-gradient(180deg, rgba(201,169,110,0.1) 0%, rgba(10,10,10,0.9) 100%);
}
.division-card:hover { transform: translateY(-4px); }
.division-card .division-img {
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.division-card:hover .division-img { transform: scale(1.08); }

/* --- Buttons --- */
.btn-gold {
  background: #C9A96E;
  color: #fff;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.btn-gold:hover {
  background: #b8944f;
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(201, 169, 110, 0.3);
}
.btn-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}
.btn-gold:hover::after { transform: translateX(100%); }

.btn-outline {
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  transition: all 0.3s ease;
}
.btn-outline:hover {
  border-color: #C9A96E;
  color: #C9A96E;
  background: rgba(201, 169, 110, 0.05);
}

.btn-dark {
  background: #0A0A0A;
  color: #fff;
  transition: all 0.3s ease;
}
.btn-dark:hover {
  background: #1a1a1a;
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* --- Gold Accent Line --- */
.gold-line {
  width: 60px;
  height: 2px;
  background: #C9A96E;
}

/* --- Stats Counter --- */
.stat-item {
  position: relative;
}
.stat-item::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.15);
}
.stat-item:last-child::after { display: none; }

/* --- Gallery --- */
.gallery-main {
  transition: opacity 0.3s ease;
}
.gallery-thumb {
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s ease, border-color 0.3s ease;
  border: 2px solid transparent;
}
.gallery-thumb:hover,
.gallery-thumb.active {
  opacity: 1;
  border-color: #C9A96E;
}

/* --- Form Inputs --- */
.form-input {
  background: transparent;
  border: 1px solid rgba(10,10,10,0.15);
  padding: 14px 18px;
  font-size: 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}
.form-input:focus {
  border-color: #C9A96E;
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.1);
}

/* --- Divider --- */
.luxury-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201, 169, 110, 0.4), transparent);
}

/* --- Parallax Text --- */
.text-stroke {
  -webkit-text-stroke: 1px rgba(201, 169, 110, 0.2);
  color: transparent;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: #C9A96E;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 50;
  cursor: pointer;
  border: none;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover {
  background: #b8944f;
  transform: translateY(-3px);
}

/* --- Loading Shimmer --- */
.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .stat-item::after { display: none; }
  .hero-bg { animation-duration: 30s; }
}

/* --- Smooth Image Loading --- */
img {
  opacity: 0;
  transition: opacity 0.4s ease;
}
img.loaded, img[src^="data:"] {
  opacity: 1;
}
/* Fallback: show images after load */
img { animation: imgFade 0.1s 1s forwards; }
@keyframes imgFade { to { opacity: 1; } }
