/* ===================================
   GLOBAL STYLES & RESET
   =================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  color-scheme: light;

  --primary-color: #3c65a7;
  --secondary-color: #d2d5d6;
  --dark-bg: #1e3a5f;
  --light-bg: #f5f7fa;
  --text-dark: #2c3e50;
  --text-light: #ffffff;
  --accent-blue: #5b8dd9;
  --accent-light: #7ba3e0;
  --gradient-1: linear-gradient(135deg, #3c65a7 0%, #5b8dd9 100%);
  --gradient-2: linear-gradient(135deg, #5b8dd9 0%, #3c65a7 100%);
  --shadow-sm: 0 2px 10px rgba(60, 101, 167, 0.1);
  --shadow-md: 0 5px 20px rgba(60, 101, 167, 0.2);
  --shadow-lg: 0 10px 40px rgba(60, 101, 167, 0.3);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  overflow-x: hidden;
  background: var(--light-bg);
}

body[dir='rtl'] {
  direction: rtl;
  font-family: 'Cairo', 'Tajawal', sans-serif;
}

body[dir='rtl'] .hero-title,
body[dir='rtl'] h1,
body[dir='rtl'] h2,
body[dir='rtl'] h3,
body[dir='rtl'] h4 {
  font-family: 'Cairo', sans-serif;
  font-weight: 900;
}

body[dir='rtl'] p,
body[dir='rtl'] span,
body[dir='rtl'] a,
body[dir='rtl'] li {
  font-family: 'Tajawal', sans-serif;
}

/* Arabic Typography Adjustments */
body[dir='rtl'] .hero-title {
  letter-spacing: 2px;
  font-weight: 900;
}

body[dir='rtl'] .section-title {
  font-weight: 800;
}

body[dir='rtl'] p {
  line-height: 2;
}

body[dir='rtl'] .hero-subtitle {
  line-height: 1.9;
}

body[dir='rtl'] button,
body[dir='rtl'] .cta-btn,
body[dir='rtl'] .hero-cta {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
}

/* RTL Hero adjustments */
body[dir='rtl'] .hero-text {
  align-items: flex-start;
  text-align: right;
}

body[dir='rtl'] .hero-feature-cards {
  justify-content: flex-start;
}

body[dir='rtl'] .hero-cta-group-3d {
  justify-content: flex-start;
}

body[dir='rtl'] .hero-badge-3d {
  align-self: flex-start;
}

body[dir='rtl'] .hero-title-3d {
  justify-content: flex-start;
}

body[dir='rtl'] .hero-cta-3d.primary .cta-icon {
  transform: scaleX(-1);
}

body[dir='rtl'] .hero-cta-3d.primary:hover .cta-icon {
  transform: scaleX(-1) translateX(5px);
}

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

/* ===================================
   ANIMATED BACKGROUND
   =================================== */
.tech-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 50%, #3d5a7f 100%);
}

#particleCanvas {
  width: 100%;
  height: 100%;
  opacity: 0.3;
}

/* ===================================
   SKIP LINK
   =================================== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: var(--text-light);
  padding: 12px 24px;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  z-index: 10000;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* ===================================
   NAVIGATION
   =================================== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(30, 58, 95, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
  background: rgba(30, 58, 95, 0.98);
  box-shadow: 0 2px 30px rgba(60, 101, 167, 0.3);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.logo {
  height: 50px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05) rotate(5deg);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-light);
  background: linear-gradient(135deg, #64b5f6 0%, #42a5f5 50%, #90caf9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-1);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-games-link {
  background: linear-gradient(135deg, rgba(91, 141, 217, 0.15), rgba(60, 101, 167, 0.15));
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(91, 141, 217, 0.4);
  font-size: 0.85em;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-games-link:hover {
  border-color: var(--accent-blue);
  background: linear-gradient(135deg, rgba(91, 141, 217, 0.25), rgba(60, 101, 167, 0.25));
}

.cta-btn {
  background: var(--gradient-1);
  color: var(--text-light);
  padding: 10px 25px;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(60, 101, 167, 0.4);
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(60, 101, 167, 0.6);
}

/* Language Dropdown */
.language-dropdown {
  position: relative;
}

.lang-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
  color: var(--text-light);
}

.lang-dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.lang-dropdown-toggle img {
  width: 20px;
  height: auto;
  border-radius: 2px;
}

.lang-dropdown-toggle .current-lang {
  font-size: 0.9rem;
  font-weight: 500;
}

.lang-dropdown-toggle i {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.language-dropdown.open .lang-dropdown-toggle i {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  min-width: 140px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease;
  z-index: 1001;
  overflow: hidden;
}

.language-dropdown.open .lang-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.3s ease;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.lang-option:hover {
  background: var(--light-bg);
}

.lang-option.active {
  background: rgba(60, 101, 167, 0.1);
  color: var(--primary-color);
}

.lang-option img {
  width: 24px;
  height: auto;
  border-radius: 2px;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: #9ca3af;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  transform-origin: center;
}

/* Hamburger to X animation */
.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===================================
   HERO SECTION
   =================================== */
/* ========================================
   WAVE HERO SECTION
   ======================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 140px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fbff 0%, #e8f2ff 50%, #f0f7ff 100%);
  perspective: 1000px;
}

/* Animated Background */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 20% 20%, rgba(91, 141, 217, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(60, 101, 167, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(60, 101, 167, 0.05) 0%, transparent 70%);
  z-index: 0;
}

/* Glowing Orbs */
.glow-orbs {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: orbFloat 8s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(91, 141, 217, 0.15);
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(60, 101, 167, 0.12);
  top: 50%;
  right: 10%;
  animation-delay: 2s;
}

.orb-3 {
  width: 250px;
  height: 250px;
  background: rgba(100, 160, 220, 0.1);
  bottom: 20%;
  left: 30%;
  animation-delay: 4s;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(30px, -30px) scale(1.1);
    opacity: 0.8;
  }
}

/* 3D Floating Shapes */
.floating-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  transform-style: preserve-3d;
}

.shape {
  position: absolute;
  left: var(--x);
  top: var(--y);
  animation: shape3DFloat 10s ease-in-out infinite;
  animation-delay: var(--delay);
  transform-style: preserve-3d;
}

.shape-cube {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, rgba(91, 141, 217, 0.25) 0%, rgba(60, 101, 167, 0.2) 100%);
  border: 1px solid rgba(91, 141, 217, 0.3);
  border-radius: 8px;
  box-shadow:
    0 0 30px rgba(91, 141, 217, 0.15),
    inset 0 0 20px rgba(255, 255, 255, 0.3);
}

.shape-sphere {
  width: 40px;
  height: 40px;
  background: radial-gradient(circle at 30% 30%, rgba(91, 141, 217, 0.4), rgba(60, 101, 167, 0.15));
  border-radius: 50%;
  box-shadow:
    0 0 40px rgba(91, 141, 217, 0.2),
    inset -5px -5px 20px rgba(60, 101, 167, 0.1);
}

.shape-ring {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(91, 141, 217, 0.3);
  border-radius: 50%;
  box-shadow:
    0 0 30px rgba(91, 141, 217, 0.15),
    inset 0 0 20px rgba(91, 141, 217, 0.05);
}

.shape-pyramid {
  width: 0;
  height: 0;
  border-left: 25px solid transparent;
  border-right: 25px solid transparent;
  border-bottom: 45px solid rgba(91, 141, 217, 0.25);
  filter: drop-shadow(0 0 20px rgba(91, 141, 217, 0.2));
}

.shape-donut {
  width: 45px;
  height: 45px;
  border: 8px solid rgba(91, 141, 217, 0.25);
  border-radius: 50%;
  box-shadow: 0 0 25px rgba(91, 141, 217, 0.15);
}

.shape-small {
  transform: scale(0.6);
}

