/* Fonts */
:root {
  --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --heading-font: "Questrial", sans-serif;
  --nav-font: "Noto Sans", sans-serif;
}

/* Global Colors */
:root {
  --background-color: #ffffff;
  --default-color: #0a0f14;
  --heading-color: #0f2943;
  --accent-color: #3d03b8;
  --surface-color: #ffffff;
  --contrast-color: #ffffff;
}

/* Nav Menu Colors */
:root {
  --nav-color: #0a0f14;
  --nav-hover-color: #3d03b8;
  --nav-mobile-background-color: #ffffff;
  --nav-dropdown-background-color: #ffffff;
  --nav-dropdown-color: #0a0f14;
  --nav-dropdown-hover-color: #3d03b8;
}

/* Color Presets */
.light-background {
  --background-color: #faf9fb;
  --surface-color: #ffffff;
}

.dark-background {
  --background-color: #060606;
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --surface-color: #252525;
  --contrast-color: #ffffff;
}

/* Smooth scroll */
:root {
  scroll-behavior: smooth;
}

/* Dark Mode */
.dark-mode {
  --background-color: #1a1a1a;
  --default-color: #e0e0e0;
  --heading-color: #ffffff;
  --surface-color: #2a2a2a;
  --contrast-color: #ffffff;
  --nav-color: #e0e0e0;
  --nav-hover-color: #3d03b8;
  --nav-mobile-background-color: #2a2a2a;
  --nav-dropdown-background-color: #2a2a2a;
  --nav-dropdown-color: #e0e0e0;
  --nav-dropdown-hover-color: #3d03b8;
}

/* Fix light-background in dark mode */
.dark-mode .light-background,
.dark-mode .light-background * {
  --background-color: #1a1a1a !important;
  --surface-color: #2a2a2a !important;
  background-color: var(--background-color) !important;
}

/* Ensure contact-form and personal-info are fixed */
/* تنظیمات فرم تماس در دارک مود */
.dark-mode .contact .contact-form {
  background-color: #2a2a2a !important;
  --surface-color: #2a2a2a !important;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5) !important; /* سایه قوی‌تر */
}

/* تنظیم رنگ متن ورودی‌ها و placeholder در دارک مود */
.dark-mode .contact .contact-form .form-control,
.dark-mode .contact .contact-form .form-select {
  color: #e0e0e0; /* رنگ متن تایپ‌شده سفید مایل به خاکستری */
  background-color: #333333; /* پس‌زمینه کمی روشن‌تر از پس‌زمینه فرم */
  border-color: #444444; /* رنگ حاشیه تیره‌تر برای تمایز */
}

/* تنظیم رنگ placeholder در دارک مود */
.dark-mode .contact .contact-form .form-control::placeholder,
.dark-mode .contact .contact-form .form-select::placeholder {
  color: #888888; /* رنگ placeholder خاکستری روشن برای خوانایی */
}

/* تنظیم رنگ حاشیه هنگام فوکوس در دارک مود */
.dark-mode .contact .contact-form .form-control:focus,
.dark-mode .contact .contact-form .form-select:focus {
  border-color: var(--accent-color); /* رنگ حاشیه هنگام فوکوس */
  box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--accent-color), transparent 70%); /* سایه اطراف */
}

/*--------------------------------------------------------------
# General Styling & Shared Classes
--------------------------------------------------------------*/
body {
  color: var(--default-color);
  background-color: var(--background-color);
  font-family: var(--default-font);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  color: color-mix(in srgb, var(--accent-color), transparent 25%);
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading-color);
  font-family: var(--heading-font);
}

/* PHP Email Form Messages
------------------------------*/
.php-email-form .error-message {
  display: none;
  background: #df1529;
  color: #ffffff;
  text-align: left;
  padding: 15px;
  margin-bottom: 24px;
  font-weight: 600;
}

.php-email-form .sent-message {
  display: none;
  color: #ffffff;
  background: #059652;
  text-align: center;
  padding: 15px;
  margin-bottom: 24px;
  font-weight: 600;
}

.php-email-form .loading {
  display: none;
  background: var(--surface-color);
  text-align: center;
  padding: 15px;
  margin-bottom: 24px;
}

.php-email-form .loading:before {
  content: "";
  display: inline-block;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  margin: 0 10px -6px 0;
  border: 3px solid var(--accent-color);
  border-top-color: var(--surface-color);
  animation: php-email-form-loading 1s linear infinite;
}

@keyframes php-email-form-loading {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/*--------------------------------------------------------------
# Global Header
--------------------------------------------------------------*/
.header {
  color: var(--default-color);
  background-color: var(--background-color);
  padding: 20px 0;
  transition: all 0.5s;
  z-index: 997;
}

.header .header-container {
  background: var(--surface-color);
  border-radius: 50px;
  padding: 5px 25px;
  box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
}

.header .logo {
  line-height: 1;
}

.header .logo img {
  max-height: 36px;
  margin-right: 8px;
}

.header .logo h1 {
  font-size: 24px;
  margin: 0;
  padding-left: 5px;
  font-weight: 500;
  color: var(--heading-color);
}

.header .header-social-links {
  padding-right: 15px;
}

.header .header-social-links a {
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  padding-left: 6px;
  display: inline-flex;
  transition: 0.3s;
  font-size: 16px;
}

.header .header-social-links a:hover {
  color: var(--accent-color);
}

.header .header-social-links a i {
  line-height: 0px;
}

@media (max-width: 1200px) {
  .header {
    padding-top: 10px;
  }

  .header .header-container {
    margin-left: 10px;
    margin-right: 10px;
    padding: 10px 5px 10px 15px;
  }

  .header .logo {
    order: 1;
  }

  .header .header-social-links {
    order: 2;
  }

  .header .navmenu {
    order: 3;
  }
}
.logo:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/* Navmenu - Desktop */
@media (min-width: 1200px) {
  .navmenu {
  padding: 0;
}
.navmenu ul {
  margin: 0;
  padding: 0;
  display: flex;
  list-style: none;
  align-items: center;
}
.navmenu li {
  position: relative;
}
.navmenu a,
.navmenu a:focus {
  color: var(--nav-color);
  padding: 18px 15px;
  font-size: 16px;
  font-family: var(--nav-font);
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
  transition: color 0.3s ease, transform 0.3s ease;
  position: relative; /* برای خط زیرین */
}
.navmenu a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 10px;
  left: 15px;
  background-color: var(--nav-hover-color); /* رنگ خط زیرین */
  transition: width 0.3s ease;
}
.navmenu li:hover>a,
.navmenu .active,
.navmenu .active:focus {
  color: var(--nav-hover-color);
  transform: translateY(-2px); /* جابجایی ملایم به بالا */
}
.navmenu li:hover>a::after,
.navmenu .active::after,
.navmenu .active:focus::after {
  width: calc(100% - 30px); /* گسترش خط زیرین */
}
.navmenu a i,
.navmenu a:focus i {
  font-size: 12px;
  line-height: 0;
  margin-left: 5px;
  transition: 0.3s;
}
.navmenu li:last-child a {
  padding-right: 0;
}
}

