/* ═══════════════════════════════════════════════════════════════
   ESLAM STUDIO — Main Stylesheet
   Font: IBM Plex Mono | Palette: #14002b bg · #7907eb accent
   ═══════════════════════════════════════════════════════════════ */

/* ─── Reset & Root ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colors */
  --bg:        #060010;
  --surface:   #14002b;
  --surface2:  #1c0038;
  --card:      #1a0032;
  --accent:    #7907eb;
  --accent-h:  #9b35ff;
  --accent-s:  #5a00b8;
  --glow:      rgba(121, 7, 235, 0.35);
  --glow-sm:   rgba(121, 7, 235, 0.15);
  --gold:      #e8c84a;
  --text:      #f0ecfa;
  --text-m:    #9985cc;
  --text-d:    #5a4a7a;
  --border:    rgba(121, 7, 235, 0.22);
  --border-h:  rgba(121, 7, 235, 0.5);
  --success:   #22d3a4;
  --danger:    #ff4d6d;
  --warn:      #fbbf24;

  /* Spacing */
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  22px;
  --r-xl:  32px;

  /* Transitions */
  --t-fast: 0.18s ease;
  --t-med:  0.32s ease;
  --t-slow: 0.55s cubic-bezier(.25,.46,.45,.94);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Arabic mode — switch to Cairo */
[dir="rtl"] body {
  font-family: 'Cairo', 'IBM Plex Mono', sans-serif;
}
/* Fix Arabic text connections broken by negative letter-spacing */
[dir="rtl"] .hero-headline,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 {
  letter-spacing: 0 !important;
}
/* Keep monospace elements in their font even in Arabic mode */
[dir="rtl"] .logo-name,
[dir="rtl"] .nav-logo-img,
[dir="rtl"] .sec-label,
[dir="rtl"] .port-cat-badge,
[dir="rtl"] .blog-cat,
[dir="rtl"] .svc-num,
[dir="rtl"] .ticker-set span,
[dir="rtl"] .hero-tag,
[dir="rtl"] .cb-label,
[dir="rtl"] .cb-sub,
[dir="rtl"] .svc-chips span,
[dir="rtl"] .port-tags span,
[dir="rtl"] .proj-modal-tags span {
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: normal;
}

/* Logo image */
.nav-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 10px var(--glow));
  transition: filter var(--t-fast);
}
.nav-logo:hover .nav-logo-img {
  filter: drop-shadow(0 0 20px var(--accent)) brightness(1.1);
}
.footer-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
  margin-bottom: 14px;
  opacity: 0.85;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent-s); border-radius: 3px; }

/* ─── Selection ─── */
::selection { background: var(--accent); color: #fff; }

/* ══════════════════════════════════════════════
   BACKGROUND CANVAS
══════════════════════════════════════════════ */
.bg-canvas {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none;
}

.bg-blob {
  position: absolute; border-radius: 50%;
  filter: blur(120px); opacity: 0.55;
}
.b1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, #7907eb 0%, transparent 70%);
  top: -200px; left: -200px;
  animation: blobFloat1 18s ease-in-out infinite;
}
.b2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #3a007a 0%, transparent 70%);
  bottom: 10%; right: -150px;
  animation: blobFloat2 22s ease-in-out infinite;
}
.b3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #14002b 0%, #7907eb 60%, transparent 100%);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  animation: blobFloat3 15s ease-in-out infinite;
  opacity: 0.3;
}

@keyframes blobFloat1 {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(80px,60px) scale(1.1); }
  66%     { transform: translate(-40px,80px) scale(0.95); }
}
@keyframes blobFloat2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(-80px,-60px) scale(1.12); }
}
@keyframes blobFloat3 {
  0%,100% { transform: translate(-50%,-50%) scale(1); opacity: 0.3; }
  50%     { transform: translate(-50%,-50%) scale(1.3); opacity: 0.15; }
}

.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
}

.film-grain {
  position: absolute; inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
  animation: grainShift 0.15s steps(1) infinite;
}

@keyframes grainShift {
  0%   { background-position: 0 0; }
  25%  { background-position: -30px 20px; }
  50%  { background-position: 15px -25px; }
  75%  { background-position: -20px 10px; }
  100% { background-position: 0 0; }
}

/* ══════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; gap: 24px;
  padding: 0 5vw;
  height: 68px;
  background: rgba(6,0,16,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-med), box-shadow var(--t-med);
}
.navbar.scrolled {
  background: rgba(6,0,16,0.92);
  box-shadow: 0 4px 40px rgba(121,7,235,0.15);
}

/* Logo */
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.logo-play {
  color: var(--accent); font-size: 1.1rem;
  animation: pulsePlay 2s ease-in-out infinite;
}
@keyframes pulsePlay {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
.logo-name {
  font-size: 1.1rem; font-weight: 700; letter-spacing: 0.12em;
  color: var(--text);
}
.logo-dot { color: var(--accent); }

/* Nav links */
.nav-menu {
  display: flex; align-items: center; gap: 4px;
  margin: 0 auto;
}
.nav-link {
  padding: 6px 14px;
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.06em;
  color: var(--text-m);
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute; bottom: -2px; left: 50%; right: 50%;
  height: 2px; background: var(--accent);
  transition: left var(--t-med), right var(--t-med);
  border-radius: 2px;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--glow-sm);
}
.nav-link.active::after { left: 14px; right: 14px; }

/* Nav actions */
.nav-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.lang-btn {
  padding: 5px 12px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--text-m);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}
.lang-btn:hover { color: var(--accent); border-color: var(--accent); }
.lang-label-ar { display: none; }
[lang="ar"] .lang-label-en { display: none; }
[lang="ar"] .lang-label-ar { display: inline; }

.auth-trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  font-size: 0.8rem; font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}
.auth-trigger:hover {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow);
}

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  width: 34px; padding: 6px;
}
.hamburger span {
  height: 2px; background: var(--text-m);
  border-radius: 2px;
  transition: all var(--t-fast);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ══════════════════════════════════════════════
   PAGE SECTIONS
══════════════════════════════════════════════ */
.page-section {
  position: relative; z-index: 1;
  padding: 120px 5vw 80px;
}

.sec-header {
  text-align: center;
  margin-bottom: 64px;
}
.sec-label {
  display: inline-block;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border-h);
  padding: 4px 14px;
  border-radius: 40px;
  margin-bottom: 16px;
}
.sec-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700; letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}
.sec-desc {
  font-size: 0.95rem; color: var(--text-m);
  max-width: 500px; margin: 0 auto;
}

