/* CSS Variables for Colors and Direction */
:root {
  /* الألوان الأساسية (Primary Colors) */
  --primary-purple: #7a35b6; /* اللون البنفسجي الأساسي */
  --secondary-green: #3fa966; /* اللون الأخضر الثانوي */
  --secondary-orange: #f05326; /* اللون البرتقالي الثانوي */
  --white: #ffffff; /* الأبيض */
  --black: #000000; /* الأسود */

  /* ألوان مساعدة */
  --gray-light: #f8f9fa;
  --gray-medium: #666666;
  --gray-dark: #333333;
  --text-light: #bbbbbb;

  /* Direction Variables */
  --text-align-start: right;
  --text-align-end: left;
  --float-start: right;
  --float-end: left;

  /* Shadows */
  --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.2);

  /* Transitions */
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
  --transition-slow: 1s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "IBM Plex Sans Arabic", "Cairo", "Tajawal", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--gray-dark);
  overflow-x: hidden; /* منع التمرير الأفقي */
  direction: rtl;
}

body.en {
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  direction: ltr;
}

html {
  overflow-x: hidden; /* منع التمرير الأفقي */
}

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

/* Splash Screen with GIF and Logo - Full Screen with Dark Overlay */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
  overflow: hidden;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.splash-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.splash-gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.splash-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* تظليل أسود */
}

.splash-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.splash-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
  animation: logoFloat 3s ease-in-out infinite;
}

/* Main Website */
.main-website {
  opacity: 0;
  transition: opacity var(--transition-slow);
  width: 100%;
  overflow-x: hidden;
}

.main-website.visible {
  opacity: 1;
}

/* Header Styles - RTL Layout with Fade In Effect */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: transparent;
  backdrop-filter: blur(20px);
  z-index: 1000;
  transition: all var(--transition-fast);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateY(-100%);
}

.header.scrolled {
  background: rgba(122, 53, 182, 0.95);
}

.header.fade-in {
  opacity: 1;
  transform: translateY(0);
  animation: headerFadeIn 1s ease-out forwards;
}

@keyframes headerFadeIn {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar {
  padding: 0.7rem 0;
}

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

body.en .nav-container {
  direction: ltr;
}

/* Logo on the left side for RTL - Updated Order */
.logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  order: 2;
  gap: 1rem;
}

body.en .logo {
  order: 1;
}

.logo-main {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  animation: logoGlow 2s ease-in-out infinite alternate;
}

/* Navigation menu on the right side for RTL */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  order: 1;
  align-items: center;
  flex-wrap: wrap;
}

body.en .nav-menu {
  order: 2;
}

.nav-link {
  text-decoration: none;
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  position: relative;
  padding: 0.5rem 0;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--secondary-green);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--secondary-green);
  transition: width var(--transition-fast);
}

body.en .nav-link::after {
  right: auto;
  left: 0;
}

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

/* Language Switcher in Navigation */
.nav-language-switcher {
  position: relative;
  margin-right: 1rem;
}

body.en .nav-language-switcher {
  margin-right: 0;
  margin-left: 1rem;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: none;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-btn:hover,
.lang-btn.active {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.lang-arrow {
  transition: transform var(--transition-fast);
  font-size: 0.7rem;
}

.lang-btn.active .lang-arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-heavy);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  min-width: 120px;
  margin-top: 8px;
  z-index: 1001;
}

body.en .lang-dropdown {
  right: auto;
  left: 0;
}

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

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: none;
  border: none;
  width: 100%;
  text-align: right;
  cursor: pointer;
  transition: background var(--transition-fast);
  color: var(--gray-dark);
  font-size: 0.85rem;
}

body.en .lang-option {
  text-align: left;
}

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

.lang-option i {
  color: var(--primary-purple);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  order: 3;
}

body.en .hamburger {
  order: 3;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--white);
  margin: 3px 0;
  transition: var(--transition-fast);
  border-radius: 2px;
}

/* Hero Section with GIF Background and Enhanced Effects */
.hero {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-bg-gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* تغميق بنسبة 20% إضافية */
}

/* Decorative Logo Background */
.hero-decorative-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.decorative-logo {
  width: 100%;
  height: 100%;
  opacity: 0.03;
  animation: decorativeFloat 20s ease-in-out infinite;
}

