html {
  scroll-behavior: smooth;
}
:root {
  --primary-color: #00d9ff;
  --primary-hover: #00b8d9;
  --secondary-color: #6c63ff;
  --dark-bg: #1a1a2e;
  --darker-bg: #16213e;
  --card-bg: #2a2a40;
  --card-hover: #33334d;
  --text-color: #ffffff; /* سفید برای تم دارک */
  --text-muted: #b0b0b0;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --success-color: #2ecc71;
  --error-color: #e74c3c;
}

/* تم روشن */
body.light-theme {
  --dark-bg: #f8f9fa;
  --darker-bg: #e9ecef;
  --card-bg: #ffffff;
  --card-hover: #f1f3f5;
  --text-color: #2d3436; /* سیاه/خاکستری تیره برای تم روشن */
  --text-muted: #636e72;
  --primary-color: #0984e3;
  --primary-hover: #0767b1;
}

/* کلاس های متن */
.text-muted {
  color: var(--text-muted) !important;
}

.text-color {
  color: var(--text-color) !important;
}
/* پیش‌بارگذاری */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--darker-bg);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.loader {
  width: 48px;
  height: 48px;
  border: 5px solid var(--primary-color);
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* استایل‌های پایه */
body {
  font-family: Vazir, sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-color);
  overflow-x: hidden;
  line-height: 1.7;
  transition: background-color 0.3s ease;
}

/* دایره پس‌زمینه بهبود یافته */
.background-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 280px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  filter: blur(60px);
  opacity: 0.7;
  animation: pulse 8s infinite alternate;
  mix-blend-mode: soft-light;
}

@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.8; }
}

/* دکمه بازگشت به بالا */

/* Sidebar */
.sidebar {
  background-color: var(--darker-bg);
  height: 100vh;
  position: fixed;
  right: 0;
  top: 0;
  width: 280px;
  padding-top: 2rem;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: var(--transition);
  overflow-y: auto;
}

.sidebar-header {
  text-align: center;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid rgba(0, 217, 255, 0.2);
  margin-bottom: 15px;
  transition: var(--transition);
}

.profile-img:hover {
  transform: scale(1.05);
  border-color: var(--primary-color);
}

.sidebar a {
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 12px 25px;
  margin: 5px 15px;
  border-radius: 8px;
  transition: var(--transition);
}

.sidebar a i {
  margin-left: 10px;
  font-size: 1.1rem;
}

.sidebar a:hover, .sidebar a.active {
  background-color: var(--primary-color);
  color: #000;
  transform: translateX(-5px);
  box-shadow: 0 5px 15px rgba(0, 217, 255, 0.3);
}

.social-links {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  border-radius: 50%;
  margin: 0 5px;
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--primary-color);
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 217, 255, 0.3);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1100;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: #000;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

.mobile-menu-toggle:hover {
  transform: scale(1.1);
}

/* Main Content */
.content {
  margin-right: 280px;
  padding: 40px;
  position: relative;
  transition: var(--transition);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
  font-weight: 700;
}

.section-title::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -10px;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 3px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Home Section */
#home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.home-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.home-content h1 span {
  color: var(--primary-color);
}

.home-content .lead {
  font-size: 1.3rem;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.home-btns .btn {
  margin-left: 15px;
}

.typed-cursor {
  color: var(--primary-color);
  font-weight: bold;
}

.bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.3;
  z-index: -1;
}

/* About Section */
.about-img {
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
  max-width: 100%;
  height: auto;
}

.about-img:hover {
  transform: scale(1.03);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.about-content h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.about-content p {
  margin-bottom: 15px;
  line-height: 1.8;
  color: var(--text-muted);
}

.info-list {
  margin-top: 30px;
  list-style: none;
  padding: 0;
}

.info-list li {
  margin-bottom: 15px;
  display: flex;
}

.info-list strong {
  width: 120px;
  display: inline-block;
  color: var(--primary-color);
}

.info-list span {
  color: var(--text-muted);
}

/* Skills Section */
.skill-item {
  margin-bottom: 25px;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.skill-name {
  font-weight: 500;
}

.skill-percent {
  color: var(--primary-color);
  font-weight: bold;
}

.skill-bar {
  height: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 5px;
  position: relative;
  transition: width 1.5s ease;
  width: 0;
}

.skill-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shine 2s infinite;
}

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

/* Services Section */
.service-card {
  background-color: var(--card-bg);
  border: none;
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  transition: var(--transition);
  height: 100%;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.1) 0%, transparent 100%);
  z-index: -1;
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  background-color: var(--card-hover);
  box-shadow: 0 20px 40px rgba(0, 217, 255, 0.3);
}

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