/* ══════════════════════════════════════════════
   HERO SECTION
══════════════════════════════════════════════ */
.hero-sec {
  min-height: 82vh;
  display: flex; flex-direction: column;
  justify-content: center;
  padding-top: 120px;
  padding-bottom: 40px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px; margin: 0 auto; width: 100%;
}

.hero-tag {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.75rem; letter-spacing: 0.1em;
  color: var(--text-m);
  margin-bottom: 28px;
}
.tag-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulseDot 1.8s ease-in-out infinite;
}
@keyframes pulseDot {
  0%,100% { box-shadow: 0 0 6px var(--accent); transform: scale(1); }
  50%     { box-shadow: 0 0 16px var(--accent), 0 0 30px var(--glow); transform: scale(1.2); }
}

.hero-headline {
  display: flex; flex-direction: column;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700; line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}
.hl { overflow: hidden; }
.hl-accent { color: var(--accent); }

.hero-sub {
  font-size: 0.95rem; color: var(--text-m);
  max-width: 480px; margin-bottom: 40px; line-height: 1.8;
}

.hero-btns-wrapper {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 52px;
}
.hero-btns {
  display: flex; flex-wrap: wrap; gap: 16px;
  margin-bottom: 0;
}
.hero-arrow {
  color: var(--accent);
  opacity: 0.6;
}
.hero-arrow-left { animation: arrowLeftBounce 2.5s infinite ease-in-out; }
.hero-arrow-right { animation: arrowRightBounce 2.5s infinite ease-in-out; }

@keyframes arrowLeftBounce {
  0%, 100% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(6px) translateY(-4px); }
}
@keyframes arrowRightBounce {
  0%, 100% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(-6px) translateY(-4px); }
}

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em;
  border-radius: var(--r-sm);
  border: 1px solid var(--accent);
  transition: all var(--t-fast);
  position: relative; overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 0; transition: opacity var(--t-fast);
}
.btn-primary:hover {
  background: var(--accent-h);
  box-shadow: 0 0 30px var(--glow), 0 4px 20px rgba(121,7,235,0.4);
  transform: translateY(-2px);
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: var(--text-m);
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  transition: all var(--t-fast);
}
.btn-ghost:hover {
  color: var(--text); border-color: var(--accent);
  background: var(--glow-sm);
}

.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  background: transparent;
  color: var(--accent);
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em;
  border-radius: var(--r-sm);
  border: 1px solid var(--accent);
  transition: all var(--t-fast);
}
.btn-outline:hover {
  background: var(--accent); color: #fff;
  box-shadow: 0 0 20px var(--glow);
}

.btn-sm {
  padding: 8px 18px; font-size: 0.78rem;
}

.full { width: 100%; justify-content: center; }

/* Hero stats */
.hero-stats {
  display: flex; align-items: center; gap: 28px;
}
.hstat {
  display: flex; flex-direction: column; align-items: flex-start;
}
.hstat-n {
  font-size: 1.8rem; font-weight: 700; color: var(--text);
  line-height: 1;
}
.hstat > span { color: var(--accent); font-size: 1.4rem; margin-left: 2px; }
.hstat small { font-size: 0.7rem; color: var(--text-m); letter-spacing: 0.08em; margin-top: 4px; }
.hstat-div { width: 1px; height: 40px; background: var(--border); }

/* Cinema box */
.hero-right { display: flex; justify-content: center; align-items: center; }

.cinema-box {
  position: relative;
  width: 340px; height: 340px;
  border: 1px solid var(--border-h);
  border-radius: var(--r-lg);
  background: rgba(20,0,43,0.6);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.cinema-box::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, var(--glow-sm) 0%, transparent 70%);
  animation: cbGlow 4s ease-in-out infinite;
}
@keyframes cbGlow {
  0%,100% { opacity: 0.5; }
  50%     { opacity: 1; }
}

.cb-corner {
  position: absolute; width: 20px; height: 20px;
  border-color: var(--accent);
  border-style: solid;
}
.cb-tl { top: 12px; left: 12px; border-width: 2px 0 0 2px; border-radius: 3px 0 0 0; }
.cb-tr { top: 12px; right: 12px; border-width: 2px 2px 0 0; border-radius: 0 3px 0 0; }
.cb-bl { bottom: 12px; left: 12px; border-width: 0 0 2px 2px; border-radius: 0 0 0 3px; }
.cb-br { bottom: 12px; right: 12px; border-width: 0 2px 2px 0; border-radius: 0 0 3px 0; }

.cb-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; text-align: center;
}
.reel-icon {
  width: 80px; height: 80px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #fff;
  box-shadow: 0 0 40px var(--glow);
  animation: reelSpin 12s linear infinite;
}
@keyframes reelSpin {
  from { box-shadow: 0 0 40px var(--glow); }
  to   { box-shadow: 0 0 60px var(--accent), 0 0 80px var(--glow); }
}
.cb-label {
  font-size: 1.1rem; font-weight: 700; letter-spacing: 0.12em;
  color: var(--text);
}
.cb-sub {
  font-size: 0.72rem; color: var(--text-m); letter-spacing: 0.08em;
}
.cb-services-list {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  margin-top: 6px;
}
.cb-services-list span {
  font-size: 0.65rem; letter-spacing: 0.08em;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 40px; color: var(--text-m);
}

.scan-line {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
  animation: scan 3s linear infinite;
}
@keyframes scan {
  from { top: 0; }
  to   { top: 100%; }
}

/* Ticker */
.ticker-wrap {
  width: 100%; overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  margin-top: 30px;
  background: rgba(20,0,43,0.4);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

#services {
  padding-top: 50px;
}
.ticker {
  display: flex;
  width: max-content;
  animation: tickerLoop 80s linear infinite;
}
/* Pause on hover */
.ticker-wrap:hover .ticker { animation-play-state: paused; }