@keyframes decorativeFloat {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) rotate(1deg);
  }
  50% {
    transform: translateY(-10px) rotate(-1deg);
  }
  75% {
    transform: translateY(-30px) rotate(0.5deg);
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--white);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.scroll-indicator:hover {
  transform: translateX(-50%) translateY(-5px);
}

.scroll-arrow {
  width: 40px;
  height: 40px;
  border: 2px solid var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scrollBounce 2s ease-in-out infinite;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.scroll-arrow i {
  font-size: 16px;
  animation: arrowMove 2s ease-in-out infinite;
}

.scroll-text {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes scrollBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes arrowMove {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}

/* Section Styles - Reduced Padding */
.section {
  padding: 60px 0; /* تقليل من 100px إلى 60px */
  width: 100%;
  overflow-x: hidden;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem; /* تقليل من 4rem إلى 3rem */
  position: relative;
  z-index: 2;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  color: var(--primary-purple);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--secondary-green);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--gray-medium);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Intro Section */
.intro {
  background: var(--gray-light);
  padding: 50px 0; /* تقليل من 80px إلى 50px */
}

.intro-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.intro-content h2 {
  font-size: 2.2rem;
  color: var(--primary-purple);
  margin-bottom: 2rem;
  line-height: 1.4;
}

.intro-content p {
  font-size: 1.3rem;
  color: var(--gray-medium);
  line-height: 1.8;
}

/* About Section */
.about {
  background: var(--white);
  color: var(--gray-dark);
  position: relative;
  overflow: hidden;
}

.about-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.about-bg-gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.about-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(122, 53, 182, 0.85) 0%,
    rgba(122, 53, 182, 0.9) 50%,
    rgba(122, 53, 182, 0.85) 100%
  );
}

.about .container {
  position: relative;
  z-index: 2;
}

.about .section-header,
.about .about-content {
  position: relative;
  z-index: 2;
}

.about .section-title,
.about .section-subtitle,
.about .about-text h3,
.about .about-text p {
  color: var(--white);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem; /* تقليل من 4rem إلى 3rem */
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.about-text h3 {
  font-size: 2rem;
  color: var(--primary-purple);
  margin-bottom: 2rem;
}

.about-text p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: var(--gray-medium);
}

.about-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: var(--shadow-medium);
}

/* Vision & Mission Section - Simple Style */
.vision-mission {
  background: var(--white);
  padding: 50px 0; /* تقليل من 80px إلى 50px */
}

.vm-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem; /* تقليل من 4rem إلى 3rem */
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.vm-item {
  text-align: center;
  padding: 2rem;
}

.vm-item h3 {
  font-size: 2rem;
  color: var(--primary-purple);
  margin-bottom: 2rem;
}

.vm-item p {
  font-size: 1.2rem;
  color: var(--gray-medium);
  line-height: 1.8;
}

/* Services Section - Updated for 4 Services */
.services {
  background: var(--white);
  color: var(--gray-dark);
}

.services .container {
  position: relative;
  z-index: 2;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-heavy);
}

.service-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-fast);
}

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

.service-name {
  padding: 1.5rem;
  font-size: 1.2rem;
  color: var(--secondary-green);
  text-align: var(--text-align-start);
  margin: 0;
  font-weight: 600;
}

body.en .service-name {
  text-align: left;
}
/* ==================== Services Fix (Desktop) ==================== */
@media (min-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
/* Portfolio Section - Updated */
.portfolio {
  background: var(--white);
  color: var(--gray-dark);
}

.portfolio .container {
  position: relative;
  z-index: 2;
}

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

.category-btn {
  background: transparent;
  color: var(--gray-medium);
  border: 2px solid var(--gray-medium);
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.category-btn:hover,
.category-btn.active {
  background: var(--primary-purple);
  color: var(--white);
  border-color: var(--primary-purple);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.portfolio-item {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-heavy);
}

.portfolio-image {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-fast);
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 2rem 1.5rem 1.5rem;
  transform: translateY(100%);
  transition: transform var(--transition-fast);
}

.portfolio-item:hover .portfolio-overlay {
  transform: translateY(0);
}

.portfolio-info {
  color: var(--white);
}

.work-type {
  font-size: 0.9rem;
  color: var(--secondary-green);
  font-weight: 500;
}

.work-title {
  font-size: 1.3rem;
  margin-top: 0.5rem;
  font-weight: 700;
}

/* Team Section - Grid Style */
.team {
  background: var(--white);
  color: var(--gray-dark);
  padding: 60px 0; /* تقليل من 100px إلى 60px */
}

.team .container {
  position: relative;
  z-index: 2;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.team-member {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  transition: all var(--transition-fast);
}

.team-member:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-heavy);
}

