/*
 * Main theme stylesheet.
 *
 * نظام الألوان، الطباعة، والتباعد.
 *
 * - تحميل خط Sofia Pro من CDN ليصبح الخط الافتراضي في الثيم.
 * - يمكن استبدال المصدر المحلي إذا أردت رفع الخط على الخادم.
 */

@import url('fonts.css');

:root {
  /* === Official Brand Colors === */
  --color-ultramarine-blue: #1658FF; /* Primary */
  --color-persian-blue: #3C23D7; /* Secondary */
  --color-pastel-blue: #8CB4FF; /* Accent */
  --color-iceberg-blue: #EFEBFF; /* Surface/Background */

  /* === Theme Mapping === */
  --color-primary: var(--color-ultramarine-blue);
  --color-primary-2: var(--color-iceberg-blue);
  --color-secondary: var(--color-persian-blue);
  --color-secondary-2: var(--color-pastel-blue);

  --bs-primary: var(--color-ultramarine-blue);
  --bs-primary-rgb: 22, 88, 255;
  --bs-secondary: var(--color-persian-blue);
  --bs-secondary-rgb: 60, 35, 215;

  /* Typography */
  --font-family-base: "DIN Next LT Arabic", "Sofia Pro", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Spacing / line-height */
  --line-height-body: 1.45; /* 145% */
  --line-height-heading: 1.16; /* ~116% */

  /* Letter spacing (tracking) */
  --tracking-tight: 0.02em;
  --tracking-wide: 0.12em;
}

/* Logo Sizing */
.custom-logo-link img,
.navbar-brand img,
.footer-logo img {
  max-height: 80px;
  width: auto;
  object-fit: contain;
  display: block;
}

@media (max-width: 991px) {
  .custom-logo-link img,
  .navbar-brand img {
    max-height: 60px;
  }
}

html {
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-regular);
  font-size: 16px;
  line-height: var(--line-height-body);
  color: #111;
  background-color: var(--color-primary-2);
}

body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  direction: rtl;
  font-family: var(--font-family-base);
  background-color: var(--color-iceberg-blue, #EFEBFF) !important; /* Main Body background */
}

.site-main {
  background-color: var(--color-iceberg-blue, #EFEBFF) !important;
}


header.site-header {
  width: 100%;
  position: sticky;
  top: 0;
  margin-top: 0 !important;
  z-index: 1050;
  transition: all 0.3s ease;
}

.header-is-sticky {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.header-bg-dark {
  background-color: var(--color-primary); /* Persian blue for top bar */
}

#main-nav.header-bg-dark {
  background-color: var(--color-primary); /* Ultramarine blue for main nav */
}

.text-brand-accent {
  color: var(--color-primary) !important; /* Primary color for light backgrounds */
}

.top-bar .text-brand-accent {
  color: var(--color-pastel-blue) !important; /* Pastel blue for dark backgrounds */
}

.btn-brand-accent {
  background-color: #ffffff;
  color: var(--color-primary) !important;
  transition: all 0.3s ease;
}

.btn-brand-accent:hover {
  background-color: var(--color-iceberg-blue);
  color: var(--color-secondary) !important;
}

.hover-white {
  transition: color 0.3s ease;
}

.hover-white:hover {
  color: #ffffff !important;
}

.hover-brand-accent {
  transition: color 0.3s ease;
}

.hover-brand-accent:hover {
  color: var(--color-pastel-blue) !important;
}

.custom-nav-menu .nav-link {
  color: #ffffff !important;
  font-weight: 500;
  font-size: 1.05rem;
  padding: 1.5rem 1rem !important;
  transition: color 0.3s ease;
}

.custom-nav-menu .nav-link:hover {
  color: var(--color-pastel-blue) !important;
}

/* Middle Bar Icons */
.middle-bar-info .info-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

#main-nav {
  width: 100%;
  transition: all 0.3s ease;
}

.top-nav-bar {
  max-height: 50px; /* Adjust to approximate height */
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, padding 0.3s ease;
  z-index: 1041;
  position: relative;
  background-color: #fff;
}

.top-bar-hidden {
  max-height: 0 !important;
  opacity: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  pointer-events: none;
}

.transition-all {
  transition: all 0.3s ease;
}

.hover-primary:hover {
  color: var(--color-primary) !important;
}

