/* 
  DeCode Website - Design System & Custom Styles
  Primary: Dark Tech Theme with Neon Accents
*/

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

:root {
  --bg-color: #020514;
  --bg-grid: rgba(0, 240, 255, 0.02);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  
  /* Neon Accent Colors */
  --color-cyan: #00f0ff;
  --color-purple: #8f00ff;
  --color-magenta: #ff007a;
  
  /* Glassmorphism */
  --glass-bg: rgba(5, 10, 25, 0.75);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(0, 240, 255, 0.3);
  --glass-shadow: rgba(0, 0, 0, 0.5);
  
  --font-ar: 'Cairo', sans-serif;
  --font-en: 'Outfit', sans-serif;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base resets & styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-primary);
  overflow-x: hidden;
}

body {
  font-family: var(--font-ar);
  line-height: 1.6;
  background: transparent;
  background-image: 
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: center;
  -webkit-font-smoothing: antialiased;
  
  /* Prevent Text Selection globally except selectable elements */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Allow text selection for inputs, textareas, code snippets, pre elements, and selectable classes */
input, textarea, [contenteditable="true"], code, pre, .selectable, .selectable *, .contact-details *, .modal-body-desc, .modal-body-desc * {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Prevent Image Downloading & Dragging */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  pointer-events: none;
}
a img {
  pointer-events: auto; /* Allow links wrapping images to be clickable */
}

body.lang-en {
  font-family: var(--font-en);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-cyan);
}

/* Background Canvas */
#three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* Glowing Aura in background */
.aura {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
}
.aura-cyan {
  top: -5%;
  left: -5%;
  background: radial-gradient(circle, #00f0ff 0%, #0044ff 60%, transparent 100%);
}
.aura-purple {
  bottom: -10%;
  right: -5%;
  background: radial-gradient(circle, #8f00ff 0%, #4400cc 60%, transparent 100%);
}

/* Typography Helpers */
h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Ensure all sections render above canvas & aura layers */
section, footer, .modal {
  position: relative;
  z-index: 2;
}

/* Neon gradient divider between sections */
section + section::before,
section + footer::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 240, 255, 0.3) 25%,
    rgba(143, 0, 255, 0.5) 50%,
    rgba(0, 240, 255, 0.3) 75%,
    transparent 100%
  );
  pointer-events: none;
}

/* Section Specifics */
.about, .services {
  background: rgba(2, 5, 20, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #ffffff 30%, var(--color-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-purple {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glass Card Definition */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px var(--glass-shadow);
  border-radius: 16px;
  transition: var(--transition);
}

.glass-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 12px 40px rgba(0, 240, 255, 0.1), 0 8px 24px rgba(143, 0, 255, 0.08);
  transform: translateY(-5px);
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  padding: 20px 0;
  transition: var(--transition);
  background: rgba(5, 10, 25, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

header.scrolled {
  padding: 12px 0;
  background: rgba(3, 6, 17, 0.85) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.5rem;
  direction: ltr; /* Always LTR regardless of page direction */
}

.logo span {
  color: var(--color-cyan);
}

/* Real logo image in Navbar/Footer — mix-blend-mode:screen removes white bg on dark theme */
.logo-img-nav {
  height: 48px;
  width: auto;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.35));
  transition: var(--transition);
  object-fit: contain;
}

.logo-img-nav:hover {
  filter: drop-shadow(0 0 14px rgba(0, 240, 255, 0.65));
  transform: scale(1.04);
}

/* Hologram core logo */
.hologram-core.logo-hologram {
  background: none;
  width: 62%;
  height: 62%;
}

.hologram-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 18px rgba(0, 240, 255, 0.7)) brightness(1.1);
  animation: float 6s ease-in-out infinite;
}

.logo-icon {
  width: 35px;
  height: 35px;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-purple));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-color);
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.nav-menu {
  display: flex;
  gap: 30px;
  list-style: none;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  padding: 5px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-purple));
  transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-cyan), var(--color-purple));
  color: var(--bg-color);
  box-shadow: 0 5px 20px rgba(0, 240, 255, 0.2);
  border: none;
}

.btn-primary:hover {
  box-shadow: 0 5px 25px rgba(0, 240, 255, 0.45);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-cyan);
  transform: translateY(-2px);
}

.btn-lang {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-lang:hover {
  border-color: var(--color-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
  border-radius: 2px;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  overflow: hidden;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 40px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-badge {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.05);
}

.hero-badge span {
  width: 8px;
  height: 8px;
  background: var(--color-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-cyan);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.2;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.hero-visual {
  position: relative;
  width: 100%;
  height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Floating holographic visual representing Code + Art */
.hologram-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hologram-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px dashed rgba(0, 240, 255, 0.2);
  animation: rotateClockwise 20s linear infinite;
}

.hologram-circle-inner {
  position: absolute;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  border: 1px dashed rgba(189, 0, 255, 0.2);
  animation: rotateCounterClockwise 15s linear infinite;
}

.hologram-core {
  width: 60%;
  height: 60%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.1) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--color-cyan);
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.6);
  animation: float 6s ease-in-out infinite;
}

