/* =========================================
   DESIGN TOKENS (Global Design System)
========================================= */

html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

html[dir="ltr"] body {
  direction: ltr;
  text-align: left;
}

/*   .phone-float */

html[dir="rtl"] #hero .phone-float {
  right: auto;
  left: -36px;
  bottom: -90px;
}

@media (min-width: 640px) {
  html[dir="rtl"] #hero .phone-float {
    left: -32px;
    bottom: -100px;
  }
}

@media (min-width: 768px) {
  html[dir="rtl"] #hero .phone-float {
    left: -40px;
    bottom: -105px;
  }
}

html, body {
  overflow-x: hidden;
}

/* ===== Global Page Styles (merged) ===== */

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  color: #0f172a;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--color-bg, #f8fafc); /* لون فاتح ثابت تحت خالص */
}

/* Soft animated page background */

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 0% 0%,   #f9e7ff 0,  transparent 55%),
    radial-gradient(circle at 100% 0%, #dbeafe 0, transparent 55%),
    radial-gradient(circle at 0% 100%, #bfdbfe 0, transparent 55%),
    radial-gradient(circle at 100% 100%, #e0f2fe 0, transparent 55%);
  filter: blur(10px);
  background-size: 140% 140%;
  animation: bgMove 18s ease-in-out infinite alternate;
}

@keyframes bgMove {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%;
  }
  50% {
    transform: translate3d(0, -25px, 0) scale(1.04);
    background-position: 20% 10%, 80% 0%, 0% 80%, 90% 90%;
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1.06);
    background-position: 0% 20%, 100% 10%, 10% 100%, 80% 100%;
  }
}

:root {
  /* SPACING */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  /* RADIUS */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* TIMING & EASING */
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;
  --dur-slower: 700ms;
  --reveal-dur: 0.75s;

  --ease-smooth: cubic-bezier(.22,.61,.36,1);
  --ease-bounce: cubic-bezier(.2,1,.2,1);

  /* COLORS – base */
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-dark: #020617;
  --color-slate-900: #0f172a;
  --color-slate-700: #334155;
  --color-slate-500: #64748b;
  --color-slate-400: #94a3b8;

  --color-primary: #0ea5e9;
  --color-primary-deep: #0b2e75;
  --color-accent: #22c55e;

  /* SHADOW HELPERS */
  --shadow-dark-soft: rgba(2,6,23,0.12);
  --shadow-dark-medium: rgba(2,6,23,0.16);
  --shadow-slate-soft: rgba(15,23,42,0.6);
  --shadow-slate-strong: rgba(15,23,42,0.75);

  --shadow-sm: 0 10px 30px -18px var(--shadow-slate-soft);
  --shadow-md: 0 18px 40px -20px rgba(34,197,94,0.85);
  --shadow-lg: 0 26px 50px -18px var(--shadow-dark-medium);

  /* REVEAL DEFAULTS */
  --rv-offset-y: 22px;
  --rv-scale: 0.98;
  --rv-blur: 4px;
}

/*  
   KHELIJ LANDING – HERO & SERVICES STYLES
   (no conflicts with design tokens system)
 */

/*  HERO ANIMATIONS & SHAPES   */

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.gradient-text {
  background: linear-gradient(
    90deg,
    #0f172a,
    #0ea5e9,
    #4f46e5,
    #0f172a
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 4s ease infinite;
  filter: drop-shadow(0 0 8px rgba(15, 23, 42, 0.25));
}

@keyframes phone-swing {
  0%, 100% { transform: translateX(0) rotate(-2deg); }
  25%      { transform: translateX(-10px) rotate(-5deg); }
  75%      { transform: translateX(10px)  rotate(1deg);  }
}
.phone-float {
  animation: phone-swing 4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1;   transform: scale(1);   }
  50%      { opacity: 0.6; transform: scale(1.2); }
}
.hero-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes blob-1 {
  0%, 100% { transform: translate(0, 0) scale(1);   }
  33%      { transform: translate(30px, -50px) scale(1.1); }
  66%      { transform: translate(-20px, 20px) scale(0.9); }
}
@keyframes blob-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-30px, 40px) scale(0.9); }
  66%      { transform: translate(20px, -30px) scale(1.1); }
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  will-change: transform, opacity;
}