.member-image {
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.member-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform var(--transition-fast);
}

.team-member:hover .member-image img {
  transform: scale(1.05);
}

.member-info {
  padding: 1.5rem;
  text-align: center;
}

.member-info h3 {
  font-size: 1.3rem;
  color: var(--primary-purple);
  margin-bottom: 0.5rem;
}

.member-position {
  color: var(--black);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Partners Section - Grid Style with 4 per row */
.clients {
  background: var(--gray-light);
  color: var(--gray-dark);
  padding: 60px 0;
}

.clients .container {
  position: relative;
  z-index: 2;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.client-item {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: all var(--transition-fast);
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.client-logo {
  max-width: 90%; /* Increased from 120px */
  max-height: 90%; /* Increased from 80px */
  object-fit: contain;
  filter: grayscale(0%); /* Removed grayscale filter */
  transition: all var(--transition-fast);
}

.client-item:hover .client-logo {
  filter: grayscale(0%); /* Ensure no grayscale on hover */
}

.team-controls {
  text-align: center;
  margin-top: 3rem;
}

/* Team Controls Buttons */
.btn-show-more,
.btn-show-less {
  background: linear-gradient(135deg, var(--primary-purple), var(--secondary-green));
  color: var(--white);
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-light);
  font-family: inherit;
}

.btn-show-more:hover,
.btn-show-less:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
  background: linear-gradient(135deg, var(--secondary-green), var(--primary-purple));
}

.btn-show-more i,
.btn-show-less i {
  font-size: 0.9rem;
  transition: transform var(--transition-fast);
}

.btn-show-more:hover i,
.btn-show-less:hover i {
  transform: scale(1.1);
}

/* Modern Profile Section */
.profile {
  background: linear-gradient(135deg, var(--gray-light) 0%, var(--white) 100%);
  color: var(--gray-dark);
  padding: 60px 0; /* تقليل من 100px إلى 60px */
}

.profile .container {
  position: relative;
  z-index: 2;
}

.modern-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem; /* تقليل من 3rem إلى 2rem */
  max-width: 1000px;
  margin: 0 auto;
}

.modern-stat-item {
  text-align: center;
  padding: 2rem; /* تقليل من 3rem إلى 2rem */
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-light);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.modern-stat-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-purple), var(--secondary-green), var(--secondary-orange));
}

.modern-stat-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-heavy);
}

.stat-value {
  font-size: 4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-purple), var(--secondary-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1;
}

.stat-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-dark);
  margin-bottom: 0.5rem;
}

.stat-description {
  color: var(--gray-medium);
  font-size: 1rem;
  line-height: 1.4;
}

/* News Section - Updated */
.news {
  background: var(--white);
  color: var(--gray-dark);
}

.news .container {
  position: relative;
  z-index: 2;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.news-item {
  background: var(--white);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: var(--shadow-light);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 2px solid transparent;
}

.news-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  border-color: var(--primary-purple);
}

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

.news-source {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #000000;
  font-weight: 600;
  font-size: 0.9rem;
}

.news-date {
  color: var(--gray-medium);
  font-size: 0.8rem;
}

.news-content p {
  color: var(--gray-dark);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.news-stats {
  display: flex;
  gap: 1rem;
}

.news-stats span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--gray-medium);
  font-size: 0.9rem;
}

.news-stats i {
  color: var(--primary-purple);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--white);
  margin: 2% auto;
  padding: 0;
  border-radius: 20px;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-heavy);
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: var(--gray-medium);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  transition: all var(--transition-fast);
}

body.en .close {
  right: auto;
  left: 30px;
}

.close:hover {
  color: var(--primary-purple);
  background: var(--white);
  transform: scale(1.1);
}