.floating-container {
  position: absolute;
  z-index: 10;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), z-index 0.3s ease;
  cursor: pointer;
  width: max-content;
  height: max-content;
}
.floating-container.expanded {
  z-index: 100 !important;
}

/* Desktop Expanded Scales */
.floating-container.expanded.frag-1-wrap,
.floating-container.expanded.frag-2-wrap,
.floating-container.expanded.frag-3-wrap {
  transform: scale(1.35) !important;
}
.floating-container.expanded.code-panel-wrap,
.floating-container.expanded.palette-panel-wrap {
  transform: scale(1.2) !important;
}

.frag-1-wrap { top: 10%; left: 5%; }
.frag-2-wrap { bottom: 15%; right: 5%; }
.frag-3-wrap { top: 70%; left: 0%; }

/* Floating UI Code fragments */
.floating-code-frag {
  position: relative;
  padding: 8px 16px;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--color-cyan);
  border-radius: 8px;
  border: 1px solid rgba(0, 240, 255, 0.15);
  background: rgba(3, 6, 17, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: float 8s ease-in-out infinite;
  white-space: nowrap;

  /* iOS Safari backdrop-filter scale compositor bug fix */
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.frag-1 { animation-delay: 0s; }
.frag-2 { color: var(--color-purple); border-color: rgba(189, 0, 255, 0.15); animation-delay: 2s; }
.frag-3 { color: var(--color-magenta); border-color: rgba(255, 0, 122, 0.15); animation-delay: 4s; }

@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(2deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes rotateClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotateCounterClockwise {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* Section Common Styles */
section {
  padding: 100px 0;
  position: relative;
  scroll-margin-top: 100px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.section-tag {
  color: var(--color-cyan);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-title {
  font-size: 2.5rem;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: start;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-intro {
  width: 100%;
  max-width: 100%;
  margin-top: 15px;
}

.about-desc {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 12px;
}
.about-desc:last-child {
  margin-bottom: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.stat-card {
  padding: 24px;
  text-align: center;
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-cyan);
  margin-bottom: 5px;
  font-family: var(--font-en);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.about-feature-icon {
  width: 45px;
  height: 45px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-cyan);
  font-size: 1.2rem;
}

.about-feature-text h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.about-feature-text p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Why Choose Us Section */
.why-us {
  background: radial-gradient(circle at 10% 50%, rgba(0, 240, 255, 0.03) 0%, transparent 50%);
}

.why-us-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.why-card {
  padding: 35px 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.why-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-purple));
  opacity: 0;
  transition: var(--transition);
}

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

.why-icon {
  width: 50px;
  height: 50px;
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-cyan);
  font-size: 1.4rem;
  transition: var(--transition);
}

.why-card:hover .why-icon {
  background: var(--color-cyan);
  color: var(--bg-color);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  transform: scale(1.05);
}

.why-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.why-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.service-card {
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-purple));
  opacity: 0;
  transition: var(--transition);
}

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

.service-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  color: var(--color-cyan);
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background: var(--color-cyan);
  color: var(--bg-color);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  transform: scale(1.05);
}

.service-card h3 {
  font-size: 1.3rem;
  margin-top: 10px;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.service-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.service-features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.service-features-list li::before {
  content: '✦';
  color: var(--color-cyan);
}

/* Portfolio Section */
.portfolio-filter {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 24px;
  border-radius: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
  background: linear-gradient(135deg, var(--color-cyan), var(--color-purple));
  color: var(--bg-color);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  height: 360px;
  cursor: pointer;
}

.portfolio-img-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.portfolio-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* fallback placeholder colors for portfolio items if images aren't present */
.portfolio-placeholder-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #09132b, #1b0a2b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-size: 2rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.1);
  position: relative;
}

.portfolio-placeholder-img::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0,240,255,0.05) 0%, transparent 70%);
}

.portfolio-item:hover .portfolio-img, 
.portfolio-item:hover .portfolio-placeholder-img {
  transform: scale(1.08);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3, 6, 17, 0.92) 0%, rgba(3, 6, 17, 0.5) 55%, transparent 100%);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 1; /* Always visible for content readability */
  transition: var(--transition);
}

.portfolio-category {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.portfolio-item-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.portfolio-item-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 15px;
}

.portfolio-btn {
  align-self: flex-start;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-cyan);
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}

/* Academy Waitlist Section */
.academy {
  background: radial-gradient(circle at center, rgba(189, 0, 255, 0.05) 0%, transparent 60%);
}