.hero-blob-1 {
  width: 420px;
  height: 420px;
  background: linear-gradient(45deg, var(--khelij-blue-light, #1ea3ff), #6366f1);
  top: -80px;
  left: -80px;
  animation: blob-1 10s ease-in-out infinite;
}

.hero-blob-2 {
  width: 360px;
  height: 360px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  bottom: -40px;
  right: -40px;
  animation: blob-2 12s ease-in-out infinite;
}

.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(56, 189, 248, 0.5);
  border-radius: 50%;
  animation: particle-float 15s linear infinite;
}
@keyframes particle-float {
  0%   { transform: translateY(0) translateX(0);   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-100vh) translateX(80px); opacity: 0; }
}

.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(10px); }
}
.scroll-indicator {
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes progress-fill {
  0%   { width: 0%; }
  100% { width: 100%; }
}
.progress-bar {
  animation: progress-fill 2s ease-out forwards;
}

.btn-ripple {
  position: relative;
  overflow: hidden;
}
.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}
.btn-ripple:active::after {
  width: 300px;
  height: 300px;
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-item {
  animation: countUp 0.6s ease-out forwards;
}

/* ===== FEATURES SECTION (  feature-card) ===== */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.feature-card {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}
.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes floatIcon {
  0%, 100% { transform: translateY(0px); }
  50%      { transform: translateY(-10px); }
}
.feature-icon {
  transition: all 0.4s ease;
}
.feature-card:hover .feature-icon {
  animation: floatIcon 2s ease-in-out infinite;
  transform: scale(1.1);
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(56, 189, 248, 0.4); }
  50%      { box-shadow: 0 0 40px rgba(56, 189, 248, 0.8); }
}
.glow-effect {
  animation: glow 3s ease-in-out infinite;
}

.gradient-border {
  position: relative;
  background: linear-gradient(
    135deg,
    #020b3f 0%,
    #0b4fae 40%,
    #1ea3ff 100%
  );
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.6);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(56,189,248,0.7),
    rgba(129,140,248,0.7)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gradient-border:hover::before {
  opacity: 1;
}

/* ===== SERVICES SECTION ANIMATIONS ===== */

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to   { opacity: 1; transform: translateX(0); }
}

.service-item:nth-child(odd) .service-content {
  animation: slideInLeft 0.8s ease-out forwards;
}
.service-item:nth-child(even) .service-content {
  animation: slideInRight 0.8s ease-out forwards;
}

.service-image {
  transition: transform 0.5s ease;
}
.service-item:hover .service-image {
  transform: scale(1.05);
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0px); }
  50%      { transform: translateY(-20px); }
}
.floating-badge {
  animation: float-slow 4s ease-in-out infinite;
}

.image-overlay {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(129, 140, 248, 0.25));
  opacity: 0;
  transition: opacity 0.4s ease;
}
.service-item:hover .image-overlay {
  opacity: 1;
}

.number-badge {
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.35rem;
  padding: 0.5rem;
  color: #f9fafb;
}

/* Service 1 – Web Development (Sky) */
#services .service-item:nth-child(1) .number-badge {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4);
}

/* Service 2 – Mobile Apps (Indigo) */
#services .service-item:nth-child(2) .number-badge {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4);
}

/* Service 3 – Odoo ERP (Purple) */
#services .service-item:nth-child(3) .number-badge {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
}

/* Service 4 – UI/UX Design (Pink) */
#services .service-item:nth-child(4) .number-badge {
  background: linear-gradient(135deg, #ec4899, #f472b6);
  box-shadow: 0 10px 30px rgba(236, 72, 153, 0.35);
}

/* ==========================
   END HERO/SERVICES BLOCK
   ========================== */