/* Service Modal Styles */
.service-modal-content {
  padding: 3rem;
}

.service-modal-header {
  text-align: center;
  margin-bottom: 2rem;
}

.service-modal-title {
  font-size: 2.5rem;
  color: var(--primary-purple);
  margin-bottom: 1rem;
}

.service-modal-subtitle {
  font-size: 1.3rem;
  color: var(--secondary-green);
  font-weight: 600;
}

.service-modal-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 15px;
  margin-bottom: 2rem;
}

.service-modal-description {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--gray-medium);
}

.service-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.service-features-section h4 {
  color: var(--primary-purple);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.service-features-section ul {
  list-style: none;
}

.service-features-section li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(122, 53, 182, 0.1);
  position: relative;
  padding-right: 1.5rem;
}

body.en .service-features-section li {
  padding-right: 0;
  padding-left: 1.5rem;
}

.service-features-section li::before {
  content: "✓";
  position: absolute;
  right: 0;
  color: var(--secondary-green);
  font-weight: bold;
}

body.en .service-features-section li::before {
  right: auto;
  left: 0;
}

.service-cta {
  background: linear-gradient(135deg, var(--primary-purple), var(--secondary-green));
  color: var(--white);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
}

.service-cta h4 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-cta p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.service-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.service-cta-button {
  padding: 12px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-cta-button.primary {
  background: var(--white);
  color: var(--primary-purple);
}

.service-cta-button.secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.service-cta-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

/* Work Modal Styles */
.work-modal-content {
  padding: 3rem;
}

.work-modal-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: center;
}

.work-modal-image {
  position: relative;
}

.work-modal-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 15px;
}

.work-type-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--secondary-green);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

body.en .work-type-badge {
  right: auto;
  left: 1rem;
}

.work-modal-info h2 {
  font-size: 2.5rem;
  color: var(--primary-purple);
  margin-bottom: 1rem;
}

.work-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.work-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-medium);
  font-size: 1rem;
}

.work-meta i {
  color: var(--secondary-green);
}

.work-description {
  margin-bottom: 2rem;
}

.work-description h3 {
  color: var(--primary-purple);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.work-description p {
  line-height: 1.8;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--gray-medium);
}

.work-video {
  margin-bottom: 2rem;
}