@keyframes shape3DFloat {
  0%,
  100% {
    transform: translateY(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    opacity: 0.7;
  }
  25% {
    transform: translateY(-20px) rotateX(90deg) rotateY(45deg) rotateZ(45deg);
  }
  50% {
    transform: translateY(-10px) rotateX(180deg) rotateY(90deg) rotateZ(90deg);
    opacity: 1;
  }
  75% {
    transform: translateY(-30px) rotateX(270deg) rotateY(135deg) rotateZ(135deg);
  }
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

/* 3D Hero Animation Container */
.hero-animation-3d {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transform-style: preserve-3d;
}

.animation-frame {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.frame-glow {
  position: absolute;
  width: 80%;
  height: 80%;
  background: radial-gradient(
    circle,
    rgba(91, 141, 217, 0.2) 0%,
    rgba(60, 101, 167, 0.1) 50%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(50px);
  animation: frameGlowPulse 4s ease-in-out infinite;
}

@keyframes frameGlowPulse {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

.frame-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
}

.frame-ring.ring-1 {
  width: 110%;
  height: 110%;
  border-color: rgba(91, 141, 217, 0.3);
  border-style: dashed;
  animation: ringRotate3D 25s linear infinite;
}

.frame-ring.ring-2 {
  width: 95%;
  height: 95%;
  border-color: rgba(60, 101, 167, 0.25);
  border-style: dotted;
  animation: ringRotate3D 20s linear infinite reverse;
}

@keyframes ringRotate3D {
  from {
    transform: rotateZ(0deg) rotateX(15deg);
  }
  to {
    transform: rotateZ(360deg) rotateX(15deg);
  }
}

.frame-particles {
  position: absolute;
  width: 120%;
  height: 120%;
}

.frame-particles span {
  position: absolute;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, #5b8dd9, #3c65a7);
  border-radius: 50%;
  animation: particleOrbit 8s linear infinite;
  box-shadow: 0 0 15px rgba(91, 141, 217, 0.8);
}

.frame-particles span:nth-child(1) {
  --orbit-delay: 0s;
  --orbit-radius: 55%;
}
.frame-particles span:nth-child(2) {
  --orbit-delay: 1s;
  --orbit-radius: 52%;
}
.frame-particles span:nth-child(3) {
  --orbit-delay: 2s;
  --orbit-radius: 58%;
}
.frame-particles span:nth-child(4) {
  --orbit-delay: 3s;
  --orbit-radius: 50%;
}
.frame-particles span:nth-child(5) {
  --orbit-delay: 4s;
  --orbit-radius: 56%;
}
.frame-particles span:nth-child(6) {
  --orbit-delay: 5s;
  --orbit-radius: 53%;
}
.frame-particles span:nth-child(7) {
  --orbit-delay: 6s;
  --orbit-radius: 57%;
}
.frame-particles span:nth-child(8) {
  --orbit-delay: 7s;
  --orbit-radius: 51%;
}

@keyframes particleOrbit {
  from {
    transform: rotate(calc(var(--orbit-delay) * 45deg)) translateX(var(--orbit-radius))
      rotate(calc(var(--orbit-delay) * -45deg));
  }
  to {
    transform: rotate(calc(360deg + var(--orbit-delay) * 45deg)) translateX(var(--orbit-radius))
      rotate(calc(-360deg + var(--orbit-delay) * -45deg));
  }
}

.hero-animation-3d lottie-player {
  width: 100%;
  max-width: 450px;
  height: auto;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 30px rgba(91, 141, 217, 0.3));
}

/* 3D Hero Badge */
.hero-badge-3d {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 10px 24px 10px 14px;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(60, 101, 167, 0.2);
  box-shadow: 0 4px 20px rgba(60, 101, 167, 0.15);
  animation: badge3DIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  transform-style: preserve-3d;
}

.badge-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #5b8dd9, #3c65a7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: badgeIconSpin 3s ease-in-out infinite;
}

.badge-icon i {
  font-size: 0.85rem;
  color: #fff;
}

@keyframes badgeIconSpin {
  0%,
  100% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(180deg);
  }
}

.badge-text {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #3c65a7 !important;
}

@keyframes badge3DIn {
  from {
    opacity: 0;
    transform: translateY(-30px) rotateX(-20deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

/* 3D Hero Title */
.hero-title-3d {
  font-size: 3.5rem;
  font-weight: 800;
  color: #1a2b4a;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  transform-style: preserve-3d;
}

.title-word {
  display: inline-block;
  animation: word3DPopIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: calc(var(--i) * 0.1s + 0.2s);
  transform-style: preserve-3d;
}

.word-inner {
  display: inline-block;
  transition: transform 0.3s ease;
  color: #1a2b4a;
}

.title-word:hover .word-inner {
  transform: translateZ(20px) rotateX(-10deg);
}

.title-brand {
  position: relative;
  white-space: nowrap;
}

.brand-glow {
  background: linear-gradient(135deg, #5b8dd9 0%, #3c65a7 50%, #5b8dd9 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: brandGlowShift 3s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(60, 101, 167, 0.5));
}

@keyframes brandGlowShift {
  0%,
  100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

@keyframes word3DPopIn {
  0% {
    opacity: 0;
    transform: translateY(50px) rotateX(-45deg) scale(0.8);
  }
  60% {
    transform: translateY(-5px) rotateX(5deg) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
  }
}

/* 3D Hero Subtitle */
.hero-subtitle-3d {
  font-size: 1.2rem;
  color: #4a5f7a !important;
  margin-bottom: 2rem;
  line-height: 1.8;
  max-width: 500px;
  animation: subtitle3DIn 0.8s ease-out 0.5s both;
}

@keyframes subtitle3DIn {
  from {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* 3D Stats Bar */
.hero-stats-3d {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  animation: stats3DIn 0.8s ease-out 0.6s both;
}

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

.stat-card-3d {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(60, 101, 167, 0.15);
  transition: all 0.3s ease;
  transform-style: preserve-3d;
  box-shadow: 0 4px 20px rgba(60, 101, 167, 0.1);
}

.stat-card-3d:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(91, 141, 217, 0.3);
  box-shadow: 0 10px 30px rgba(60, 101, 167, 0.15);
}

.stat-card-3d.highlight {
  background: linear-gradient(135deg, rgba(91, 141, 217, 0.15) 0%, rgba(60, 101, 167, 0.1) 100%);
  border-color: rgba(91, 141, 217, 0.3);
}

.stat-card-3d.highlight:hover {
  background: linear-gradient(135deg, rgba(91, 141, 217, 0.2) 0%, rgba(60, 101, 167, 0.15) 100%);
  box-shadow:
    0 10px 30px rgba(60, 101, 167, 0.2),
    0 0 20px rgba(91, 141, 217, 0.15);
}

.stat-number-3d {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #3c65a7, #5b8dd9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card-3d.highlight .stat-number-3d {
  background: linear-gradient(135deg, #3c65a7, #5b8dd9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body[dir='rtl'] .stat-number-3d {
  font-family: 'Cairo', sans-serif;
}

.stat-label-3d {
  font-size: 0.8rem;
  color: #4a5f7a !important;
  font-weight: 500;
  text-align: center;
}

/* 3D Feature Cards */
.hero-feature-cards {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.feature-card-3d {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(60, 101, 167, 0.15);
  cursor: default;
  animation: card3DIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: var(--card-delay);
  transition: all 0.3s ease;
  transform-style: preserve-3d;
  box-shadow: 0 4px 20px rgba(60, 101, 167, 0.1);
}

.feature-card-3d:hover {
  transform: translateY(-8px) rotateX(5deg) rotateY(-5deg);
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(91, 141, 217, 0.3);
  box-shadow:
    0 15px 40px rgba(60, 101, 167, 0.15),
    0 0 30px rgba(91, 141, 217, 0.1);
}

.card-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #5b8dd9, #3c65a7);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(91, 141, 217, 0.4);
}

.card-icon i {
  font-size: 1.1rem;
  color: #fff;
}

.feature-card-3d span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #3c65a7 !important;
}

@keyframes card3DIn {
  from {
    opacity: 0;
    transform: translateY(30px) rotateX(-15deg) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
  }
}

/* 3D CTA Buttons */
.hero-cta-group-3d {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: cta3DIn 0.8s ease-out 1s both;
}

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

.hero-cta-3d {
  position: relative;
  padding: 16px 32px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.3s ease;
  transform-style: preserve-3d;
  border: none;
  font-family: inherit;
}

.hero-cta-3d.primary {
  background: linear-gradient(135deg, #5b8dd9 0%, #3c65a7 100%);
  color: #fff;
  box-shadow:
    0 8px 30px rgba(91, 141, 217, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hero-cta-3d.primary .cta-text {
  color: #fff;
}

.hero-cta-3d.primary .cta-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: ctaGlowSweep 3s ease-in-out infinite;
}

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

.hero-cta-3d.primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 12px 40px rgba(91, 141, 217, 0.6),
    0 0 50px rgba(60, 101, 167, 0.3);
}

.hero-cta-3d.primary .cta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.hero-cta-3d.primary:hover .cta-icon {
  transform: translateX(-5px);
}

.hero-cta-3d.secondary {
  background: transparent;
  color: #3c65a7;
  border: 2px solid #3c65a7;
}

.hero-cta-3d.secondary .cta-text {
  color: #3c65a7;
}

.hero-cta-3d.secondary:hover {
  background: #3c65a7;
  border-color: #3c65a7;
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(60, 101, 167, 0.3);
}

.hero-cta-3d.secondary:hover .cta-text {
  color: #fff;
}

/* 3D Scroll Indicator */
.scroll-indicator-3d {
  position: absolute;
  bottom: 160px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 3;
  animation: scrollIndicator3DIn 0.8s ease-out 1.2s both;
}

.scroll-indicator-3d span {
  font-size: 0.75rem;
  color: #6a7f99 !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

.scroll-mouse {
  width: 26px;
  height: 42px;
  border: 2px solid rgba(60, 101, 167, 0.3);
  border-radius: 13px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.scroll-wheel {
  width: 4px;
  height: 10px;
  background: linear-gradient(180deg, #5b8dd9, #3c65a7);
  border-radius: 2px;
  animation: scrollWheelBounce 2s ease-in-out infinite;
}

@keyframes scrollWheelBounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(12px);
    opacity: 0.3;
  }
}

@keyframes scrollIndicator3DIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Wave Container */
.wave-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 1;
}

.wave {
  display: block;
  width: 100%;
  height: 150px;
}

.wave-1 {
  fill: rgba(91, 141, 217, 0.15);
  animation: wave-move 8s ease-in-out infinite;
}

.wave-2 {
  fill: rgba(60, 101, 167, 0.12);
  animation: wave-move 6s ease-in-out infinite reverse;
}

.wave-3 {
  fill: #fff;
}

@keyframes wave-move {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-20px);
  }
}

/* Hexagon Animation */
.robot-animation {
  position: relative;
  width: 100%;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hexagon-container {
  position: relative;
  width: 300px;
  height: 300px;
}

.hexagon {
  position: absolute;
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(30deg);
  clip-path: polygon(30% 0%, 70% 0%, 100% 50%, 70% 100%, 30% 100%, 0% 50%);
}

.hex-1 {
  background: var(--gradient-1);
  animation: rotate-hex 10s linear infinite;
  opacity: 0.2;
}

.hex-2 {
  background: var(--gradient-2);
  animation: rotate-hex 15s linear infinite reverse;
  width: 250px;
  height: 250px;
  opacity: 0.15;
}

.hex-3 {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--primary-color) 100%);
  animation: rotate-hex 20s linear infinite;
  width: 300px;
  height: 300px;
  opacity: 0.1;
}

@keyframes rotate-hex {
  from {
    transform: translate(-50%, -50%) rotate(30deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(390deg);
  }
}

/* ===================================
   SECTION STYLES
   =================================== */
section {
  padding: 60px 0;
  position: relative;
  background: var(--light-bg);
  scroll-margin-top: 80px;
}

section:nth-child(even) {
  background: #ffffff;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 2.5rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
  text-wrap: balance;
}

.title-underline {
  width: 80px;
  height: 4px;
  background: var(--gradient-1);
  margin: 0 auto 1rem;
  border-radius: 2px;
  animation: expand-line 1s ease-out;
}

@keyframes expand-line {
  from {
    width: 0;
  }
  to {
    width: 80px;
  }
}

.section-subtitle {
  color: #666;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ===================================
   ABOUT SECTION
   =================================== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  color: #555;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--gradient-1);
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
}

.stat-number {
  font-size: 3rem;
  font-weight: bold;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}

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

.about-image {
  position: relative;
}

.image-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}

.image-wrapper:hover {
  transform: scale(1.02);
}

.image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(60, 101, 167, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-wrapper:hover .image-overlay {
  opacity: 1;
}

.image-overlay i {
  font-size: 4rem;
  color: var(--text-light);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.image-overlay i:hover {
  transform: scale(1.2);
}

/* Section Tagline */
.section-tagline {
  font-size: 1.2rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-top: 0.5rem;
  font-style: italic;
}

/* ===================================
   QUOTE SECTION
   =================================== */
.quote-section {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(60, 101, 167, 0.05) 0%, rgba(91, 141, 217, 0.1) 100%);
  border-radius: 12px;
  position: relative;
}

.quote-section blockquote {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.quote-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
  opacity: 0.3;
  margin-bottom: 0.5rem;
}

.quote-section blockquote p {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.quote-section blockquote cite {
  display: block;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1rem;
  font-style: normal;
}

/* ===================================
   SKILLS SECTION
   =================================== */
section.skills-section {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
  color: var(--text-light);
}

.skills-section .section-title {
  color: var(--text-light);
}

.skills-section .section-subtitle {
  color: var(--secondary-color);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
}

.skill-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 2rem 1rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition:
    background 0.3s ease,
    transform 0.3s ease,
    border-color 0.3s ease;
}

.skill-card:hover {
  background: rgba(60, 101, 167, 0.2);
  transform: translateY(-5px);
  border-color: var(--primary-color);
}

.skill-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: var(--text-light);
}

.skill-card h4 {
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 600;
}

/* ===================================
   EQUIPMENT SECTION
   =================================== */
.equipment-section {
  background: var(--light-bg);
}

.equipment-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.equipment-text {
  text-align: center;
  max-width: 800px;
}

.equipment-text p {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.8;
}

.equipment-logos {
  display: flex;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
}

.equipment-logo {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.equipment-logo:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.logo-text-small {
  font-size: 1rem;
  font-weight: bold;
  color: var(--primary-color);
}

/* ===================================
   CERTIFICATES SECTION
   =================================== */
.certificates-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 2px solid rgba(60, 101, 167, 0.1);
}

.certificates-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.certificate-info,
.competition-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  background: white;
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.certificate-info:hover,
.competition-info:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.certificate-icon,
.competition-icon {
  width: 70px;
  height: 70px;
  min-width: 70px;
  background: var(--gradient-1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--text-light);
}

.certificate-info p,
.competition-info p {
  color: #555;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Levels Intro */
.levels-intro {
  text-align: center;
  color: #666;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* ===================================
   STUDENT PROJECTS SECTION
   =================================== */
.student-projects {
  background: #fff;
}

.project-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 12px 28px;
  border: none;
  background: rgba(60, 101, 167, 0.1);
  color: var(--primary-color);
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(60, 101, 167, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover {
  background: rgba(60, 101, 167, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(60, 101, 167, 0.2);
}

.filter-btn.active {
  background: linear-gradient(135deg, #3c65a7, #5b8dd9);
  color: white;
  box-shadow: 0 4px 20px rgba(60, 101, 167, 0.35);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  perspective: 1000px;
}

.project-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 240px;
  box-shadow:
    0 8px 30px rgba(60, 101, 167, 0.12),
    0 0 0 1px rgba(60, 101, 167, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow:
    0 30px 60px rgba(60, 101, 167, 0.25),
    0 0 0 1px rgba(60, 101, 167, 0.2);
}

.project-card.hidden {
  display: none;
}

/* Full-cover image */
.project-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

/* Gradient overlay for text readability */
.project-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70%;
  background: linear-gradient(
    to top,
    rgba(10, 22, 40, 0.95) 0%,
    rgba(10, 22, 40, 0.7) 40%,
    rgba(10, 22, 40, 0) 100%
  );
  z-index: 2;
  transition: height 0.4s ease;
}

.project-card:hover .project-image::after {
  height: 80%;
}

/* View button overlay */
.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(60, 101, 167, 0.9) 0%, rgba(91, 141, 217, 0.85) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.project-card:hover .project-overlay {
  opacity: 0; /* Hidden until videos/images are uploaded */
}

.view-project-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: white;
  color: var(--primary-color);
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.view-project-btn:hover {
  transform: scale(1.15) rotate(10deg);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

/* Content overlaid at bottom */
.project-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-info h4 {
  font-size: 0.95rem;
  color: #ffffff;
  margin: 0;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  line-height: 1.3;
}

.project-card:hover .project-info h4 {
  transform: translateY(-2px);
}

.project-age {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: #fff;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  width: fit-content;
  transition: all 0.3s ease;
}

.project-card:hover .project-age {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px);
}

.project-age::before {
  content: '\f007';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.7rem;
}

.projects-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, rgba(60, 101, 167, 0.06) 0%, rgba(91, 141, 217, 0.1) 100%);
  border-radius: 16px;
  border: 1px solid rgba(60, 101, 167, 0.1);
}

.projects-cta p {
  font-size: 1rem;
  color: #1a2b4a;
  margin: 0;
  font-weight: 600;
}

.projects-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  transition: all 0.3s ease;
  font-size: 0.9rem;
  white-space: nowrap;
}

.projects-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* ===================================
   INSTAGRAM REELS SECTION
   =================================== */
.instagram-reels {
  background: linear-gradient(180deg, #1e3a5f 0%, #2a4a70 100%);
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.instagram-reels::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(91, 141, 217, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(60, 101, 167, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.instagram-reels .section-title {
  color: var(--text-light);
}

.instagram-reels .section-subtitle {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
}

.instagram-reels .title-underline {
  background: linear-gradient(90deg, transparent, #5b8dd9, transparent);
}

.reels-slider {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 50px;
}

.reels-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 10px 0;
}

.reels-track::-webkit-scrollbar {
  display: none;
}

.reel-card {
  flex: 0 0 200px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.reel-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(91, 141, 217, 0.4);
}

.reel-thumbnail {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: linear-gradient(135deg, #2a4a70 0%, #1e3a5f 100%);
}

.reel-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

/* Placeholder icon shown when image is loading or missing */
.reel-thumbnail .placeholder-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.4);
  z-index: 1;
  transition: opacity 0.3s ease;
}

.reel-thumbnail img.loaded ~ .placeholder-icon {
  opacity: 0;
}

/* Hide broken/missing image */
.reel-thumbnail img.error {
  opacity: 0;
}

.reel-card:hover .reel-thumbnail img {
  transform: scale(1.1);
}

.reel-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.reel-card:hover .reel-play-overlay {
  opacity: 1;
}

.reel-play-overlay i {
  font-size: 2.5rem;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.reel-card:hover .reel-play-overlay i {
  transform: scale(1);
}

.reel-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(
    135deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.reel-badge i {
  font-size: 0.75rem;
}

.reel-info {
  padding: 12px;
}

.reel-info p {
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.4;
  text-align: center;
}

.reels-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  padding: 0 5px;
}

.reel-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #3c65a7, #5b8dd9);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  pointer-events: all;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.reel-nav-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(60, 101, 167, 0.5);
}

/* RTL support for reels nav */
body[dir='rtl'] .reel-nav-btn i {
  transform: scaleX(-1);
}

.reels-cta {
  text-align: center;
  margin-top: 2rem;
}

.instagram-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(
    135deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(225, 48, 108, 0.4);
}

.instagram-follow-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(225, 48, 108, 0.5);
}

.instagram-follow-btn i {
  font-size: 1.3rem;
}

/* Reels Section Responsive */
/* Tablet: Show 3 cards + half of 4th visible */
@media (max-width: 992px) {
  .reels-slider {
    padding: 0 20px;
  }

  .reels-track {
    gap: 16px;
  }

  .reel-card {
    /* 3.5 cards visible: 100% / 3.5 = 28.57%, minus gap space */
    flex: 0 0 calc((100% - 48px) / 3.5);
    min-width: calc((100% - 48px) / 3.5);
  }

  .reels-nav {
    display: none;
  }

  .reel-play-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.2);
  }

  .reel-play-overlay i {
    font-size: 2rem;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .instagram-reels {
    padding: 50px 0;
  }

  .instagram-follow-btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }
}

/* Mobile: Show 2 cards + half of 3rd visible */
@media (max-width: 576px) {
  .reels-track {
    gap: 12px;
  }

  .reel-card {
    /* 2.5 cards visible: 100% / 2.5 = 40%, minus gap space */
    flex: 0 0 calc((100% - 24px) / 2.5);
    min-width: calc((100% - 24px) / 2.5);
  }

  .reel-info p {
    font-size: 0.8rem;
  }
}

/* ===================================
   TESTIMONIALS SECTION
   =================================== */
.testimonials {
  background: linear-gradient(180deg, #f8fbff 0%, #e8f2ff 100%);
  padding: 60px 0;
}

.testimonials .section-title {
  color: var(--text-dark);
}

.testimonials-slider {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.testimonials-track {
  display: flex;
  transition: transform 0.5s ease;
  direction: ltr;
}

.testimonial-card {
  flex: 0 0 100%;
  min-width: 100%;
  background: #ffffff;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 6px 24px rgba(60, 101, 167, 0.1);
  box-sizing: border-box;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  position: relative;
  border: 1px solid rgba(60, 101, 167, 0.08);
}

.testimonial-quote-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3c65a7, #5b8dd9);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial-quote-icon i {
  font-size: 1rem;
  color: #fff;
}

.testimonial-content {
  flex: 1;
  min-width: 0;
}

.testimonial-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #4a5568;
  margin-bottom: 0.75rem;
  font-style: italic;
}

.testimonial-author {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(60, 101, 167, 0.06);
  padding: 6px 12px 6px 6px;
  border-radius: 30px;
}

.author-avatar {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #3c65a7, #5b8dd9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-avatar i {
  font-size: 0.85rem;
  color: #fff;
}

.author-info h5 {
  color: var(--text-dark);
  font-size: 0.8rem;
  margin-bottom: 0;
  font-weight: 600;
  line-height: 1.2;
}

.author-info span {
  display: none;
}

.testimonials-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  position: relative;
  z-index: 10;
}

.testimonial-nav-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #3c65a7, #5b8dd9);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  position: relative;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(60, 101, 167, 0.3);
}

.testimonial-nav-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(60, 101, 167, 0.4);
}

/* RTL: Flip nav button icons */
body[dir='rtl'] .testimonial-nav-btn i {
  transform: scaleX(-1);
}

/* RTL: Testimonial card content in Arabic */
body[dir='rtl'] .testimonial-card {
  direction: rtl;
  flex-direction: row-reverse;
  text-align: right;
}

body[dir='rtl'] .testimonial-text {
  text-align: right;
}

body[dir='rtl'] .testimonial-author {
  padding: 6px 6px 6px 12px;
  flex-direction: row-reverse;
}

.testimonials-dots {
  display: flex;
  gap: 6px;
}

.testimonial-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(60, 101, 167, 0.25);
  cursor: pointer;
  transition: all 0.3s ease;
}

.testimonial-dot.active {
  background: var(--primary-color);
  width: 20px;
  border-radius: 4px;
}

/* Testimonials Responsive */
@media (max-width: 768px) {
  .testimonial-card {
    flex-direction: column;
    padding: 1.25rem;
    gap: 1rem;
  }

  .testimonial-quote-icon {
    width: 36px;
    height: 36px;
  }

  .testimonial-text {
    font-size: 0.9rem;
  }

  .testimonial-quote-icon i {
    font-size: 0.9rem;
  }

  .testimonials-nav {
    gap: 0.75rem;
    margin-top: 1.25rem;
  }

  .testimonial-nav-btn {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }
}

/* ===================================
   INTERACTIVE SECTION
   =================================== */
.interactive-section {
  background: var(--light-bg);
}

.interactive-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.interactive-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border: 2px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.interactive-tab:hover,
.interactive-tab.active {
  background: var(--primary-color);
  color: white;
}

.interactive-tab i {
  font-size: 1.2rem;
}

.interactive-content {
  max-width: 900px;
  margin: 0 auto;
}

/* Quiz Styles */
.quiz-container {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.quiz-progress {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  background: var(--gradient-1);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.quiz-question {
  text-align: center;
}

.quiz-question h3 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 2rem;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.quiz-option {
  padding: 1.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 15px;
  background: white;
  cursor: pointer;
  transition:
    border-color 0.3s ease,
    background 0.3s ease;
  text-align: center;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.quiz-option:hover {
  border-color: var(--primary-color);
  background: rgba(60, 101, 167, 0.05);
}

.quiz-option.selected {
  border-color: var(--primary-color);
  background: rgba(60, 101, 167, 0.1);
}

.quiz-option i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  display: block;
}

.quiz-option span {
  font-weight: 600;
  color: var(--text-dark);
}

.quiz-result {
  text-align: center;
  padding: 2rem;
}

.quiz-result .result-icon {
  font-size: 5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.quiz-result h3 {
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.quiz-result p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.quiz-result .recommended-course {
  background: var(--light-bg);
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  display: inline-block;
  text-align: left;
}

.quiz-result .course-level,
.quiz-result .course-focus {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dark);
  padding: 5px 0;
}

.quiz-result .course-level i,
.quiz-result .course-focus i {
  color: var(--primary-color);
  width: 20px;
}

.quiz-retake-btn {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  margin-top: 1rem;
  font-size: 0.95rem;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.quiz-retake-btn:hover {
  background: var(--primary-color);
  color: white;
}

.quiz-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25d366;
  color: white;
  padding: 15px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.quiz-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

/* Puzzle Styles */
.puzzle-container {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  direction: ltr; /* Keep puzzle grid LTR regardless of page direction */
}

.puzzle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.puzzle-header h3 {
  color: var(--text-dark);
  font-size: 1.3rem;
}

.puzzle-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.puzzle-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(60, 101, 167, 0.1);
  border: 1px solid rgba(60, 101, 167, 0.2);
  border-radius: 20px;
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.puzzle-help-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.puzzle-help-btn i {
  font-size: 1rem;
}

.puzzle-level-selector {
  display: flex;
  gap: 8px;
}

.level-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition:
    border-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
  min-width: 70px;
}

.level-btn i {
  font-size: 0.7rem;
  color: #ccc;
  transition: color 0.3s ease;
}

.level-btn span {
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
  transition: color 0.3s ease;
}

.level-btn:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(60, 101, 167, 0.2);
}

.level-btn.active {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, rgba(60, 101, 167, 0.1) 0%, rgba(60, 101, 167, 0.05) 100%);
}

.level-btn.active i {
  color: #f1c40f;
}

.level-btn.active span {
  color: var(--primary-color);
}

/* Difficulty-specific colors */
.level-btn[data-level='1'].active {
  border-color: #27ae60;
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.15) 0%, rgba(39, 174, 96, 0.05) 100%);
}
.level-btn[data-level='1'].active span {
  color: #27ae60;
}
.level-btn[data-level='1']:hover {
  border-color: #27ae60;
}

.level-btn[data-level='2'].active {
  border-color: #f39c12;
  background: linear-gradient(135deg, rgba(243, 156, 18, 0.15) 0%, rgba(243, 156, 18, 0.05) 100%);
}
.level-btn[data-level='2'].active span {
  color: #f39c12;
}
.level-btn[data-level='2']:hover {
  border-color: #f39c12;
}

.level-btn[data-level='3'].active {
  border-color: #e74c3c;
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.15) 0%, rgba(231, 76, 60, 0.05) 100%);
}
.level-btn[data-level='3'].active span {
  color: #e74c3c;
}
.level-btn[data-level='3']:hover {
  border-color: #e74c3c;
}