/* =========================================
   GLOBAL REVEAL SYSTEM (hero + about + blogs)
========================================= */

/* base reveal without blur */
:is(.reveal, .anim-up, [data-reveal]) {
  opacity: 0;
  transform: translateY(var(--rv-offset-y)) scale(var(--rv-scale));
  will-change: opacity, transform, filter;
}

.anim-up,
[data-reveal] {
  filter: blur(var(--rv-blur));
}

/* hero/about keyframe-based reveal (controlled by JS play/pause) */
.reveal.from-left,
.reveal.from-right,
.reveal.fade-up {
  animation-duration: var(--reveal-dur);
  animation-fill-mode: forwards;
  animation-delay: var(--d, 0ms);
  animation-play-state: paused;
}

/* initial transforms for hero/about */
.reveal.from-left {
  transform: translateX(-40px);
  animation-name: slide-in-left;
}
.reveal.from-right {
  transform: translateX(40px);
  animation-name: slide-in-right;
}
.reveal.fade-up {
  animation-name: fade-up;
}

.reveal.play {
  animation-play-state: running;
}

@keyframes slide-in-left  { to { opacity: 1; transform: translateX(0); } }
@keyframes slide-in-right { to { opacity: 1; transform: translateX(0); } }
@keyframes fade-up        { to { opacity: 1; transform: translateY(0); } }

/* IO system toggles this (blogs / project-details  */
.revealed {
  opacity: 1;
}

/* BLOGS – anim-up / anim-side / anim-pop refinements */
.anim-up {
  transition:
    opacity var(--dur-slow) ease,
    transform var(--dur-slower) var(--ease-smooth),
    filter var(--dur-slower) ease;
}
.revealed.anim-up {
  transform: none;
  filter: blur(0);
}

.anim-side {
  transform: translateX(var(--x, 24px));
  filter: blur(3px);
  transition:
    opacity var(--dur-slow) ease,
    transform var(--dur-slower) var(--ease-smooth),
    filter var(--dur-slower) ease;
}
.revealed.anim-side {
  transform: none;
  filter: blur(0);
}

.anim-pop {
  transform: scale(.92) translateY(8px);
  transition:
    opacity var(--dur-base) ease,
    transform 800ms var(--ease-bounce);
}
.revealed.anim-pop {
  transform: none;
}

/* SERVICE DETAILS – [data-reveal] uses same base, just overrides filter + transition */
[data-reveal] {
  filter: saturate(0.9);
  transition:
    opacity 0.9s cubic-bezier(.16,1,.3,1),
    transform 0.9s cubic-bezier(.16,1,.3,1),
    filter 0.9s cubic-bezier(.16,1,.3,1);
}

.is-in {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
  filter: saturate(1);
  transition-delay: var(--rv-delay, 0ms);
}


/* =========================================
   ABOUT SECTION (bubbles + badge + images)
========================================= */

@keyframes floaty {
  0%   { transform: translateY(0) translateX(0); }
  50%  { transform: translateY(-10px) translateX(6px); }
  100% { transform: translateY(0) translateX(0); }
}
.bubble {
  animation: floaty 12s ease-in-out infinite;
  will-change: transform;
}
.bubble.slow { animation-duration: 16s; }
.bubble.fast { animation-duration: 9s; }