.work-video h3 {
  color: var(--primary-purple);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.work-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.work-info-card,
.work-team-card {
  background: var(--gray-light);
  padding: 2rem;
  border-radius: 15px;
}

.work-info-card h4,
.work-team-card h4 {
  color: var(--primary-purple);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.work-info-card ul,
.work-team-card ul {
  list-style: none;
}

.work-info-card li,
.work-team-card li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(122, 53, 182, 0.1);
}

/* Footer */
.footer {
  background: var(--primary-purple);
  color: var(--white);
  padding: 40px 0 20px; /* تقليل من 60px إلى 40px */
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem; /* تقليل من 4rem إلى 3rem */
  margin-bottom: 2rem; /* تقليل من 3rem إلى 2rem */
}

.footer-main {
  display: flex;
  flex-direction: column;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 2rem;
}

.footer-logo-long {
  height: 80px;
  width: auto;
  max-width: 300px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.footer-description {
  color: var(--text-light);
  line-height: 1.8;
  margin-top: 1rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--secondary-green);
}

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

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

.footer-section ul li a {
  color: var(--text-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.contact-info p {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

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

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

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(63, 169, 102, 0.1);
  color: var(--secondary-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all var(--transition-fast);
  border: 1px solid rgba(63, 169, 102, 0.3);
}

.social-link:hover {
  background: var(--secondary-green);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-final-logo {
  display: flex;
  align-items: center;
}

.footer-final-logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-purple);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  z-index: 1000;
  box-shadow: var(--shadow-light);
}

body.en .back-to-top {
  left: auto;
  right: 30px;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--secondary-green);
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

/* Animations */
@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes logoGlow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(122, 53, 182, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(122, 53, 182, 0.6);
  }
}

/* Utility Classes */
.hidden {
  display: none;
}

/* Responsive Design for Detail Pages */
@media (max-width: 768px) {
  .service-modal-content,
  .work-modal-content {
    padding: 2rem;
  }

  .service-features-grid,
  .work-modal-header,
  .work-details-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .service-modal-title,
  .work-modal-info h2 {
    font-size: 2rem;
  }

  .service-cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .work-meta {
    flex-direction: column;
    gap: 1rem;
  }

  /* Mobile Navigation */
  .hamburger {
    display: flex;
    order: 1;
  }

  body.en .hamburger {
    order: 3;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

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

  .logo {
    order: 2;
    justify-content: center;
  }

  body.en .logo {
    order: 2;
  }

  .logo-main {
    height: 45px;
  }

  .nav-menu {
    position: fixed;
    right: -100%;
    top: 80px;
    flex-direction: column;
    background-color: rgba(122, 53, 182, 0.98);
    backdrop-filter: blur(20px);
    width: calc(100% - 30px);
    margin: 0 15px;
    text-align: center;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-heavy);
    padding: 2rem 0;
    gap: 1.5rem;
    order: 3;
    border-radius: 25px;
  }

  body.en .nav-menu {
    right: auto;
    left: -100%;
  }

  body.en .nav-menu.active {
    left: 0;
  }

  .nav-menu.active {
    right: 0;
  }

  /* Mobile Navigation Language Switcher */
  .nav-language-switcher {
    margin-right: 0;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  body.en .nav-language-switcher {
    margin-left: 0;
  }

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

  .lang-dropdown {
    position: static;
    width: 100%;
    margin-top: 0.5rem;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
  }

  .lang-dropdown.show {
    display: block;
  }

  /* Mobile Header */
  .nav-container {
    background: transparent;
    border-radius: 0;
    margin: 0;
    padding: 0.5rem 20px;
    box-shadow: none;
  }

  .header {
    background: transparent;
    padding: 8px 0;
  }

  .header.scrolled {
    background: rgba(122, 53, 182, 0.95);
  }
}

@media (max-width: 480px) {
  .nav-container {
    margin: 0;
    padding: 0.4rem 15px;
  }

  .nav-menu {
    width: calc(100% - 20px);
    margin: 0 10px;
    padding: 1.5rem 0;
    gap: 1rem;
  }

  .modern-stat-item {
    padding: 1.5rem;
  }

  .stat-value {
    font-size: 2.5rem;
  }

  .stat-title {
    font-size: 1.2rem;
  }

  .footer-logo-long {
    height: 60px;
    max-width: 250px;
  }

  .footer-final-logo img {
    height: 35px;
  }

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

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

  /* تقليل إضافي للمسافات في الشاشات الصغيرة جداً */
  .section {
    padding: 30px 0;
  }

  .intro {
    padding: 25px 0;
  }

  .vision-mission {
    padding: 25px 0;
  }

  .team {
    padding: 30px 0;
  }

  .clients {
    padding: 30px 0;
  }

  .profile {
    padding: 30px 0;
  }

  .footer {
    padding: 20px 0 10px;
  }

  .container {
    padding: 0 15px;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

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

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

  .clients-more {
    grid-template-columns: repeat(5, 1fr);
  }

  .modern-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
  }

  /* تقليل المسافات في الشاشات المتوسطة */
  .section {
    padding: 50px 0;
  }

  .intro {
    padding: 40px 0;
  }

  .vision-mission {
    padding: 40px 0;
  }

  .team {
    padding: 50px 0;
  }

  .clients {
    padding: 50px 0;
  }

  .profile {
    padding: 50px 0;
  }

  .footer {
    padding: 30px 0 15px;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }

  .intro-content h2 {
    font-size: 1.8rem;
  }

  .intro-content p {
    font-size: 1.1rem;
  }

  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

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

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

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

  .modern-stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .stat-value {
    font-size: 3rem;
  }

  .stat-title {
    font-size: 1.3rem;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .portfolio-categories {
    gap: 0.5rem;
  }

  .category-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  /* تقليل المسافات في الموبايل */
  .section {
    padding: 40px 0;
  }

  .intro {
    padding: 30px 0;
  }

  .vision-mission {
    padding: 30px 0;
  }

  .team {
    padding: 40px 0;
  }

  .clients {
    padding: 40px 0;
  }

  .profile {
    padding: 40px 0;
  }

  .footer {
    padding: 25px 0 15px;
  }

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

  .scroll-indicator {
    bottom: 20px;
  }

  .scroll-arrow {
    width: 35px;
    height: 35px;
  }

  .scroll-arrow i {
    font-size: 14px;
  }

  .scroll-text {
    font-size: 12px;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-purple);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-green);
}
/*
 * Century Camera Viewer - Cinematic Video Player
 * Version 2.0
 * All classes prefixed with cv- to avoid conflicts
 */

/* ==================== HIDE OLD PORTFOLIO SECTIONS ==================== */
/* Hide old portfolio section to show only camera viewer portfolio */
#portfolio.portfolio.section,
section#portfolio,
.portfolio.section {
  display: none !important;
}

/* ==================== Reset only for viewer ==================== */
.cv-viewer-root * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==================== Portfolio Grid ==================== */
.cv-portfolio-section {
  background: #000;
  padding: 60px 40px;
  min-height: 100vh;
  display: block !important;
}

.cv-container {
  max-width: 1600px;
  margin: 0 auto;
}

.cv-header {
  text-align: center;
  margin-bottom: 60px;
}

.cv-header h2 {
  font-size: 56px;
  font-weight: 700;
  background: linear-gradient(135deg, #aa66ff, #ffb400);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
  letter-spacing: -1px;
}

.cv-header p {
  font-size: 18px;
  color: #888;
}

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

.cv-item {
  background: #0a0a0a;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cv-item:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(170, 102, 255, 0.5);
  box-shadow: 0 25px 50px rgba(170, 102, 255, 0.25), 0 0 100px rgba(170, 102, 255, 0.1);
}

.cv-item-image {
  position: relative;
  width: 100%;
  height: 350px;
  overflow: hidden;
}

.cv-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.cv-item:hover .cv-item-image img {
  transform: scale(1.15);
}

.cv-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 80px;
  height: 80px;
  background: rgba(170, 102, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 40px rgba(170, 102, 255, 0.5);
}

.cv-item:hover .cv-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cv-play-btn::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 22px solid #fff;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  margin-left: 5px;
}

.cv-item-info {
  padding: 20px 25px;
  background: #0a0a0a;
}

.cv-item-title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.cv-item-type {
  font-size: 12px;
  font-weight: 600;
  color: #ffb400;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: rgba(255, 180, 0, 0.1);
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
}

/* ==================== Camera Lens Loader ==================== */
.cv-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.cv-loader.cv-active {
  display: flex;
}

.cv-shutter-wrap {
  position: relative;
  width: 200px;
  height: 200px;
}

.cv-shutter-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  border: 3px solid rgba(170, 102, 255, 0.3);
  border-radius: 50%;
}

.cv-shutter-ring::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 3px solid transparent;
  border-top-color: #aa66ff;
  border-radius: 50%;
  animation: cv-spin 1s linear infinite;
}

@keyframes cv-spin {
  to {
    transform: rotate(360deg);
  }
}

.cv-blades {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: 150px;
}

.cv-blade {
  position: absolute;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 50%, 50% 0%, 100% 0%, 100% 50%);
  background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
  border: 1px solid rgba(170, 102, 255, 0.2);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.cv-blade:nth-child(1) {
  transform: rotate(0deg);
}
.cv-blade:nth-child(2) {
  transform: rotate(45deg);
}
.cv-blade:nth-child(3) {
  transform: rotate(90deg);
}
.cv-blade:nth-child(4) {
  transform: rotate(135deg);
}
.cv-blade:nth-child(5) {
  transform: rotate(180deg);
}
.cv-blade:nth-child(6) {
  transform: rotate(225deg);
}
.cv-blade:nth-child(7) {
  transform: rotate(270deg);
}
.cv-blade:nth-child(8) {
  transform: rotate(315deg);
}

.cv-loader.cv-opening .cv-blade:nth-child(1) {
  transform: rotate(0deg) translateX(-40px);
  opacity: 0;
}
.cv-loader.cv-opening .cv-blade:nth-child(2) {
  transform: rotate(45deg) translateX(-40px);
  opacity: 0;
}
.cv-loader.cv-opening .cv-blade:nth-child(3) {
  transform: rotate(90deg) translateX(-40px);
  opacity: 0;
}
.cv-loader.cv-opening .cv-blade:nth-child(4) {
  transform: rotate(135deg) translateX(-40px);
  opacity: 0;
}
.cv-loader.cv-opening .cv-blade:nth-child(5) {
  transform: rotate(180deg) translateX(-40px);
  opacity: 0;
}
.cv-loader.cv-opening .cv-blade:nth-child(6) {
  transform: rotate(225deg) translateX(-40px);
  opacity: 0;
}
.cv-loader.cv-opening .cv-blade:nth-child(7) {
  transform: rotate(270deg) translateX(-40px);
  opacity: 0;
}
.cv-loader.cv-opening .cv-blade:nth-child(8) {
  transform: rotate(315deg) translateX(-40px);
  opacity: 0;
}

.cv-lens-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, #1a1a1a, #000);
  border-radius: 50%;
  border: 2px solid rgba(170, 102, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.cv-lens-center::after {
  content: "";
  width: 20px;
  height: 20px;
  background: rgba(170, 102, 255, 0.3);
  border-radius: 50%;
  animation: cv-pulse 1.5s ease-in-out infinite;
}

@keyframes cv-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.5;
  }
}