/* Navmenu - Mobile */
@media (max-width: 1199px) {
  .mobile-nav-toggle {
    color: var(--nav-color);
    font-size: 28px;
    line-height: 0;
    margin-right: 10px;
    cursor: pointer;
    transition: color 0.3s;
  }

  .navmenu {
    padding: 0;
    z-index: 9997;
  }

  .navmenu ul {
    display: none;
    list-style: none;
    position: absolute;
    inset: 60px 20px 20px 20px;
    padding: 10px 0;
    margin: 0;
    border-radius: 6px;
    background-color: var(--nav-mobile-background-color);
    overflow-y: auto;
    transition: 0.3s;
    z-index: 9998;
    box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.1);
  }

  .navmenu a,
  .navmenu a:focus {
    color: var(--nav-dropdown-color);
    padding: 10px 20px;
    font-family: var(--nav-font);
    font-size: 17px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    transition: 0.3s;
  }

  .navmenu a i,
  .navmenu a:focus i {
    font-size: 12px;
    line-height: 0;
    margin-left: 5px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
    background-color: color-mix(in srgb, var(--accent-color), transparent 90%);
  }

  .navmenu a i:hover,
  .navmenu a:focus i:hover {
    background-color: var(--accent-color);
    color: var(--contrast-color);
  }

  .navmenu a:hover,
  .navmenu .active,
  .navmenu .active:focus_tran {
    color: var(--nav-dropdown-hover-color);
  }

  .navmenu .active i,
  .navmenu .active:focus i {
    background-color: var(--accent-color);
    color: var(--contrast-color);
    transform: rotate(180deg);
  }

  .navmenu .dropdown ul {
    position: static;
    display: none;
    z-index: 99;
    padding: 10px 0;
    margin: 10px 20px;
    background-color: var(--nav-dropdown-background-color);
    border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
    box-shadow: none;
    transition: all 0.5s ease-in-out;
  }

  .navmenu .dropdown ul ul {
    background-color: rgba(33, 37, 41, 0.1);
  }

  .navmenu .dropdown>.dropdown-active {
    display: block;
    background-color: rgba(33, 37, 41, 0.03);
  }

  .mobile-nav-active {
    overflow: hidden;
  }

  .mobile-nav-active .mobile-nav-toggle {
    color: #fff;
    position: absolute;
    font-size: 32px;
    top: 15px;
    right: 15px;
    margin-right: 0;
    z-index: 9999;
  }

  .mobile-nav-active .navmenu {
    position: fixed;
    overflow: hidden;
    inset: 0;
    background: rgba(33, 37, 41, 0.8);
    transition: 0.3s;
  }

  .mobile-nav-active .navmenu>ul {
    display: block;
  }
}

/*--------------------------------------------------------------
# Global Footer
--------------------------------------------------------------*/
.footer {
  color: var(--default-color);
  background-color: var(--background-color);
  font-size: 14px;
  padding: 40px 0;
  position: relative;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
}

.footer .copyright p {
  margin-bottom: 0;
}

.footer .social-links {
  margin-top: 20px;
}

.footer .social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 50%);
  font-size: 16px;
  color: color-mix(in srgb, var(--default-color), transparent 50%);
  margin: 0 5px;
  transition: 0.3s;
}

.footer .social-links a:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.footer .credits {
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
}

/*--------------------------------------------------------------
# Scroll Top Button
--------------------------------------------------------------*/
.scroll-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: -15px;
  z-index: 99999;
  background-color: var(--accent-color);
  width: 44px;
  height: 44px;
  border-radius: 50px;
  transition: all 0.4s;
}

.scroll-top i {
  font-size: 24px;
  color: var(--contrast-color);
  line-height: 0;
}

.scroll-top:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 20%);
  color: var(--contrast-color);
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
  bottom: 15px;
}

/*--------------------------------------------------------------
# Disable aos animation delay on mobile devices
--------------------------------------------------------------*/
@media screen and (max-width: 768px) {
  [data-aos-delay] {
    transition-delay: 0 !important;
  }
}

/*--------------------------------------------------------------
# Global Page Titles & Breadcrumbs
--------------------------------------------------------------*/
.page-title {
  text-align: center;
  padding: 20px 0;
}

.page-title .breadcrumbs {
  margin-bottom: 1.5rem;
}

.page-title .breadcrumbs .breadcrumb {
  justify-content: center;
  margin: 0;
  padding: 0;
  background: none;
}

.page-title .breadcrumbs .breadcrumb .breadcrumb-item {
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
}

.page-title .breadcrumbs .breadcrumb .breadcrumb-item.active {
  color: var(--accent-color);
}

.page-title .breadcrumbs .breadcrumb .breadcrumb-item a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-title .breadcrumbs .breadcrumb .breadcrumb-item a:hover {
  color: var(--accent-color);
}

.page-title .breadcrumbs .breadcrumb .breadcrumb-item+.breadcrumb-item::before {
  color: color-mix(in srgb, var(--default-color), transparent 50%);
}

.page-title .title-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem 0;
}

.page-title .title-wrapper h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--heading-color);
}

.page-title .title-wrapper p {
  font-size: 1.1rem;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .page-title .title-wrapper h1 {
    font-size: 2rem;
  }

  .page-title .title-wrapper p {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .page-title .title-wrapper h1 {
    font-size: 1.75rem;
  }
}

/*--------------------------------------------------------------
# Global Sections
--------------------------------------------------------------*/
section,
.section {
  color: var(--default-color);
  background-color: var(--background-color);
  padding: 60px 0;
  scroll-margin-top: 90px;
  overflow: clip;
}

@media (max-width: 1199px) {

  section,
  .section {
    scroll-margin-top: 66px;
  }
}

/*--------------------------------------------------------------
# Global Section Titles
--------------------------------------------------------------*/
.section-title {
  text-align: center;
  padding-bottom: 60px;
  position: relative;
}

.section-title h2 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(120deg, var(--heading-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.section-title .title-shape {
  width: 200px;
  height: 20px;
  margin: 0 auto;
  color: var(--accent-color);
  opacity: 0.5;
}

.section-title .title-shape svg {
  width: 100%;
  height: 100%;
}

.section-title p {
  margin: 15px auto 0;
  font-size: 16px;
  max-width: 700px;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
  line-height: 1.8;
}

@media (max-width: 768px) {
  .section-title h2 {
    font-size: 32px;
  }

  .section-title .subtitle-wrapper .subtitle {
    font-size: 13px;
  }
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
.hero {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero .content h2 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

@media (max-width: 991px) {
  .hero .content h2 {
    font-size: 2.5rem;
  }
}

.hero .content .lead {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
}

.hero .cta-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

@media (max-width: 576px) {
  .hero .cta-buttons {
    flex-direction: column;
  }
}

.hero .cta-buttons .btn {
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.hero .cta-buttons .btn.btn-primary {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--contrast-color);
}

.hero .cta-buttons .btn.btn-primary:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 15%);
  border-color: color-mix(in srgb, var(--accent-color), transparent 15%);
  transform: translateY(-2px);
}

.hero .cta-buttons .btn.btn-outline {
  border: 2px solid color-mix(in srgb, var(--accent-color), transparent 70%);
  color: var(--accent-color);
  background: transparent;
}

.hero .cta-buttons .btn.btn-outline:hover {
  background-color: var(--accent-color);
  color: var(--contrast-color);
  transform: translateY(-2px);
}

.hero .hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 2rem;
}

@media (max-width: 576px) {
  .hero .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
}

.hero .hero-stats .stat-item .stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--heading-color);
  line-height: 1;
}