.ticker-set {
  display: flex;
  gap: 32px;
  padding-right: 32px; /* must exactly match the gap for seamless wrap */
  flex-shrink: 0;
}
.ticker-set span {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em;
  color: var(--text-m); white-space: nowrap;
  font-family: 'IBM Plex Mono', monospace;
}
.ticker-set .tdot { color: var(--accent); }

@keyframes tickerLoop {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ══════════════════════════════════════════════
   SERVICES SECTION
══════════════════════════════════════════════ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1200px; margin: 0 auto;
}

.svc-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  transition: transform var(--t-med), border-color var(--t-med), box-shadow var(--t-med);
  overflow: hidden;
  cursor: default;
}
.svc-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity var(--t-med);
}
.svc-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-h);
  box-shadow: 0 20px 60px rgba(121,7,235,0.2);
}
.svc-card:hover::before { opacity: 1; }

.svc-featured {
  border-color: rgba(121,7,235,0.4);
  background: linear-gradient(135deg, var(--card), rgba(121,7,235,0.08));
}
.svc-featured::before { opacity: 0.6; }

.svc-num {
  font-size: 3rem; font-weight: 700;
  color: rgba(121,7,235,0.12);
  position: absolute; top: 16px; right: 22px;
  letter-spacing: -0.05em; line-height: 1;
}

.svc-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--surface), var(--surface2));
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--accent);
  margin-bottom: 20px;
  box-shadow: 0 4px 20px var(--glow-sm);
  transition: all var(--t-fast);
}
.svc-card:hover .svc-icon {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 30px var(--glow);
}

.svc-card h3 {
  font-size: 1rem; font-weight: 600;
  color: var(--text); margin-bottom: 12px;
}
.svc-card p {
  font-size: 0.83rem; color: var(--text-m); line-height: 1.75;
  margin-bottom: 20px;
}
.svc-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.svc-chips span {
  font-size: 0.68rem; letter-spacing: 0.05em;
  padding: 3px 10px;
  background: rgba(121,7,235,0.08);
  border: 1px solid var(--border);
  border-radius: 40px; color: var(--text-m);
}

/* ══════════════════════════════════════════════
   PORTFOLIO SECTION
══════════════════════════════════════════════ */
.portfolio-sec { background: rgba(20,0,43,0.2); }

.port-filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-bottom: 48px;
}
.pf-btn {
  padding: 8px 20px;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em;
  color: var(--text-m);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 40px;
  transition: all var(--t-fast);
}
.pf-btn:hover { color: var(--text); border-color: var(--accent); }
.pf-btn.active {
  color: #fff; background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow);
}

.port-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1200px; margin: 0 auto;
}

.port-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.port-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(121,7,235,0.25);
  border-color: var(--border-h);
}

.port-thumb {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
  background: var(--surface);
}
.port-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-slow);
}
.port-card:hover .port-thumb img { transform: scale(1.06); }

.port-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: var(--border-h);
}
.port-play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6,0,16,0.5);
  opacity: 0; transition: opacity var(--t-fast);
}
.port-play-btn i {
  width: 52px; height: 52px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff;
  box-shadow: 0 0 30px var(--glow);
  transform: scale(0.8); transition: transform var(--t-fast);
}
.port-card:hover .port-play-btn { opacity: 1; }
.port-card:hover .port-play-btn i { transform: scale(1); }

.port-cat-badge {
  position: absolute; top: 12px; left: 12px;
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  background: var(--accent);
  color: #fff;
  border-radius: 40px;
}

.port-body {
  padding: 18px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
}
.port-body h3 {
  font-size: 0.95rem; font-weight: 600;
  color: var(--text); margin-bottom: 2px;
  line-height: 1.45;
  min-height: 2.8rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.port-desc-box {
  background: rgba(121, 7, 235, 0.04);
  border: 1px solid rgba(121, 7, 235, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
  margin-bottom: 14px;
  height: 64px;
  display: flex;
  align-items: center;
}
.port-desc-box p {
  font-size: 0.78rem; color: var(--text-m); line-height: 1.5;
  margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}
.port-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.port-tags span {
  font-size: 0.65rem; padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 40px; color: var(--text-d);
}
.port-tags .tag-more {
  background: rgba(121, 7, 235, 0.08);
  border: 1px solid rgba(121, 7, 235, 0.22);
  color: var(--accent-h);
  font-weight: 600;
  font-size: 0.62rem;
  padding: 2px 7px;
  border-radius: 40px;
}

/* ─── Portfolio Card Footer ─── */
.port-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  gap: 8px;
  padding-right: 48px;
}
[dir="rtl"] .port-footer {
  padding-right: 0;
  padding-left: 48px;
}

/* ─── Like Button (Card) ─── */
.like-btn {
  position: absolute;
  bottom: 18px;
  right: 20px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  background: rgba(121, 7, 235, 0.06);
  border: 1px solid rgba(121, 7, 235, 0.22);
  border-radius: 20px;
  color: var(--text-m);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.like-btn.like-icon-only {
  width: 28px;
  padding: 0;
  border-radius: 50%;
  gap: 0;
}
.like-btn.like-icon-only .like-count {
  display: none;
}
.like-btn:hover {
  border-color: #ff4d6d;
  color: #ff4d6d;
  background: rgba(255, 77, 109, 0.08);
  transform: translateY(-2px);
}
.like-btn.liked {
  color: #fff;
  background: #ff4d6d;
  border-color: #ff4d6d;
  box-shadow: 0 0 10px rgba(255, 77, 109, 0.4);
}
.like-btn.liked i { color: #fff; }
.like-btn .like-count {
  font-weight: 600;
  min-width: 0;
  font-size: 0.72rem;
}
[dir="rtl"] .like-btn {
  right: auto;
  left: 20px;
}
[dir="rtl"] .port-cat-badge {
  left: auto;
  right: 12px;
}

/* Like pop animation */
@keyframes likePop {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.35); }
  60%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.like-btn.like-pop i,
.like-btn-modal.like-pop i {
  animation: likePop 0.4s ease;
}

/* ─── Like Button (Modal) ─── */
.proj-modal-actions {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.like-btn-modal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-m);
  cursor: pointer;
  transition: all 0.25s;
}
.like-btn-modal:hover {
  border-color: #ff4d6d;
  color: #ff4d6d;
  background: rgba(255,77,109,0.06);
}
.like-btn-modal.liked {
  color: #ff4d6d;
  border-color: rgba(255,77,109,0.4);
  background: rgba(255,77,109,0.08);
}
.like-btn-modal.liked i { color: #ff4d6d; }
.like-btn-modal .like-count { font-weight: 700; }
.like-btn-modal .like-label { font-weight: 500; }

/* ─── View All Button ─── */
.view-all-wrap {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 20px;
}
.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--accent), #9b35ff);
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 25px rgba(121, 7, 235, 0.3);
}
.btn-view-all:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 35px rgba(121, 7, 235, 0.5);
}
.btn-view-all i {
  transition: transform 0.3s;
}
.btn-view-all:hover i {
  transform: translateX(5px);
}
[dir="rtl"] .btn-view-all i {
  transform: scaleX(-1);
}
[dir="rtl"] .btn-view-all:hover i {
  transform: scaleX(-1) translateX(5px);
}