.puzzle-workspace {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
}

.puzzle-grid-container {
  position: relative;
}

.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  background: #f0f0f0;
  padding: 10px;
  border-radius: 15px;
  aspect-ratio: 1;
}

/* Puzzle Message Toast */
.puzzle-message {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  z-index: 5;
  white-space: nowrap;
}

.puzzle-message.show {
  opacity: 1;
  visibility: visible;
}

.puzzle-message.error {
  background: #e74c3c;
  color: white;
}

.puzzle-message.info {
  background: var(--primary-color);
  color: white;
}

/* Games CTA Banner */
.games-cta-banner {
  margin-top: 2rem;
  background: #fff;
  border: 1px solid rgba(60, 101, 167, 0.2);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 12px rgba(60, 101, 167, 0.06);
}

.games-cta-banner:hover {
  border-color: var(--primary-color);
  box-shadow: 0 6px 24px rgba(60, 101, 167, 0.12);
}

.games-cta-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.games-cta-icon {
  font-size: 2rem;
  color: var(--primary-color);
  flex-shrink: 0;
}

.games-cta-text {
  flex: 1;
  min-width: 0;
}

.games-cta-text h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}

.games-cta-text p {
  font-size: 0.85rem;
  color: #5a6c7d;
  margin: 0;
}