.academy-card {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

.academy-badge {
  padding: 6px 16px;
  background: rgba(189, 0, 255, 0.1);
  border: 1px solid rgba(189, 0, 255, 0.25);
  border-radius: 30px;
  color: #d880ff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.academy-title {
  font-size: 2.5rem;
}

.academy-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
}

.waitlist-form {
  display: flex;
  width: 100%;
  max-width: 500px;
  gap: 10px;
  margin-top: 15px;
}

.waitlist-input {
  flex-grow: 1;
  background: rgba(3, 6, 17, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 14px 24px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
  font-family: inherit;
}

.waitlist-input:focus {
  outline: none;
  border-color: var(--color-purple);
  box-shadow: 0 0 15px rgba(189, 0, 255, 0.25);
}

.waitlist-btn {
  background: linear-gradient(135deg, var(--color-purple), var(--color-magenta));
  border: none;
  color: var(--text-primary);
  font-weight: 700;
  padding: 0 30px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
}

.waitlist-btn:hover {
  box-shadow: 0 5px 20px rgba(189, 0, 255, 0.4);
  transform: translateY(-2px);
}

.academy-coming-soon-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 15px;
}

.academy-coming-soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 45px;
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-purple) 50%, var(--color-magenta) 100%);
  background-size: 200% auto;
  border-radius: 50px;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.35), 
              0 0 60px rgba(189, 0, 255, 0.2),
              inset 0 0 15px rgba(255, 255, 255, 0.3);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
  animation: gradientShift 4s ease infinite, comingSoonPulse 2s ease-in-out infinite;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.academy-coming-soon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: rotate(30deg);
  animation: shine 4s linear infinite;
}

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

@keyframes comingSoonPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.35), 0 0 60px rgba(189, 0, 255, 0.2);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 45px rgba(0, 240, 255, 0.55), 0 0 90px rgba(189, 0, 255, 0.4);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.35), 0 0 60px rgba(189, 0, 255, 0.2);
  }
}

@keyframes shine {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* Academy Learning Paths */
.learning-paths-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 45px;
  gap: 20px;
}

.path-box {
  flex: 1;
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  border-radius: 16px;
  min-height: 220px;
  justify-content: center;
}

.path-icon {
  width: 60px;
  height: 60px;
  background: rgba(189, 0, 255, 0.08);
  border: 1px solid rgba(189, 0, 255, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #d880ff;
  box-shadow: 0 0 15px rgba(189, 0, 255, 0.15);
  transition: var(--transition);
}

.path-box:hover .path-icon {
  background: var(--color-purple);
  color: var(--text-primary);
  box-shadow: 0 0 25px rgba(189, 0, 255, 0.5);
  transform: scale(1.05);
}

.path-box h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.path-box p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Central Choice Node */
.path-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  width: 180px;
}

.connector-line {
  width: 2px;
  height: 40px;
  background: linear-gradient(180deg, rgba(189,0,255,0.4), rgba(0,240,255,0.4));
}

.connector-node {
  background: rgba(10, 15, 30, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-cyan);
  white-space: nowrap;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
  text-align: center;
}

/* Academy Badges Grid (Three column badges) */
.academy-badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  margin-top: 40px;
}

.badge-item {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  border-radius: 16px;
  border: 1px dashed var(--glass-border);
  transition: var(--transition);
}

.badge-item:hover {
  border-style: solid;
  border-color: rgba(189, 0, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(189, 0, 255, 0.1);
}

.badge-icon {
  font-size: 2rem;
  color: var(--color-purple);
  filter: drop-shadow(0 0 8px rgba(189, 0, 255, 0.4));
}

.badge-item h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.badge-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Responsiveness for new Academy features */
@media (max-width: 768px) {
  .learning-paths-container {
    flex-direction: column;
    gap: 20px;
  }
  .path-connector {
    width: 100%;
    margin: 10px 0;
  }
  .connector-line {
    width: 2px;
    height: 30px;
  }
  .academy-badges-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

/* ============================================================
   TESTIMONIALS SECTION
   ============================================================ */
.testimonials {
  background: radial-gradient(circle at 80% 50%, rgba(0, 240, 255, 0.04) 0%, transparent 60%);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin-top: 10px;
}

.testi-card {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.testi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-purple));
  opacity: 0;
  transition: var(--transition);
}

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

.testi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.testi-rating {
  font-size: 1.1rem;
  letter-spacing: 2px;
  filter: drop-shadow(0 0 6px rgba(255, 170, 0, 0.4));
}

.testi-text {
  font-size: 0.97rem;
  line-height: 1.9;
  color: var(--text-secondary);
  font-style: italic;
  flex: 1;
  position: relative;
  padding-inline-start: 16px;
  border-inline-start: 2px solid rgba(0, 240, 255, 0.3);
}