.service-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(0, 217, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-size: 1.5rem;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background-color: var(--primary-color);
  color: #000;
  transform: rotate(15deg);
}

.service-feature-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.service-feature-item {
  position: relative;
  padding-right: 20px;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.service-feature-item::before {
  content: '\f00c';
  font-family: 'bootstrap-icons';
  position: absolute;
  right: 0;
  color: var(--primary-color);
}

.service-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.service-link:hover {
  color: var(--text-color);
  transform: translateX(-5px);
}

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

.filter-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 8px 20px;
  margin: 5px;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 30px;
  font-weight: 500;
}

.filter-btn.active, .filter-btn:hover {
  background-color: var(--primary-color);
  color: #000;
  box-shadow: 0 5px 15px rgba(0, 217, 255, 0.3);
}

.portfolio-item {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.portfolio-item:hover {
  transform: scale(1.05);
  z-index: 10;
  box-shadow: 0 15px 40px rgba(0, 217, 255, 0.3);
}

.portfolio-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: all 0.5s ease;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 217, 255, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

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

.portfolio-overlay h4 {
  color: #000;
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.portfolio-overlay p {
  color: #000;
  margin-bottom: 20px;
  text-align: center;
  padding: 0 20px;
}

.portfolio-overlay .links {
  display: flex;
}

.portfolio-overlay a {
  color: #000;
  background-color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 5px;
  transition: var(--transition);
}

.portfolio-overlay a:hover {
  background-color: #000;
  color: #fff;
  transform: translateY(-5px);
}

/* Contact Section */
.contact-form .form-control {
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-color);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  transition: var(--transition);
}

.contact-form .form-control:focus {
  background-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 0.25rem rgba(0, 217, 255, 0.25);
  color: var(--text-color);
}

.contact-form textarea.form-control {
  min-height: 150px;
}

.contact-info {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 15px;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.contact-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.1) 0%, transparent 100%);
  z-index: -1;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
}

.contact-info-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(0, 217, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-left: 15px;
  flex-shrink: 0;
  transition: var(--transition);
}

.contact-info-item:hover .contact-info-icon {
  background-color: var(--primary-color);
  color: #000;
  transform: rotate(15deg);
}

.contact-info-content h5 {
  font-weight: 600;
  margin-bottom: 5px;
}

.contact-info-content p {
  color: var(--text-muted);
  margin: 0;
}

.working-hours {
  margin-top: 30px;
}

.working-hours h5 {
  font-weight: 600;
  margin-bottom: 10px;
}

.working-hours p {
  color: var(--text-muted);
}

/* Buttons */
.btn-custom {
  background-color: var(--primary-color);
  color: #000;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  box-shadow: 0 5px 15px rgba(0, 217, 255, 0.3);
}

.btn-custom i {
  margin-right: 8px;
}

.btn-custom:hover {
  background-color: var(--primary-hover);
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 217, 255, 0.4);
}

.btn-outline-custom {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 10px 28px;
  box-shadow: none;
}

.btn-outline-custom:hover {
  background-color: var(--primary-color);
  color: #000;
  box-shadow: 0 5px 15px rgba(0, 217, 255, 0.3);
}

/* Divider */
.divider {
  text-align: center;
  margin: 40px 0;
}

.divider img {
  max-width: 100%;
  opacity: 0.5;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 900px;
  width: 90%;
  background-color: var(--darker-bg);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
}

.close-lightbox {
  position: absolute;
  top: 15px;
  left: 15px;
  font-size: 1.8rem;
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
}