.games-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-1);
  color: #fff;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.games-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(60, 101, 167, 0.3);
}

@media (max-width: 600px) {
  .games-cta-content {
    flex-direction: column;
    text-align: center;
  }

  .games-cta-btn {
    width: 100%;
    justify-content: center;
  }
}

body[dir='rtl'] .games-cta-content {
  flex-direction: row-reverse;
}

body[dir='rtl'] .games-cta-text {
  text-align: right;
}

@media (max-width: 600px) {
  body[dir='rtl'] .games-cta-content {
    flex-direction: column;
  }

  body[dir='rtl'] .games-cta-text {
    text-align: center;
  }
}

/* Interactive Onboarding */
.puzzle-onboarding {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  pointer-events: none;
  display: none;
}

.puzzle-onboarding.active {
  display: block;
  pointer-events: auto;
}

.onboarding-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
}

.onboarding-tooltip {
  position: fixed;
  background: white;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 10002;
  max-width: 280px;
  animation: tooltipPop 0.3s ease;
}

@keyframes tooltipPop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.onboarding-tooltip::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: white;
  transform: rotate(45deg);
}

.onboarding-tooltip.arrow-left::before {
  left: -8px;
  top: 50%;
  margin-top: -8px;
}

.onboarding-tooltip.arrow-right::before {
  right: -8px;
  top: 50%;
  margin-top: -8px;
}