@keyframes badge-bob {
  0%   { transform: translateY(0) rotate(0deg); }
  50%  { transform: translateY(-6px) rotate(-0.6deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
@keyframes sheen-badge {
  0%   { transform: translateX(-120%) rotate(8deg); opacity: 0; }
  20%  { opacity: .7; }
  50%  { transform: translateX(120%)  rotate(8deg); opacity: 0; }
  100% { transform: translateX(120%)  rotate(8deg); opacity: 0; }
}

.years-badge {
  position: absolute;
  right: 12px;
  top: 0;
  transform: translateY(-50%);
  z-index: 10;
  display: grid;
  place-items: center;
  gap: 2px;
  width: 64px;
  height: 80px;
  border-radius: var(--radius-lg);
  color: #fff;
  background: linear-gradient(135deg, #7c3aed 0%, #22d3ee 50%, #10b981 100%);
  border: 1px solid rgba(255,255,255,.5);
  box-shadow:
    0 12px 28px rgba(34, 51, 84, .25),
    inset 0 0 0 1px rgba(255, 255, .28);
  animation: badge-bob 3.6s ease-in-out infinite;
  will-change: transform;
}
.years-badge::after {
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.55) 45%, transparent 60%);
  filter: blur(6px);
  transform: translateX(-120%) rotate(8deg);
  opacity: 0;
  animation: sheen-badge 5.5s ease-in-out infinite;
  pointer-events: none;
}
.years-badge .t1 { font-weight: 800; font-size: 22px; line-height: 1; }
.years-badge .t2 { font-weight: 700; font-size: 11px; letter-spacing: .6px; }

.media-wrap {
  position: relative;
  transition: transform .25s var(--ease-smooth), box-shadow .25s var(--ease-smooth);
}
.media-wrap::after {
  content:"";
  position:absolute;
  inset:auto 0 -1px 0;
  height:4px;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(90deg,#7c3aed, #22d3ee 60%, #7c3aed);
  filter: blur(.5px);
}
.media-wrap:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}

.reveal-img {
  opacity: 0;
  transform: translateX(40px) scale(.98);
  filter: blur(6px);
  will-change: transform, opacity, filter;
  animation: img-in .9s cubic-bezier(.2,.65,.2,1) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes img-in {
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}


/* =========================================
   OUR SERVICES – CTA BUTTON (View All)
========================================= */

.btn-fill {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: var(--shadow-sm);
}

.btn-fill::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 0%;
  background: linear-gradient(to bottom, #33A6FF, var(--color-primary-deep));
  transition: height 0.4s var(--ease-smooth);
  border-radius: inherit;
  z-index: 0;
}

@media (hover:hover) {
  .btn-fill:hover::before {
    height: 100%;
  }
}

.btn-fill:focus-visible::before,
.btn-fill:active::before {
  height: 100%;
}

.btn-fill span {
  position: relative;
  z-index: 1;
  color: #3730a3;
  font-weight: 600;
  transition: color 0.3s ease;
}

.btn-fill:hover span,
.btn-fill:focus-visible span {
  color: #ffffff;
}

.btn-view-all {
  border-radius: 9999px;
  border: 2px solid transparent;
  background:
    linear-gradient(#ede9fe, #ede9fe) padding-box,
    linear-gradient(135deg, #4f46e5, #6366f1, #22c55e) border-box;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.18);
}


/* =========================================
   OUR SERVICES – Underline under card titles
========================================= */

section.grid.md\:grid-cols-3 article .z-10 h2 {
  position: relative;
  padding-bottom: .25rem;
}

section.grid.md\:grid-cols-3 article .z-10 h2::after {
  content: "";
  position: absolute;
  bottom: -0.2rem;
  height: 4px;
  width: 72px;
  background: #10B981;
  border-radius: 9999px;
  transition: width .35s ease;
}

html[dir="ltr"] section.grid.md\:grid-cols-3 article .z-10 h2::after {
  left: 0;
  right: auto;
}

html[dir="rtl"] section.grid.md\:grid-cols-3 article .z-10 h2::after {
  right: 0;
  left: auto;
}

section.grid.md\:grid-cols-3 article:hover .z-10 h2::after,
section.grid.md\:grid-cols-3 article:focus-within .z-10 h2::after {
  width: 112px;
}


/* =========================================
   WHY LOGIC SECTION (js-reveal)
========================================= */

.js-reveal {
  --line-dur: 900ms;
  --line-stagger: 600ms;
}

.line-reveal {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(2px);
  transition:
    opacity var(--line-dur) ease,
    transform var(--line-dur) ease,
    filter var(--line-dur) ease;
  transition-delay: calc(var(--i, 0) * var(--line-stagger));
  will-change: opacity, transform, filter;
}

.js-reveal.is-visible .line-reveal {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.js-reveal.is-visible .reveal.fade-up {
  opacity: 1;
  transform: none;
  transition: opacity 800ms ease, transform 800ms ease;
}


/* =========================================
   OUR WORK – swinging icon
========================================= */

.swing {
  animation: swing 2.8s ease-in-out infinite;
}
@keyframes swing {
  0%   { transform: rotate(0deg); }
  50%  { transform: rotate(4deg); }
  100% { transform: rotate(0deg); }
}


/* =========================================
   PORTFOLIO SECTION
========================================= */

#portfolio .grid > .group {
  opacity: 0;
  transform: translateY(22px) scale(.98);
  filter: blur(6px);
  will-change: opacity, transform, filter;
  animation: card-in .85s cubic-bezier(.2,.65,.2,1) forwards;
  animation-delay: var(--d, 0ms);
  animation-play-state: paused;
}

@keyframes card-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

#portfolio .grid > .group:nth-child(1) { --d: 60ms; }
#portfolio .grid > .group:nth-child(2) { --d: 160ms; }
#portfolio .grid > .group:nth-child(3) { --d: 260ms; }
#portfolio .grid > .group:nth-child(4) { --d: 360ms; }
#portfolio .grid > .group:nth-child(5) { --d: 60ms; }
#portfolio .grid > .group:nth-child(6) { --d: 160ms; }
#portfolio .grid > .group:nth-child(7) { --d: 260ms; }
#portfolio .grid > .group:nth-child(8) { --d: 360ms; }

#portfolio h2 {
  opacity: 0;
  transform: translateY(12px);
  animation: title-in .7s ease-out .1s forwards;
}
@keyframes title-in {
  to { opacity: 1; transform: none; }
}


/* =========================================
   COUNTERS & PROGRESS SECTION (kpis)
========================================= */

@keyframes float {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}
.animate-float { animation: float 6s ease-in-out infinite; }

@keyframes sectionIn {
  0%   { opacity:0; transform: translateY(16px); }
  100% { opacity:1; transform: none; }
}
.animate-section {
  opacity:0;
  transform: translateY(16px);
}
.animate-section.show {
  animation: sectionIn .7s ease-out both;
}

@keyframes blobFloat {
  0%   { transform: translate(0,0); }
  50%  { transform: translate(8px,-10px); }
  100% { transform: translate(0,0); }
}
.blob { animation: blobFloat 12s ease-in-out infinite; }


/* =========================================
   BLOGS SECTION (cards + scroll)
========================================= */

.reveal .hero-img {
  transform: scale(1.04);
  transition: transform 1s ease;
}
.revealed .hero-img {
  transform: scale(1);
}

/* diagonal wipe overlay */
.blog-card .wipe {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(2,132,199,.28), transparent 60%),
    radial-gradient(120% 120% at 100% 100%, rgba(14,165,233,.22), transparent 60%);
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  transition:
    clip-path 600ms cubic-bezier(.22,.8,.24,1),
    opacity 600ms;
  pointer-events: none;
  opacity: 0;
}

/* parallax tilt + title lift */
.blog-card:hover .hero-img,
.blog-card.is-active .hero-img,
.blog-card:focus-within .hero-img {
  transform:
    scale(1.06)
    translate(var(--tx,-6px), var(--ty,-4px))
    rotateZ(var(--rot,-.4deg));
}

.blog-card:hover .wipe,
.blog-card.is-active .wipe,
.blog-card:focus-within .wipe {
  clip-path: polygon(0 0, 100% 0, 100% 65%, 0 100%);
  opacity: 1;
}

.blog-card .title {
  transform: translateY(0);
  transition: transform 500ms cubic-bezier(.22,.8,.24,1);
}
.blog-card:hover .title,
.blog-card.is-active .title,
.blog-card:focus-within .title {
  transform: translateY(-2px);
}

/* thin scrollbars */
.scroll-thin {
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 transparent;
}
.scroll-thin::-webkit-scrollbar {
  width: 8px;
}
.scroll-thin::-webkit-scrollbar-track {
  background: transparent;
}
.scroll-thin::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,.6);
  border-radius: 9999px;
}
.scroll-thin::-webkit-scrollbar-thumb:hover {
  background: rgba(100,116,139,.8);
}


/* contact home */

/* LTR (إنجليزي) */
html[dir="ltr"] .contact-gradient-bar {
  background: linear-gradient(
    to right,
    #FCD34D,
    #F97316,
    transparent
  );
}

/* RTL (عربي) */
html[dir="rtl"] .contact-gradient-bar {
  background: linear-gradient(
    to left,
    #FCD34D,
    #F97316,
    transparent
  );
}

/* ====== Awards Section | Clean Tech Animations ====== */

/* subtle glow pulse instead of fast spin */
@keyframes techPulse {
  0%   { transform: scale(1); opacity: 0.65; }
  50%  { transform: scale(1.03); opacity: 0.9; }
  100% { transform: scale(1); opacity: 0.65; }
}

/* soft shimmer instead of strong white sweep */
@keyframes softShimmer {
  0%   { transform: translateX(-120%); opacity: 0; }
  50%  { opacity: 0.3; }
  100% { transform: translateX(120%); opacity: 0; }
}

/* minimal tech floating orbs */
@keyframes softFloat {
  0%,100% { transform: translateY(0); opacity: 0.25; }
  50%     { transform: translateY(-10px); opacity: 0.35; }
}

.award-card {
  border-color: rgba(226, 232, 240, 0.6);
  background-clip: padding-box;
}

.border-anim::before {
  animation: techPulse 6s ease-in-out infinite;
}

.soft-shimmer {
  animation: softShimmer 1.8s ease-in-out forwards;
}


/* =========================================
   SERVICE DETAILS PAGE (data-reveal / tilt / spotlight)
========================================= */

/* spotlight hover */
[data-spotlight] {
  position: relative;
}
[data-spotlight]::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 14px;
  pointer-events: none;
  background:
    radial-gradient(
      120px 120px at var(--mx, 50%) var(--my, 50%),
      rgba(59,130,246,0.18),
      transparent 60%
    );
  opacity: 0;
  transition: opacity 0.3s ease;
}
[data-spotlight]:hover::after {
  opacity: 1;
}