.hero .hero-stats .stat-item .stat-label {
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  margin-top: 0.5rem;
  display: block;
}

.hero .hero-image {
  position: relative;
  padding: 2rem;
}

.hero .hero-image img {
  position: relative;
  z-index: 2;
}

.hero .hero-image .shape-1,
.hero .hero-image .shape-2 {
  position: absolute;
  border-radius: 30% 70% 70% 30%/30% 30% 70% 70%;
  z-index: 1;
}

.hero .hero-image .shape-1 {
  width: 300px;
  height: 300px;
  background-color: color-mix(in srgb, var(--accent-color), transparent 85%);
  top: -20px;
  right: -20px;
  animation: morphShape 15s linear infinite;
}

.hero .hero-image .shape-2 {
  width: 200px;
  height: 200px;
  background-color: color-mix(in srgb, var(--heading-color), transparent 90%);
  bottom: -20px;
  left: -20px;
  animation: morphShape 20s linear infinite reverse;
}

@keyframes morphShape {
  0% {
    border-radius: 30% 70% 70% 30%/30% 30% 70% 70%;
  }

  25% {
    border-radius: 58% 42% 75% 25%/76% 46% 54% 24%;
  }

  50% {
    border-radius: 50% 50% 33% 67%/55% 27% 73% 45%;
  }

  75% {
    border-radius: 33% 67% 58% 42%/63% 68% 32% 37%;
  }

  100% {
    border-radius: 30% 70% 70% 30%/30% 30% 70% 70%;
  }
}

/*--------------------------------------------------------------
# About Section
--------------------------------------------------------------*/
.about .about-image {
  position: relative;
  overflow: hidden; /* برش محتوای اضافی */
  border-radius: 0.5rem; /* گوشه‌های گرد برای کنتینر */
}

.about .about-image img {
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* ترنزیشن برای افکت‌ها */
  width: 100%; /* اطمینان از پر شدن کامل کنتینر */
  height: auto; /* حفظ نسبت تصویر */
  border-radius: 0.5rem; /* گوشه‌های گرد برای تصویر */
  display: block; /* جلوگیری از حاشیه‌های ناخواسته */
}

.about .about-image img:hover {
  transform: scale(1.05); /* بزرگ شدن تصویر */
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.15); /* افزایش سایه */
}

.about .about-content {
  padding-left: 2rem;
}

@media (max-width: 991.98px) {
  .about .about-content {
    padding-left: 0;
    margin-top: 3rem;
  }
}

.about .about-content .subtitle {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent-color);
  margin-bottom: 1rem;
  display: block;
}

.about .about-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.about .about-content .lead {
  font-size: 1.1rem;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
}

.about .personal-info {
  margin-top: 2rem;
  padding: 2rem;
  background-color: var(--surface-color);
  border-radius: 1rem;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* ترنزیشن برای افکت‌ها */
}

.about .personal-info:hover {
  transform: scale(1.05); /* بزرگ شدن کادر */
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.15); /* افزایش سایه */
}

.about .personal-info .info-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.about .personal-info .info-item .label {
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--default-color), transparent 40%);
}

.about .personal-info .info-item .value {
  font-weight: 600;
  color: var(--heading-color);
}

.about .signature {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.about .signature .signature-image {
  max-width: 150px;
}

.about .signature .signature-info h4 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.about .signature .signature-info p {
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  margin: 0;
}

/* Skills Section */
.skills .skill-box {
  background-color: var(--surface-color);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease;
}

.skills .skill-box:hover {
  transform: scale(1.05);
}

.skills .skill-box h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.skills .skill-box p {
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  opacity: 0.6;
  flex-grow: 1;
}

.skills .skill-box .progress {
  background-color: color-mix(in srgb, var(--accent-color), transparent 85%);
  border-radius: 50px;
  height: 8px;
  margin-top: 5px;
  overflow: hidden;
}

.skills .skill-box .progress .progress-bar {
  background-color: var(--accent-color);
  height: 100%;
  position: relative;
  border-radius: 50px;
  width: var(--progress-width); /* عرض اصلی در حالت عادی */
  animation: progress-animate 1.5s ease-in-out forwards; /* انیمیشن اولیه هنگام لود */
  animation-fill-mode: forwards; /* حفظ حالت نهایی انیمیشن */
}

/* انیمیشن برای پر شدن اولیه progress bar */
@keyframes progress-animate {
  from {
    width: 0;
  }
  to {
    width: var(--progress-width);
  }
}

/* انیمیشن برای پر شدن دوباره هنگام اولین هاور */
@keyframes progress-animate-hover {
  from {
    width: 0;
  }
  to {
    width: var(--progress-width);
  }
}

/* اعمال انیمیشن فقط در اولین هاور (وقتی کلاس hovered وجود ندارد) */
.skills .skill-box:not(.hovered):hover .progress .progress-bar {
  width: 0; /* ابتدا عرض صفر می‌شود */
  animation: progress-animate-hover 0.8s ease-in-out forwards; /* انیمیشن پر شدن از صفر */
}

/* وقتی کلاس hovered اضافه شد، عرض ثابت می‌مونه */
.skills .skill-box.hovered .progress .progress-bar {
  width: var(--progress-width); /* عرض اصلی بدون انیمیشن */
}

/* تنظیم عرض اولیه progress-bar بر اساس aria-valuenow */
.skills .skill-box .progress .progress-bar[aria-valuenow="90"] {
  --progress-width: 90%;
}
.skills .skill-box .progress .progress-bar[aria-valuenow="65"] {
  --progress-width: 65%;
}
.skills .skill-box .progress .progress-bar[aria-valuenow="70"] {
  --progress-width: 70%;
}
.skills .skill-box .progress .progress-bar[aria-valuenow="75"] {
  --progress-width: 75%;
}
.skills .skill-box .progress .progress-bar[aria-valuenow="80"] {
  --progress-width: 80%;
}
.skills .skill-box .progress .progress-bar[aria-valuenow="85"] {
  --progress-width: 85%;
}
/*--------------------------------------------------------------
# Resume Section
--------------------------------------------------------------*/
.resume .resume-wrapper .resume-block {
  margin-bottom: 3rem;
}

.resume .resume-wrapper .resume-block:last-child {
  margin-bottom: 0;
}

.resume .resume-wrapper .resume-block h2 {
  font-size: 2rem;
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.resume .resume-wrapper .resume-block h2 span {
  color: var(--accent-color);
}

.resume .resume-wrapper .resume-block .lead {
  color: color-mix(in srgb, var(--default-color), transparent 25%);
  margin-bottom: 3rem;
}

.resume .resume-wrapper .timeline {
  position: relative;
}

.resume .resume-wrapper .timeline::before {
  content: "";
  position: absolute;
  left: 20%;
  top: 0;
  height: 100%;
  width: 2px;
  background-color: color-mix(in srgb, var(--accent-color), transparent 85%);
}

.resume .resume-wrapper .timeline .timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  position: relative;
}

.resume .resume-wrapper .timeline .timeline-item:last-child {
  margin-bottom: 0;
}

.resume .resume-wrapper .timeline .timeline-item .timeline-left {
  width: 20%;
  padding-right: 3rem;
}

.resume .resume-wrapper .timeline .timeline-item .timeline-left .company {
  color: var(--heading-color);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.resume .resume-wrapper .timeline .timeline-item .timeline-left .period {
  color: var(--accent-color);
  font-size: 0.9rem;
}

.resume .resume-wrapper .timeline .timeline-item .timeline-dot {
  position: absolute;
  left: calc(20% + 1px);
  transform: translateX(-50%);
  width: 1rem;
  height: 1rem;
  background-color: var(--accent-color);
  border-radius: 50%;
}

.resume .resume-wrapper .timeline .timeline-item .timeline-right {
  width: 70%;
  padding-left: 3rem;
  margin-top: -4px;
}

.resume .resume-wrapper .timeline .timeline-item .timeline-right .position {
  color: var(--heading-color);
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.resume .resume-wrapper .timeline .timeline-item .timeline-right .description {
  color: color-mix(in srgb, var(--default-color), transparent 25%);
}

.resume .resume-wrapper .timeline .timeline-item .timeline-right ul {
  padding-left: 15px;
}

.resume .resume-wrapper .timeline .timeline-item .timeline-right ul li {
  padding-bottom: 12px;
}

@media (max-width: 992px) {
  .resume .resume-wrapper .resume-block h2 {
    font-size: 2rem;
  }

  .resume .resume-wrapper .timeline::before {
    left: 1rem;
  }

  .resume .resume-wrapper .timeline .timeline-item {
    flex-direction: column;
    margin-bottom: 20px;
  }

  .resume .resume-wrapper .timeline .timeline-item .timeline-left {
    width: 100%;
    text-align: left;
    padding-right: 0;
    padding-left: 2.5rem;
    margin-bottom: 1.6rem;
    margin-top: -4px;
  }

  .resume .resume-wrapper .timeline .timeline-item .timeline-dot {
    left: calc(1rem + 1px);
  }

  .resume .resume-wrapper .timeline .timeline-item .timeline-right {
    width: 100%;
    padding-left: 2.5rem;
  }
}

/*--------------------------------------------------------------
# Portfolio Section
--------------------------------------------------------------*/
.portfolio .portfolio-filters-container {
  margin-bottom: 40px;
}

.portfolio .portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
}

.portfolio .portfolio-filters li {
  font-size: 15px;
  font-weight: 500;
  padding: 8px 20px;
  cursor: pointer;
  border-radius: 30px;
  background-color: color-mix(in srgb, var(--surface-color), transparent 50%);
  color: var(--default-color);
  transition: all 0.3s ease-in-out;
}

.portfolio .portfolio-filters li:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 85%);
  color: var(--accent-color);
  transform: translateY(-2px);
}