.onboarding-tooltip.arrow-top::before {
  top: -8px;
  left: 50%;
  margin-left: -8px;
}

.onboarding-tooltip.arrow-bottom::before {
  bottom: -8px;
  left: 50%;
  margin-left: -8px;
}

.onboarding-step-indicator {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 1rem;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  transition:
    background 0.3s ease,
    width 0.3s ease,
    border-radius 0.3s ease;
}

.step-dot.active {
  background: var(--primary-color);
  width: 20px;
  border-radius: 4px;
}

.step-dot.completed {
  background: #27ae60;
}

.onboarding-content {
  text-align: center;
  margin-bottom: 1rem;
}

.onboarding-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

.onboarding-icon i {
  font-size: 1.4rem;
  color: white;
}

.onboarding-text {
  color: var(--text-dark);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

.onboarding-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.onboarding-skip {
  background: none;
  border: none;
  color: #999;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 8px 12px;
  transition: color 0.3s ease;
}

.onboarding-skip:hover {
  color: #666;
}

.onboarding-next {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gradient-1);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.onboarding-next:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(60, 101, 167, 0.4);
}

.onboarding-next.start-btn {
  background: #27ae60;
}

/* Highlighted element during onboarding */
.onboarding-highlight {
  position: relative;
  z-index: 10001;
  box-shadow:
    0 0 0 4px rgba(60, 101, 167, 0.5),
    0 0 20px rgba(60, 101, 167, 0.3);
  animation: highlightPulse 1.5s ease infinite;
}

