/* حذف ایمپورت قبلی فونت */
/* @import url('...'); */

/* تعریف فونت‌ها */
@font-face {
  font-family: 'IRANYekan';
  src: url('../assets/fonts/Iranyekan\ regular.woff2') format('woff2'),
       url('../assets/fonts/Iranyekan\ regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANYekan';
  src: url('../assets/fonts/Iranyekan\ medium.woff2') format('woff2'),
       url('../assets/fonts/Iranyekan\ medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANYekan';
  src: url('../assets/fonts/Iranyekan\ bold.woff2') format('woff2'),
       url('../assets/fonts/Iranyekan\ bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'CustomFont';
  src: url('../assets/fonts/Iranyekan\ regular.woff2') format('woff2'),
       url('../assets/fonts/Iranyekan\ regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; /* محدوده کاراکترهای فارسی و عربی */
}

@font-face {
  font-family: 'CustomFont';
  src: url('../assets/fonts/Iranyekan\ medium.woff2') format('woff2'),
       url('../assets/fonts/Iranyekan\ medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: 'CustomFont';
  src: url('../assets/fonts/Iranyekan\ bold.woff2') format('woff2'),
       url('../assets/fonts/Iranyekan\ bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'CustomFont', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* تنظیمات زبان‌ها */
[lang="ar"], [lang="fa"] {
  font-family: 'CustomFont', system-ui, -apple-system, sans-serif;
}

/* اعمال فونت به المان‌های زبان‌دار */
.ar, .fa {
  display: none;
  font-family: 'CustomFont', system-ui, -apple-system, sans-serif !important;
}

/* حذف استایل‌های قبلی زبان */
[lang="ar"] *,
[lang="fa"] * {
  font-family: inherit;
}

/* Language styles */
[data-lang] {
  display: none;
  font-weight: var(--font-weight-medium);
}

[data-lang].active {
  display: block;
}

/* حذف استایل‌های قبلی */
[data-lang] {
  display: none;
}

[data-lang].active {
  display: block !important;
}

/* برای المنت‌هایی که باید flex باشند */
[data-lang].flex-item {
  display: none;
}

[data-lang].flex-item.active {
  display: flex !important;
}

[data-lang].flex-item[style*="display: flex"] {
  display: flex !important;
}

[data-lang][style*="display: block"] {
  display: block !important;
}

:root {
  --primary-color-light: #2563eb;
  --hover-color-light: #1d4ed8;
  --primary-color-dark: #ff8534; /* افزایش contrast */
  --hover-color-dark: #ea580c;
  --background-light: #f8fafc;
  --text-light: #1e293b;
  --card-light: #ffffff;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --background-dark: #0f172a;
  --text-dark: #ffffff; /* افزایش contrast */
  --card-dark: #1e293b;
  --shadow-dark: rgba(0, 0, 0, 0.3);
}

body {
  min-height: 100vh;
  transition: all 0.3s ease;
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}

body.light-mode {
  background: linear-gradient(135deg, #f6f8ff 0%, #f1f5ff 100%);
  color: var(--text-light);
}

body.dark-mode {
  background: url('../assets/images/backgroundDark.webp') no-repeat center center fixed;
  background-size: cover;
  color: var(--text-dark);
  background-attachment: fixed;
  min-height: 100vh;
}

/* برای اطمینان از نمایش درست تصویر */
@media (max-width: 768px) {
  body.dark-mode {
    background-attachment: scroll; /* برای موبایل */
  }
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: space-between; /* تغییر این خط */
  overflow: visible;
  padding-top: 0.5rem; /* کاهش پدینگ از بالا */
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* تغییر از center به flex-start */
  padding-top: 3rem; /* اضافه کردن پدینگ از بالا */
}

.controls {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  display: flex;
  gap: 0.75rem;
  z-index: 1000;
}

#themeToggle,
#langToggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1.25rem;
  cursor: pointer;
  color: inherit;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  min-width: auto;
  height: 48px;
}

#themeToggle {
  width: 48px;
  min-width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  cursor: pointer;
  color: inherit;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.theme-icon {
  font-size: 1.5rem;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.dark-mode .theme-icon {
  content: "☽"; /* ماه در حالت دارک */
  transform: rotate(0deg);
}

.light-mode .theme-icon {
  content: "☼"; /* خورشید در حالت لایت */
  transform: rotate(-45deg);
  opacity: 0.9;
}

#themeToggle i {
  transition: transform 0.3s ease;
}

.dark-mode #themeToggle:hover,
.dark-mode #langToggle:hover {
  background: var(--primary-color-dark);
  color: white;
  transform: translateY(-2px);
}

.light-mode #themeToggle:hover,
.light-mode #langToggle:hover {
  background: var(--primary-color-light);
  color: white;
  transform: translateY(-2px);
}

.dark-mode #themeToggle i {
  transform: rotate(0deg);
}

.light-mode #themeToggle i {
  transform: rotate(180deg);
}

.current-lang {
  font-size: 1rem;
  font-weight: 600;
}

.logo {
  text-align: center;
  margin-bottom: 0.5rem; /* کاهش margin */
  overflow: visible;
  padding-bottom: 0;
  margin-top: 2rem; /* اضافه کردن مارجین منفی برای بالاتر رفتن */
  margin-bottom: 0.5rem;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  margin-bottom: 0.2rem;
}

.logo-image {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: none;
}

/* Remove box shadow in light mode */
.light-mode .logo-image {
  box-shadow: none;
  background: transparent;
}

body.dark-mode .dark-logo {
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.light-mode .light-logo {
  display: block;
}

.logo h1 {
  font-size: 2.5rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-color-dark), #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.light-mode .logo h1 {
  background: linear-gradient(135deg, var(--primary-color-light), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.slogan {
  font-size: 0.95rem; /* کاهش سایز فونت */
  opacity: 0.9;
  font-weight: 500;
  line-height: 1.6;
  padding: 0.5rem; /* کاهش padding */
  width: 100%;
  max-width: 800px;
  margin: 0 auto 0.5rem auto; /* کاهش margin پایین */
  white-space: normal;
  overflow: visible;
  min-height: fit-content;
  height: auto;
}

/* اصلاح کامل باکس سرویس‌ها */
.services-wrapper {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
}

.services-container {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
}

.services-grid {
  display: grid;
  gap: 1.2rem;
  width: 100%;
}

.services-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.service-btn {
  width: 100%;
  min-height: 90px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: inherit;
  cursor: pointer;
  transition: all 0.3s;
}

/* اصلاح آیکون‌ها در لایت مود */
.light-mode .service-btn {
  background: rgba(255, 255, 255, 0.7);
}

.light-mode .service-btn i,
.light-mode .icon-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--primary-color-light);
}

.light-mode .service-btn:hover i,
.light-mode .service-btn:hover .icon-container {
  color: white !important;
}

/* اصلاح هاور در دارک مود */
.dark-mode .service-btn:hover {
  background: var(--primary-color-dark);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.2);
}

.dark-mode .service-btn:hover i,
.dark-mode .service-btn:hover .icon-container {
  color: white !important;
  background: transparent !important;
  border: none !important;
}

/* اصلاح هاور در لایت مود */
.light-mode .service-btn:hover {
  background: var(--primary-color-light);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

.light-mode .service-btn:hover i,
.light-mode .service-btn:hover .icon-container {
  color: white !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* حذف استایل‌های اضافی آیکون در هاور */
.light-mode .service-btn:hover .icon-container,
.dark-mode .service-btn:hover .icon-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* واکنش‌پذیری */
@media (max-width: 1024px) {
  .services-wrapper {
    padding: 0 0.7rem;
  }
  
  .services-container {
    padding: 1rem;
  }
  
  .services-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  
  .service-btn {
    min-height: 80px;
  }
}

@media (max-width: 768px) {
  .services-wrapper {
    padding: 0 0.5rem;
    max-width: 100%;
  }
  
  .services-container {
    padding: 0.8rem;
    border-radius: 12px;
    max-width: 100%;
    margin: 0.5rem auto;
  }
  
  .services-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }
  
  .service-btn {
    min-height: 70px;
    padding: 0.8rem;
    font-size: 0.9rem;
  }
  
  .icon-container {
    width: 24px;
    height: 24px;
  }
  
  .service-btn i {
    font-size: 1.1rem;
  }
  
  .service-btn span {
    font-size: 0.8rem;
  }

  .announcement-text {
    font-size: 0.75rem; /* کوچکتر شدن متن */
    line-height: 1.3;
  }

  .announcement-link {
    font-size: 0.7rem;
    font-weight: 300;
  }

  .announcement-link-url {
    font-size: 0.65rem;
  }

  .announcement-icon {
    min-width: 18px; /* کوچکتر شدن آیکون */
    height: 18px;
    font-size: 0.7rem;
  }

  .announcement-item {
    padding: 0.5rem; /* کاهش padding */
    gap: 0.4rem;
  }
}

@media (max-width: 480px) {
  .services-wrapper {
    padding: 0 0.3rem;
    max-width: 100%;
  }
  
  .services-container {
    padding: 0.5rem;
    border-radius: 8px;
    margin: 0.3rem auto;
  }
  
  .services-grid {
    gap: 0.5rem;
  }
  
  .services-row {
    gap: 0.5rem;
  }
  
  .service-btn {
    min-height: 60px;
    padding: 0.5rem;
    font-size: 0.8rem;
  }
  
  .icon-container {
    width: 20px;
    height: 20px;
  }
  
  .service-btn i {
    font-size: 0.9rem;
  }
  
  .service-btn span {
    font-size: 0.7rem;
  }

  .announcement-text {
    font-size: 0.7rem; /* حتی کوچکتر برای موبایل‌های کوچک */
    line-height: 1.2;
  }

  .announcement-link {
    font-size: 0.65rem;
  }

  .announcement-link-url {
    font-size: 0.6rem;
  }

  .announcement-icon {
    min-width: 16px; /* باز هم کوچکتر */
    height: 16px;
    font-size: 0.65rem;
  }

  .announcement-item {
    padding: 0.4rem;
    gap: 0.3rem;
  }
}

/* === اصلاح عرض و padding کانتینرها === */
.services-wrapper,
.announcements-container {
  width: 100%;
  max-width: 800px;
  margin: 1.5rem auto 0;
}

.services-container,
.announcements-container {
  width: 100%;
  border-radius: 20px;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* === واکنش‌گرایی === */
@media (max-width: 768px) {
  .services-wrapper,
  .announcements-container {
    max-width: 100%;
    margin: 0.5rem auto;
  }

  .services-container,
  .announcements-container {
    border-radius: 12px;
    padding: 0.75rem;
  }

  .services-wrapper {
    padding: 0;
  }
}

@media (max-width: 480px) {
  .services-wrapper,
  .announcements-container {
    margin: 0.3rem auto;
  }

  .services-container,
  .announcements-container {
    border-radius: 8px;
    padding: 0.5rem;
  }
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem; /* کاهش فاصله */
  margin-top: 2rem; /* کاهش فاصله از بالا */
  margin-bottom: 0.5rem;
}

.social-btn {
  color: inherit;
  font-size: 1.25rem; /* کاهش سایز آیکون */
  width: 40px; /* کاهش عرض */
  height: 40px; /* کاهش ارتفاع */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px; /* کاهش گردی گوشه‌ها */
}

.footer {
  margin-top: auto; /* اضافه کردن این خط */
  text-align: center;
  padding: 1rem 0;
  opacity: 0.8;
  font-size: 0.85rem;
}

.footer p {
  margin: 0.25rem 0;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.social-btn {
  color: inherit;
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.light-mode .social-btn {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.dark-mode .social-btn:hover {
  background: var(--primary-color-dark);
  transform: translateY(-2px);
}

.light-mode .social-btn:hover {
  background: var(--primary-color-light);
  color: white;
  transform: translateY(-2px);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  padding: 2.5rem;
  border-radius: 24px;
  position: relative;
  max-width: 90%;
  width: 400px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.light-mode .modal-content {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color-dark);
}

.light-mode .modal-icon {
  color: var(--primary-color-light);
}

.modal-content h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.modal-content p {
  font-size: 1.1rem;
  opacity: 0.9;
  line-height: 1.6;
}

.close-modal {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.25rem;
  cursor: pointer;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.light-mode .close-modal {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.close-modal:hover {
  background: rgba(255, 255, 255, 0.2);
}

.light-mode .close-modal:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* حذف استایل‌های قدیمی */
.theme-text {
  display: none;
}

/* ساده‌سازی استایل‌های زبان */
.lang-switcher {
  position: relative;
  height: 48px;
  z-index: 1001;
  min-width: 140px;
  width: max-content; /* اضافه شده */
}

#langToggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  min-width: 140px;
  width: 100%; /* تغییر داده شده */
  height: 48px;
  white-space: nowrap;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0; /* تغییر از left به right */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 0.75rem;
  width: 100%; /* تغییر به 100% */
  min-width: 100%; /* اضافه شده */
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1002;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(-10px);
}

.lang-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem; /* اضافه کردن فاصله بین آیتم‌ها */
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid transparent; /* اضافه کردن بوردر شفاف */
  transition: all 0.2s ease;
}

.lang-option:last-child {
  margin-bottom: 0; /* حذف مارجین آخرین آیتم */
}

.lang-option:hover,
.lang-option.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3); /* نمایش بوردر در هاور */
}

.light-mode .lang-option:hover,
.light-mode .lang-option.active {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--primary-color-light);
}

.lang-option span {
  font-size: 0.95rem;
  font-weight: 500;
  flex: 1; /* اضافه شده برای فاصله‌گذاری بهتر */
}

.lang-option img {
  width: 30px; /* increased from 20px */
  height: 20px; /* kept at 20px for rectangular shape */
  border-radius: 4px;
  object-fit: cover;
}

/* حذف همه استایل‌های تداخلی */
[data-lang].lang-option {
  display: flex !important;
}

/* حذف همه استایل‌های اضافی */
.dropdown-menu,
.lang-dropdown,
.dropdown-menu.show {
  display: none !important;
}

/* اصلاح استایل دکمه‌های کنترل در حالت لایت */
.light-mode #themeToggle,
.light-mode #langToggle,
.light-mode .lang-switcher button {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: none; /* حذف بوردر در حالت عادی */
}

.light-mode #themeToggle:hover,
.light-mode #langToggle:hover,
.light-mode .lang-switcher button:hover {
  background: var(--primary-color-light);
  border: 1px solid var(--primary-color-light); /* نمایش بوردر فقط در هاور */
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.light-mode .lang-menu {
  background: rgba(255, 255, 255, 0.95);
  border: none; /* حذف بوردر از منوی کشویی */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.light-mode .lang-option:hover {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid var(--primary-color-light); /* اضافه کردن بوردر در هاور */
  border-radius: 8px;
}

/* اصلاح استایل شیشه‌ای در حالت لایت */
.light-mode .services-container,
.light-mode .social-btn,
.light-mode .modal-content,
.light-mode .lang-menu,
.light-mode #themeToggle,
.light-mode #langToggle,
.light-mode .service-btn {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.light-mode .modal-content {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.light-mode .service-btn:hover,
.light-mode #themeToggle:hover,
.light-mode #langToggle:hover,
.light-mode .social-btn:hover {
  background: var(--primary-color-light);
  border-color: var(--primary-color-light);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

.light-mode .lang-menu {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.95);
}

.light-mode .lang-option:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--primary-color-light);
}

/* اصلاح سایه و عمق در حالت لایت */
.light-mode .icon-container {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.light-mode .service-btn:hover .icon-container {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 1);
}

/* برای اطمینان از خوانایی محتوا روی تصویر */
.dark-mode .services-container,
.dark-mode .social-btn,
.dark-mode .modal-content,
.dark-mode #themeToggle,
.dark-mode #langToggle,
.dark-mode .service-btn {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.05);
}

.announcements-container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 1rem;
  width: 100%;
  max-width: 800px;
  margin: 1.5rem auto 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
}

.announcements-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.announcement-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 1px solid rgba(56, 149, 255, 0.212);
}

.announcement-item:hover {
  background: rgba(255, 255, 255, 0.1);
  
}

.announcement-icon {
  min-width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary-color-dark);
  font-size: 0.9rem;
}

.announcement-link {
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
  flex: 1;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.5;
  padding-left: 0.25rem;
  font-weight: 400; /* کاهش وزن فونت */
}

.announcement-link-url {
  color: inherit;
  margin-right: 0.5rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.announcement-link-url:hover {
  opacity: 1;
}

/* اصلاح استایل در حالت لایت */
.light-mode .announcement-link-url {
  color: var(--primary-color-light);
}

.light-mode .announcement-item:hover {
  background: rgb(25, 144, 255);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}
.light-mode .announcements-container {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.1);
}
.light-mode .announcement-icon {
  background: rgba(0, 0, 0, 0.05);
  color: rgb(25, 144, 255);
}

.light-mode .announcement-item:hover .announcement-icon {
  background: rgba(0, 0, 0, 0.05);
  color: white;
}

.announcement-item:hover .announcement-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white; /* رنگ آیکون در hover */
}

.dark-mode .announcement-item:hover .announcement-icon {
  background: rgba(255, 255, 255, 0.1);
  color: white; /* رنگ آیکون در حالت دارک */
}

.light-mode .announcement-item:hover .announcement-icon {
  background: rgba(0, 0, 0, 0.05);
  color: white;
}

.pagination {
  display: none; /* پنهان کردن پیش‌فرض */
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.page-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px; /* تغییر از دایره به مربع با خمیدگی */
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-number.active {
  background: var(--primary-color-dark);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dark-mode .page-number.active {
  background: var(--primary-color-dark);
}

.light-mode .page-number.active {
  background: var(--primary-color-light);
}

.page-number:hover {
  background: rgba(255, 255, 255, 0.2);
}

.light-mode .page-number {
  background: rgba(37, 99, 235, 0.1); /* بگگراند آبی در لایت مود */
}

.light-mode .page-number.active {
  background: var(--primary-color-light); /* بگگراند آبی تیره‌تر در لایت مود */
  color: white;
}

.light-mode .page-number:hover {
  background: rgba(37, 99, 235, 0.2); /* بگگراند آبی روشن‌تر در هاور */
}

@media (max-width: 768px) {
  .announcements-container {
    margin-top: 1rem;
    padding: 0.75rem;
    max-width: 100%;
    margin: 0.5rem auto;
    border-radius: 12px;
  }

  .announcement-text {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .announcement-link {
    font-size: 0.75rem;
  }

  .announcement-link-url {
    font-size: 0.7rem;
  }

  .announcement-icon {
    min-width: 20px;
    height: 20px;
    font-size: 0.8rem;
  }

  .lang-menu {
    position: absolute;
    width: 100%;
    min-width: 140px;
    right: 0;
    transform: translateY(-10px);
  }

  .lang-menu.show {
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .announcements-container {
    margin: 0.3rem auto;
    border-radius: 8px;
    padding: 0.5rem;
  }

  .announcement-text {
    font-size: 0.75rem;
    line-height: 1.3;
  }

  .announcement-link {
    font-size: 0.7rem;
  }

  .announcement-link-url {
    font-size: 0.65rem;
  }
}

/* حذف استایل‌های مزاحم */
[data-lang] {
  display: none;
}

[data-lang].flex-item[style*="display: flex"] {
  display: flex !important;
}

[data-lang][style*="display: block"] {
  display: block !important;
}

.announcement-text {
  color: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.announcement-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.announcement-item {
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
}

.announcement-item:hover .announcement-text {
  color: inherit;
}

.light-mode .announcement-item:hover .announcement-text {
  color: white;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 1rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.pagination button.active {
    background: var(--primary-color-dark);
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-prev, .page-next {
    padding: 0.5rem 1rem;
}

/* دکمه شناور دانلود اپلیکیشن */
.app-download-fab {
  position: fixed;
  bottom: 32px;
  left: 32px;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  background: rgba(255,255,255,0.18); /* شیشه‌ای */
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.13);
  padding: 0.85rem 1.5rem;
  font-size: 1.08rem;
  font-weight: 400;
  font-family: 'CustomFont', system-ui, -apple-system, sans-serif;
  cursor: pointer;
  transition: all 0.25s;
  border: none;
  outline: none;
  user-select: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.app-download-fab:hover {
  background: var(--primary-color-dark);
  color: #fff;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
}
.light-mode .app-download-fab {
  background: rgba(255,255,255,0.7);
  color: var(--primary-color-light); /* متن آبی */
}
.light-mode .app-download-fab:hover {
  background: var(--primary-color-light); /* آبی */
  color: #fff;
}
.app-download-fab i {
  font-size: 1.3rem;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.app-download-label {
  font-weight: 400 !important;
  font-family: 'CustomFont', system-ui, -apple-system, sans-serif !important;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 600px) {
  .app-download-fab {
    left: 12px;
    bottom: 12px;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    border-radius: 12px;
  }
}

/* آیکون دکمه دانلود اپلیکیشن */
.app-download-fab img {
  filter: invert(1) brightness(2) grayscale(1);
  transition: filter 0.2s;
}
.light-mode .app-download-fab img {
  filter: invert(36%) sepia(98%) saturate(749%) hue-rotate(196deg) brightness(1.1) contrast(1.1);
}
.light-mode .app-download-fab:hover img {
  filter: invert(1) brightness(2) grayscale(1);
}
.app-download-fab:hover img {
  filter: invert(1) brightness(2) grayscale(1);
}

/* پاپ‌آپ دانلود اپلیکیشن */
#appDownloadModal {
  display: none;
  position: fixed;
  z-index: 1300;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.35);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
#appDownloadModal.show {
  display: flex;
}
.app-modal-content {
  background: rgba(255,255,255,0.13);
  border-radius: 20px;
  padding: 2.2rem 1.5rem 1.5rem 1.5rem;
  min-width: 320px;
  max-width: 95vw;
  width: 370px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.13);
  position: relative;
  text-align: center;
}
.light-mode .app-modal-content {
  background: rgba(255,255,255,0.97);
}
.app-download-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}
.app-market-btn {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--primary-color-dark);
  color: #fff;
  border-radius: 12px;
  padding: 0.85rem 1.2rem;
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  outline: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.app-market-btn:hover {
  background: var(--hover-color-dark);
  color: #fff;
  transform: translateY(-2px) scale(1.03);
}
.light-mode .app-market-btn {
  background: var(--primary-color-light);
}
.light-mode .app-market-btn:hover {
  background: var(--hover-color-light);
}
.app-market-btn img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
}
.app-market-btn i {
  font-size: 1.3rem;
}
.app-close-modal {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.25rem;
  cursor: pointer;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 2;
}
.light-mode .app-close-modal {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.1);
}
.app-close-modal:hover {
  background: rgba(255,255,255,0.2);
}
.light-mode .app-close-modal:hover {
  background: rgba(0,0,0,0.1);
}
@media (max-width: 600px) {
  .app-modal-content {
    min-width: 0;
    width: 95vw;
    padding: 1.2rem 0.5rem 1rem 0.5rem;
  }
}

/* دکمه‌های دانلود اپلیکیشن جدید و ریسپانسیو */
.button-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  width: 100%;
  max-width: 800px;
  margin: 2rem auto 0 auto;
}
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #2a3439, #1c2526);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: clamp(14px, 2vw, 18px);
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.18);
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
  white-space: nowrap;
  font-family: 'CustomFont', system-ui, -apple-system, sans-serif;
  font-weight: 400;
}
.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.28);
  background: linear-gradient(145deg, #3b4a50, #2a3439);
  color: #fff;
}
.button i {
  margin-left: 0.8rem;
  font-size: clamp(16px, 2.5vw, 24px);
  transition: transform 0.3s;
  display: flex;
  align-items: center;
}
.button:hover i {
  transform: scale(1.2);
}
.button.google-play i {
  color: #34a853;
}
.button.bazaar i {
  color: #34c759;
}
.button.myket i {
  color: #2196f3;
}
@media (max-width: 768px) {
  .button-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .button {
    padding: 0.8rem 1.5rem;
    font-size: clamp(12px, 3vw, 16px);
  }
  .button i {
    font-size: clamp(14px, 3vw, 20px);
  }
}
@media (max-width: 480px) {
  .button {
    padding: 0.6rem 1rem;
    font-size: clamp(10px, 2.5vw, 14px);
  }
  .button i {
    font-size: clamp(12px, 2.5vw, 18px);
  }
  .button-container {
    gap: 0.8rem;
  }
}