.cv-brand {
  margin-top: 50px;
  text-align: center;
}

.cv-brand h2 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 15px;
  background: linear-gradient(135deg, #aa66ff, #ffb400);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  opacity: 0;
  animation: cv-fadeUp 0.8s ease forwards 0.3s;
}

.cv-brand p {
  font-size: 12px;
  color: #666;
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-top: 10px;
  opacity: 0;
  animation: cv-fadeUp 0.8s ease forwards 0.5s;
}

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

/* ==================== Camera Viewer (Full Screen) ==================== */
.cv-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 99998;
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.cv-viewer.cv-active {
  display: flex;
  opacity: 1;
}

.cv-blur-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(80px);
  opacity: 0.15;
  z-index: 1;
}

.cv-interface {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* HUD Elements */
.cv-hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.cv-hud-top {
  position: absolute;
  top: 25px;
  left: 25px;
  display: flex;
  gap: 15px;
  align-items: center;
}

.cv-rec {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 18px;
  border-radius: 25px;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cv-rec-dot {
  width: 12px;
  height: 12px;
  background: #ff0000;
  border-radius: 50%;
  animation: cv-recPulse 1s ease-in-out infinite;
  box-shadow: 0 0 10px #ff0000;
}

@keyframes cv-recPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.cv-rec-text {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
}

.cv-timer {
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 18px;
  border-radius: 25px;
  font-family: "Courier New", monospace;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 2px;
}

/* Specs Badges - Desktop: Top Right, Mobile: Left Side Vertical */
.cv-specs {
  position: absolute;
  top: 25px;
  right: 120px;
  display: flex;
  gap: 10px;
}

.cv-spec {
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #ffb400;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 180, 0, 0.3);
  letter-spacing: 1px;
}

/* Frame Corners */
.cv-corner {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 2px solid rgba(170, 102, 255, 0.4);
  pointer-events: none;
}

.cv-corner-tl {
  top: 100px;
  left: 100px;
  border-right: none;
  border-bottom: none;
}
.cv-corner-tr {
  top: 100px;
  right: 100px;
  border-left: none;
  border-bottom: none;
}
.cv-corner-bl {
  bottom: 100px;
  left: 100px;
  border-right: none;
  border-top: none;
}
.cv-corner-br {
  bottom: 100px;
  right: 100px;
  border-left: none;
  border-top: none;
}

/* Video Frame - Full Screen */
.cv-video-frame {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 550px;
  max-height: 95vh;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 0 100px rgba(170, 102, 255, 0.3), 0 0 200px rgba(255, 180, 0, 0.1);
}

.cv-video-frame video,
.cv-video-frame iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
}

/* Side Controls */
.cv-controls {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 15;
}

.cv-btn {
  width: 55px;
  height: 55px;
  background: rgba(15, 15, 15, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(15px);
  pointer-events: all;
  position: relative;
}

.cv-btn:hover {
  background: rgba(170, 102, 255, 0.3);
  border-color: rgba(170, 102, 255, 0.6);
  transform: scale(1.15);
  box-shadow: 0 0 25px rgba(170, 102, 255, 0.4);
}

.cv-btn svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  transition: fill 0.3s ease;
}

.cv-btn:hover svg {
  fill: #ffb400;
}

.cv-tooltip {
  position: absolute;
  right: 70px;
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(170, 102, 255, 0.3);
}

.cv-btn:hover .cv-tooltip {
  opacity: 1;
  right: 75px;
}

/* Info Panel */
.cv-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.9) 60%, transparent 100%);
  padding: 80px 30px 35px;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 12;
  pointer-events: all;
}