.testi-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--glass-border);
}

.testi-user-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.testi-user-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.testi-user-title {
  font-size: 0.82rem;
  color: var(--color-cyan);
  font-weight: 500;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

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

.contact-info-col h3 {
  font-size: 1.4rem;
  font-weight: 700;
}

.contact-info-col p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.contact-detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.contact-detail-item.selectable {
  user-select: all;
  cursor: text;
}

.contact-detail-item i {
  color: var(--color-cyan);
  width: 20px;
  font-size: 1rem;
}

.contact-form-col {
  padding: 40px 36px;
  border-radius: 20px;
}

.contact-form-col form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea {
  background: rgba(3, 6, 17, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--text-primary);
  font-family: var(--font-ar);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s ease;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-cyan);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
  background: rgba(3, 6, 17, 0.9);
}

/* Form validation visual states */
.form-group input.is-invalid,
.form-group textarea.is-invalid {
  border-color: #ff004c;
  box-shadow: 0 0 0 3px rgba(255, 0, 76, 0.1);
  animation: shakeInput 0.35s ease;
}

.form-group input.is-valid,
.form-group textarea.is-valid {
  border-color: #00e87a;
  box-shadow: 0 0 0 3px rgba(0, 232, 122, 0.08);
}

.form-error-msg {
  font-size: 0.8rem;
  color: #ff4d7d;
  display: none;
  margin-top: -4px;
}

.form-error-msg.visible {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes shakeInput {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Toast Notification System */
.toast-container {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

[dir="rtl"] .toast-container {
  left: auto;
  right: 30px;
}

.toast {
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  max-width: 380px;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  pointer-events: all;
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.hiding {
  animation: toastSlideOut 0.3s ease forwards;
}

.toast-success {
  background: rgba(0, 185, 90, 0.85);
  border-color: rgba(0, 232, 122, 0.3);
}

.toast-error {
  background: rgba(200, 0, 60, 0.85);
  border-color: rgba(255, 0, 76, 0.3);
}

.toast-info {
  background: rgba(0, 100, 200, 0.85);
  border-color: rgba(0, 180, 255, 0.3);
}

.toast-warning {
  background: rgba(200, 120, 0, 0.85);
  border-color: rgba(255, 180, 0, 0.3);
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(10px) scale(0.95); }
}

/* Footer styles */
footer {
  border-top: 1px solid var(--glass-border);
  background: rgba(5, 10, 25, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 60px 0 30px;
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
  align-items: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 320px;
}

.footer-socials {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

.social-icon {
  width: 45px;
  height: 45px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1.1rem;
  transition: var(--transition);
}

.social-icon:hover {
  color: #fff;
  transform: scale(1.12) translateY(-4px);
}

/* Glowing buttons brand-specific colors */
.social-icon.telegram:hover {
  background: #0088cc;
  border-color: #0088cc;
  box-shadow: 0 0 25px rgba(0, 136, 204, 0.5);
}
.social-icon.facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
  box-shadow: 0 0 25px rgba(24, 119, 242, 0.5);
}
.social-icon.whatsapp:hover {
  background: #25d366;
  border-color: #25d366;
  box-shadow: 0 0 25px rgba(37, 211, 102, 0.5);
}
.social-icon.youtube:hover {
  background: #ff0000;
  border-color: #ff0000;
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.5);
}
.social-icon.twitter:hover {
  background: #1da1f2;
  border-color: #1da1f2;
  box-shadow: 0 0 25px rgba(29, 161, 242, 0.5);
}
.social-icon.instagram:hover {
  background: #e1306c;
  border-color: #e1306c;
  box-shadow: 0 0 25px rgba(225, 48, 108, 0.5);
}
.social-icon.linkedin:hover {
  background: #0077b5;
  border-color: #0077b5;
  box-shadow: 0 0 25px rgba(0, 119, 181, 0.5);
}
.social-icon.tiktok:hover {
  background: #000000;
  border-color: #ff0050;
  box-shadow: 0 0 20px rgba(255, 0, 80, 0.6);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Details Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 17, 0.85);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 1001;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transform: scale(0.95);
  transition: var(--transition);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

.modal-close:hover {
  color: var(--color-cyan);
}

.modal-img-container {
  width: 100%;
  height: 350px;
  border-radius: 12px;
  overflow: hidden;
}

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

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.modal-title {
  font-size: 2rem;
}

.modal-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-tag {
  font-size: 0.8rem;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-secondary);
}

.modal-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

.footer-social-col {
  text-align: center;
}

.footer-socials {
  justify-content: center;
}

/* RTL Layout Fixes */
[dir="rtl"] {
  body {
    font-family: var(--font-ar);
  }
  
  .hero-container {
    grid-template-columns: 1.2fr 0.8fr;
  }
  
  .about-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
  
  .waitlist-form {
    flex-direction: row;
  }
  
  .modal-close {
    right: auto;
    left: 20px;
  }
}

/* Responsive styles */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 60px;
  }
  
  .hero-badge {
    align-self: center;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-visual {
    height: 300px;
  }
  
  .code-panel-wrap {
    left: -5% !important;
    top: -15% !important;
  }
  .palette-panel-wrap {
    right: -5% !important;
    bottom: -15% !important;
  }
  .floating-container {
    transform: scale(0.85) !important;
  }
  
  .about-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: stretch !important;
  }
  .about-features {
    order: 1;
  }
  .about-text {
    order: 2;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =============================================
   Custom Interactive Cursor
============================================= */
body { cursor: none; }

#cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--color-cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, opacity 0.2s ease;
  box-shadow: 0 0 8px var(--color-cyan), 0 0 20px rgba(0,240,255,0.4);
}

#cursor-ring {
  position: fixed;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(0, 240, 255, 0.45);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, width 0.25s ease, height 0.25s ease, border-color 0.25s ease;
}