/* ══════════════════════════════════════════════
   BLOG SECTION
══════════════════════════════════════════════ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  max-width: 1200px; margin: 0 auto;
}

.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 50px rgba(121,7,235,0.2);
  border-color: var(--border-h);
}

.blog-thumb {
  aspect-ratio: 16/9; overflow: hidden;
  background: var(--surface);
  position: relative;
}
.blog-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-slow);
}
.blog-card:hover .blog-thumb img { transform: scale(1.05); }
.blog-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: var(--border-h);
}

.blog-body { padding: 24px; }
.blog-meta {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.blog-cat {
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px; border-radius: 40px;
  background: rgba(121,7,235,0.15); color: var(--accent);
  border: 1px solid var(--border-h);
}
.blog-date { font-size: 0.7rem; color: var(--text-d); }

.blog-body h3 {
  font-size: 1rem; font-weight: 600;
  color: var(--text); margin-bottom: 10px; line-height: 1.4;
}
.blog-body p {
  font-size: 0.82rem; color: var(--text-m); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 16px;
}
.blog-footer {
  display: flex; align-items: center; justify-content: space-between;
}
.blog-comments { font-size: 0.75rem; color: var(--text-d); }
.blog-read-more {
  font-size: 0.75rem; color: var(--accent);
  font-weight: 500;
}

/* ══════════════════════════════════════════════
   CONTACT SECTION
══════════════════════════════════════════════ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  max-width: 1000px; margin: 0 auto;
  align-items: start;
}

.contact-info { display: flex; flex-direction: column; gap: 28px; }

.cinfo-item {
  display: flex; align-items: flex-start; gap: 16px;
}
.cinfo-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 1.1rem;
}
.cinfo-lbl { font-size: 0.7rem; letter-spacing: 0.1em; color: var(--text-d); margin-bottom: 4px; }
.cinfo-item a, .cinfo-item span {
  font-size: 0.88rem; color: var(--text-m);
  transition: color var(--t-fast);
}
.cinfo-item a:hover { color: var(--accent); }

.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.social-ic {
  width: 40px; height: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-m); font-size: 1rem;
  transition: all var(--t-fast);
}
.social-ic:hover {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow);
}

/* Contact form */
.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grp { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-grp:last-child { margin-bottom: 0; }
.form-grp label {
  font-size: 0.75rem; letter-spacing: 0.08em; color: var(--text-m);
  font-weight: 500;
}
.form-grp input,
.form-grp textarea,
.form-grp select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  color: var(--text); font-size: 0.85rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
  width: 100%;
}
.form-grp input:focus,
.form-grp textarea:focus,
.form-grp select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow-sm);
}
.form-grp input::placeholder,
.form-grp textarea::placeholder { color: var(--text-d); }
.form-grp textarea { resize: vertical; min-height: 120px; }

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  background: rgba(6,0,16,0.8);
  backdrop-filter: blur(10px);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr 1.2fr 1.6fr;
  gap: 30px;
  padding: 80px 5vw 64px;
  max-width: 1250px;
  margin: 0 auto;
}

.footer-brand {
  max-width: 320px;
}
.footer-brand .logo-play { font-size: 1rem; }
.footer-brand .logo-name { font-size: 1rem; font-weight: 700; letter-spacing: 0.1em; }
.footer-brand p {
  font-size: 0.82rem; color: var(--text-m);
  margin-top: 18px; line-height: 1.85;
}

.footer-col {
  min-width: 0;
}

.footer-col h5 {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text); margin-bottom: 26px;
  position: relative;
}

.footer-col h5::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

[dir="rtl"] .footer-col h5::after {
  left: auto;
  right: 0;
}

.footer-col ul { display: flex; flex-direction: column; gap: 14px; }
.footer-col li {
  white-space: nowrap;
}
.footer-col li a, .footer-col li span {
  font-size: 0.85rem; color: var(--text-m);
  transition: color var(--t-fast);
}
.footer-col li a:hover { color: var(--accent-h); }

/* --- Footer Contact Column --- */
.fc-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.fc-list i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(121, 7, 235, 0.08);
  border: 1px solid rgba(121, 7, 235, 0.25);
  color: var(--accent-h);
  border-radius: 50%;
  font-size: 0.95rem;
  box-shadow: 0 0 10px rgba(121, 7, 235, 0.1);
  transition: all 0.3s ease;
}

.fc-list li:hover i {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--glow);
  transform: scale(1.08);
}

.fc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fc-info span:first-child {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.72rem !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-m);
  opacity: 0.85;
}

.fc-info a, 
.fc-info span:last-child {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.88rem !important;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color var(--t-fast);
}

.fc-info a:hover {
  color: var(--accent-h);
}

/* --- Gorgeous Premium Socials --- */
.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(121, 7, 235, 0.18);
  border-radius: 50%;
  color: var(--text-m);
  font-size: 1rem;
  position: relative;
  z-index: 10;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              background 0.3s, 
              border-color 0.3s, 
              box-shadow 0.3s, 
              color 0.3s;
}

.social-btn:hover {
  transform: translateY(-4px) scale(1.08);
}

