/* ==========================================================================
   مشروع جراند مسك - درة العقارية
   أنماط الواجهة المعمارية الفاخرة (Grand Misk Luxury Light Theme)
   متوافقة 100% مع نظام تصميم درة العقارية وهوية رَسايا المعمارية
   ========================================================================== */

:root {
  --font-arabic: 'Cairo', Arial, sans-serif;
  --font-display: 'Cairo', Arial, sans-serif;
  --font-sans: 'Cairo', Arial, sans-serif;
  --gold-primary: #b88636;
  --gold-light: #dfbe84;
  --gold-accent: #d4a34b;
  --gold-dark: #7c5220;
  --bg-cream: #faf7f2;
  --bg-cream-card: #f5f0e6;
  --brand-navy: #07111e;
  --brand-deep: #050c15;
}

html {
  scroll-behavior: smooth;
  direction: rtl;
  font-family: 'Cairo', Arial, sans-serif;
  background-color: #faf7f2;
  color: #1c1917;
  margin: 0;
  padding: 0;
}

body, button, input, select, textarea, optgroup {
  font-family: 'Cairo', Arial, sans-serif;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

#main-header {
  top: 0 !important;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: 'Cairo', Arial, sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #07111e;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #b88636;
}

/* Subtle Gold Accents & Badges */
.gold-gradient-text {
  background: linear-gradient(135deg, #dfbe84 0%, #d4a34b 45%, #f6eedb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gold-gradient-btn {
  background: linear-gradient(135deg, #b88636 0%, #d4a34b 50%, #c59b48 100%);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.gold-gradient-btn:hover {
  background: linear-gradient(135deg, #c59b48 0%, #dfbe84 50%, #d4a34b 100%);
  box-shadow: 0 10px 25px -5px rgba(184, 134, 54, 0.35);
  transform: translateY(-2px);
}

.gold-border {
  border-color: rgba(184, 134, 54, 0.3);
}

/* Hero Overlay - Rich Architectural Lighting */
.hero-overlay-refined {
  background: linear-gradient(
    180deg,
    rgba(5, 12, 21, 0.55) 0%,
    rgba(5, 12, 21, 0.72) 40%,
    rgba(7, 17, 30, 0.92) 80%,
    rgba(7, 17, 30, 1) 100%
  );
}

/* Luxury Cards */
.card-luxury-light {
  background: #ffffff;
  border: 1px solid #e7e2d9;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-luxury-light:hover {
  border-color: #dfbe84;
  transform: translateY(-4px);
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.06), 0 0 1px 1px rgba(184, 134, 54, 0.15);
}

/* Tabs */
.tab-btn-refined {
  transition: all 0.25s ease;
}
.tab-btn-refined.active {
  background-color: #07111e;
  color: #ffffff;
  border-color: #07111e;
  box-shadow: 0 4px 12px rgba(7, 17, 30, 0.15);
}

/* Modal styling */
.modal-backdrop {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}
.modal-dialog {
  opacity: 0;
  transform: scale(0.97) translateY(12px);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.active .modal-dialog {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Modal content scrollbar */
#model-modal-content ::-webkit-scrollbar {
  width: 5px;
}
#model-modal-content ::-webkit-scrollbar-track {
  background: #f5f1e8;
}
#model-modal-content ::-webkit-scrollbar-thumb {
  background: #d4a34b;
  border-radius: 4px;
}

/* Fancybox Custom Luxury Theme Overrides */
.fancybox__container {
  --fancybox-bg: rgba(5, 12, 21, 0.94);
  --fancybox-color: #f8fafc;
  --fancybox-accent-color: #d4a34b;
  font-family: 'Cairo', Arial, sans-serif;
  direction: rtl;
}
.fancybox__toolbar {
  --fancybox-color: #ffffff;
  background: rgba(7, 17, 30, 0.6);
  backdrop-filter: blur(8px);
}
.fancybox__thumb.is-selected {
  border-color: #d4a34b !important;
  box-shadow: 0 0 12px rgba(212, 163, 75, 0.5);
}
.fancybox__caption {
  font-family: 'Cairo', Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 12, 21, 0.9) 100%);
  padding: 16px 24px;
}

/* Subtle Hover Zoom */
.img-zoom-parent {
  overflow: hidden;
}
.img-zoom-parent img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.img-zoom-parent:hover img {
  transform: scale(1.05);
}

/* ==========================================================================
   Mobile Horizontal Card Rails (Native CSS Scroll Snap + Vanilla JS)
   ========================================================================== */
@media (max-width: 639.98px) {
  .mobile-slider-rail {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 0.75rem;
    padding-top: 0.25rem;
  }

  .mobile-slider-rail::-webkit-scrollbar {
    display: none;
  }

  .mobile-slider-rail > * {
    flex: 0 0 84vw !important;
    max-width: 325px !important;
    min-width: 270px !important;
    scroll-snap-align: center !important;
    scroll-snap-stop: always;
  }
}

@media (max-width: 767.98px) {
  .mobile-slider-rail-md {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 0.75rem;
    padding-top: 0.25rem;
  }

  .mobile-slider-rail-md::-webkit-scrollbar {
    display: none;
  }

  .mobile-slider-rail-md > * {
    flex: 0 0 84vw !important;
    max-width: 335px !important;
    min-width: 270px !important;
    scroll-snap-align: center !important;
    scroll-snap-stop: always;
  }
}
