@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* Color Variables & Saudi Desert Sand + White Theme Tokens */
:root {
  --bg-deep-desert: #FFFFFF;
  --bg-card-glass: rgba(255, 255, 255, 0.88);
  --bg-card-hover: #FFFFFF;
  --border-glass: rgba(212, 175, 55, 0.28);
  --border-glass-cyan: rgba(91, 193, 215, 0.35);
  --border-glass-bright: rgba(212, 175, 55, 0.7);

  --primary-blue: #4C64C4;
  --bright-cyan: #0EA5E9;
  --desert-gold: #D4AF37;
  --desert-sand: #B8860B;

  --text-white: #0F172A;
  --text-muted: #475569;

  --glow-sand: 0 8px 30px rgba(212, 175, 55, 0.2);
  --glow-cyan: 0 8px 30px rgba(14, 165, 233, 0.2);
  --glow-blue: 0 8px 30px rgba(76, 100, 196, 0.2);

  --font-ar: 'Tajawal', sans-serif;
  --font-en: 'Outfit', sans-serif;
}

/* Global Reset & Box Sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg-deep-desert);
  color: var(--text-white);
}

body {
  font-family: var(--font-ar);
  background-color: var(--bg-deep-desert);
  color: var(--text-white);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  cursor: default;
}

/* Hide default cursor on desktop ONLY for public non-admin pages */
@media (min-width: 768px) {
  body:not(.admin-body):not([class*="admin"]) {
    cursor: none !important;
  }

  body:not(.admin-body):not([class*="admin"]) a,
  body:not(.admin-body):not([class*="admin"]) button,
  body:not(.admin-body):not([class*="admin"]) input,
  body:not(.admin-body):not([class*="admin"]) select,
  body:not(.admin-body):not([class*="admin"]) textarea,
  body:not(.admin-body):not([class*="admin"]) .glass-panel {
    cursor: none !important;
  }
}

/* Explicitly restore native mouse cursors for Admin Dashboard & Login */
body.admin-body,
body.admin-body *,
body[class*="admin"],
body[class*="admin"] *,
.admin-body,
.admin-body * {
  cursor: auto !important;
}

body.admin-body a,
body.admin-body button,
body.admin-body select,
body.admin-body [role="button"],
body.admin-body input[type="submit"],
body.admin-body input[type="button"],
body[class*="admin"] a,
body[class*="admin"] button,
body[class*="admin"] select,
body[class*="admin"] [role="button"],
body[class*="admin"] input[type="submit"],
body[class*="admin"] input[type="button"] {
  cursor: pointer !important;
}

body.admin-body input[type="text"],
body.admin-body input[type="email"],
body.admin-body input[type="password"],
body.admin-body input[type="number"],
body.admin-body textarea,
body[class*="admin"] input[type="text"],
body[class*="admin"] input[type="email"],
body[class*="admin"] input[type="password"],
body[class*="admin"] input[type="number"],
body[class*="admin"] textarea {
  cursor: text !important;
}

/* Hide custom glowing cursor dots on Admin Dashboard */
body.admin-body .custom-cursor-dot,
body.admin-body .custom-cursor-ring,
body[class*="admin"] .custom-cursor-dot,
body[class*="admin"] .custom-cursor-ring {
  display: none !important;
}

/* RTL / LTR Font Assignment & Dynamic Responsive Text Alignment */
html[dir="rtl"] body {
  font-family: var(--font-ar);
  text-align: right;
}

html[dir="ltr"] body {
  font-family: var(--font-en);
  text-align: left;
}

/* Alignment Helper Classes */
.text-start {
  text-align: start !important;
}

.text-center {
  text-align: center !important;
}

.text-end {
  text-align: end !important;
}

