*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
}

main {
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-ar);
  font-size: 16px;
  line-height: 1.75;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

h1, h2, h3, h4, h5, h6, p {
  margin-block-start: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.25;
  color: var(--navy);
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.8rem);
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.5rem);
  line-height: 1.3;
}

h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  line-height: 1.4;
}

p {
  max-width: 72ch;
  color: var(--ink-secondary);
}

.container {
  width: min(calc(100% - 2.5rem), var(--container));
  margin-inline: auto;
}

.narrow {
  max-width: var(--narrow);
}

.section {
  padding-block: clamp(4rem, 7vw, 6.5rem);
  position: relative;
}

.section-head {
  max-width: 820px;
  margin-block-end: 2.75rem;
}

.section-head.center {
  text-align: center;
  margin-inline: auto;
}

.section-head.inline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  max-width: none;
}

/* Eyebrow & Badges */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--emerald-dark);
  background: var(--emerald-soft);
  border: 1px solid var(--emerald-border);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-block-end: 1rem;
  width: fit-content;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  background: var(--emerald);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 3px var(--emerald-glow);
}

.lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--muted);
  line-height: 1.7;
}

.muted {
  color: var(--muted-light);
}

.disclaimer {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  inset-block-start: 0.75rem;
  inset-inline-start: 0.75rem;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transform: translateY(-200%);
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: none;
}

/* ==========================================================================
   BUTTONS (أزرار زجاجية رشيقة وشفافة قليلاً - Compact Translucent Glass Buttons)
   ========================================================================== */
.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn:active {
  transform: scale(0.97);
}

/* Primary Button: Translucent Emerald Glass with Luminous Edge */
.btn-primary {
  background: linear-gradient(135deg, rgba(0, 185, 122, 0.82) 0%, rgba(0, 150, 98, 0.80) 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.38) !important;
  box-shadow: 0 4px 12px -2px rgba(0, 176, 116, 0.35), 0 2px 5px rgba(0, 0, 0, 0.05), inset 0 1px 1.5px rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgba(0, 204, 137, 0.92) 0%, rgba(0, 168, 110, 0.90) 100%) !important;
  border-color: rgba(255, 255, 255, 0.65) !important;
  box-shadow: 0 6px 20px -2px rgba(0, 176, 116, 0.45), 0 3px 8px rgba(0, 0, 0, 0.08), inset 0 1.5px 2px rgba(255, 255, 255, 0.8) !important;
  transform: translateY(-1.5px) scale(1.015);
  color: #ffffff !important;
}

/* Secondary Button: Translucent Frosted Crystal Glass */
.btn-secondary {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  color: var(--navy) !important;
  box-shadow: 0 4px 12px -2px rgba(6, 30, 49, 0.06), 0 2px 5px rgba(0, 0, 0, 0.03), inset 0 1px 1.5px rgba(255, 255, 255, 0.9) !important;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(0, 176, 116, 0.4) !important;
  color: var(--emerald-dark) !important;
  transform: translateY(-1.5px) scale(1.015);
  box-shadow: 0 6px 18px -2px rgba(6, 30, 49, 0.1), inset 0 1px 2px rgba(255, 255, 255, 1) !important;
}

/* Ghost Button */
.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid transparent;
  color: var(--navy);
}

.btn-ghost:hover {
  background: rgba(0, 176, 116, 0.08);
  border-color: rgba(0, 176, 116, 0.2);
  color: var(--emerald-dark);
}

/* Glass Button for Hero & Dark Overlays */
.btn-glass {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16), inset 0 1px 1.5px rgba(255, 255, 255, 0.4);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

/* Outline White for Dark Sections */
.btn-outline-white {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.btn-outline-white:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--navy);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.25);
}

.btn-lg {
  min-height: 54px;
  padding: 0.9rem 1.85rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  min-height: 38px;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Focus Visible */
.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
}

/* Dark Navy Section Styles */
.navy-section {
  background: var(--navy);
  color: #ffffff;
}

.navy-section h1,
.navy-section h2,
.navy-section h3 {
  color: #ffffff;
}

.navy-section p {
  color: #c5d5e2;
}

.navy-section .eyebrow {
  background: rgba(0, 176, 116, 0.15);
  border-color: rgba(0, 176, 116, 0.35);
  color: #6ee7b7;
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   SAFE & HIGH-PERFORMANCE SEO REVEAL ANIMATIONS
   ========================================================================== */
body, main {
  overflow-x: clip;
}

.reveal-on-scroll {
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0s);
}

