@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap');

:root {
  --bg-dark: #131410;
  --text-parchment: #e5e2db;
  --text-muted: #a09e98;
  --gold-primary: #e9c349;
  --gold-secondary: #B38728;
  --maroon-deep: #1A0505;
  --maroon-mid: #300A0A;
  --maroon-light: #5a413d;
  --glass-bg: rgba(26, 5, 5, 0.45);
  --glass-border: rgba(233, 195, 73, 0.15);
  --glass-border-hover: rgba(233, 195, 73, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --glass-highlight: inset 0 1px 1px rgba(255, 255, 255, 0.12);
  --apple-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --blob-maroon: #690000;
  --blob-gold: #af8d11;
  --blob-mix-blend: screen;
  --blob-opacity: 0.18;
  --input-bg: rgba(14, 14, 11, 0.6);
  --input-bg-focus: rgba(14, 14, 11, 0.85);
  --input-text: #fff;
  --header-bg: rgba(19, 20, 16, 0.55);
  --header-bg-scrolled: rgba(19, 20, 16, 0.85);
  --nav-link-color: rgba(229, 226, 219, 0.6);
}

html.light {
  --bg-dark: #fafaf9;
  --text-parchment: #1d1d1f;
  --text-muted: #86868b;
  --gold-primary: #b38728;
  --gold-secondary: #8c661a;
  --maroon-deep: #f5f5f7;
  --maroon-mid: #e8e8ed;
  --maroon-light: #d2d2d7;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(179, 135, 40, 0.2);
  --glass-border-hover: rgba(179, 135, 40, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.06);
  --glass-highlight: inset 0 1px 1px rgba(255, 255, 255, 0.8);
  --blob-maroon: #ffdad4;
  --blob-gold: #ffe088;
  --blob-mix-blend: multiply;
  --blob-opacity: 0.35;
  --input-bg: rgba(255, 255, 255, 0.8);
  --input-bg-focus: #ffffff;
  --input-text: #1d1d1f;
  --header-bg: rgba(250, 250, 249, 0.65);
  --header-bg-scrolled: rgba(250, 250, 249, 0.9);
  --nav-link-color: rgba(29, 29, 31, 0.65);
}

body {
  background-color: var(--bg-dark);
  color: var(--text-parchment);
  font-family: var(--apple-font);
  scroll-behavior: smooth;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* Liquid Blob Background Animations */
.bg-blob-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background-color: var(--bg-dark);
  transition: background-color 0.5s ease;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: var(--blob-opacity);
  mix-blend-mode: var(--blob-mix-blend);
  pointer-events: none;
  transition: opacity 0.5s ease, mix-blend-mode 0.5s ease;
}

.blob-maroon-1 {
  background: radial-gradient(circle, var(--blob-maroon) 0%, transparent 70%);
  width: 700px;
  height: 700px;
  top: -200px;
  left: -200px;
  animation: floatBlob1 28s ease-in-out infinite alternate;
}

.blob-gold-1 {
  background: radial-gradient(circle, var(--blob-gold) 0%, transparent 70%);
  width: 500px;
  height: 500px;
  bottom: -150px;
  right: -100px;
  animation: floatBlob2 24s ease-in-out infinite alternate;
}

.blob-maroon-2 {
  background: radial-gradient(circle, var(--blob-maroon) 0%, transparent 70%);
  width: 600px;
  height: 600px;
  top: 40%;
  left: 50%;
  animation: floatBlob3 32s ease-in-out infinite alternate;
}

@keyframes floatBlob1 {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  50% { transform: translate(120px, 80px) scale(1.1) rotate(90deg); }
  100% { transform: translate(-50px, 150px) scale(0.9) rotate(180deg); }
}

@keyframes floatBlob2 {
  0% { transform: translate(0, 0) scale(0.9) rotate(0deg); }
  50% { transform: translate(-100px, -120px) scale(1.05) rotate(-120deg); }
  100% { transform: translate(80px, -40px) scale(1) rotate(-240deg); }
}

@keyframes floatBlob3 {
  0% { transform: translate(0, 0) scale(1.05) rotate(0deg); }
  50% { transform: translate(-150px, 60px) scale(0.9) rotate(140deg); }
  100% { transform: translate(50px, -100px) scale(1.1) rotate(280deg); }
}

/* Glassmorphism Panels (Liquid Glass) */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), var(--glass-shadow);
  border-radius: 1.25rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel-hover:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--glass-highlight), 
              0 16px 48px 0 rgba(0, 0, 0, 0.6), 
              0 0 24px 0 rgba(233, 195, 73, 0.04);
  transform: translateY(-4px);
}

/* Glass Header / Navigation */
.glass-header {
  background: var(--header-bg);
  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-bottom 0.3s ease;
}

.glass-header.scrolled {
  background: var(--header-bg-scrolled);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--gold-primary), var(--gold-secondary));
  border: 2px solid var(--bg-dark);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* Typography styles */
.font-display-lg {
  font-family: var(--apple-font);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.font-headline-lg {
  font-family: var(--apple-font);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.font-title-md {
  font-family: var(--apple-font);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.font-body-md {
  font-family: var(--apple-font);
  font-weight: 400;
  line-height: 1.6;
}

.font-label-sm {
  font-family: var(--apple-font);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Gold Gradient Details */
.gold-gradient-text {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary) 80%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold-primary); /* Fallback */
}

.gold-gradient-bg {
  background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-secondary) 100%);
}