@keyframes highlightPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 4px rgba(60, 101, 167, 0.5),
      0 0 20px rgba(60, 101, 167, 0.3);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(60, 101, 167, 0.3),
      0 0 30px rgba(60, 101, 167, 0.2);
  }
}

.grid-cell {
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  position: relative;
}

.grid-cell.robot {
  background: var(--primary-color);
  color: white;
}

.grid-cell.star {
  background: #ffd700;
}

.grid-cell.obstacle {
  background: #e74c3c;
}

.puzzle-blocks h4 {
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.available-blocks {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.code-block {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 15px;
  background: var(--gradient-1);
  color: white;
  border-radius: 10px;
  cursor: grab;
  font-weight: 600;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease,
    background 0.3s ease;
  text-align: center;
}

.code-block:hover {
  transform: scale(1.02);
}

.code-block.dragging {
  opacity: 0.5;
}

.code-sequence {
  min-height: 150px;
  border: 2px dashed #ccc;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.code-sequence .code-block {
  cursor: pointer;
}

.code-sequence .code-block:hover {
  background: #e74c3c;
}

.drop-hint {
  color: #999;
  text-align: center;
  margin: auto;
}

.puzzle-controls {
  display: flex;
  gap: 1rem;
}

.puzzle-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.run-btn {
  background: #27ae60;
  color: white;
}

.run-btn:hover {
  background: #219a52;
}

.reset-btn {
  background: #e74c3c;
  color: white;
}

.reset-btn:hover {
  background: #c0392b;
}

.puzzle-success {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
  z-index: 1100;
  width: 90%;
  max-width: 360px;
  padding: 1rem;
}

.puzzle-success-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1099;
}

.puzzle-success-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  z-index: 5;
}

.puzzle-success-close:hover {
  background: rgba(0, 0, 0, 0.2);
}

.puzzle-success-close i {
  font-size: 1rem;
  color: #666;
}

.success-content {
  text-align: center;
  padding: 1.5rem 1rem;
}

.success-content > i {
  font-size: 3.5rem;
  color: #ffd700;
  margin-bottom: 0.75rem;
  display: block;
}

.success-content h3 {
  font-size: 1.4rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.success-content .success-message {
  color: #666;
  font-size: 1rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.success-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25d366;
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.success-cta i {
  font-size: 1.2rem;
  color: white;
}

.success-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

/* ===================================
   GALLERY SECTION - 3D Cards
   =================================== */
.lab-gallery {
  background: linear-gradient(180deg, #f8fbff 0%, #e8f2ff 100%);
  padding: 80px 0;
  overflow: hidden;
}

.lab-gallery .section-title {
  color: var(--text-dark);
}

.gallery-3d {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  perspective: 1000px;
}

.gallery-card {
  position: relative;
  height: 350px;
  border-radius: 24px;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow:
    0 20px 40px rgba(60, 101, 167, 0.15),
    0 0 0 1px rgba(60, 101, 167, 0.1);
  animation: galleryFloat 6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.5s);
}

@keyframes galleryFloat {
  0%,
  100% {
    transform: translateY(0) rotateX(0) rotateY(0);
  }
  25% {
    transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
  }
  50% {
    transform: translateY(-4px) rotateX(0) rotateY(0);
  }
  75% {
    transform: translateY(-8px) rotateX(-2deg) rotateY(2deg);
  }
}

.gallery-card:hover {
  transform: translateY(-15px) scale(1.03) rotateX(5deg);
  box-shadow:
    0 35px 70px rgba(60, 101, 167, 0.25),
    0 0 0 1px rgba(60, 101, 167, 0.2);
  animation-play-state: paused;
}

.gallery-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery-card-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-card:hover .gallery-card-inner img {
  transform: scale(1.1);
}

.gallery-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.5rem;
  background: linear-gradient(
    to top,
    rgba(10, 22, 40, 0.95) 0%,
    rgba(10, 22, 40, 0.6) 50%,
    transparent 100%
  );
  transform: translateY(20px);
  opacity: 0.8;
  transition: all 0.4s ease;
}

.gallery-card:hover .gallery-card-overlay {
  transform: translateY(0);
  opacity: 1;
}

.gallery-card-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 20px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.gallery-card-label::before {
  content: '\f03e';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.9rem;
}

/* Decorative elements */
.gallery-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #3c65a7, #5b8dd9, #3c65a7);
  border-radius: 26px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

/* ===================================
   COURSES SECTION
   =================================== */
.subsection-title {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  text-align: center;
}

.special-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 3rem;
}

.levels-section {
  margin-bottom: 5rem;
}

.levels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.level-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
}

.level-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--gradient-1);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.level-card:hover::before {
  transform: scaleX(1);
}

.level-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.level-card.featured {
  background: var(--gradient-1);
  color: var(--text-light);
}

.level-card.featured h4,
.level-card.featured .level-age,
.level-card.featured .level-features li {
  color: var(--text-light);
}

.popular-badge {
  position: absolute;
  top: 20px;
  right: -30px;
  background: var(--primary-color);
  color: var(--text-light);
  padding: 5px 40px;
  transform: rotate(45deg);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.level-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
  color: var(--text-light);
  box-shadow: var(--shadow-md);
}

.level-card.featured .level-icon {
  background: white;
  color: var(--primary-color);
}

.level-card h4 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  text-align: center;
}