/* Privacy Policy Modal Styles */
.privacy-link {
  color: var(--primary-color-dark);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.98em;
  margin-right: 0.5em;
}
.light-mode .privacy-link {
  color: var(--primary-color-light);
}
.privacy-link:hover {
  color: #ea580c;
  text-decoration: underline;
}

#privacyPolicyModal {
  display: none;
  position: fixed;
  z-index: 1400;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
#privacyPolicyModal.show {
  display: flex;
}
.privacy-modal-content {
  background: rgba(255,255,255,0.13);
  border-radius: 20px;
  padding: 2.2rem 1.5rem 1.5rem 1.5rem;
  min-width: 320px;
  max-width: 95vw;
  width: 600px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.13);
  position: relative;
  text-align: right;
  direction: rtl;
  max-height: 90vh;
  overflow: hidden;
  font-size: 1.01rem;
}
.light-mode .privacy-modal-content {
  background: rgba(255,255,255,0.97);
}
.privacy-modal-scroll {
  max-height: 70vh;
  overflow-y: auto;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.privacy-close-modal {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.25rem;
  cursor: pointer;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 2;
}
.light-mode .privacy-close-modal {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.1);
}
.privacy-close-modal:hover {
  background: rgba(255,255,255,0.2);
}
.light-mode .privacy-close-modal:hover {
  background: rgba(0,0,0,0.1);
}
@media (max-width: 700px) {
  .privacy-modal-content {
    min-width: 0;
    width: 98vw;
    padding: 1.2rem 0.5rem 1rem 0.5rem;
    font-size: 0.95rem;
  }
  .privacy-modal-scroll {
    max-height: 60vh;
  }
}