/* Beveled Glass Buttons */
.glass-button-primary {
  background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-secondary) 100%);
  color: #131410;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 
              0 4px 15px rgba(233, 195, 73, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.glass-button-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 
              0 8px 25px rgba(233, 195, 73, 0.4);
  filter: brightness(1.05);
}

.glass-button-primary:active {
  transform: translateY(0) scale(0.98);
}

.glass-button-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: rotate(45deg);
  transition: 0.5s;
  pointer-events: none;
}

.glass-button-primary:hover::after {
  left: 120%;
}

.glass-button-secondary {
  background: rgba(233, 195, 73, 0.05);
  color: var(--gold-primary);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-button-secondary:hover {
  background: rgba(233, 195, 73, 0.12);
  border-color: var(--glass-border-hover);
  color: #fff;
  transform: translateY(-2px);
}

.glass-button-secondary:active {
  transform: translateY(0);
}

/* Navigation Link Indicator Glow */
.nav-link {
  position: relative;
  color: var(--nav-link-color);
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--gold-primary);
}

.nav-link.active {
  color: var(--gold-primary);
  font-weight: 700;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-link.active::after {
  width: 100%;
  left: 0;
}

/* Sidebar Active Indicator */
.sidebar-link {
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
}

.sidebar-link:hover {
  background: rgba(233, 195, 73, 0.04);
  color: var(--gold-primary);
}

.sidebar-link.active {
  color: var(--gold-primary);
  font-weight: 700;
  border-left-color: var(--gold-primary);
  background: rgba(233, 195, 73, 0.08);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.05);
}

/* Custom Input Styling */
.glass-input {
  background: var(--input-bg) !important;
  border: 1px solid rgba(233, 195, 73, 0.15) !important;
  border-bottom: 2px solid rgba(233, 195, 73, 0.3) !important;
  color: var(--input-text) !important;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.glass-input:focus {
  outline: none;
  background: var(--input-bg-focus) !important;
  border-color: rgba(233, 195, 73, 0.5) !important;
  border-bottom-color: var(--gold-primary) !important;
  box-shadow: 0 0 15px rgba(233, 195, 73, 0.15);
  ring: 0;
}

/* Force autofill states to match glassmorphism theme variables */
.glass-input:-webkit-autofill,
.glass-input:-webkit-autofill:hover, 
.glass-input:-webkit-autofill:focus,
.glass-input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--input-text) !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--input-bg) inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Interactive Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  height: 6px;
  border-radius: 9999px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-primary);
  cursor: pointer;
  transition: transform 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Shariah Badges */
.shariah-badge {
  background: rgba(175, 141, 17, 0.12);
  border: 1px solid rgba(175, 141, 17, 0.35);
  color: var(--gold-primary);
  box-shadow: 0 0 10px rgba(175, 141, 17, 0.05);
}

/* Tab View Transitions overrides */
::view-transition-old(root) {
  animation: fade-out 0.25s cubic-bezier(0.4, 0, 0.2, 1) both;
}
::view-transition-new(root) {
  animation: fade-in 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes fade-out {
  from { opacity: 1; transform: scale(1); filter: blur(0); }
  to { opacity: 0; transform: scale(0.97); filter: blur(5px); }
}

@keyframes fade-in {
  from { opacity: 0; transform: scale(1.03); filter: blur(5px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* Responsive Grid layouts */
.luxury-grid-card {
  position: relative;
  overflow: hidden;
}

.luxury-grid-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  opacity: 0.6;
}

/* Success Modal starting styles */
@starting-style {
  .modal-overlay {
    opacity: 0;
  }
  .modal-box {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
  }
}

/* Remove default browser focus outline on programmatically focused headers/elements */
[tabindex="-1"]:focus,
h1:focus,
h2:focus,
h3:focus,
h4:focus,
h5:focus,
h6:focus {
  outline: none !important;
}

/* Services Image Masking & Gradients */
.services-hero-mask {
  mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.05) 25%, rgba(0,0,0,1) 100%);
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.05) 25%, rgba(0,0,0,1) 100%);
}

.services-card-mask {
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.15) 75%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.15) 75%, rgba(0,0,0,0) 100%);
}

/* Google Maps Embed Dark Theme Styling */
.map-iframe {
  filter: grayscale(0.5) invert(0.92) contrast(1.15) brightness(0.85) hue-rotate(180deg);
  transition: filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

html.light .map-iframe {
  filter: none;
}

/* Map highlight pulse animation */
@keyframes mapPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(233, 195, 73, 0.5);
    border-color: rgba(233, 195, 73, 0.7);
  }
  50% {
    box-shadow: 0 0 25px 8px rgba(233, 195, 73, 0.35);
    border-color: rgba(233, 195, 73, 1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(233, 195, 73, 0);
    border-color: rgba(233, 195, 73, 0.15);
  }
}

.map-highlight {
  animation: mapPulse 1.8s cubic-bezier(0.4, 0, 0.2, 1) 1;
}