.close-lightbox:hover {
  color: var(--primary-color);
  transform: rotate(90deg);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 500px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.lightbox-content h4 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

.lightbox-content p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 1199px) {
  .section-title {
    font-size: 2.2rem;
  }
  
  .home-content h1 {
    font-size: 3rem;
  }
}

@media (max-width: 991px) {
  .sidebar {
    transform: translateX(100%);
    width: 300px;
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .content {
    margin-right: 0;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .home-content h1 {
    font-size: 2.5rem;
  }
  
  .home-content .lead {
    font-size: 1.1rem;
  }
  
  .theme-toggle {
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

@media (max-width: 767px) {
  .content {
    padding: 20px;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .home-content h1 {
    font-size: 2rem;
  }
  
  .home-btns .btn {
    margin-left: 0;
    margin-right: 10px;
    margin-bottom: 10px;
  }
  
  .about-img {
    margin-bottom: 30px;
  }
  
  .portfolio-filter {
    justify-content: flex-start;
  }
  
  .filter-btn {
    padding: 6px 15px;
    font-size: 0.9rem;
  }
}

@media (max-width: 575px) {
  .section-title {
    font-size: 1.6rem;
  }
  
  .home-content h1 {
    font-size: 1.8rem;
  }
  
  .home-btns .btn {
    display: block;
    width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
  }
  
  .contact-form .col-md-6 {
    width: 100%;
  }
}
/* Testimonials Section Styles */
.testimonials-section {
  padding: 80px 0;
  background: var(--dark-bg);
}

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

.testimonial-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.testimonial-title::after {
  content: '';
  position: absolute;
  right: 50%;
  transform: translateX(50%);
  bottom: -10px;
  width: 60px;
  height: 4px;
  background: linear-gradient(to left, var(--secondary-accent), var(--primary-color));
  border-radius: 3px;
}

.testimonial-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.7;
  margin: 0 auto;
}

.testimonial-grid {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.testimonial-card {
  background: var(--card-bg);
  padding: 35px;
  border-radius: 12px;
  width: 350px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  transition: var(--transition);
  border: 1px solid rgba(108, 99, 255, 0.1);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  background: var(--card-hover);
}

.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.1) 0%, transparent 100%);
  border-radius: 12px;
  opacity: 0;
  transition: var(--transition);
}

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

.client-profile {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
}

.client-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin-left: 20px;
  border: 3px solid rgba(13, 0, 255, 0.3);
  transition: var(--transition);
}

.testimonial-card:hover .client-avatar {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.client-details {
  flex: 1;
}

.client-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 5px;
  color: var(--text-color);
}

.client-position {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.quote-symbol {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 20px;
  opacity: 0.7;
}

.testimonial-text {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 25px;
  position: relative;
}

.star-rating {
  color: #ffc107;
  margin-top: 20px;
  font-size: 0.9rem;
}

.star-rating i {
  margin-left: 3px;
}

/* Light Theme Adjustments */
body.light-theme .testimonials-section {
  background: var(--dark-bg);
}

body.light-theme .testimonial-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
}

body.light-theme .testimonial-card:hover {
  background: var(--card-hover);
}

body.light-theme .testimonial-text {
  color: var(--text-muted);
}

/* Animation Effects */
.testimonial-card:nth-child(1) {
  animation: cardEntrance 0.5s ease forwards;
}

.testimonial-card:nth-child(2) {
  animation: cardEntrance 0.7s ease forwards;
}

.testimonial-card:nth-child(3) {
  animation: cardEntrance 0.9s ease forwards;
}

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

/* Responsive Design */
@media (max-width: 992px) {
  .testimonial-grid {
    gap: 20px;
  }
  
  .testimonial-card {
    width: calc(50% - 20px);
  }
}

@media (max-width: 768px) {
  .testimonials-section {
    padding: 60px 30px;
  }
  
  .testimonial-title {
    font-size: 2rem;
  }
  
  .testimonial-card {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .testimonials-section {
    padding: 40px 20px;
  }
  
  .testimonial-title {
    font-size: 1.8rem;
  }
  
  .testimonial-subtitle {
    font-size: 1rem;
  }
}