/* 3D tilt cards */
[data-tilt] {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}
[data-tilt] img {
  transform: translateZ(12px);
}

/* sidebar glass block */
.sidebar-bg {
  position: relative;
  border-radius: 1.75rem;
  border: 1px solid transparent;
  background:
    linear-gradient(0deg, rgba(255,255,255,0.9), rgba(255,255,255,0.9)) padding-box,
    linear-gradient(
      135deg,
      rgba(96,165,250,0.35),
      rgba(167,139,250,0.30),
      rgba(6,182,212,0.30)
    ) border-box;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.75rem;
}
.sidebar-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(120% 120% at 12% 0%, rgba(59,130,246,.06), transparent 42%),
    radial-gradient(120% 120% at 100% 100%, rgba(168,85,247,.07), transparent 45%),
    linear-gradient(180deg, rgba(2,6,23,.035), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

/* frosted cards */
.card-frost {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 20px 40px -22px rgba(2,6,23,.12);
  transition:
    transform 0.3s cubic-bezier(.2,.8,.2,1),
    box-shadow 0.3s cubic-bezier(.2,.8,.2,1);
  will-change: transform, box-shadow;
}
.card-frost:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 50px -18px rgba(2,6,23,.16);
}

/* CTA button */
.btn-cta {
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  box-shadow: 0 10px 30px -12px rgba(37,99,235,.38);
  color: #fff;
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  transition:
    transform 0.18s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}