body.cursor-hover #cursor-dot { transform: translate(-50%, -50%) scale(2.5); background: var(--color-purple); }
body.cursor-hover #cursor-ring { width: 55px; height: 55px; border-color: rgba(189,0,255,0.5); }

@media (hover: none) {
  body { cursor: auto; }
  #cursor-dot, #cursor-ring { display: none; }
}

/* =============================================
   Typewriter Cursor
============================================= */
.tw-cursor {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background: var(--color-cyan);
  margin-inline-start: 4px;
  vertical-align: middle;
  animation: tw-blink 0.9s step-end infinite;
  border-radius: 2px;
}

@keyframes tw-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: rgba(3, 6, 17, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 40px 24px;
    flex-direction: column;
    gap: 20px;
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .services-grid, .portfolio-grid {
    grid-template-columns: 1fr;
  }
  
  .academy-features {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-socials {
    justify-content: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .waitlist-form {
    flex-direction: column;
    border-radius: 0;
    background: transparent;
    border: none;
  }
  
  .waitlist-input {
    border-radius: 30px;
  }
  
  .waitlist-btn {
    padding: 14px;
    border-radius: 30px;
  }
}

.code-panel-wrap {
  top: -42%;
  left: -28%;
  width: 220px;
}
.palette-panel-wrap {
  bottom: -15%;
  right: -38%;
  width: 140px;
}

/* Interactive Floating Panels (Inspired by Image 1) */
.floating-widget {
  position: relative;
  width: 100%;
  background: rgba(4, 7, 20, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
  transition: all 0.4s ease;

  /* iOS Safari backdrop-filter scale compositor bug fix */
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.floating-widget:hover {
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: 0 20px 50px rgba(0, 240, 255, 0.15);
  transform: translateY(-5px) scale(1.02) !important;
}

.code-panel-widget {
  width: 100%;
  font-family: monospace;
  animation: float 10s ease-in-out infinite;
  animation-delay: 1.5s;
}

.palette-panel-widget {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  border-color: rgba(189, 0, 255, 0.15);
  animation: float 12s ease-in-out infinite;
  animation-delay: 3.5s;
}

.palette-panel-widget:hover {
  border-color: rgba(189, 0, 255, 0.4);
  box-shadow: 0 20px 50px rgba(189, 0, 255, 0.15);
}

.widget-header {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.widget-header .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-panel-widget pre {
  margin: 0;
  font-size: 0.72rem;
  color: var(--color-cyan);
  line-height: 1.4;
  text-align: left;
  direction: ltr;
}

.palette-colors {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

.palette-tools {
  display: flex;
  justify-content: space-around;
  color: var(--text-secondary);
  font-size: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
  margin-top: 2px;
}

.palette-tools i {
  cursor: pointer;
  transition: var(--transition);
}

.palette-tools i:hover {
  color: var(--color-purple);
  transform: scale(1.15);
}





/* ============================================================
   NEW FRONTEND COMPONENT STYLES
   ============================================================ */

/* Preloader screen styling */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-color);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preloader-content {
  text-align: center;
}
.loader-showcase {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.brush-canvas {
  position: relative;
  width: 120px;
  height: 80px;
}
.moving-brush {
  position: absolute;
  color: var(--color-magenta);
  font-size: 1.5rem;
  z-index: 5;
  animation: brushDance 3s infinite ease-in-out;
  text-shadow: 0 0 10px rgba(255, 0, 122, 0.8);
}
.brush-stroke {
  position: absolute;
  height: 8px;
  border-radius: 4px;
  background: var(--color-magenta);
  opacity: 0;
  box-shadow: 0 0 10px var(--color-magenta);
}
.stroke-1 {
  top: 20px; left: 10px; width: 60px;
  animation: revealStroke1 3s infinite;
}
.stroke-2 {
  top: 40px; left: 30px; width: 50px;
  background: var(--color-cyan);
  box-shadow: 0 0 10px var(--color-cyan);
  animation: revealStroke2 3s infinite;
}
.stroke-3 {
  top: 60px; left: 15px; width: 70px;
  background: #ffcc00;
  box-shadow: 0 0 10px #ffcc00;
  animation: revealStroke3 3s infinite;
}

@keyframes brushDance {
  0% { top: 20px; left: 10px; transform: rotate(135deg); opacity: 0; }
  5% { opacity: 1; }
  20% { top: 20px; left: 70px; transform: rotate(150deg); }
  25% { top: 40px; left: 80px; transform: rotate(120deg); }
  45% { top: 40px; left: 30px; transform: rotate(135deg); }
  50% { top: 60px; left: 15px; transform: rotate(150deg); }
  70% { top: 60px; left: 85px; transform: rotate(130deg); }
  80% { opacity: 1; }
  100% { top: 60px; left: 85px; opacity: 0; }
}
@keyframes revealStroke1 {
  0%, 5% { width: 0; opacity: 0; }
  5.1% { opacity: 1; }
  20%, 100% { width: 60px; opacity: 1; }
}
@keyframes revealStroke2 {
  0%, 25% { width: 0; opacity: 0; left: 80px; }
  25.1% { opacity: 1; }
  45%, 100% { width: 50px; left: 30px; opacity: 1; }
}
@keyframes revealStroke3 {
  0%, 50% { width: 0; opacity: 0; }
  50.1% { opacity: 1; }
  70%, 100% { width: 70px; opacity: 1; }
}

.loader-code-block {
  font-family: monospace;
  font-size: 0.9rem;
  color: #a9b7c6;
  text-align: left;
  background: rgba(0, 0, 0, 0.4);
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid rgba(0, 242, 254, 0.2);
  width: 260px;
  height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}
.code-line {
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  line-height: 1.5;
}
.kwd { color: #c678dd; font-weight: bold; }
.var { color: #e06c75; }
.func { color: #61afef; }
.str { color: #98c379; }

.line-1 { animation: typeLine1 3s infinite steps(20, end); }
.line-2 { animation: typeLine2 3s infinite steps(20, end); }
.line-3 { animation: typeLine3 3s infinite steps(20, end); }

@keyframes typeLine1 {
  0% { width: 0; }
  20%, 100% { width: 100%; }
}
@keyframes typeLine2 {
  0%, 25% { width: 0; }
  45%, 100% { width: 100%; }
}
@keyframes typeLine3 {
  0%, 50% { width: 0; }
  70%, 100% { width: 100%; }
}
.preloader-text {
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: 5px;
  color: var(--color-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
  animation: textPulse 2s infinite ease-in-out alternate;
}
@keyframes textPulse {
  0% { opacity: 0.6; }
  100% { opacity: 1; text-shadow: 0 0 20px rgba(0, 240, 255, 0.8); }
}

/* Skills Progress Bars Styling */
.about-skills {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.skill-item {
  width: 100%;
}
.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.skill-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.skill-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--color-purple), var(--color-cyan));
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
  position: absolute;
  top: 0;
  left: 0;
  width: 0; /* Animated via GSAP */
}

/* Testimonials Section Styling */
.testimonials {
  padding: 100px 0;
  position: relative;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 50px;
}
.testi-card {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.testi-rating {
  color: #ffb703;
  font-size: 1.1rem;
}
.testi-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  font-style: italic;
}
.testi-user {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: auto;
}
.testi-user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.testi-user-name {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 700;
}
.testi-user-title {
  font-size: 0.85rem;
  color: var(--color-cyan);
}
@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

/* Contact Section Styling */
.contact {
  padding: 100px 0;
  position: relative;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  margin-top: 50px;
}
.contact-info-col {
  display: flex;
  flex-direction: column;
  gap: 25px;
}
.contact-info-col h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
}
.contact-info-col p {
  color: var(--text-secondary);
  line-height: 1.8;
}
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-detail-item {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1.1rem;
}
.contact-detail-item i {
  color: var(--color-cyan);
  font-size: 1.3rem;
  width: 25px;
}
.contact-form-col {
  padding: 40px;
}
#contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 0.95rem;
  color: var(--text-primary);
}
.form-group input,
.form-group textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}
@media (max-width: 992px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Floating WhatsApp Button Styling */
.floating-whatsapp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: all 0.3s ease;
}
.floating-whatsapp:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}
@media (max-width: 768px) {
  .floating-whatsapp {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.6rem;
  }
}

/* ============================================================
   MOBILE RESPONSIVENESS FIXES (OVERFLOW & ALIGNMENT FIXES)
   ============================================================ */

/* 1. Universal layout fixes to prevent overflow */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* 2. Header and Nav Actions responsiveness */
@media (max-width: 768px) {
  /* Hide the wide booking button on mobile header to prevent overlapping/overflow */
  .nav-actions .btn-primary {
    display: none !important;
  }
  
  /* Ensure the header container adapts correctly */
  .nav-container {
    padding: 0 16px;
  }
}

/* 3. Hero section & hologram wrapper adjustments */
@media (max-width: 992px) {
  /* Scale and adjust positions instead of hiding them completely */
  .floating-widget {
    transform: scale(0.75);
  }
  .code-panel-wrap {
    top: -25% !important;
    left: -15% !important;
  }
  .palette-panel-wrap {
    bottom: -25% !important;
    right: -15% !important;
  }
  .floating-container {
    transform: scale(0.75) !important;
  }
  .floating-code-frag {
    transform: scale(0.85);
  }
  .floating-code-frag.frag-1 {
    top: 5%;
    right: -8%;
  }
  .floating-code-frag.frag-2 {
    bottom: 10%;
    left: auto;
    right: -12%;
  }
  .floating-code-frag.frag-3 {
    bottom: -8%;
    left: -12%;
    right: auto;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-top: 90px;
    padding-bottom: 50px;
  }
  .hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
  }
  .hero-content {
    display: contents;
  }
  .hero-badge {
    order: 1;
    align-self: center;
  }
  .hero-title {
    order: 2;
    font-size: 2.2rem !important;
    line-height: 1.3;
    min-height: 100px; /* Prevent layout jumping during typewriter effect */
  }
  .hero-visual {
    order: 3;
    height: 300px;
    margin-top: 5px;
    margin-bottom: 5px;
  }
  .hologram-wrapper {
    width: 260px;
    height: 260px;
  }
  .hologram-circle {
    width: 100%;
    height: 100%;
  }
  .hero-description {
    order: 4;
    font-size: 0.95rem;
    max-width: 100%;
    padding: 0 10px;
  }
  .hero-actions {
    order: 5;
    justify-content: center;
    width: 100%;
  }
  
  /* Prevent horizontal overflow on mobile while keeping widgets visible (using wrappers) */
  .floating-container {
    transform: scale(0.7) !important;
  }
  .floating-container.expanded {
    transform: scale(1.05) !important;
  }
  .code-panel-wrap {
    top: -20% !important;
    left: -28% !important;
  }
  .palette-panel-wrap {
    bottom: -20% !important;
    right: -12% !important;
  }
  .frag-1-wrap {
    top: 5% !important;
    right: -24% !important;
    left: auto !important;
  }
  .frag-2-wrap {
    bottom: 10% !important;
    left: auto !important;
    right: -10% !important;
  }
  .frag-3-wrap {
    bottom: -8% !important;
    left: -10% !important;
    right: auto !important;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 80px !important;
    padding-bottom: 30px !important;
  }
  .hero-title {
    font-size: 1.8rem !important;
    min-height: 80px; /* Prevent layout jumping on small screens */
  }
  .hologram-wrapper {
    width: 200px;
    height: 200px;
  }
  .hero-visual {
    height: 220px;
  }
  .floating-container {
    transform: scale(0.55) !important;
  }
  .floating-container.expanded {
    transform: scale(0.85) !important;
  }
  .code-panel-wrap {
    top: -22% !important;
    left: -36% !important;
  }
  .palette-panel-wrap {
    bottom: -22% !important;
    right: -15% !important;
  }
  .frag-1-wrap {
    top: 2% !important;
    right: -30% !important;
    left: auto !important;
  }
  .frag-2-wrap {
    bottom: 5% !important;
    left: auto !important;
    right: -22% !important;
  }
  .frag-3-wrap {
    bottom: -10% !important;
    left: -26% !important;
    right: auto !important;
  }
}

/* 4. About Us section adjustments */
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px;
  }
  .stat-card {
    padding: 16px 10px;
  }
  .stat-num {
    font-size: 1.8rem;
  }
  .stat-label {
    font-size: 0.8rem;
  }
}

/* 5. Portfolio Section improvements */
@media (max-width: 768px) {
  .portfolio-filter {
    flex-wrap: wrap !important;
    gap: 10px;
    margin-bottom: 30px;
  }
  .filter-btn {
    padding: 6px 16px;
  }
}

/* 6. Academy Section & waitlist fixes */
@media (max-width: 768px) {
  .academy-card {
    padding: 30px 20px !important;
    gap: 20px;
  }
  .academy-title {
    font-size: 1.8rem !important;
  }
  .academy-coming-soon {
    font-size: 1.8rem !important;
    padding: 12px 35px !important;
  }
}

@media (max-width: 480px) {
  .connector-node {
    white-space: normal !important;
    padding: 8px 12px !important;
    font-size: 0.7rem !important;
    line-height: 1.4;
    max-width: 180px;
  }
  .academy-coming-soon {
    font-size: 1.4rem !important;
    padding: 10px 25px !important;
    letter-spacing: 1px !important;
  }
}

/* 7. Testimonials section layout */
@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .testi-card {
    padding: 24px 20px !important;
  }
}

/* 8. Contact section layout */
@media (max-width: 480px) {
  .contact-form-col {
    padding: 24px 16px !important;
  }
  
  .contact-detail-item {
    font-size: 0.95rem;
  }
}

/* 9. Footer layout & Social icons overflow fix */
@media (max-width: 768px) {
  .footer-socials {
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: center !important;
    max-width: 320px;
    margin: 0 auto;
  }
  .social-icon {
    width: 40px !important;
    height: 40px !important;
    font-size: 1rem !important;
  }
}

/* 10. Project Details Modal mobile view */
@media (max-width: 768px) {
  .modal-content {
    padding: 24px 16px !important;
    gap: 16px !important;
  }
  .modal-img-container {
    height: 200px !important;
  }
  .modal-title {
    font-size: 1.4rem !important;
  }
  .modal-desc {
    font-size: 0.9rem !important;
  }
}

/* ============================================================
   PORTFOLIO SLIDER / CAROUSEL STYLING
   ============================================================ */
.portfolio-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 45px;
}