.level-age {
  text-align: center;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.level-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.level-features li {
  padding: 0.7rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: #555;
}

.level-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.level-card.featured .level-features li::before {
  color: var(--text-light);
}

.level-badge {
  background: var(--gradient-1);
  color: var(--text-light);
  padding: 8px 20px;
  margin-top: auto;
  border-radius: 20px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.level-card.featured .level-badge {
  background: white;
  color: var(--primary-color);
}

/* Special Courses */
.special-courses-section {
  margin-top: 5rem;
}

.special-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.special-card {
  background: white;
  border-radius: 16px;
  padding: 1.25rem 1rem;
  box-shadow: 0 4px 15px rgba(60, 101, 167, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(60, 101, 167, 0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.special-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(60, 101, 167, 0.15);
  border-color: var(--primary-color);
}

.special-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #3c65a7, #5b8dd9);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  transform: rotate(-8deg);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.special-card:hover .special-icon {
  transform: rotate(0deg) scale(1.1);
}

.special-card h4 {
  font-size: 1rem;
  color: var(--text-dark);
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
}

.special-duration {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ===================================
   PRICING SECTION
   =================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.pricing-card {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  position: relative;
  border: 2px solid transparent;
}

.pricing-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.pricing-card.featured {
  background: var(--gradient-1);
  color: var(--text-light);
  transform: scale(1.05);
}

.pricing-card.featured:hover {
  transform: scale(1.08) translateY(-10px);
}

.popular-tag {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: var(--text-light);
  padding: 8px 25px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.pricing-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.pricing-card.featured .pricing-header {
  border-bottom-color: rgba(255, 255, 255, 0.3);
}

.pricing-header h4 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.pricing-card.featured .pricing-header h4 {
  color: var(--text-light);
}

.price {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
}

.currency {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 10px;
}

.amount {
  font-size: 3.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

.pricing-card.featured .amount {
  color: var(--text-light);
}

.period {
  font-size: 1rem;
  align-self: flex-end;
  margin-bottom: 15px;
  color: #666;
}

.pricing-card.featured .period {
  color: rgba(255, 255, 255, 0.8);
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
}

.pricing-features li {
  padding: 0.8rem 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #555;
}

.pricing-card.featured .pricing-features li {
  color: var(--text-light);
}

.pricing-features i {
  color: var(--primary-color);
  font-size: 1.1rem;
}

.pricing-card.featured .pricing-features i {
  color: var(--text-light);
}

.pricing-btn {
  width: 100%;
  padding: 15px;
  background: var(--gradient-1);
  color: var(--text-light);
  border: none;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.pricing-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(60, 101, 167, 0.5);
}

.pricing-card.featured .pricing-btn {
  background: white;
  color: var(--primary-color);
}

.pricing-note {
  text-align: center;
  color: #666;
  font-style: italic;
  margin-top: 2rem;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
  background: var(--dark-bg);
  color: var(--text-light);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h4 {
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  color: var(--text-light);
}

.footer-section p {
  color: var(--secondary-color);
  line-height: 1.8;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.8rem;
}

.footer-section ul li a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--primary-color);
}

.footer-logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.footer-logo {
  height: 50px;
}

.footer-logo-text {
  font-size: 1.4rem;
  font-weight: bold;
  background: linear-gradient(135deg, #64b5f6 0%, #42a5f5 50%, #90caf9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-info li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--secondary-color);
}

.contact-info i {
  color: var(--primary-color);
  width: 20px;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(60, 101, 167, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition:
    background 0.3s ease,
    transform 0.3s ease;
  font-size: 1.2rem;
  text-decoration: none;
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--secondary-color);
}

/* ===================================
   FLOATING WHATSAPP BUTTON
   =================================== */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
  z-index: 999;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  animation: pulse-whatsapp 2s infinite;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.7);
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-10px);
}

@keyframes pulse-whatsapp {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* WhatsApp Tooltip */
.whatsapp-tooltip {
  position: absolute;
  right: 70px;
  background: #25d366;
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-tooltip::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent transparent #25d366;
}

/* Mobile Robot CTA Popup */
.robot-cta {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 15px;
  z-index: 998;
  align-items: flex-end;
  gap: 5px;
  flex-direction: row-reverse;
  opacity: 0;
  transform: translateY(100px);
  transition:
    opacity 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
    transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.robot-cta.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Robot Character */
.robot-character {
  width: 60px;
  flex-shrink: 0;
}

.robot-head {
  position: relative;
  width: 50px;
  height: 45px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #5b8dd9 100%);
  border-radius: 12px 12px 8px 8px;
  margin: 0 auto;
}

.robot-antenna {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 10px;
  background: var(--primary-color);
  border-radius: 2px;
}

.robot-antenna::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: #25d366;
  border-radius: 50%;
  animation: antenna-blink 2s infinite;
}

@keyframes antenna-blink {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 8px #25d366;
  }
  50% {
    opacity: 0.5;
    box-shadow: 0 0 2px #25d366;
  }
}

.robot-face {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 25px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.robot-eye {
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: robot-blink 3s infinite;
}

@keyframes robot-blink {
  0%,
  90%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.1);
  }
}

.robot-mouth {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 0 0 6px 6px;
}

.robot-body {
  width: 40px;
  height: 30px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #5b8dd9 100%);
  border-radius: 8px;
  margin: 3px auto 0;
  position: relative;
}

.robot-arm {
  position: absolute;
  width: 8px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 4px;
  top: 5px;
}

.robot-arm.left {
  left: -10px;
}

.robot-arm.right {
  right: -10px;
  transform-origin: top center;
}

.robot-arm.waving {
  animation: wave 0.8s ease-in-out infinite;
}

@keyframes wave {
  0%,
  100% {
    transform: rotate(-10deg);
  }
  50% {
    transform: rotate(20deg);
  }
}

/* Speech Bubble */
.speech-bubble {
  background: white;
  border-radius: 15px;
  padding: 12px 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  max-width: 200px;
  animation: bubble-bounce 2s ease-in-out infinite;
}

@keyframes bubble-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.speech-bubble::before {
  content: '';
  position: absolute;
  right: -10px;
  bottom: 20px;
  border-width: 10px;
  border-style: solid;
  border-color: transparent transparent transparent white;
}

.speech-bubble p {
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
  line-height: 1.3;
}

.robot-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 0.85rem;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.robot-cta-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.robot-cta-btn i {
  font-size: 1.1rem;
}

/* ===================================
   SCROLL TO TOP BUTTON
   =================================== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease;
  z-index: 999;
  box-shadow: var(--shadow-md);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* ===================================
   SKELETON LOADERS
   =================================== */
@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-loader {
  position: relative;
  overflow: hidden;
}

.skeleton-loader::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(60, 101, 167, 0.1) 0%,
    rgba(60, 101, 167, 0.2) 50%,
    rgba(60, 101, 167, 0.1) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  z-index: 1;
  border-radius: inherit;
}

/* Gallery skeleton */
.gallery-item.loading img {
  opacity: 0;
}

.gallery-item.loading {
  background: linear-gradient(
    90deg,
    rgba(60, 101, 167, 0.1) 0%,
    rgba(60, 101, 167, 0.25) 50%,
    rgba(60, 101, 167, 0.1) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  min-height: 500px;
}

.gallery-item img {
  transition: opacity 0.3s ease;
}

/* Testimonial skeleton */
.testimonial-card.loading {
  position: relative;
}

.testimonial-card.loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(60, 101, 167, 0.05) 0%,
    rgba(60, 101, 167, 0.15) 50%,
    rgba(60, 101, 167, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  z-index: 1;
  border-radius: 20px;
  pointer-events: none;
}

.testimonial-card.loading > * {
  opacity: 0.3;
}

.testimonial-card > * {
  transition: opacity 0.3s ease;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 1200px) {
  .levels-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .gallery-3d {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-card {
    height: 300px;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .special-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .certificates-content {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .project-card {
    height: 200px;
  }

  .project-info {
    padding: 0.75rem;
  }

  .project-info h4 {
    font-size: 0.85rem;
  }

  .puzzle-workspace {
    grid-template-columns: 1fr;
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .gallery-3d {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .gallery-card {
    height: 280px;
  }

  .gallery-card-label {
    font-size: 1rem;
    padding: 8px 16px;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: linear-gradient(180deg, rgba(30, 58, 95, 0.98) 0%, rgba(45, 74, 111, 0.98) 100%);
    flex-direction: column;
    justify-content: center;
    transition: left 0.3s ease;
    padding: 2rem;
    gap: 1.5rem;
  }

  .nav-links.active {
    left: 0;
  }

  /* Staggered link animations */
  .nav-links a,
  .nav-links .cta-btn,
  .nav-links .language-dropdown {
    opacity: 0;
    transform: translateX(-30px);
    transition:
      opacity 0.4s ease,
      transform 0.4s ease;
  }

  .nav-links.active a,
  .nav-links.active .cta-btn,
  .nav-links.active .language-dropdown {
    opacity: 1;
    transform: translateX(0);
  }

  .nav-links.active a:nth-child(1) {
    transition-delay: 0.1s;
  }
  .nav-links.active a:nth-child(2) {
    transition-delay: 0.15s;
  }
  .nav-links.active a:nth-child(3) {
    transition-delay: 0.2s;
  }
  .nav-links.active a:nth-child(4) {
    transition-delay: 0.25s;
  }
  .nav-links.active .cta-btn {
    transition-delay: 0.3s;
  }
  .nav-links.active .language-dropdown {
    transition-delay: 0.35s;
  }

  /* Mobile language dropdown adjustments */
  .language-dropdown {
    width: 100%;
  }

  .lang-dropdown-toggle {
    width: 100%;
    justify-content: center;
  }

  .lang-dropdown-menu {
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(-10px);
  }

  .language-dropdown.open .lang-dropdown-menu {
    transform: translateX(-50%) translateY(0);
  }

  /* Mobile nav links styling */
  .nav-links a {
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
  }

  /* Glowing CTA in mobile menu */
  .nav-links .cta-btn {
    animation: ctaPulse 2s ease-in-out infinite;
    font-size: 1.1rem;
    padding: 15px 30px;
  }

  @keyframes ctaPulse {
    0%,
    100% {
      box-shadow: 0 4px 15px rgba(60, 101, 167, 0.4);
    }
    50% {
      box-shadow: 0 4px 30px rgba(60, 101, 167, 0.8);
    }
  }

  .mobile-menu-toggle {
    display: flex;
  }

  /* Logo pulse/glow animation on mobile */
  .logo {
    animation: logoPulse 3s ease-in-out infinite;
  }

  @keyframes logoPulse {
    0%,
    100% {
      filter: drop-shadow(0 0 5px rgba(100, 181, 246, 0.3));
    }
    50% {
      filter: drop-shadow(0 0 15px rgba(100, 181, 246, 0.6));
      transform: scale(1.03);
    }
  }

  .logo-text {
    animation: textGlow 3s ease-in-out infinite;
  }

  @keyframes textGlow {
    0%,
    100% {
      text-shadow: 0 0 5px rgba(100, 181, 246, 0.3);
      filter: brightness(1);
    }
    50% {
      text-shadow: 0 0 15px rgba(100, 181, 246, 0.6);
      filter: brightness(1.1);
    }
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-image {
    order: -1;
  }

  .hero {
    padding-top: 100px;
    padding-bottom: 100px;
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
    justify-items: center;
  }

  .hero-text {
    align-items: center !important;
    text-align: center !important;
    order: 2;
    width: 100%;
  }

  .floating-shapes {
    opacity: 0.4;
  }

  .shape {
    transform: scale(0.5);
  }

  .glow-orbs {
    opacity: 0.3;
  }

  .orb {
    filter: blur(80px);
  }

  /* RTL mobile centering override */
  body[dir='rtl'] .hero-text {
    align-items: center !important;
    text-align: center !important;
  }

  body[dir='rtl'] .hero-feature-cards {
    justify-content: center !important;
  }

  body[dir='rtl'] .hero-cta-group-3d {
    justify-content: center !important;
  }

  body[dir='rtl'] .hero-badge-3d {
    align-self: center !important;
  }

  body[dir='rtl'] .hero-title-3d {
    justify-content: center !important;
  }

  .hero-animation-3d {
    order: 1;
  }

  .hero-animation-3d lottie-player {
    max-width: 220px;
  }

  .frame-glow {
    filter: blur(30px);
  }

  .frame-ring,
  .frame-particles {
    display: none;
  }

  .hero-badge-3d {
    align-self: center;
    padding: 8px 18px 8px 10px;
  }

  .badge-icon {
    width: 24px;
    height: 24px;
  }

  .badge-text {
    font-size: 0.75rem;
  }

  .hero-title-3d {
    font-size: 2rem;
    justify-content: center;
    gap: 0.3rem;
  }

  .hero-subtitle-3d {
    font-size: 0.95rem;
  }

  .hero-stats-3d {
    justify-content: center;
    gap: 0.6rem;
  }

  .stat-card-3d {
    padding: 12px 16px;
    min-width: 80px;
  }

  .stat-number-3d {
    font-size: 1.3rem;
  }

  .stat-label-3d {
    font-size: 0.7rem;
  }

  .hero-feature-cards {
    justify-content: center;
    gap: 0.75rem;
  }

  .feature-card-3d {
    padding: 12px 16px;
  }

  .card-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .card-icon i {
    font-size: 0.9rem;
  }

  .feature-card-3d span {
    font-size: 0.75rem;
  }

  .hero-cta-group-3d {
    justify-content: center !important;
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

  .hero-cta-3d {
    justify-content: center;
    width: 100%;
  }

  .scroll-indicator-3d {
    display: none;
  }

  .wave {
    height: 80px;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quote-section {
    padding: 1rem;
    margin-top: 1rem;
  }

  .quote-section blockquote p {
    font-size: 1rem;
  }

  .certificate-info,
  .competition-info {
    flex-direction: column;
    text-align: center;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .project-card {
    height: 180px;
  }

  .project-info {
    padding: 0.6rem;
    gap: 0.3rem;
  }

  .project-info h4 {
    font-size: 0.75rem;
  }

  .project-age {
    font-size: 0.6rem;
    padding: 4px 8px;
  }

  .interactive-tabs {
    flex-direction: column;
  }

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

  section {
    padding: 40px 0;
  }

  .section-header {
    margin-bottom: 1.5rem;
  }

  .puzzle-workspace {
    grid-template-columns: 1fr;
  }

  .puzzle-blocks {
    order: -1;
  }

  .puzzle-header {
    flex-direction: column;
    text-align: center;
  }

  .puzzle-header h3 {
    font-size: 1.1rem;
  }

  .puzzle-title-row {
    justify-content: center;
    width: 100%;
  }

  .puzzle-help-btn span {
    display: none;
  }

  .puzzle-help-btn {
    padding: 8px 10px;
  }

  .puzzle-level-selector {
    justify-content: center;
  }

  .level-btn {
    padding: 6px 12px;
    min-width: 60px;
  }

  .level-btn i {
    font-size: 0.6rem;
  }

  .level-btn span {
    font-size: 0.7rem;
  }

  .onboarding-tooltip {
    max-width: 260px;
    padding: 1rem;
  }

  .onboarding-tooltip::before {
    display: none;
  }

  .onboarding-tooltip.arrow-top::before,
  .onboarding-tooltip.arrow-bottom::before {
    display: block;
    left: 50%;
    margin-left: -8px;
  }

  .onboarding-icon {
    width: 40px;
    height: 40px;
  }

  .onboarding-icon i {
    font-size: 1.1rem;
  }

  .onboarding-text {
    font-size: 0.9rem;
  }

  .onboarding-highlight {
    position: relative;
    z-index: 10001;
  }

  .whatsapp-float {
    display: none; /* Hidden on mobile since we have robot CTA */
  }

  .whatsapp-tooltip {
    display: none;
  }

  .robot-cta {
    display: flex;
  }

  .scroll-top {
    display: none;
  }
}

@media (max-width: 480px) {
  .levels-grid,
  .special-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding-bottom: 100px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 8px 16px;
  }

  .hero-features {
    flex-direction: column;
  }

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

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

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

  .wave {
    height: 80px;
  }

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

  .gallery-item img {
    height: 300px;
  }
}

/* ===================================
   FOCUS VISIBLE STYLES
   =================================== */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.cta-btn:focus-visible,
.hero-cta:focus-visible,
.pricing-btn:focus-visible,
.filter-btn:focus-visible,
.interactive-tab:focus-visible,
.puzzle-btn:focus-visible,
.onboarding-next:focus-visible,
.onboarding-skip:focus-visible,
.quiz-retake-btn:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.gallery-nav:focus-visible,
.testimonial-nav-btn:focus-visible,
.scroll-top:focus-visible,
.whatsapp-float:focus-visible,
.view-project-btn:focus-visible,
.puzzle-success-close:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

.nav-links a:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

.lang-dropdown-toggle:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

.mobile-menu-toggle:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

/* ===================================
   TOUCH INTERACTION
   =================================== */
button,
a,
.quiz-option,
.code-block,
.gallery-dot,
.testimonial-dot,
.lang-option,
.filter-btn,
.interactive-tab {
  touch-action: manipulation;
}

/* ===================================
   OVERSCROLL CONTAINMENT
   =================================== */
.puzzle-success,
.onboarding-backdrop,
.puzzle-success-backdrop,
.nav-links.active {
  overscroll-behavior: contain;
}

/* ===================================
   REDUCED MOTION
   =================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .gallery-track {
    transition: none;
  }

  .hero-visual {
    transform: none !important;
  }
}
