/* 
  Al Falah Gate Group - Custom Stylesheet
  Extends Tailwind CSS with premium transitions, keyframe animations, 
  glassmorphism, custom scrollbars, and Arabic-specific typography adjustments.
*/

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@300;400;500;600;700;800&display=swap');

:root {
  --color-primary-dark: #12161A;
  --color-primary: #1A1E24;
  --color-primary-light: #2C323B;
  --color-accent: #C6A664;
  --color-accent-light: #D9B875;
  --color-accent-dark: #A68748;
  --color-bg-cream: #F8F8F6;
  
  scroll-behavior: smooth;
}

/* --- Base RTL / Language Typography Styling --- */
html {
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

html[dir="rtl"] {
  font-family: 'Cairo', sans-serif;
}

/* Apply specific fonts for headings */
.font-heading-en {
  font-family: 'Montserrat', sans-serif;
}

.font-heading-ar {
  font-family: 'Cairo', sans-serif;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
  font-family: 'Cairo', sans-serif;
}

html[dir="ltr"] h1,
html[dir="ltr"] h2,
html[dir="ltr"] h3,
html[dir="ltr"] h4,
html[dir="ltr"] h5,
html[dir="ltr"] h6 {
  font-family: 'Montserrat', sans-serif;
}

/* --- Premium Background Texture --- */
.bg-textured {
  background-color: var(--color-bg-cream);
  background-image: 
    radial-gradient(rgba(198, 166, 100, 0.03) 1px, transparent 1px),
    radial-gradient(rgba(26, 30, 36, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
}

/* --- Premium Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-primary-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-light);
}

/* --- Glassmorphism Styles --- */
.glassmorphic {
  background: rgba(26, 30, 36, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glassmorphic-light {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(198, 166, 100, 0.2);
}

.glassmorphic-modal {
  background: rgba(18, 22, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(198, 166, 100, 0.15);
}

/* --- Custom Floating & Anti-Gravity Animations --- */
@keyframes float-slow {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(1deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

@keyframes float-medium {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(-1deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

.animate-float-slow {
  animation: float-slow 8s ease-in-out infinite;
}

.animate-float-medium {
  animation: float-medium 6s ease-in-out infinite;
}

/* --- Mouse Parallax Layer Transitions --- */
.parallax-layer {
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- Scroll-Reveal System --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Delay modifiers for staggered entries */
.reveal-delay-100 { transition-delay: 100ms; }
.reveal-delay-200 { transition-delay: 200ms; }
.reveal-delay-300 { transition-delay: 300ms; }
.reveal-delay-400 { transition-delay: 400ms; }
.reveal-delay-500 { transition-delay: 500ms; }

/* Scale Reveal */
.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* --- Service Card Visual Effects --- */
.service-card {
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  border: 1px solid rgba(26, 30, 36, 0.04);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(26, 30, 36, 0.08), 0 0 20px rgba(198, 166, 100, 0.15);
  border-color: rgba(198, 166, 100, 0.4);
}

/* --- Glowing Button Effect --- */
.btn-gold-glow {
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.btn-gold-glow::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: all 0.6s ease;
}

.btn-gold-glow:hover::after {
  left: 100%;
}

/* --- Contact Input Custom Focus --- */
.contact-input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transition: all 0.3s ease;
}

.contact-input:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--color-accent);
  box-shadow: 0 0 10px rgba(198, 166, 100, 0.2);
  outline: none;
}

/* --- Active Language Indicator Nav Accent --- */
.lang-active {
  color: var(--color-accent) !important;
  border-bottom: 2px solid var(--color-accent);
}

/* --- Dynamic Direction (RTL) Layout Helpers --- */
html[dir="rtl"] .ltr-only {
  display: none !important;
}

html[dir="ltr"] .rtl-only {
  display: none !important;
}

/* --- Enhanced Logo Glowing Effects --- */
.logo-gold-path {
  transition: filter 0.5s cubic-bezier(0.25, 1, 0.5, 1), fill 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.group:hover .logo-gold-path {
  filter: drop-shadow(0 0 8px rgba(198, 166, 100, 0.75));
  fill: #D9B875 !important;
}

/* --- Card Image Zoom Effects --- */
.card-image-container {
  position: relative;
  overflow: hidden;
}

.card-image {
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.service-card:hover .card-image {
  transform: scale(1.06);
}

/* --- Hero Slideshow Ken Burns Transitions --- */
.hero-slide {
  transition: opacity 1.2s ease-in-out, transform 1.5s ease-in-out;
  transform-origin: center center;
}

.hero-slide.active-slide {
  opacity: 1 !important;
  transform: scale(1) !important;
  z-index: 2;
}

.hero-slide.inactive-slide {
  opacity: 0 !important;
  transform: scale(1.08) !important;
  z-index: 1;
}

/* Dynamic slider indicator pill-shape expansion */
.hero-indicator-dot {
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-indicator-dot.active-dot {
  background-color: var(--color-accent) !important;
  width: 20px !important;
}

/* --- Select Dropdown Options List Legibility Fix --- */
select,
select option,
.contact-input,
.contact-input option {
  background-color: #12161A !important; /* Enforce deep slate-charcoal */
  color: #FFFFFF !important;            /* Enforce crisp white text */
  color-scheme: dark !important;        /* Native browser picker dark mode override */
}

/* Active select focus state */
select:focus,
.contact-input:focus {
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 10px rgba(198, 166, 100, 0.25) !important;
}

/* --- Map Highlight Pulse Animation --- */
@keyframes map-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(198, 166, 100, 0.4);
    border-color: var(--color-accent);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(198, 166, 100, 0);
    border-color: var(--color-accent);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(198, 166, 100, 0);
    border-color: rgba(255, 255, 255, 0.1);
  }
}

.map-pulse {
  animation: map-pulse 1s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- Trusted Partners Logo SVG Transitions --- */
.amg-flame-yellow {
  fill: url(#logoGold);
  transition: fill 0.5s ease;
}
.group:hover .amg-flame-yellow {
  fill: #F59E0B;
}

.amg-flame-blue {
  fill: url(#logoGold);
  transition: fill 0.5s ease;
}
.group:hover .amg-flame-blue {
  fill: #1D4ED8;
}

.amg-flame-red {
  fill: url(#logoGold);
  transition: fill 0.5s ease;
}
.group:hover .amg-flame-red {
  fill: #EA580C;
}

.tg-stroke {
  stroke: url(#logoGold2);
  transition: stroke 0.5s ease;
}
.group:hover .tg-stroke {
  stroke: #009BE0;
}
.tg-fill {
  fill: url(#logoGold2);
  transition: fill 0.5s ease;
}
.group:hover .tg-fill {
  fill: #009BE0;
}
.tg-white-fill {
  fill: url(#logoGold2);
  transition: fill 0.5s ease;
}
.group:hover .tg-white-fill {
  fill: #FFFFFF;
}

/* --- Lightbox Overlay Zoom Animation & Transition --- */
#lightboxImg {
  transition: opacity 0.15s ease-in-out;
}

#lightboxOverlay {
  transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.lightbox-content {
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}