.portfolio-slider-container {
  overflow: hidden;
  width: 100%;
  padding: 10px 5px; /* small padding for card shadow overflow */
}

.portfolio-slider-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 100%;
  will-change: transform;
}

.portfolio-slider-track .portfolio-item {
  flex: 0 0 calc((100% - (2 * 24px)) / 3); /* Desktop: 3 items */
  width: calc((100% - (2 * 24px)) / 3);
  box-sizing: border-box;
}

/* Slider Navigation Buttons (Highly Compatible RTL/LTR) */
.slider-arrow {
  position: absolute;
  top: 50%;
  background: rgba(3, 6, 17, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 10;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.slider-arrow i {
  font-size: 1.2rem;
}

/* RTL Direction */
html[dir="rtl"] .slider-arrow.prev-btn {
  right: -26px;
  transform: translateY(-50%);
}
html[dir="rtl"] .slider-arrow.next-btn {
  left: -26px;
  transform: translateY(-50%);
}
html[dir="rtl"] .slider-arrow.prev-btn:hover,
html[dir="rtl"] .slider-arrow.next-btn:hover {
  transform: translateY(-50%) scale(1.1);
}

/* LTR Direction */
html[dir="ltr"] .slider-arrow.prev-btn {
  left: -26px;
  transform: translateY(-50%);
}
html[dir="ltr"] .slider-arrow.next-btn {
  right: -26px;
  transform: translateY(-50%);
}
html[dir="ltr"] .slider-arrow.prev-btn:hover,
html[dir="ltr"] .slider-arrow.next-btn:hover {
  transform: translateY(-50%) scale(1.1);
}

.slider-arrow:hover {
  background: var(--color-cyan);
  border-color: var(--color-cyan);
  color: #030611;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.slider-arrow:disabled {
  opacity: 0.15;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
}

/* Tablet Responsiveness */
@media (max-width: 1024px) {
  .portfolio-slider-track .portfolio-item {
    flex: 0 0 calc((100% - (1 * 24px)) / 2); /* Tablet: 2 items */
    width: calc((100% - (1 * 24px)) / 2);
  }
  
  html[dir="rtl"] .slider-arrow.prev-btn { right: -15px; }
  html[dir="rtl"] .slider-arrow.next-btn { left: -15px; }
  
  html[dir="ltr"] .slider-arrow.prev-btn { left: -15px; }
  html[dir="ltr"] .slider-arrow.next-btn { right: -15px; }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .portfolio-slider-track .portfolio-item {
    flex: 0 0 100%; /* Mobile: 1 item */
    width: 100%;
  }
  
  .slider-arrow {
    background: rgba(3, 6, 17, 0.85);
    width: 44px;
    height: 44px;
  }
  
  html[dir="rtl"] .slider-arrow.prev-btn { right: 10px; }
  html[dir="rtl"] .slider-arrow.next-btn { left: 10px; }
  
  html[dir="ltr"] .slider-arrow.prev-btn { left: 10px; }
  html[dir="ltr"] .slider-arrow.next-btn { right: 10px; }
  
  html[dir="rtl"] .slider-arrow.prev-btn:hover,
  html[dir="rtl"] .slider-arrow.next-btn:hover,
  html[dir="ltr"] .slider-arrow.prev-btn:hover,
  html[dir="ltr"] .slider-arrow.next-btn:hover {
    transform: translateY(-50%) scale(1.05);
  }
}