.portfolio .portfolio-filters li.filter-active {
  background-color: var(--accent-color);
  color: var(--contrast-color);
}

.portfolio-card {
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--surface-color);
  border-radius: 8px;
  overflow: hidden;
}

.portfolio-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease-in-out;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  z-index: 2;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-actions {
  display: flex;
  gap: 15px;
  transform: translateY(20px);
  transition: transform 0.4s ease-in-out;
}

.portfolio-card:hover .portfolio-actions {
  transform: translateY(0);
}

.portfolio-actions a {
  width: 45px;
  height: 45px;
  background-color: var(--surface-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  font-size: 20px;
  transition: all 0.3s ease;
  z-index: 3;
}

.portfolio-actions a:hover {
  background-color: var(--accent-color);
  color: var(--contrast-color);
  transform: scale(1.1);
}

.portfolio-content {
  padding: 25px;
  background: var(--surface-color);
}

.portfolio-content .category {
  font-size: 14px;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  display: block;
  margin-bottom: 10px;
}

.portfolio-content h3 {
  font-size: 20px;
  margin: 0 0 15px;
  font-weight: 600;
  transition: color 0.3s ease;
}

.portfolio-content h3:hover {
  color: var(--accent-color);
}

.portfolio-content p {
  font-size: 15px;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .portfolio .portfolio-filters li {
    font-size: 14px;
    padding: 6px 15px;
  }

  .portfolio .portfolio-card .portfolio-content {
    padding: 20px;
  }

  .portfolio .portfolio-card .portfolio-content h3 {
    font-size: 18px;
  }

  .portfolio .portfolio-card .portfolio-content p {
    font-size: 14px;
  }

  .portfolio-overlay {
    opacity: 1;
    align-items: center;
  }

  .portfolio-actions {
    transform: translateY(0);
  }
}
/*--------------------------------------------------------------
# Testimonials Section
--------------------------------------------------------------*/
.testimonials .testimonials-slider {
  width: 100%;
  position: relative;
  padding-bottom: 60px;
}

.testimonials .swiper-wrapper {
  height: auto;
}

.testimonials .testimonial-item {
  background-color: var(--surface-color);
  padding: 40px;
  border-radius: 20px;
}

@media (max-width: 575px) {
  .testimonials .testimonial-item {
    padding: 20px;
  }
}

.testimonials .testimonial-item h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
}

.testimonials .testimonial-item p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 30px;
  font-style: italic;
}

.testimonials .testimonial-item .profile {
  gap: 15px;
}

.testimonials .testimonial-item .profile .profile-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonials .testimonial-item .profile .profile-info h3 {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}

.testimonials .testimonial-item .profile .profile-info span {
  font-size: 14px;
  color: color-mix(in srgb, var(--default-color) 70%, transparent);
}

.testimonials .testimonial-item .featuredahn-img-wrapper {
  min-height: 400px;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.testimonials .testimonial-item .featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.testimonials .swiper-navigation {
  position: absolute;
  bottom: 0;
  gap: 10px;
}

.testimonials .swiper-button-prev,
.testimonials .swiper-button-next {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  margin: 0;
  width: 44px;
  height: 44px;
  background-color: var(--surface-color);
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--default-color) 10%, transparent);
  transition: 0.3s;
}

.testimonials .swiper-button-prev::after,
.testimonials .swiper-button-next::after {
  font-size: 20px;
  color: var(--default-color);
}

.testimonials .swiper-button-prev:hover,
.testimonials .swiper-button-next:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.testimonials .swiper-button-prev:hover::after,
.testimonials .swiper-button-next:hover::after {
  color: var(--contrast-color);
}

/*--------------------------------------------------------------
# Services Section
--------------------------------------------------------------*/
.services {
  padding: 80px 0;
}