/* Responsive Mobile & Tablet Alignment Engine */
@media (max-width: 768px) {
  .badge-glow {
    margin-left: auto;
    margin-right: auto;
  }

  /* Footer elements centering on mobile */
  footer .grid>div {
    display: flex;
    flex-direction: column;
    align-items: center !important;
    text-align: center !important;
  }

  footer img {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  footer ul {
    display: flex;
    flex-direction: column;
    align-items: center !important;
    text-align: center !important;
    width: 100%;
  }

  footer li {
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* Center cards & headings on mobile */
  .glass-panel.text-start {
    text-align: center !important;
  }

  .glass-panel.text-start .inline-flex,
  .glass-panel.text-start .pt-2,
  .glass-panel.text-start .pt-4 {
    justify-content: center !important;
    margin-left: auto;
    margin-right: auto;
  }

  /* Section header centering */
  .section-header,
  .hero-animate {
    text-align: center !important;
    justify-content: center !important;
  }
}

/* Mobile Typography & Text Distribution Optimization */
@media (max-width: 640px) {
  body {
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
  }

  h1,
  h2,
  h3 {
    letter-spacing: -0.01em;
    line-height: 1.35 !important;
  }

  p {
    line-height: 1.75 !important;
    font-size: 0.9375rem !important;
  }

  .glass-panel {
    padding: 1.25rem !important;
    border-radius: 1.25rem !important;
  }
}

/* 🌟 Ambient Dynamic Fluid Gradient Orbs (Gold, Royal Blue, Soft Cyan for White Theme) */
.bg-mesh-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-color: #FFFFFF;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.18;
  will-change: transform;
}

.bg-orb-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--desert-gold) 0%, rgba(212, 175, 55, 0) 70%);
  animation: floatOrb1 20s ease-in-out infinite alternate;
}

.bg-orb-2 {
  bottom: -15%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, var(--primary-blue) 0%, rgba(76, 100, 196, 0) 70%);
  animation: floatOrb2 25s ease-in-out infinite alternate;
}

.bg-orb-3 {
  top: 40%;
  left: 30%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, var(--bright-cyan) 0%, rgba(14, 165, 233, 0) 70%);
  animation: floatOrb3 22s ease-in-out infinite alternate;
}

@keyframes floatOrb1 {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(15vw, 12vh) scale(1.15);
  }

  100% {
    transform: translate(-8vw, 20vh) scale(0.9);
  }
}

@keyframes floatOrb2 {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-18vw, -15vh) scale(1.2);
  }

  100% {
    transform: translate(10vw, -10vh) scale(0.95);
  }
}

@keyframes floatOrb3 {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-12vw, 15vh) scale(1.25);
  }

  100% {
    transform: translate(15vw, -12vh) scale(0.85);
  }
}

/* 🖱️ Custom Interactive Glowing Animated Cursor for Light Theme */
.custom-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--primary-blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--primary-blue);
  transition: transform 0.05s ease, background 0.2s ease;
}

.custom-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--desert-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
  transition: transform 0.15s ease-out, width 0.3s ease, height 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.custom-cursor-ring.cursor-hover {
  width: 65px;
  height: 65px;
  border-color: var(--primary-blue);
  background: rgba(76, 100, 196, 0.08);
  box-shadow: 0 0 25px rgba(76, 100, 196, 0.3);
}

/* Sizing via rem and vw for Zero Overlapping Responsive Artistry */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02vw;
  color: var(--text-white);
}

h1 {
  font-size: clamp(2.2rem, 4.5vw, 4.2rem);
}

h2 {
  font-size: clamp(1.8rem, 3.2vw, 3.0rem);
}

h3 {
  font-size: clamp(1.4rem, 2.2vw, 2.0rem);
}

h4 {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
}

p {
  font-size: clamp(0.95rem, 1.15vw, 1.15rem);
  color: var(--text-muted);
}

/* Glassmorphism Components for White Theme with Ultra High Contrast */
.glass-panel {
  position: relative;
  z-index: 10;
  background: var(--bg-card-glass);
  backdrop-filter: blur(1.2rem);
  -webkit-backdrop-filter: blur(1.2rem);
  border: 1px solid var(--border-glass);
  border-radius: 1.25rem;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 4px 12px -2px rgba(212, 175, 55, 0.08);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: #0F172A;
}