.btn-cta::after {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,.32) 30%,
    transparent 60%
  );
  transform: translateX(-120%) skewX(-12deg);
}
.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px -12px rgba(37,99,235,.48);
  background: linear-gradient(90deg, #1e40af, #1d4ed8);
}
.btn-cta:hover::after {
  animation: sheen-cta 1.1s ease forwards;
}
.btn-cta:active {
  transform: translateY(0);
  box-shadow: 0 10px 28px -12px rgba(37,99,235,.40);
}
@keyframes sheen-cta {
  from { transform: translateX(-120%) skewX(-12deg); }
  to   { transform: translateX(120%) skewX(-12deg); }
}


/* =========================================
   PRODUCTS FILTER PILLS
========================================= */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  border-width: 1px;
  border-style: solid;
  cursor: pointer;
  transition:
    transform var(--dur-fast) ease,
    box-shadow 200ms ease,
    background 200ms ease,
    color 200ms ease,
    border-color 200ms ease;
}

/* active pill */
.pill--active {
  border-color: transparent;
  background-image: linear-gradient(to right, #0ea5e9, #22c55e);
  color: #f8fafc;
  box-shadow: 0 18px 40px -20px rgba(34,197,94,0.85);
}

/* inactive pill */
.pill--inactive {
  background-color: rgba(255,255,255,0.9);
  border-color: rgba(148,163,184,0.7);
  color: #020617;
  box-shadow: 0 10px 30px -18px rgba(15,23,42,0.6);
}

.pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 35px -18px rgba(15,23,42,0.75);
}