.services .servies-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.services .btn-outline-primary {
  color: var(--accent-color);
  border-color: var(--accent-color);
  padding: 10px 30px;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.services .btn-outline-primary:hover {
  background-color: var(--accent-color);
  color: var(--contrast-color);
}

.services .service-item {
  background-color: var(--surface-color);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  height: 100%;
  transition: transform 0.3s ease;
}

.services .service-item:hover {
  transform: scale(1.05);
}

.services .service-item i {
  font-size: 2.5rem;
  color: var(--accent-color);
  display: inline-block;
  margin-bottom: 15px;
}

.services .service-item h3 {
  font-size: 1.25rem;
  margin-bottom: 15px;
}

.services .service-item h3 a {
  color: var(--heading-color);
}

.services .service-item h3 a:hover {
  color: var(--accent-color);
}

.services .service-item p {
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
}

@media (max-width: 991px) {
  .services h2 {
    font-size: 2rem;
  }
}

/*--------------------------------------------------------------
# Faq Section
--------------------------------------------------------------*/
.faq .faq-container .faq-item {
  background-color: var(--surface-color);
  position: relative;
  padding: 20px;
  margin-bottom: 15px;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 85%);
  border-radius: 5px;
  overflow: hidden;
}

.faq .faq-container .faq-item:last-child {
  margin-bottom: 0;
}

.faq .faq-container .faq-item h3 {
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  margin: 0 30px 0 0;
  transition: 0.3s;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.faq .faq-container .faq-item h3 .num {
  color: var(--accent-color);
  padding-right: 5px;
}

.faq .faq-container .faq-item h3:hover {
  color: var(--accent-color);
}

.faq .faq-container .faq-item .faq-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: 0.3s ease-in-out;
  visibility: hidden;
  opacity: 0;
}

.faq .faq-container .faq-item .faq-content p {
  margin-bottom: 0;
  overflow: hidden;
}

.faq .faq-container .faq-item .faq-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 16px;
  line-height: 0;
  transition: 0.3s;
  cursor: pointer;
}

.faq .faq-container .faq-item .faq-toggle:hover {
  color: var(--accent-color);
}

.faq .faq-container .faq-active {
  background-color: color-mix(in srgb, var(--accent-color), transparent 97%);
  border-color: color-mix(in srgb, var(--accent-color), transparent 80%);
}

.faq .faq-container .faq-active h3 {
  color: var(--accent-color);
}

.faq .faq-container .faq-active .faq-content {
  grid-template-rows: 1fr;
  visibility: visible;
  opacity: 1;
  padding-top: 10px;
}

.faq .faq-container .faq-active .faq-toggle {
  transform: rotate(90deg);
  color: var(--accent-color);
}

/*--------------------------------------------------------------
# Contact Section
--------------------------------------------------------------*/
.contact .section-category {
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact .content h2 {
  font-weight: 700;
  line-height: 1.2;
}

.contact .content .lead {
  color: color-mix(in srgb, var(--default-color), transparent 25%);
}

.contact .contact-info .info-item {
  font-size: 1.1rem;
}

.contact .contact-info .info-item i {
  color: var(--accent-color);
  font-size: 1.4rem;
}

.contact .contact-info .map-link {
  color: var(--heading-color);
  font-weight: 500;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.contact .contact-info .map-link i {
  transition: transform 0.3s ease;
}

.contact .contact-info .map-link:hover {
  color: var(--accent-color);
}

.contact .contact-info .map-link:hover i {
  transform: translateX(5px);
}

/* تنظیمات پایه باکس فرم تماس (برای همه حالات) */
.contact .contact-form {
  background-color: var(--surface-color);
  border: none;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* افکت هاور در لایت مود */
.contact .contact-form:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* تنظیمات باکس در دارک مود */
.dark-mode .contact .contact-form {
  background-color: #2a2a2a !important;
  --surface-color: #2a2a2a !important;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5) !important;
  border: 1px solid #404040 !important;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

/* افکت هاور در دارک مود */
.dark-mode .contact .contact-form:hover {
  transform: scale(1.02) !important;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15) !important;
}

/* تنظیمات پایه دکمه سابمیت (برای لایت مود) */
.contact .contact-form .btn-submit {
  background-color: var(--accent-color);
  color: var(--contrast-color);
  border: 1px solid color-mix(in srgb, var(--accent-color), transparent 20%);
  box-shadow: 0 0 10px rgba(61, 3, 184, 0.3);
  padding: 0.75rem 2rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s ease;
}

/* افکت هاور دکمه سابمیت در لایت مود */
.contact .contact-form .btn-submit:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 15%);
  box-shadow: 0 0 15px rgba(61, 3, 184, 0.5);
  transform: translateY(-1px);
}

/* تنظیم دکمه سابمیت در دارک مود */
.dark-mode .contact .contact-form .btn-submit {
  background-color: var(--accent-color);
  color: var(--contrast-color);
  border: 1px solid color-mix(in srgb, var(--accent-color), transparent 20%);
  box-shadow: 0 0 10px rgba(61, 3, 184, 0.5);
  padding: 0.75rem 2rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s ease;
}

/* افکت هاور دکمه سابمیت در دارک مود */
.dark-mode .contact .contact-form .btn-submit:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 15%);
  box-shadow: 0 0 15px rgba(61, 3, 184, 0.7);
  transform: translateY(-1px);
}

/* تنظیم رنگ متن‌های ورودی‌ها و placeholder در دارک مود */
.dark-mode .contact .contact-form .form-control,
.dark-mode .contact .contact-form .form-select {
  color: #e0e0e0;
  background-color: #3a3a3a;
  border-color: #444444;
}

.dark-mode .contact .contact-form .form-control::placeholder,
.dark-mode .contact .contact-form .form-select::placeholder {
  color: #888888;
}

.dark-mode .contact .contact-form .form-control:focus,
.dark-mode .contact .contact-form .form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--accent-color), transparent 70%);
}

/* تنظیم رنگ متن‌های بخش اطلاعات تماس در دارک مود */
.dark-mode .contact .contact-info .info-item {
  color: #e0e0e0;
}

.dark-mode .contact .contact-info .info-item i {
  color: var(--accent-color);
}

.dark-mode .contact .content h2 {
  color: #ffffff;
}

.dark-mode .contact .section-category {
  color: #a0a0a0;
}
/*--------------------------------------------------------------
# Portfolio Details Section
--------------------------------------------------------------*/
.portfolio-details .portfolio-info h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 20px;
  position: relative;
}

.portfolio-details .portfolio-info h3:after {
  content: "";
  position: absolute;
  display: block;
  width: 50px;
  height: 3px;
  background: var(--accent-color);
  left: 0;
  bottom: 0;
}

.portfolio-details .portfolio-info ul {
  list-style: none;
  padding: 0;
  font-size: 15px;
}

.portfolio-details .portfolio-info ul li {
  display: flex;
  flex-direction: column;
  padding-bottom: 15px;
}

.portfolio-details .portfolio-info ul strong {
  text-transform: uppercase;
  font-weight: 400;
  color: color-mix(in srgb, var(--default-color), transparent 50%);
  font-size: 14px;
}

.portfolio-details .portfolio-info .btn-visit {
  padding: 8px 40px;
  background: var(--accent-color);
  color: var(--contrast-color);
  border-radius: 50px;
  transition: 0.3s;
}

.portfolio-details .portfolio-info .btn-visit:hover {
  background: color-mix(in srgb, var(--accent-color), transparent 20%);
}

.portfolio-details .portfolio-description h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 20px;
}

.portfolio-details .portfolio-description p {
  padding: 0;
  text-align: justify;
}