.social-btn.facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
  color: #fff;
  box-shadow: 0 5px 15px rgba(24, 119, 242, 0.4);
}

.social-btn.instagram:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 5px 15px rgba(220, 39, 67, 0.4);
}

.social-btn.youtube:hover {
  background: #ff0000;
  border-color: #ff0000;
  color: #fff;
  box-shadow: 0 5px 15px rgba(255, 0, 0, 0.4);
}

.social-btn.whatsapp:hover {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.social-btn.behance:hover {
  background: #0057ff;
  border-color: #0057ff;
  color: #fff;
  box-shadow: 0 5px 15px rgba(0, 87, 255, 0.4);
}

.social-btn.upwork:hover {
  background: #14a800;
  border-color: #14a800;
  color: #fff;
  box-shadow: 0 5px 15px rgba(20, 168, 0, 0.4);
}

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 5vw;
  border-top: 1px solid var(--border);
  max-width: 1200px; margin: 0 auto;
}
.footer-bottom p { font-size: 0.75rem; color: var(--text-d); }
.admin-portal-link {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.72rem; color: var(--text-d);
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}
.admin-portal-link:hover { color: var(--accent); border-color: var(--accent); }

/* ══════════════════════════════════════════════
   MODALS
══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(6,0,16,0.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border-h);
  border-radius: var(--r-xl);
  padding: 40px;
  max-width: 480px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  animation: modalSlideUp 0.3s cubic-bezier(.25,.46,.45,.94);
}
.modal-wide { max-width: 800px; padding: 0; }

@keyframes modalSlideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.modal-x {
  position: absolute; top: 16px; right: 16px; z-index: 150;
  width: 36px; height: 36px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-m); font-size: 1rem;
  transition: all var(--t-fast);
}
.modal-x:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* Auth modal */
.auth-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.atab {
  flex: 1; padding: 14px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em;
  color: var(--text-m);
  border-bottom: 2px solid transparent;
  transition: all var(--t-fast);
  text-align: center;
}
.atab:hover { color: var(--text); }
.atab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Project Modal */
.proj-modal-header {
  position: relative;
  background: var(--card);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  overflow: hidden;
}
.proj-embed-wrap {
  position: relative; aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}
.proj-embed-thumb {
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity var(--t-fast);
}
.proj-embed-thumb.hidden { opacity: 0; }
.proj-embed-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.proj-embed-play .play-circle {
  width: 72px; height: 72px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: #fff;
  box-shadow: 0 0 50px var(--glow);
  transition: transform var(--t-fast);
}
.proj-embed-play:hover .play-circle { transform: scale(1.1); }
.proj-embed-iframe {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: none;
}
.proj-embed-iframe.active { display: block; }

.proj-modal-body { padding: 28px 32px 32px; }
.proj-modal-cat {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 8px;
}
.proj-modal-title {
  font-size: 1.4rem; font-weight: 700;
  color: var(--text); margin-bottom: 16px; line-height: 1.3;
}
.proj-modal-desc {
  font-size: 0.85rem; color: var(--text-m);
  line-height: 1.8; margin-bottom: 24px;
}
.proj-modal-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.proj-modal-tags span {
  font-size: 0.68rem; padding: 4px 12px;
  background: rgba(121,7,235,0.1);
  border: 1px solid var(--border-h);
  border-radius: 40px; color: var(--accent);
}

/* Blog Modal */
.blog-modal-img {
  width: 100%; aspect-ratio: 21/9; object-fit: cover;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.blog-modal-body {
  padding: 40px;
  background: var(--surface);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
}
.blog-modal-title {
  font-size: clamp(1.6rem, 4vw, 2rem); font-weight: 700;
  color: var(--text); margin-bottom: 20px; line-height: 1.3;
}
.blog-modal-meta { font-size: 0.75rem; color: var(--text-d); margin-bottom: 24px; }

/* Premium Blog Article Styling */
.post-article {
  font-size: 1.15rem;
  line-height: 1.85;
  color: #e2e8f0;
}
.post-article p { margin-bottom: 1.5em; }
.post-article a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.post-article img,
.post-article video,
.post-article iframe {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  margin: 32px 0;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.post-article h2, .post-article h3 {
  color: #fff;
  margin: 1.5em 0 0.8em;
  font-weight: 700;
}

/* Blog post media items */
.post-media-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 28px 0;
}
.post-media-item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-h);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  background: #000;
}
.post-media-item iframe {
  width: 100%; aspect-ratio: 16/9;
  border: none; margin: 0;
  display: block;
}
.post-media-item img {
  width: 100%;
  display: block;
  margin: 0;
  border: none;
}