/* small dot */
.pill-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: var(--radius-full);
  background-color: #94a3b8;
}

.pill--active .pill-dot {
  background-color: #f8fafc;
}
.pill--inactive .pill-dot {
  background-color: #94a3b8;
}


/* =========================================
   TECHNICAL SECTION – directional reveal
========================================= */

#technical [data-reveal] {
  transform: translateY(var(--rv-offset-y)) scale(var(--rv-scale)) translateX(var(--tx, 0));
}

/* odd cards from left, even from right */
#technical [data-reveal]:nth-child(2n+1) {
  --tx: -26px;
}

#technical [data-reveal]:nth-child(2n) {
  --tx: 26px;
}


/* =========================================
   GLOBAL REDUCED-MOTION HANDLING
========================================= */

@media (prefers-reduced-motion: reduce) {
  :is(.reveal, .anim-up, .anim-side, .anim-pop, [data-reveal]) {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    filter: none !important;
    transition: none !important;
  }

  .bubble,
  .reveal-img,
  .years-badge,
  .years-badge::after,
  .swing,
  .animate-float,
  .blob,
  .animate-section,
  .animate-shimmer,
  .before\:animate-spin-slow::before {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  #portfolio .grid > .group,
  #portfolio h2,
  .line-reveal,
  .js-reveal.is-visible .reveal.fade-up,
  .blog-card .title,
  .blog-card .wipe,
  .award-card {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }

  .media-wrap:hover {
    transform: none;
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
  }

  [data-tilt] {
    transform: none !important;
    box-shadow: none;
  }

  .btn-cta,
  .card-frost {
    transition: none;
  }

  .btn-cta:hover::after {
    animation: none;
  }

  [data-spotlight]::after {
    display: none;
  }
}


/* =========================================
   PHONE SWING (extra helper)
========================================= */

@keyframes phoneSwing {
  0% {
    transform: translateX(-6px) rotate(-4deg);
  }
  50% {
    transform: translateX(6px) rotate(4deg);
  }
  100% {
    transform: translateX(-6px) rotate(-4deg);
  }
}

.phone-swing {
  animation: phoneSwing 4s ease-in-out infinite;
  transform-origin: bottom center;
  will-change: transform;
}


/* =========================================
   FLOATING SOCIAL BUTTONS (RTL/LTR)
========================================= */

html[dir="rtl"] .social-floating {
  right: auto;
  left: 1rem;
}

/* =========================================
   FLOATING SOCIAL BUTTONS (RTL/LTR + Reveal)
========================================= */

/* الحالة الأساسية – قبل ما تظهر */
.social-floating {
  opacity: 0;
  transform: translateY(8px);
  animation-duration: 0.85s;
  animation-timing-function: cubic-bezier(.22,.8,.24,1);
  animation-fill-mode: forwards;
  animation-delay: 0.6s;
}

html[dir="ltr"] .social-floating {
  animation-name: socialInLTR;
}

html[dir="rtl"] .social-floating {
  right: auto;
  left: 1rem;
  animation-name: socialInRTL;
}

@keyframes socialInLTR {
  from {
    opacity: 0;
    transform: translateX(40px) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}

@keyframes socialInRTL {
  from {
    opacity: 0;
    transform: translateX(-40px) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}


/* =========================================
   ABOUT CARD – animated gradient
========================================= */

.animated-about-card {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.14),
    rgba(56, 189, 248, 0.24),
    rgba(129, 140, 248, 0.26),
    rgba(15, 23, 42, 0.18)
  );
  background-size: 220% 220%;
  animation: aboutCardGradient 14s ease-in-out infinite;
}

@keyframes aboutCardGradient {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 100%;
  }
  100% {
    background-position: 0% 0%;
  }
}