.portfolio-details .portfolio-description .testimonial-item {
  padding: 30px 30px 0 30px;
  position: relative;
  background: color-mix(in srgb, var(--default-color), transparent 97%);
  margin-bottom: 50px;
}

.portfolio-details .portfolio-description .testimonial-item .testimonial-img {
  width: 90px;
  border-radius: 50px;
  border: 6px solid var(--background-color);
  float: left;
  margin: 0 10px 0 0;
}

.portfolio-details .portfolio-description .testimonial-item h3 {
  font-size: 18px;
  font-weight: bold;
  margin: 15px 0 5px 0;
  padding-top: 20px;
}

.portfolio-details .portfolio-description .testimonial-item h4 {
  font-size: 14px;
  color: #6c757d;
  margin: 0;
}

.portfolio-details .portfolio-description .testimonial-item .quote-icon-left,
.portfolio-details .portfolio-description .testimonial-item .quote-icon-right {
  color: color-mix(in srgb, var(--accent-color), transparent 50%);
  font-size: 26px;
  line-height: 0;
}

.portfolio-details .portfolio-description .testimonial-item .quote-icon-left {
  display: inline-block;
  left: -5px;
  position: relative;
}

.portfolio-details .portfolio-description .testimonial-item .quote-icon-right {
  display: inline-block;
  right: -5px;
  position: relative;
  top: 10px;
  transform: scale(-1, -1);
}

.portfolio-details .portfolio-description .testimonial-item p {
  font-style: italic;
  margin: 0 0 15px 0 0 0;
  padding: 0;
}

.portfolio-details .image-container {
  position: relative;
  width: 100%;
  max-width: 600px; /* عرض بزرگ‌تر برای تصاویر */
  margin: 30px auto; /* فاصله بین تصاویر */
  display: block;
  box-sizing: border-box;
}

.portfolio-details .video-container {
  position: relative;
  width: 100%;
  max-width: 336px; /* اندازه اصلی ویدیوها در دسکتاپ */
  margin: 30px auto; /* فاصله بین ویدیوها */
  display: block;
  box-sizing: border-box;
}

.portfolio-details .portfolio-video,
.portfolio-details .portfolio-image {
  width: 100%;
  height: auto;
  object-fit: contain; /* نمایش کامل تصویر/ویدیو بدون برش */
  border-radius: 10px;
  display: block;
}

.portfolio-details .portfolio-detail-img {
  display: block;
  padding: 10px; /* padding مناسب برای باکس */
  border: 2px solid var(--surface-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
}

.portfolio-details .portfolio-detail-img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* اضافه کردن فضای کلی به بخش col-lg-6 */
.portfolio-details .col-lg-6 {
  padding-top: 20px;
  padding-bottom: 20px;
}

/* تنظیمات برای موبایل */
@media (max-width: 576px) {
  .portfolio-details .image-container {
    max-width: 400px; /* عرض مناسب برای تصاویر در موبایل */
    margin: 20px auto;
  }

  .portfolio-details .video-container {
    max-width: 288px; /* اندازه اصلی ویدیوها در موبایل */
    margin: 20px auto;
  }

  .portfolio-details .portfolio-video,
  .portfolio-details .portfolio-image {
    max-height: none; /* حذف محدودیت ارتفاع برای حفظ نسبت */
  }

  .portfolio-details .col-lg-6 {
    padding-top: 15px;
    padding-bottom: 15px;
  }

  .portfolio-details .portfolio-detail-img {
    padding: 8px; /* فضای داخلی کمتر برای موبایل */
  }
}
/*--------------------------------------------------------------
# Service Details Section
--------------------------------------------------------------*/
.service-details .service-details-slider {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  z-index: 1;
}

.service-details .service-details-slider .swiper-wrapper {
  height: auto !important;
}

.service-details .service-details-slider .swiper-pagination {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  z-index: 2;
}

.service-details .service-details-slider .swiper-pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background-color: var(--contrast-color);
  opacity: 0.5;
  transition: 0.3s;
}

.service-details .service-details-slider .swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active {
  opacity: 1;
  width: 20px;
  border-radius: 5px;
}

.service-details .content h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
}

.service-details .content p {
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  margin-bottom: 15px;
}

.service-details .content .features .feature-box {
  padding: 20px;
  background: var(--surface-color);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  height: 100%;
  transition: 0.3s;
}

.service-details .content .features .feature-box:hover {
  transform: translateY(-5px);
}

.service-details .content .features .feature-box i {
  font-size: 24px;
  color: var(--accent-color);
  margin-right: 15px;
}

.service-details .content .features .feature-box h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.service-details .content .features .feature-box h3 a {
  color: var(--heading-color);
}

.service-details .content .features .feature-box h3 a:hover {
  color: var(--accent-color);
}

.service-details .service-info {
  background: var(--surface-color);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.service-details .service-info h4 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid color-mix(in srgb, var(--accent-color), transparent 85%);
}

.service-details .service-info .info-item {
  margin-bottom: 25px;
}

.service-details .service-info .info-item:last-child {
  margin-bottom: 0;
}

.service-details .service-info .info-item i {
  font-size: 24px;
  color: var(--accent-color);
  margin-bottom: 10px;
}

.service-details .service-info .info-item h5 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.service-details .service-info .info-item p {
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  margin: 0;
}

.service-details .related-services {
  background: var(--surface-color);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.service-details .related-services h4 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid color-mix(in srgb, var(--accent-color), transparent 85%);
}