/* Force dark readable typography on all light background cards & glass panels */
.glass-panel,
.bg-white,
.bg-slate-50,
.bg-slate-100 {
  color: #0F172A;
}

.glass-panel p,
.bg-white p,
.bg-slate-50 p {
  color: #334155;
}

.glass-panel h1,
.glass-panel h2,
.glass-panel h3,
.glass-panel h4,
.glass-panel h5,
.glass-panel h6,
.bg-white h1,
.bg-white h2,
.bg-white h3,
.bg-white h4,
.bg-white h5,
.bg-white h6 {
  color: #0F172A;
}

/* Contrast override for faint white/grey text utilities inside light cards */
.glass-panel .text-white:not(.btn-primary *):not(.badge-glow *):not(.bg-slate-900 *):not(.bg-slate-800 *):not(.bg-blue-600 *):not(.bg-emerald-600 *),
.glass-panel .text-slate-300:not(.btn-primary *),
.glass-panel .text-slate-400:not(.btn-primary *),
.glass-panel .text-gray-300:not(.btn-primary *),
.glass-panel .text-gray-400:not(.btn-primary *),
.glass-panel .text-slate-200:not(.btn-primary *),
.glass-panel .text-white\/60,
.glass-panel .text-white\/70,
.glass-panel .text-white\/80 {
  color: #334155 !important;
}

/* Headings inside glass-panel */
.glass-panel h1.text-white,
.glass-panel h2.text-white,
.glass-panel h3.text-white,
.glass-panel h4.text-white,
.glass-panel h1.text-slate-300,
.glass-panel h2.text-slate-300,
.glass-panel h3.text-slate-300 {
  color: #0F172A !important;
}

.glass-panel:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass-bright);
  box-shadow: 0 20px 40px -10px rgba(76, 100, 196, 0.12), 0 8px 24px -4px rgba(212, 175, 55, 0.25);
  transform: translateY(-0.3rem);
  color: #0F172A;
}

.glass-panel:hover p {
  color: #1E293B !important;
}

.glass-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(1.5rem);
  -webkit-backdrop-filter: blur(1.5rem);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.glass-nav-item {
  position: relative;
  color: var(--text-white);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

.glass-nav-item:hover,
.glass-nav-item.active {
  color: var(--desert-sand);
}

.glass-nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--desert-gold), var(--primary-blue));
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 99px;
}

.glass-nav-item:hover::after,
.glass-nav-item.active::after {
  width: 80%;
}

/* Gradient Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.9rem 2.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--primary-blue) 0%, #2563EB 50%, var(--desert-gold) 100%);
  color: #FFFFFF !important;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(76, 100, 196, 0.3);
  transition: all 0.35s ease;
}

.btn-primary:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.5);
  color: #FFFFFF !important;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 2rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 9999px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-white);
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(0.8rem);
  transition: all 0.35s ease;
}

.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: var(--desert-gold);
  color: var(--desert-sand);
}

/* Badge Styling */
.badge-glow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.2rem;
  border-radius: 9999px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.12), rgba(14, 165, 233, 0.12));
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--desert-sand);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

/* Horizontal Infinite Marquee Carousel */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 1.5rem 0;
}