/* Comments Section Separation */
.post-comments-section {
  background: rgba(10, 0, 25, 0.6);
  border: 1px solid rgba(121, 7, 235, 0.25);
  border-radius: 16px;
  padding: 32px;
  margin-top: 50px;
  box-shadow: 0 0 30px rgba(121, 7, 235, 0.08), inset 0 0 60px rgba(121, 7, 235, 0.03);
}
.comments-section { margin-top: 0; border-top: none; padding-top: 0; }
.comments-title {
  font-size: 1.2rem; font-weight: 700; color: var(--text);
  margin-bottom: 24px; display: flex; align-items: center; gap: 10px;
}
.comment-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.comment-author {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.comment-avatar {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.comment-name { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.comment-date { font-size: 0.7rem; color: var(--text-d); }
.comment-text { font-size: 0.82rem; color: var(--text-m); line-height: 1.6; }

.comment-form { margin-top: 20px; }
.comment-form .form-row-2 { display: flex; gap: 12px; }
.comment-form .form-grp { margin-bottom: 14px; }

/* ══════════════════════════════════════════════
   EMPTY STATES
══════════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 80px 20px;
  color: var(--text-d);
}
.empty-state i { font-size: 3rem; margin-bottom: 16px; display: block; }
.empty-state p { font-size: 0.88rem; }

/* ══════════════════════════════════════════════
   TOAST NOTIFICATIONS
══════════════════════════════════════════════ */
.toasts {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  font-size: 0.82rem; color: var(--text);
  pointer-events: auto;
  animation: toastIn 0.3s ease;
  max-width: 320px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--accent); }
.toast i { font-size: 1rem; }
.toast.success i { color: var(--success); }
.toast.error i   { color: var(--danger); }
.toast.info i    { color: var(--accent); }
@keyframes toastIn {
  from { transform: translateX(30px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.toast.out {
  animation: toastOut 0.25s ease forwards;
}
@keyframes toastOut {
  to { transform: translateX(30px); opacity: 0; }
}

/* ══════════════════════════════════════════════
   SCROLL REVEAL ANIMATION (DISABLED)
══════════════════════════════════════════════ */
.reveal {
  opacity: 1;
  transform: none;
  transition: none;
}
.reveal.visible { opacity: 1; transform: none; }

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-tag   { justify-content: center; }
  .hero-headline { align-items: center; text-align: center; }
  .hero-sub   { margin: 0 auto 40px; text-align: center; }
  .hero-btns-wrapper { justify-content: center; }
  .hero-btns  { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hstat      { align-items: center; text-align: center; }
  /* Restore the premium interactive showreel player box on mobile/tablet */
  .hero-right {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 36px;
  }
  .cinema-box {
    width: 300px;
    height: 300px;
  }
  
  /* RTL specific centering overrides on mobile */
  [dir="rtl"] .hero-inner { text-align: center; }
  [dir="rtl"] .hero-headline { align-items: center; text-align: center; }
  [dir="rtl"] .hero-sub { text-align: center; }
  [dir="rtl"] .hstat { align-items: center; }
  
  .contact-layout { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; max-width: 100%; }
}

@media (max-width: 768px) {
  /* Horizontal Swiping Category Filters for Mobile */
  .port-filters {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    padding: 4px 16px 14px 16px !important;
    margin-left: -5vw !important;
    margin-right: -5vw !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide Firefox scrollbar */
    gap: 8px;
  }
  .port-filters::-webkit-scrollbar {
    display: none; /* Hide Chrome/Safari scrollbar */
  }
  .pf-btn {
    flex-shrink: 0;
  }
  .hero-arrow { display: none; }
  .hero-btns-wrapper { justify-content: center; }
}

@media (max-width: 640px) {
  .page-section  { padding: 70px 4vw 50px; }
  
  /* Fix Top Navbar */
  .navbar {
    padding: 0 4vw;
    height: 65px;
  }
  .nav-logo-img {
    height: 28px !important;
  }
  .nav-menu { 
    display: none; position: fixed; top: 65px; left: 0; right: 0;
    background: rgba(6, 0, 16, 0.98); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); flex-direction: column;
    padding: 24px; gap: 16px; border-bottom: 1px solid var(--border);
    align-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); 
  }
  .nav-menu.open { display: flex; }
  .hamburger { display: flex; flex-direction: column; width: 28px; gap: 5px; cursor: pointer; }
  .hamburger span { width: 100%; height: 2px; background: var(--text); border-radius: 2px; }
  .nav-actions { gap: 12px; }
  .auth-trigger { padding: 8px; font-size: 0.9rem; }
  .auth-trigger span { display: none; }
  .auth-trigger i { margin: 0 !important; }
  
  /* Clean 2-Column Cards Layout */
  .services-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .port-grid     { grid-template-columns: 1fr 1fr; gap: 10px; }
  .blog-grid     { grid-template-columns: 1fr 1fr; gap: 10px; }
  
  /* Readable Service Cards */
  .svc-card {
    padding: 20px 14px;
    border-radius: var(--r-md);
  }
  .svc-num { font-size: 1.8rem; top: 12px; right: 14px; opacity: 0.08; }
  [dir="rtl"] .svc-num { left: 14px; right: auto; }
  .svc-icon { width: 42px; height: 42px; font-size: 1.2rem; margin-bottom: 14px; }
  .svc-card h3 { font-size: 0.88rem; margin-bottom: 8px; line-height: 1.3; }
  .svc-card p { font-size: 0.76rem; line-height: 1.6; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .svc-chips { gap: 6px; }
  .svc-chips span { font-size: 0.65rem; padding: 4px 8px; }
  
  /* Readable Portfolio Cards */
  .port-card { border-radius: var(--r-md); }
  .port-body { padding: 14px 12px 16px; }
  .port-body h3 { font-size: 0.85rem; min-height: 40px; line-height: 1.4; }
  .port-desc-box { padding: 8px 10px; margin-top: 8px; margin-bottom: 12px; height: auto; min-height: 54px; }
  .port-desc-box p { font-size: 0.74rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .port-footer { padding-right: 36px; }
  [dir="rtl"] .port-footer { padding-left: 36px; padding-right: 0; }
  .like-btn { bottom: 12px; right: 12px; width: 30px; height: 30px; font-size: 0.8rem; }
  [dir="rtl"] .like-btn { left: 12px; right: auto; }
  
  /* Forms & Footer */
  .form-row      { grid-template-columns: 1fr; }
  .contact-form  { padding: 24px 16px; }
  
  .footer-top    { grid-template-columns: 1fr !important; gap: 40px; padding: 60px 5vw 40px; text-align: center; }
  [dir="rtl"] .footer-top { text-align: center; }
  .footer-brand { margin: 0 auto; }
  .footer-col h5::after { left: 50%; transform: translateX(-50%); }
  [dir="rtl"] .footer-col h5::after { right: 50%; transform: translateX(50%); }
  .fc-list li { justify-content: center; text-align: center; }
  .footer-socials { justify-content: center; }
  
  /* Snug Edge-to-Edge Modals */
  .modal-box     { padding: 24px 16px; }
  .modal-wide    { padding: 0 !important; border-radius: var(--r-lg); }
  .proj-modal-body, .blog-modal-body { padding: 20px 16px 24px 16px; }
  .proj-modal-title { font-size: 1.25rem !important; }
  .blog-modal-title { font-size: 1.4rem !important; margin-bottom: 16px !important; }
  
  .hero-stats    { gap: 20px; }
  .hero-headline { font-size: clamp(2rem, 8vw, 2.8rem) !important; }
  [dir="rtl"] .hero-headline { font-size: clamp(1.8rem, 7vw, 2.6rem) !important; line-height: 1.3; }
  .page-hero-title { font-size: clamp(1.6rem, 7vw, 2.2rem) !important; }
}

@media (max-width: 480px) {
  /* No special overrides needed if 640px is responsive enough, but keep minor tweaks */
  .hero-btns { flex-direction: column; width: 100%; }
  .hero-btns .btn-primary, .hero-btns .btn-ghost { width: 100%; justify-content: center; }
}

/* ══════════════════════════════════════════════
   FLOATING TOOL ICONS (JS-driven infinite roam)
══════════════════════════════════════════════ */
.tool-float {
  position: fixed;
  z-index: 0; /* Behind everything */
  width: 72px; height: 72px;
  border-radius: 16px;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  will-change: transform, opacity;
  filter: drop-shadow(0 0 15px rgba(255,255,255,0.15)) drop-shadow(0 10px 20px rgba(0,0,0,0.5));
  transition: opacity 0.6s ease;
}
.tool-float.visible { opacity: 0.08; }

.tool-float img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: inherit;
}






/* ══════════════════════════════════════════════
   RTL OVERRIDES
══════════════════════════════════════════════ */
/* ══════════════════════════════════════════════
   RTL OVERRIDES (ARABIC FORMATTING)
══════════════════════════════════════════════ */
[dir="rtl"] body {
  font-family: 'IBM Plex Sans Arabic', 'IBM Plex Mono', sans-serif;
  text-align: right;
}

/* Reset letter spacing for Arabic font to prevent disconnected letters */
[dir="rtl"] .nav-link,
[dir="rtl"] .btn-primary,
[dir="rtl"] .btn-ghost,
[dir="rtl"] .sec-title,
[dir="rtl"] .hero-headline,
[dir="rtl"] .hero-sub,
[dir="rtl"] p,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] .pf-btn,
[dir="rtl"] .form-grp label,
[dir="rtl"] .atab,
[dir="rtl"] .lang-btn,
[dir="rtl"] .footer-col h5,
[dir="rtl"] .cinfo-lbl {
  letter-spacing: 0 !important;
}

/* Keep monospace elements in their font even in Arabic mode */
[dir="rtl"] .logo-name,
[dir="rtl"] .nav-logo-img,
[dir="rtl"] .sec-label,
[dir="rtl"] .port-cat-badge,
[dir="rtl"] .blog-cat,
[dir="rtl"] .svc-num,
[dir="rtl"] .ticker-set span,
[dir="rtl"] .hero-tag,
[dir="rtl"] .cb-label,
[dir="rtl"] .cb-sub,
[dir="rtl"] .svc-chips span,
[dir="rtl"] .port-tags span,
[dir="rtl"] .proj-modal-tags span {
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0; /* safe default */
}

/* Specific alignments and margins for RTL */
[dir="rtl"] .ticker { animation-name: tickerLoopRtl; }
[dir="rtl"] .ticker-set { padding-right: 0; padding-left: 32px; }
@keyframes tickerLoopRtl {
  0%   { transform: translateX(0); }
  100% { transform: translateX(50%); }
}
[dir="rtl"] .hero-headline { align-items: flex-start; }
[dir="rtl"] .toasts { left: 24px; right: auto; }
[dir="rtl"] .toast { animation-name: toastInRtl; border-left: none; border-right: 3px solid var(--accent); }
[dir="rtl"] .toast.success { border-right-color: var(--success); }
[dir="rtl"] .toast.error { border-right-color: var(--danger); }
@keyframes toastInRtl {
  from { transform: translateX(-30px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
[dir="rtl"] .hero-tag { flex-direction: row; }
[dir="rtl"] .cinfo-icon { margin-left: 16px; margin-right: 0; }
[dir="rtl"] .nav-link::after { left: auto; right: 50%; }
[dir="rtl"] .nav-link.active::after { left: auto; right: 14px; }
[dir="rtl"] .btn-primary i { margin-right: 0; margin-left: 8px; }
[dir="rtl"] .btn-ghost i { margin-right: 0; margin-left: 8px; }
[dir="rtl"] .hstat > span { margin-left: 0; margin-right: 2px; }
[dir="rtl"] .port-play-btn { left: auto; right: 20px; }
[dir="rtl"] .blog-comments i { margin-right: 0; margin-left: 6px; }
[dir="rtl"] .hero-inner { text-align: right; }
[dir="rtl"] .footer-top { text-align: right; }
[dir="rtl"] .contact-layout { text-align: right; }
[dir="rtl"] .auth-modal-box { text-align: right; }
[dir="rtl"] .modal-x { right: auto; left: 16px; }

/* ─── Enhanced Arabic/RTL Typography & Layout ─── */

/* Arabic hero headline: bigger, bolder, more dramatic */
[dir="rtl"] .hero-headline {
  align-items: flex-start;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.25;
}

/* Arabic body text needs more line-height for readability */
[dir="rtl"] .hero-sub {
  font-size: 1rem;
  line-height: 2;
  font-weight: 400;
}

/* Section headers in Arabic */
[dir="rtl"] .sec-title {
  font-weight: 800;
}
[dir="rtl"] .sec-desc {
  line-height: 2;
}

/* Service cards */
[dir="rtl"] .svc-card { text-align: right; }
[dir="rtl"] .svc-card p { line-height: 1.9; }

/* Portfolio */
[dir="rtl"] .port-info { text-align: right; }
[dir="rtl"] .port-title { font-weight: 700; }
[dir="rtl"] .port-desc { line-height: 1.8; }

/* Blog cards */
[dir="rtl"] .blog-card { text-align: right; }
[dir="rtl"] .blog-title { font-weight: 700; }
[dir="rtl"] .blog-excerpt { line-height: 1.9; }

/* Blog modal */
[dir="rtl"] .blog-modal-body { text-align: right; }
[dir="rtl"] .post-article { line-height: 2; }

/* Footer */
[dir="rtl"] .footer-col { text-align: right; }
[dir="rtl"] .footer-links { text-align: right; }

/* Contact */
[dir="rtl"] .cinfo-item { text-align: right; }
[dir="rtl"] .contact-form { text-align: right; }

/* Hero buttons and stats flow naturally from right to left in RTL */

/* Cinema box alignment */
[dir="rtl"] .hero-right { order: -1; }

/* Category filter buttons */
[dir="rtl"] .port-filters { direction: rtl; }

/* Modal content */
[dir="rtl"] .proj-modal-desc { line-height: 1.9; }
[dir="rtl"] .proj-modal-tags { justify-content: flex-end; }

/* ═══════════════ View All Button ═══════════════ */
.view-all-wrap {
  position: relative;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 60px;
  margin-bottom: 20px;
}
.view-all-arrow {
  position: absolute;
  top: -18px;
  pointer-events: none;
  opacity: 0.65;
  z-index: 0;
  transition: opacity 0.3s ease;
}
.arrow-left {
  right: calc(50% + 150px);
  left: auto;
}
.arrow-right {
  left: calc(50% + 150px);
  right: auto;
}
@media (max-width: 768px) {
  .view-all-arrow {
    display: none !important;
  }
}
.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 42px;
  background: rgba(121, 7, 235, 0.06);
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: var(--r-md);
  border: 1px solid var(--border-h);
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1;
}
[dir="rtl"] .btn-view-all {
  font-family: 'Cairo', sans-serif;
  letter-spacing: normal;
}
.btn-view-all::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--accent), #9b35ff);
  z-index: -1;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  transform: scaleX(0);
  transform-origin: right;
}
[dir="rtl"] .btn-view-all::before {
  transform-origin: left;
}
.btn-view-all:hover {
  transform: translateY(-4px);
  color: #fff;
  border-color: var(--accent-h);
  box-shadow: 0 12px 35px rgba(121, 7, 235, 0.4), 0 0 15px rgba(121, 7, 235, 0.2);
}
.btn-view-all:hover::before {
  transform: scaleX(1);
}
.btn-view-all i {
  font-size: 0.85rem;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.btn-view-all:hover i {
  transform: translateX(6px);
}
[dir="rtl"] .btn-view-all i {
  transform: scaleX(-1);
}
[dir="rtl"] .btn-view-all:hover i {
  transform: scaleX(-1) translateX(6px);
}

/* ═══════════════ Coming Soon Badges ═══════════════ */
.nav-soon-link {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  cursor: default;
}
.nav-soon-badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  color: #ff4d6d;
  background: rgba(255, 77, 109, 0.08);
  border: 1px solid rgba(255, 77, 109, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'IBM Plex Mono', monospace;
  transition: all var(--t-fast);
}
.nav-soon-link:hover .nav-soon-badge {
  color: #fff;
  background: #ff4d6d;
  border-color: #ff4d6d;
  box-shadow: 0 0 10px rgba(255, 77, 109, 0.4);
}
[dir="rtl"] .nav-soon-badge {
  font-family: 'Cairo', sans-serif;
  font-size: 0.55rem;
}



/* ═══════════════ Sub-Page Hero Header ═══════════════ */
.page-hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 140px 5vw 60px;
  background: linear-gradient(180deg, rgba(121,7,235,0.08) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}
.page-hero .sec-label {
  margin-bottom: 16px;
}
.page-hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 14px;
}
.page-hero-desc {
  font-size: 0.95rem;
  color: var(--text-m);
  max-width: 500px;
  margin: 0 auto;
}
[dir="rtl"] .page-hero-title {
  letter-spacing: 0 !important;
  font-weight: 800;
}
[dir="rtl"] .page-hero-desc {
  line-height: 2;
}

/* ═══════════════ Interactive Reel Hero ═══════════════ */
.cinema-box.interactive-showreel {
  cursor: pointer;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
  z-index: 10;
}
.cinema-box.interactive-showreel:hover {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(121, 7, 235, 0.35);
  transform: scale(1.02);
}
.showreel-loop-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
  opacity: 0.65;
}
.cinema-box.interactive-showreel:hover .showreel-loop-video {
  transform: scale(1.08);
  opacity: 0.85;
}
.showreel-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: radial-gradient(circle at center, rgba(6, 0, 16, 0.2) 0%, rgba(6, 0, 16, 0.7) 100%);
  transition: background 0.4s ease;
}
.cinema-box.interactive-showreel:hover .showreel-overlay {
  background: radial-gradient(circle at center, rgba(6, 0, 16, 0.05) 0%, rgba(6, 0, 16, 0.5) 100%);
}
.showreel-overlay .play-circle {
  width: 68px;
  height: 68px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  box-shadow: 0 0 30px var(--glow), 0 0 10px rgba(121, 7, 235, 0.4);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, background-color 0.4s ease;
  transform: scale(0.95);
}
.showreel-overlay .play-circle i {
  margin-left: 4px;
  transition: transform 0.4s ease;
}
[dir="rtl"] .showreel-overlay .play-circle i {
  margin-left: 0;
  margin-right: 4px;
}
.cinema-box.interactive-showreel:hover .play-circle {
  transform: scale(1.08);
  background: var(--accent-h);
  box-shadow: 0 0 45px var(--accent), 0 0 20px rgba(121, 7, 235, 0.6);
}
.cinema-box.interactive-showreel:hover .play-circle i {
  transform: scale(1.1);
}
.showreel-overlay .sr-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  transition: all 0.4s ease;
  opacity: 0.85;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
[dir="rtl"] .showreel-overlay .sr-label {
  font-family: 'Cairo', sans-serif;
  letter-spacing: normal;
}
.cinema-box.interactive-showreel:hover .sr-label {
  opacity: 1;
  letter-spacing: 0.18em;
  border-color: rgba(255, 255, 255, 0.4);
}
[dir="rtl"] .cinema-box.interactive-showreel:hover .sr-label {
  letter-spacing: normal;
  border-color: rgba(255, 255, 255, 0.4);
}

/* ═══════════════ RTL Fixes & Enhancements ═══════════════ */
[dir="rtl"] .svc-num {
  right: auto;
  left: 22px;
}
.port-tags .tag-more {
  direction: ltr;
  display: inline-flex;
  align-items: center;
}

/* ═══════════════ Stats Improvements ═══════════════ */
.hstat-val {
  display: flex;
  align-items: baseline;
  gap: 3px;
  line-height: 1;
}
.hstat-plus {
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 700;
  margin-left: 2px;
}
[dir="rtl"] .hstat-plus {
  margin-left: 0;
  margin-right: 2px;
}