.service-details .related-services .service-item {
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.service-details .related-services .service-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.service-details .related-services .service-item i {
  font-size: 24px;
  color: var(--accent-color);
  margin-bottom: 10px;
}

.service-details .related-services .service-item h5 {
  font-size: 18px;
  margin-bottom: 10px;
}

.service-details .related-services .service-item h5 a {
  color: var(--heading-color);
  transition: 0.3s;
}

.service-details .related-services .service-item h5 a:hover {
  color: var(--accent-color);
}

.service-details .related-services .service-item p {
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  margin: 0;
  font-size: 14px;
}

@media (max-width: 991px) {

  .service-details .service-info,
  .service-details .related-services {
    margin-top: 30px;
  }
}

/* Custom Image Box for Photos */
.custom-image-box {
  position: relative;
  width: 100%;
  max-width: 600px; /* عرض حداکثر مشابه portfolio-detail-img */
  margin: 30px auto; /* فاصله بین تصاویر */
  display: block;
  box-sizing: border-box;
}

.custom-image-box img {
  width: 100%;
  height: auto;
  object-fit: contain; /* نمایش کامل تصویر بدون برش */
  border-radius: 10px;
  display: block;
  padding: 10px; /* padding مشابه برای باکس */
  border: 2px solid var(--surface-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.custom-image-box:hover img {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* تنظیمات برای موبایل */
@media (max-width: 576px) {
  .custom-image-box {
    max-width: 400px; /* عرض مناسب برای تصاویر در موبایل */
    margin: 20px auto;
  }

  .custom-image-box img {
    padding: 8px; /* فضای داخلی کمتر برای موبایل */
  }
}

/*--------------------------------------------------------------
# Starter Section Section
--------------------------------------------------------------*/
.starter-section {
  /* Add your styles here */
}
/* Coming Soon Modal */
.coming-soon-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.coming-soon-modal.active {
  visibility: visible;
  opacity: 1;
}

.coming-soon-modal .modal-content {
  background-color: var(--surface-color);
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  width: 90%;
  transition: transform 0.3s ease;
}

.coming-soon-modal.active .modal-content {
  transform: scale(1);
}

.coming-soon-modal .modal-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 20px;
}

.coming-soon-modal .modal-content p {
  font-size: 1.1rem;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
  margin-bottom: 30px;
}

.coming-soon-modal .modal-content .btn-primary {
  background-color: var(--accent-color);
  color: var(--contrast-color);
  padding: 12px 40px;
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.coming-soon-modal .modal-content .btn-primary:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 15%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Blur effect for content when modal is active */
.coming-soon-modal.active ~ * {
  filter: blur(5px);
  pointer-events: none;
}

/* Dark mode styles for modal */
.dark-mode .coming-soon-modal .modal-content {
  background-color: #2a2a2a;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.dark-mode .coming-soon-modal .modal-content h2 {
  color: #ffffff;
}

.dark-mode .coming-soon-modal .modal-content p {
  color: #a0a0a0;
}

@media (max-width: 576px) {
  .coming-soon-modal .modal-content {
    padding: 20px;
  }

  .coming-soon-modal .modal-content h2 {
    font-size: 2rem;
  }

  .coming-soon-modal .modal-content p {
    font-size: 1rem;
  }

  .coming-soon-modal .modal-content .btn-primary {
    padding: 10px 30px;
  }
}
/* Custom Video Box with Title Overlay */
.custom-video-box {
  position: relative;
  display: block;
  overflow: hidden;
}

.custom-video-box img {
  transition: all 0.3s ease;
}

.custom-video-box .video-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
  z-index: 2;
}

.custom-video-box .video-title {
  color: var(--contrast-color);
  font-size: 1.3rem;
  font-weight: 500;
  font-family: var(--heading-font);
  margin: 0;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  text-align: center;
}

.custom-video-box:hover .video-title-overlay {
  opacity: 1;
}

.custom-video-box:hover .video-title {
  transform: translateY(0);
}

/* Ensure no conflict with existing custom-image-box */
.custom-image-box.custom-video-box {
  border-radius: 10px;
  border: 2px solid var(--surface-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.custom-image-box.custom-video-box:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Dark mode adjustments */
.dark-mode .custom-video-box .video-title-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.dark-mode .custom-video-box .video-title {
  color: #e0e0e0;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .custom-video-box .video-title {
    font-size: 1.2rem;
  }
}
/* استایل جدید برای ویدیوهای افقی */
.portfolio-details .video-container-horizontal {
  position: relative;
  width: 100%;
  max-width: 600px; /* عرض مشابه image-container برای یکپارچگی */
  margin: 30px auto; /* فاصله بین ویدیوها */
  display: block;
  box-sizing: border-box;
  aspect-ratio: 16 / 9; /* نسبت ابعاد افقی */
}

.portfolio-details .video-container-horizontal iframe {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  display: block;
  border: 2px solid var(--surface-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.portfolio-details .video-container-horizontal:hover iframe {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* تنظیمات برای موبایل */
@media (max-width: 576px) {
  .portfolio-details .video-container-horizontal {
    max-width: 400px; /* عرض مناسب برای موبایل */
    margin: 20px auto;
  }

  .portfolio-details .video-container-horizontal iframe {
    padding: 8px; /* فضای داخلی کمتر برای موبایل */
  }
}

/* Custom styles for portfolio details Swiper pagination */
.portfolio-details-swiper {
  padding-bottom: 40px; /* فضای کافی برای pagination dots */
}

.portfolio-details-swiper .swiper-pagination-ut { /* کلاس سفارشی */
  position: absolute; /* موقعیت‌یابی مطلق نسبت به اسلایدر */
  bottom: 0px; /* چسباندن به پایین اسلایدر */
  left: 0;
  right: 0;
  text-align: center;
  margin-top: 20px; /* فاصله‌گذاری از ویدیوها */
}

.portfolio-details-swiper .swiper-pagination-ut .swiper-pagination-bullet { /* کلاس سفارشی */
  background-color: var(--default-color); /* رنگ دایره‌های غیرفعال */
  opacity: 0.5;
  transition: all 0.3s ease;
}

.portfolio-details-swiper .swiper-pagination-ut .swiper-pagination-bullet-active { /* کلاس سفارشی */
  background-color: var(--accent-color); /* رنگ دایره فعال */
  opacity: 1;
  width: 20px; /* کمی بزرگتر شدن دایره فعال */
  border-radius: 5px; /* گوشه‌های گرد برای دایره فعال */
}

/* Custom styles for Swiper navigation arrows (Prev/Next buttons) */
.portfolio-details-swiper .swiper-button-prev-ut, /* کلاس سفارشی */
.portfolio-details-swiper .swiper-button-next-ut { /* کلاس سفارشی */
  color: var(--accent-color); /* رنگ فلش‌ها */
  width: 40px; /* عرض دکمه */
  height: 40px; /* ارتفاع دکمه */
  background-color: var(--surface-color);
  border-radius: 50%; /* گرد کردن دکمه */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* سایه دکمه */
  transition: all 0.3s ease;
  z-index: 10; /* برای اینکه روی ویدیوها قرار بگیرند */
}

.portfolio-details-swiper .swiper-button-prev-ut:hover, /* کلاس سفارشی */
.portfolio-details-swiper .swiper-button-next-ut:hover { /* کلاس سفارشی */
  background-color: color-mix(in srgb, var(--accent-color), transparent 15%); /* رنگ پس‌زمینه هنگام هاور */
  color: var(--contrast-color); /* رنگ فلش هنگام هاور */
  transform: translateY(-2px); /* افکت کوچک در هاور */
}

/* تغییر رنگ فلش‌ها در حالت دارک مود */
.dark-mode .portfolio-details-swiper .swiper-button-prev-ut, /* کلاس سفارشی */
.dark-mode .portfolio-details-swiper .swiper-button-next-ut { /* کلاس سفارشی */
  background-color: #3a3a3a; /* پس‌زمینه تیره‌تر در دارک مود */
  color: #e0e0e0; /* رنگ فلش روشن‌تر در دارک مود */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.dark-mode .portfolio-details-swiper .swiper-button-prev-ut:hover, /* کلاس سفارشی */
.dark-mode .portfolio-details-swiper .swiper-button-next-ut:hover { /* کلاس سفارشی */
  background-color: var(--accent-color); /* حفظ رنگ accent در هاور */
  color: var(--contrast-color);
}

/* تنظیم موقعیت فلش‌ها */
.portfolio-details-swiper .swiper-button-prev-ut { /* کلاس سفارشی */
  left: 10px; /* فاصله از چپ */
}

.portfolio-details-swiper .swiper-button-next-ut { /* کلاس سفارشی */
  right: 10px; /* فاصله از راست */
}

/* تنظیم اندازه آیکون فلش‌ها (اگر از فونت آیکون استفاده می‌کنید) */
.portfolio-details-swiper .swiper-button-prev-ut::after, /* کلاس سفارشی */
.portfolio-details-swiper .swiper-button-next-ut::after { /* کلاس سفارشی */
  font-size: 20px; /* اندازه آیکون */
  font-weight: bold;
}

/* در موبایل، ممکن است بخواهید فلش‌ها کمی کوچکتر باشند یا موقعیتشان تغییر کند */
@media (max-width: 768px) {
  .portfolio-details-swiper .swiper-button-prev-ut, /* کلاس سفارشی */
  .portfolio-details-swiper .swiper-button-next-ut { /* کلاس سفارشی */
    width: 30px;
    height: 30px;
  }
  .portfolio-details-swiper .swiper-button-prev-ut::after, /* کلاس سفارشی */
  .portfolio-details-swiper .swiper-button-next-ut::after { /* کلاس سفارشی */
    font-size: 16px;
  }
  .portfolio-details-swiper .swiper-button-prev-ut { /* کلاس سفارشی */
    left: 5px;
  }
  .portfolio-details-swiper .swiper-button-next-ut { /* کلاس سفارشی */
    right: 5px;
  }
}

/* استایل برای دکمه/آیکون GLightbox روی ویدیو */
.video-container {
    position: relative; /* برای موقعیت‌یابی مطلق دکمه */
    display: flex; /* برای ترازبندی مرکزی ویدیو اگر video-container کوچکتر از col باشد */
    justify-content: center;
    align-items: center;
    overflow: hidden; /* برای اطمینان از اینکه دکمه پلی خارج از مرز ویدیو قرار نگیرد */
}

.glightbox-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5; /* اطمینان از اینکه روی ویدیو قرار گیرد */
    background-color: rgba(0, 0, 0, 0.5); /* پس‌زمینه شفاف */
    border-radius: 50%;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0; /* به صورت پیش فرض مخفی باشد */
}

/* در هاور روی video-container دکمه پلی نمایش داده شود */
.video-container:hover .glightbox-play-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1); /* بزرگنمایی در هاور */
}

.glightbox-play-button a {
    display: block; /* برای اینکه لینک کل ناحیه دکمه را بگیرد */
    line-height: 0; /* برای حذف فضای اضافی زیر آیکون */
    color: white; /* رنگ آیکون */
    font-size: 48px; /* اندازه آیکون */
}

.glightbox-play-button a i {
    font-size: 48px; /* مطمئن شوید آیکون اندازه صحیح را دارد */
}

/* استایل‌های مربوط به TEDx Motion Swiper (اگر این اسلایدر در این صفحه استفاده نمی‌شود، این بخش‌ها فقط برای صفحات دیگر مؤثر هستند) */
.tedx-motion-swiper {
  padding-bottom: 40px;
  margin-top: 30px;
}

.tedx-motion-swiper .swiper-wrapper {
  display: flex;
  position: relative;
  width: 100%;
  height: auto;
  align-items: center;
}

.tedx-motion-swiper .swiper-slide {
  flex-shrink: 0;
  width: 100%;
  height: auto;
  position: relative;
  transition-property: transform;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tedx-motion-swiper .swiper-slide .video-container {
    width: 100%;
    max-width: 336px;
    margin: 0 auto;
}

.tedx-motion-swiper .swiper-slide video {
    width: 100%;
    height: auto;
    display: block;
}

.tedx-motion-swiper {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.tedx-motion-swiper .tedx-pagination {
  position: absolute;
  bottom: 0px;
  left: 0;
  right: 0;
  text-align: center;
  margin-top: 20px;
}

.tedx-motion-swiper .tedx-pagination .swiper-pagination-bullet {
  background-color: var(--default-color);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.tedx-motion-swiper .tedx-pagination .swiper-pagination-bullet-active {
  background-color: var(--accent-color);
  opacity: 1;
  width: 20px;
  border-radius: 5px;
}

.tedx-motion-swiper .tedx-prev,
.tedx-motion-swiper .tedx-next {
  color: var(--accent-color);
  width: 40px;
  height: 40px;
  background-color: var(--surface-color);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  z-index: 10;
}

.tedx-motion-swiper .tedx-prev:hover,
.tedx-motion-swiper .tedx-next:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 15%);
  color: var(--contrast-color);
  transform: translateY(-2px);
}

.dark-mode .tedx-motion-swiper .tedx-prev,
.dark-mode .tedx-motion-swiper .tedx-next {
  background-color: #3a3a3a;
  color: #e0e0e0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.dark-mode .tedx-motion-swiper .tedx-prev:hover,
.dark-mode .tedx-motion-swiper .tedx-next:hover {
  background-color: var(--accent-color);
  color: var(--contrast-color);
}

.tedx-motion-swiper .tedx-prev {
  left: 10px;
}

.tedx-motion-swiper .tedx-next {
  right: 10px;
}

.tedx-motion-swiper .tedx-prev::after,
.tedx-motion-swiper .tedx-next::after {
  font-size: 20px;
  font-weight: bold;
}

@media (max-width: 768px) {
  .tedx-motion-swiper .tedx-prev,
  .tedx-motion-swiper .tedx-next {
    width: 30px;
    height: 30px;
  }
  .tedx-motion-swiper .tedx-prev::after,
  .tedx-motion-swiper .tedx-next::after {
    font-size: 16px;
  }
  .tedx-motion-swiper .tedx-prev {
    left: 5px;
  }
  .tedx-motion-swiper .tedx-next {
    right: 5px;
  }
  
}
/* === Before/After Image Comparison Slider Styles === */

/* 1. Core Component Styles (FIXED) */
img-comparison-slider:host {
  display: inline-block;
  overflow: hidden;
  position: relative;
  width: 100%;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  line-height: 0;
}

img-comparison-slider .slider {
  align-items: stretch;
  display: flex;
  flex-direction: row;
  height: 100%;
  justify-content: flex-start;
  max-height: 100%;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

img-comparison-slider .divider {
  align-items: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  left: 50%;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: auto;
  z-index: 1;
}

img-comparison-slider .line {
  background-color: var(--divider-color, #fff);
  flex: 1;
  width: var(--divider-width, 2px);
}

/* This is the corrected handle style */
img-comparison-slider .handle {
  align-items: center;
  background-color: var(--handle-color, #fff);
  border-radius: 50%;
  box-shadow: var(--handle-shadow, 0 0 10px rgba(0, 0, 0, .5));
  display: flex;
  height: var(--handle-size, 40px);
  justify-content: center;
  width: var(--handle-size, 40px);
  /* The broken 'transform' line is now gone */
}

img-comparison-slider .handle .left-arrow,
img-comparison-slider .handle .right-arrow {
  fill: var(--arrow-color, #333);
  height: var(--arrow-size, 20px);
  width: var(--arrow-size, 20px);
}

img-comparison-slider .handle .left-arrow {
  margin-right: var(--arrow-spacing, 4px);
}

img-comparison-slider .handle .right-arrow {
  margin-left: var(--arrow-spacing, 4px);
}


/* 2. Container and Image Styles */
.comparison-slider-wrapper {
  width: 100%;
  max-width: 600px;
  border: 2px solid var(--surface-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.comparison-slider-wrapper img-comparison-slider,
.comparison-slider-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* This uses the slider's internal variable to hide the handle */
img-comparison-slider {
  --handle-size: 0px;
}