@media (min-width: 769px) {
  .reveal-on-scroll {
    opacity: 0.88;
    transform: translateY(8px);
  }
  .reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   ALTERNATING SECTION SCROLL ANIMATIONS (حركة الأقسام بالتبادل يميناً ويساراً)
   ========================================================================== */
.section-enter-right {
  opacity: 0;
  transform: translateX(48px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.section-enter-left {
  opacity: 0;
  transform: translateX(-48px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.section-enter-active {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

@media (prefers-reduced-motion: reduce) {
  .section-enter-right,
  .section-enter-left {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   GLOBAL RAISED 3D GLASSMORPHIC BOXES (بوكسات زجاجية بارزة ثلاثية الأبعاد)
   ========================================================================== */
.glass-box-raised,
.opportunity-card,
.service-card,
.stat-box,
.seller-card,
.thesis-grid > div,
.calc-card,
.lead-form,
.faq-list details,
.detail-panel,
.step-card {
  background: rgba(255, 255, 255, 0.86) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 
    0 14px 36px -4px rgba(6, 30, 49, 0.08),
    0 4px 12px -2px rgba(6, 30, 49, 0.04),
    inset 0 1.5px 1.5px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 1px 0 rgba(0, 0, 0, 0.02) !important;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease !important;
}

.glass-box-raised:hover,
.opportunity-card:hover,
.service-card:hover,
.stat-box:hover,
.seller-card:hover,
.thesis-grid > div:hover,
.detail-panel:hover,
.step-card:hover {
  transform: translateY(-6px) scale(1.008) !important;
  border-color: rgba(0, 176, 116, 0.35) !important;
  box-shadow: 
    0 22px 50px -8px rgba(6, 30, 49, 0.15),
    0 8px 18px -4px rgba(6, 30, 49, 0.07),
    inset 0 1.5px 2px 0 rgba(255, 255, 255, 1) !important;
}

/* Final Action Choice Boxes (بوكسات الاختيار النهائي — مينت جرين فاتح فاخر) */
.final-choice-card,
.final-choice-card.alt,
.final-choice article {
  background: linear-gradient(145deg, #f0fdf4 0%, #e6f9f0 100%) !important;
  border: 1.5px solid rgba(0, 176, 116, 0.28) !important;
  box-shadow: 
    0 12px 32px -6px rgba(0, 176, 116, 0.14),
    0 4px 12px -2px rgba(6, 30, 49, 0.04),
    inset 0 1.5px 1.5px 0 rgba(255, 255, 255, 0.95) !important;
  border-radius: var(--radius-2xl) !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease !important;
}

.final-choice-card:hover,
.final-choice-card.alt:hover,
.final-choice article:hover {
  transform: translateY(-4px) scale(1.008) !important;
  border-color: rgba(0, 176, 116, 0.5) !important;
  box-shadow: 
    0 18px 40px -6px rgba(0, 176, 116, 0.22),
    inset 0 1.5px 2px 0 rgba(255, 255, 255, 1) !important;
}

.final-choice-card h2 {
  color: #032117 !important;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem) !important;
  font-weight: 800 !important;
  margin-block-end: 0.5rem !important;
}

.final-choice-card p,
.final-choice-card .lead {
  color: #164e3f !important;
  font-size: 0.92rem !important;
  line-height: 1.62 !important;
  margin-block-end: 1.35rem !important;
}

.final-choice-card .btn {
  min-height: 36px !important;
  padding: 0.42rem 1.15rem !important;
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  margin-block-start: auto;
}

/* Buyer Card: Restored to Deep Luxury Navy (كحلي فاخر) with Mint Accent */
.buyer-card {
  background: linear-gradient(180deg, #072237 0%, #041624 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-top: 4px solid #34d399 !important;
  color: #ffffff !important;
  box-shadow: 0 18px 45px -8px rgba(0, 0, 0, 0.5), inset 0 1px 1px 0 rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

.buyer-card:hover {
  transform: translateY(-6px) scale(1.008) !important;
  border-color: rgba(114, 240, 183, 0.5) !important;
  box-shadow: 0 24px 55px -8px rgba(0, 0, 0, 0.65), 0 0 25px rgba(0, 176, 116, 0.25), inset 0 1px 2px 0 rgba(255, 255, 255, 0.3) !important;
}

.buyer-card .dual-card-title {
  color: #ffffff !important;
}

.buyer-card .dual-card-desc {
  color: #b0c4d4 !important;
}

.buyer-card .dual-feature-list li span {
  color: #e2e8f0 !important;
}

.buyer-card .dual-feature-list li span strong {
  color: #72f0b7 !important;
}

/* Dark Section Glass Raised Cards */
.navy-section .glass-box-raised,
.navy-section .stat-box,
.navy-section .thesis-grid > div {
  background: rgba(255, 255, 255, 0.07) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 
    0 20px 48px -8px rgba(0, 0, 0, 0.4),
    inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.25) !important;
}

.navy-section .glass-box-raised:hover,
.navy-section .stat-box:hover,
.navy-section .thesis-grid > div:hover {
  border-color: rgba(114, 240, 183, 0.4) !important;
  box-shadow: 
    0 26px 60px -8px rgba(0, 0, 0, 0.55),
    0 0 20px rgba(0, 176, 116, 0.25),
    inset 0 1px 2px 0 rgba(255, 255, 255, 0.4) !important;
}