/* Mobile Nav Adjustments */
@media (max-width: 991px) {
  .bg-dark-blue-mobile {
    background-color: var(--color-primary);
    padding: 1rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1045;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .custom-nav-menu .nav-link {
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
}

/* Immersive Parallax Section */
.immersive-parallax-container {
  position: relative;
}

.immersive-sticky-wrapper {
  position: relative;
  height: 150vh; /* Control the scroll distance for the sticky part */
}

.immersive-image-layer {
  position: sticky;
  top: 12px;
  height: calc(100vh - 24px);
  background-size: cover;
  background-position: center;
  z-index: 0;
  will-change: transform;
  transform-origin: center center;
}

.immersive-overlay {
  position: absolute;
  inset: 0;
  will-change: opacity;
}

.immersive-text-layer {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity;
  margin-top: -100vh; /* Pull it back up over the image layer */
}

.immersive-heading {
  max-width: 900px;
  line-height: 1.1;
}

@media (max-width: 768px) {
  .immersive-heading {
    font-size: 3rem;
  }
}

.rounded-3xl {
  border-radius: 1.5rem;
}

.text-neutral-600 {
  color: #525252;
}

.bg-neutral-900 {
  background-color: #171717 !important;
  color: white !important;
}

.hover\:bg-neutral-700:hover {
  background-color: #404040 !important;
}

/* Grid helper for the example content */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .md\:grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .md\:col-span-4 {
    grid-column: span 4 / span 4;
  }
  .md\:col-span-8 {
    grid-column: span 8 / span 8;
  }
  .md\:text-7xl {
    font-size: 4.5rem;
    line-height: 1;
  }
  .md\:text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
}

.gap-8 {
  gap: 2rem;
}

.max-w-5xl {
  max-width: 64rem;
}

.pb-24 {
  padding-bottom: 6rem;
}

.pt-12 {
  padding-top: 3rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Project Foundation Section */
.project-foundation-section {
  background-color: #ffffff;
  position: relative;
  z-index: 5;
}

.bg-primary-soft {
  background-color: var(--color-iceberg-blue); /* Uses official Iceberg Blue */
}

.foundation-icon-box {
  width: 48px;
  height: 48px;
  background: #f8fafc;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(22, 88, 255, 0.08);
  transition: all 0.3s ease;
}

.foundation-item:hover .foundation-icon-box {
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(22, 88, 255, 0.15);
  transform: translateY(-3px);
}

.result-card {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(22, 88, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Symmetrical List Layouts (Optimized for RTL) */
.foundation-item {
  display: flex !important;
  flex-direction: row !important; /* Always Icon Right, Text Left in RTL */
  text-align: right;
  align-items: flex-start;
}

.foundation-icon-box {
  margin-left: 1.25rem !important; /* Margin on the left of the icon to push text */
  margin-right: 0 !important;
}



.result-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

footer.site-footer {
  background-color: var(--color-primary);
  color: #ffffff;
  padding: 6rem 0 4rem;
  border-top: none;
}

.footer-heading {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 2rem;
}

.footer-links li {
  margin-bottom: 0.875rem;
}

.footer-links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 1.1rem;
  transition: opacity 0.2s ease;
  opacity: 0.9;
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: none;
}

.footer-tagline {
  line-height: 1.8;
  font-size: 1rem;
  max-width: 320px;
  color: rgba(255, 255, 255, 0.8) !important;
}

.footer-social-link {
  color: #ffffff !important;
  transition: opacity 0.3s ease;
  font-size: 1.5rem;
  opacity: 0.85;
  background: transparent;
  width: auto;
  height: auto;
  border-radius: 0;
}

.footer-social-link:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.footer-contact li {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
}

.footer-contact li i {
  font-size: 1.25rem;
  color: #ffffff;
}

.footer-brand p {
  font-size: 1rem;
  line-height: 1.8;
}

.footer-logo span {
  transition: color 0.3s ease;
}

.footer-logo:hover span.text-brand-accent {
  color: #ffffff !important;
}


.footer-bottom {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-logo-box {
  transition: transform 0.3s ease;
}

.footer-logo-box:hover {
  transform: rotate(-10deg) scale(1.1);
}

@property --aurora-color {
  syntax: '<color>';
  initial-value: #1658FF;
  inherits: false;
}

.aurora-hero {
  --aurora-color: #1658FF; /* Dynamic color variable */
  background-color: #020617;
  background-image: radial-gradient(125% 125% at 50% 0%, #020617 50%, var(--aurora-color));
  color: #f8fafc;
}

#hero-stars {
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.aurora-badge {
  background-color: rgba(71, 85, 105, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.aurora-title {
  background: linear-gradient(to bottom right, #ffffff 40%, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  max-width: 900px;
  line-height: 1.15;
}

.btn-aurora-primary {
  --btn-glow: var(--aurora-color);
  background-color: rgba(2, 6, 23, 0.1);
  color: #f8fafc;
  border: 1px solid var(--btn-glow);
  box-shadow: 0px 4px 24px var(--btn-glow);
  font-weight: 500;
  border-radius: 9999px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-aurora-primary:hover {
  background-color: rgba(2, 6, 23, 0.5);
  transform: scale(1.02);
  color: #fff;
  box-shadow: 0px 8px 32px var(--btn-glow);
}

.btn-aurora-secondary {
  background-color: transparent;
  color: #94a3b8;
  border: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.btn-aurora-secondary:hover {
  color: #fff;
}

.place-content-center {
  place-content: center;
}

.z-10 { z-index: 10; }
.z-0 { z-index: 0; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }



h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-base);
  line-height: var(--line-height-heading);
  font-weight: var(--font-weight-bold);
}

p {
  line-height: var(--line-height-body);
  margin-bottom: 1.25em;
}

/* Base theme color & typography overrides */
body {
  color: rgba(30, 30, 30, 0.95);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

a:hover,
a:focus {
  color: var(--color-secondary);
  text-decoration: underline;
}

.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #fff;
}

.btn-outline-light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-outline-light:hover,
.btn-outline-light:focus {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.9);
}

/* Utility helpers */
.text-primary {
  color: var(--color-primary) !important;
}

.bg-primary {
  background-color: var(--color-primary) !important;
}

.text-secondary {
  color: var(--color-secondary) !important;
}

.bg-secondary {
  background-color: var(--color-secondary) !important;
}

.bg-neutral {
  background-color: var(--color-primary-2) !important;
}

/* Premium Spacing Utilities */
.py-8 {
  padding-top: 5rem !important;
  padding-bottom: 5rem !important;
}

.py-10 {
  padding-top: 6.5rem !important;
  padding-bottom: 6.5rem !important;
}

.py-12 {
  padding-top: 8rem !important;
  padding-bottom: 8rem !important;
}

/* Smart Section Spacing: collapse padding between adjacent sections of the same color */
section.bg-white + section.bg-white.py-8,
section.bg-white + section.bg-white.py-10,
section.bg-light + section.bg-light.py-8,
section.bg-light + section.bg-light.py-10 {
  padding-top: 0rem !important;
}

@media (max-width: 991px) {
  .py-8 {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }
  .py-10 {
    padding-top: 4.5rem !important;
    padding-bottom: 4.5rem !important;
  }
  .py-12 {
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
  }
}

/* Dynamic Block Area */
.site-main-content {
  padding-top: 0;
  padding-bottom: 0;
  background-color: var(--color-iceberg-blue, #EFEBFF) !important;
}

.site-main {
  background-color: var(--color-iceberg-blue, #EFEBFF) !important;
}

.site-main-content > *:last-child {
  margin-bottom: 0;
}

/* Services Page Hero */
.services-hero-section {
  background: linear-gradient(135deg, rgba(239, 235, 255, 0.4) 0%, rgba(255, 255, 255, 0.8) 100%);
  position: relative;
}

.services-hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: radial-gradient(circle at 10% 20%, rgba(22, 88, 255, 0.03) 0%, transparent 40%);
  pointer-events: none;
}

.bg-iceberg {
  background-color: var(--color-iceberg-blue) !important;
}

.services-hero-image-wrapper {
  padding: 1.5rem;
  perspective: 1000px;
}

.hero-image-backdrop {
  position: absolute;
  top: 15%;
  left: 10%;
  width: 80%;
  height: 80%;
  background: var(--color-primary);
  opacity: 0.1;
  filter: blur(60px);
  border-radius: 50%;
  z-index: 0;
}

.services-hero-img {
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform: rotateY(-5deg) rotateX(5deg);
}

.services-hero-image-wrapper:hover .services-hero-img {
  transform: rotateY(0deg) rotateX(0deg) scale(1.02);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.12);
}

.shadow-2xl {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.hover-up {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-up:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(22, 88, 255, 0.2) !important;
}

@media (max-width: 991px) {
  .services-hero-section h1 {
    font-size: 2.5rem;
  }
}

/* --- Services Hub Grid & Cards --- */
.services-hub-grid {
  margin-top: -50px; /* Overlap with intro section slightly as in design */
  position: relative;
  z-index: 10;
}

.hub-service-card {
  position: relative;
  height: 450px;
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: block;
  text-decoration: none !important;
}

.hub-service-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 25px 50px rgba(0, 82, 255, 0.3);
}

.hub-service-card .card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}

.hub-service-card:hover .card-bg {
  transform: scale(1.1);
}

.hub-service-card .card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(22, 88, 255, 0.1) 0%, rgba(22, 88, 255, 0.8) 100%);
  opacity: 0.85;
  transition: opacity 0.4s ease;
}

.hub-service-card:hover .card-overlay {
  opacity: 0.95;
  background: linear-gradient(180deg, rgba(60, 35, 215, 0.2) 0%, rgba(60, 35, 215, 0.9) 100%);
}

.hub-service-card .card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: #fff;
  z-index: 5;
}

.hub-service-card .card-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 1rem;
  backdrop-filter: blur(4px);
}

.hub-service-card .card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.hub-service-card .card-btn {
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.hub-service-card:hover .card-btn {
  opacity: 1;
  transform: translateY(0);
}

/* Service Info Section */
.service-info-row {
  background: #fff;
  border-radius: 30px;
  padding: 4rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.05);
}

/* RTL Adjustments for Arrows */
[dir="rtl"] .bi-arrow-left::before {
  content: "\f12f"; /* bi-arrow-right */
}

/* Remove hardcoded white background from Gutenberg block wrapper sections to let theme background show */
[class*="wp-block-almorabba-"].bg-white {
    background-color: transparent !important;
}