/* =========================================
   BLOG DETAILS – orange accent bar (LTR / RTL)
========================================= */

.gradient-accent {
  background: linear-gradient(
    to right,
    #FDBA74,
    #F97316,
    transparent
  );
}

html[dir="rtl"] .gradient-accent {
  background: linear-gradient(
    to left,
    #FDBA74,
    #F97316,
    transparent
  );
}


/* 
   TEAM PAGE (Our Team)
  */

.team-main {
  min-height: 100vh;
  padding: 4rem 1.5rem 3rem;
  background: #f3f4f6;
}

/* Hero */

.team-hero {
  max-width: 960px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.team-badge {
  font-size: 1rem;              
  font-weight: 700;             
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #0ea5e9;
  margin-bottom: 0.75rem;
}

.team-title {
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

 
.team-title span {
  background: linear-gradient(90deg, #0ea5e9, #6366f1, #22c55e);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: khelij-gradient 4s ease-in-out infinite;
}

@keyframes khelij-gradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.team-subtitle {
  max-width: 38rem;
  margin: 0 auto;
  font-size: 1.05rem;   
  font-weight: 600;      
  color: #4b5563;
}

/* ===== Team grid 3D blue ===== */

.team-grid {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  perspective: 1200px;
}

@media (min-width: 640px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.team-card {
  position: relative;
  background: radial-gradient(circle at top left, #e0f2fe, #ffffff);
  border-radius: 24px;
  padding: 1.75rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  transform-style: preserve-3d;
  transform: translateZ(0) rotateX(0deg) rotateY(0deg);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    background 0.35s ease;
}

.team-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, #38bdf833, #0ea5e933);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.team-card:hover {
  transform: translateY(-10px) translateZ(20px) rotateX(4deg) rotateY(-4deg);
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.35);
  background: radial-gradient(circle at top left, #e0f2fe, #f9fafb);
}

.team-card:hover::before {
  opacity: 1;
}

 

.team-avatar {
  width: 112px;
  height: 112px;
  border-radius: 9999px;
  overflow: hidden;
  border: 4px solid rgba(59, 130, 246, 0.35);
  margin-bottom: 1rem;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.35);
  transform: translateZ(30px);
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.15rem;
  transform: translateZ(20px);
}

.team-role {
  font-size: 0.85rem;
  font-weight: 500;
  color: #2563eb;  
  margin-bottom: 0.6rem;
  transform: translateZ(18px);
}

.team-bio {
  font-size: 0.85rem;
  color: #4b5563;
  transform: translateZ(15px);
}

.team-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  transform: translateZ(18px);
}

.team-social a {
  color: #6b7280;
  font-size: 0.9rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.team-social a:hover {
  color: #3b82f6;
  transform: translateY(-2px) translateZ(5px);
}