.marquee-track {
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: marquee 35s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

html[dir="rtl"] .marquee-track {
  animation-direction: reverse;
}

/* Fast Mobile Marquee Carousel for Clients */
.client-fast-marquee-track {
  display: flex;
  gap: 0.85rem;
  width: max-content;
  animation: clientMarqueeSmooth 16s linear infinite !important;
  will-change: transform;
}

.client-fast-marquee-track-reverse {
  display: flex;
  gap: 0.85rem;
  width: max-content;
  animation: clientMarqueeReverseSmooth 16s linear infinite !important;
  will-change: transform;
}

@keyframes clientMarqueeSmooth {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes clientMarqueeReverseSmooth {
  0% {
    transform: translate3d(-50%, 0, 0);
  }

  100% {
    transform: translate3d(0, 0, 0);
  }
}

html[dir="rtl"] .client-fast-marquee-track {
  animation: clientMarqueeSmoothRTL 16s linear infinite !important;
}

html[dir="rtl"] .client-fast-marquee-track-reverse {
  animation: clientMarqueeReverseSmoothRTL 16s linear infinite !important;
}

@keyframes clientMarqueeSmoothRTL {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(50%, 0, 0);
  }
}

@keyframes clientMarqueeReverseSmoothRTL {
  0% {
    transform: translate3d(50%, 0, 0);
  }

  100% {
    transform: translate3d(0, 0, 0);
  }
}

.logo-card-frame-mobile {
  width: 8rem;
  height: 4.8rem;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  border-radius: 0.9rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
  overflow: hidden;
}

.logo-card-frame-mobile img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.25rem;
}

/* High-Contrast Client Logo Frame */
.logo-card-frame {
  width: 11.5rem;
  height: 6.8rem;
  padding: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 2px solid rgba(212, 175, 55, 0.35);
  border-radius: 1.15rem;
  transition: all 0.35s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.logo-card-frame:hover {
  border-color: var(--primary-blue);
  box-shadow: 0 10px 25px rgba(76, 100, 196, 0.2);
  transform: translateY(-0.25rem) scale(1.05);
}

.logo-card-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.5rem;
  transition: transform 0.35s ease;
}

.logo-card-frame:hover img {
  transform: scale(1.06);
}

/* Partner Logo Card Frame */
.partner-logo-frame {
  width: 13.5rem;
  height: 7.8rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 2.5px solid var(--desert-gold);
  border-radius: 1.25rem;
  transition: all 0.35s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), var(--glow-sand);
  overflow: hidden;
}

.partner-logo-frame:hover {
  border-color: var(--primary-blue);
  box-shadow: 0 12px 30px rgba(76, 100, 196, 0.25);
  transform: translateY(-0.3rem) scale(1.06);
}

.partner-logo-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.5rem;
}

/* Mobile Fullscreen Overlay */
.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(2rem);
  -webkit-backdrop-filter: blur(2rem);
  display: flex;
  flex-direction: column;
  padding: 6rem 2rem 3rem 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Accordion Transition */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
}

.accordion-content.open {
  max-height: 25rem;
  transition: max-height 0.4s ease-in-out;
}

/* Sticky Floating Action Bar for Mobile */
.mobile-floating-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(5rem);
  z-index: 90;
  width: 90%;
  max-width: 28rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(1.5rem);
  border: 1px solid var(--border-glass-bright);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), var(--glow-sand);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-floating-bar.visible {
  transform: translateX(-50%) translateY(0);
}

/* Transparent News Ticker */
.hero-ticker-wrap {
  width: 100%;
  overflow: hidden;
  position: relative;
  background: transparent;
  padding: 1.25rem 0;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.hero-ticker-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  gap: 3.5rem;
  will-change: transform;
  animation: heroTickerSlide 18s linear infinite;
}

.hero-ticker-track:hover {
  animation-play-state: paused;
}

@keyframes heroTickerSlide {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

html[dir="rtl"] .hero-ticker-track {
  animation: heroTickerSlideRtl 18s linear infinite;
}

@keyframes heroTickerSlideRtl {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(50%);
  }
}

.hero-ticker-item {
  font-size: 1.2rem;
  font-weight: 800;
  color: #B8860B;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.hero-ticker-item:hover {
  color: #4C64C4;
}

@media (min-width: 640px) {
  .hero-ticker-item {
    font-size: 1.5rem;
  }
}

/* Desktop Services Dropdown Hover & Explicit Show State */
#desktop-services-dropdown:hover #desktop-services-menu,
#desktop-services-dropdown:focus-within #desktop-services-menu,
#desktop-services-menu:hover,
#desktop-services-menu.is-open {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

#desktop-services-dropdown:hover #desktop-services-chevron {
  transform: rotate(180deg) !important;
}