.cv-info.cv-show {
  transform: translateY(0);
}

.cv-info h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #fff;
}

.cv-info-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.cv-info-meta span {
  font-size: 12px;
  font-weight: 600;
  color: #ffb400;
  background: rgba(255, 180, 0, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 180, 0, 0.3);
}

.cv-info p {
  font-size: 15px;
  line-height: 1.7;
  color: #bbb;
}

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

@media (max-width: 768px) {
  .cv-portfolio-section {
    padding: 40px 15px;
  }

  .cv-header h2 {
    font-size: 32px;
  }

  .cv-header p {
    font-size: 14px;
  }

  /* 2 items per row on mobile */
  .cv-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .cv-item-image {
    height: 180px;
  }

  .cv-item-info {
    padding: 12px 15px;
  }

  .cv-item-title {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .cv-item-type {
    font-size: 9px;
    padding: 3px 8px;
  }

  .cv-play-btn {
    width: 50px;
    height: 50px;
  }

  .cv-play-btn::after {
    border-left-width: 14px;
    border-top-width: 9px;
    border-bottom-width: 9px;
  }

  /* Loader Mobile */
  .cv-shutter-wrap {
    width: 140px;
    height: 140px;
  }

  .cv-shutter-ring {
    width: 120px;
    height: 120px;
  }

  .cv-blades {
    width: 100px;
    height: 100px;
  }

  .cv-lens-center {
    width: 40px;
    height: 40px;
  }

  .cv-brand h2 {
    font-size: 32px;
    letter-spacing: 8px;
  }

  /* Viewer Mobile - Full Screen */
  .cv-video-frame {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .cv-hud-top {
    top: 15px;
    left: 15px;
  }

  .cv-rec {
    padding: 8px 12px;
  }

  .cv-rec-dot {
    width: 10px;
    height: 10px;
  }

  .cv-rec-text {
    font-size: 12px;
  }

  .cv-timer {
    padding: 8px 12px;
    font-size: 14px;
  }

  /* Move specs to left side vertical on mobile to avoid stacking */
  .cv-specs {
    position: absolute;
    top: 50%;
    left: 15px;
    right: auto;
    transform: translateY(-50%);
    flex-direction: column;
    gap: 8px;
  }

  .cv-spec {
    font-size: 9px;
    padding: 6px 10px;
  }

  /* Controls Mobile */
  .cv-controls {
    right: 15px;
    gap: 12px;
  }

  .cv-btn {
    width: 45px;
    height: 45px;
  }

  .cv-btn svg {
    width: 20px;
    height: 20px;
  }

  .cv-tooltip {
    display: none;
  }

  /* Hide corners on mobile */
  .cv-corner {
    display: none;
  }

  /* Info Panel Mobile */
  .cv-info h3 {
    font-size: 20px;
  }

  .cv-info-meta span {
    font-size: 11px;
    padding: 5px 10px;
  }

  .cv-info p {
    font-size: 14px;
  }
}

/* ==================== RTL Support ==================== */
[dir="rtl"] .cv-controls {
  right: auto;
  left: 40px;
}

[dir="rtl"] .cv-tooltip {
  right: auto;
  left: 70px;
}

[dir="rtl"] .cv-btn:hover .cv-tooltip {
  left: 75px;
  right: auto;
}

[dir="rtl"] .cv-specs {
  right: auto;
  left: 120px;
}

[dir="rtl"] .cv-hud-top {
  left: auto;
  right: 25px;
}

@media (max-width: 768px) {
  [dir="rtl"] .cv-controls {
    left: 15px;
  }

  [dir="rtl"] .cv-specs {
    left: auto;
    right: 15px;
  }

  [dir="rtl"] .cv-hud-top {
    right: 15px;
  }
}


