/* استایل‌های سفارشی برای اپلیکیشن معتکف */

/* فونت Vazirmatn - دانلود شده محلی */
@import url('../fonts/vazirmatn.css');

body {
  font-family: 'Vazirmatn', serif;
  direction: rtl;
  line-height: 1.8;
}

/* استایل برای تگ strong */
strong {
  font-weight: 800;
  font-size: 1.05em;
  letter-spacing: 0.5px;
}

/* Smooth scrolling برای ناوبری */
html {
  scroll-behavior: smooth;
}

/* انیمیشن برای کارت‌های فضایل و اعمال */
.virtue-card, .act-card, .hadith-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.virtue-card:hover, .act-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(5, 150, 105, 0.15);
}

/* انیمیشن ظهور تدریجی */
.fade-in {
  animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* انیمیشن fade-in برای عناصر */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* استایل برای منوی موبایل */
.mobile-menu-enter {
  transform: translateX(100%);
  opacity: 0;
}

.mobile-menu-enter-active {
  transform: translateX(0);
  opacity: 1;
  transition: all 0.3s ease;
}

/* استایل برای دکمه‌های ناوبری */
.nav-link {
  position: relative;
  transition: all 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 50%;
  background-color: #2563eb;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* استایل برای دکمه نصب PWA */
#install-btn {
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

#install-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* ریسپانسیو برای تصاویر */
img {
  max-width: 100%;
  height: auto;
}

/* استایل برای نوتیفیکیشن‌ها */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 1000;
  animation: slideInRight 0.3s ease;
}

.notification.success {
  background-color: #10b981;
}

.notification.error {
  background-color: #ef4444;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* استایل برای چک‌باکس‌های اعمال */
.deed-checkbox {
  appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  background-color: #ffffff;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.deed-checkbox:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
  transform: scale(1.05);
}

.deed-checkbox:checked {
  background-color: #10b981;
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transform: scale(1.1);
}

.deed-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 16px;
  animation: checkmark 0.3s ease-out;
}

@keyframes checkmark {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.deed-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* فاصله چک‌باکس از لیبل */
.deed-checkbox {
  margin-left: 0.5rem;
}

/* استایل برای دکمه‌ها */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  background-color: #6b7280;
  color: white;
}

.btn-secondary:hover {
  background-color: #4b5563;
}

/* استایل برای وضعیت آنلاین/آفلاین */
.offline-indicator {
  position: fixed;
  bottom: 20px;
  left: 20px;
  padding: 10px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
}

.offline-indicator.online {
  background-color: #10b981;
  color: white;
}

.offline-indicator.offline {
  background-color: #ef4444;
  color: white;
}

/* استایل‌های تاریک (اختیاری) */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1f2937;
    color: #f9fafb;
  }

  nav {
    background-color: #111827;
  }

  .feature-card {
    background-color: #374151;
    color: #f9fafb;
  }

  footer {
    background-color: #111827;
  }
}

/* ریسپانسیو - کامل و جامع */
@media (max-width: 1024px) {
  /* تبلت */
  body {
    font-size: 16px;
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.75rem; }
}

@media (max-width: 768px) {
  /* موبایل بزرگ */
  body {
    font-size: 15px;
    padding: 0;
  }

  nav {
    padding: 0;
  }

  /* حذف padding افقی از بخش‌ها برای چسبیدن به دیواره‌ها */
  section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* تنظیم padding داخلی کانتینرها */
  .max-w-7xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .hero h1 {
    font-size: 2rem !important;
  }

  .hero h2 {
    font-size: 1.75rem !important;
  }

  .hero p {
    font-size: 1rem !important;
    line-height: 1.6;
  }

  /* دکمه‌های اصلی */
  .main-btn {
    padding: 14px 20px !important;
    font-size: 14px !important;
    min-width: 160px !important;
  }

  /* کارت‌ها */
  .virtue-card, .act-card, .hadith-card {
    margin: 15px 0;
    padding: 20px !important;
  }

  /* شبکه */
  .grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  /* نوتیفیکیشن */
  .notification {
    right: 10px;
    left: 10px;
    width: auto;
    max-width: calc(100vw - 20px);
  }

  /* modal */
  .modal-content {
    padding: 20px;
    margin: 20px;
    width: calc(100vw - 40px);
    max-width: none;
  }

  /* فرم‌ها */
  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 16px; /* جلوگیری از zoom در iOS */
  }

  /* دکمه‌ها */
  .btn {
    padding: 14px 20px;
    font-size: 15px;
    width: 100%;
    margin-bottom: 10px;
  }

  /* آیکون‌ها */
  .text-6xl { font-size: 3rem !important; }
  .text-3xl { font-size: 1.5rem !important; }
  .text-xl { font-size: 1.1rem !important; }
  .text-2xl { font-size: 1.3rem !important; }

  /* تصاویر */
  img {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  /* موبایل کوچک */
  body {
    font-size: 14px;
    padding: 0;
  }

  nav {
    padding: 0;
  }

  /* حذف padding افقی از بخش‌ها برای چسبیدن به دیواره‌ها */
  section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* تنظیم padding داخلی کانتینرها */
  .max-w-7xl {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  .hero h1 {
    font-size: 1.75rem !important;
  }

  .hero h2 {
    font-size: 1.5rem !important;
  }

  .hero p {
    font-size: 0.95rem !important;
  }

  /* دکمه‌های اصلی */
  .main-btn {
    padding: 12px 16px !important;
    font-size: 13px !important;
    min-width: 140px !important;
  }

  /* کارت‌ها */
  .virtue-card, .act-card, .hadith-card {
    padding: 16px !important;
    margin: 10px 0;
  }

  .card-title {
    font-size: 1.1rem !important;
  }

  /* نوتیفیکیشن */
  .notification {
    padding: 12px 16px;
    font-size: 14px;
  }

  /* آیکون‌ها */
  .text-6xl { font-size: 2.5rem !important; }
  .text-3xl { font-size: 1.2rem !important; }
  .text-xl { font-size: 1rem !important; }
  .text-2xl { font-size: 1.1rem !important; }
}

@media (max-width: 360px) {
  /* موبایل خیلی کوچک */
  body {
    font-size: 13px;
  }

  .hero h1 {
    font-size: 1.5rem !important;
  }

  .hero h2 {
    font-size: 1.25rem !important;
  }

  /* دکمه‌ها */
  .btn {
    padding: 12px 16px;
    font-size: 14px;
  }

  /* کارت‌ها */
  .virtue-card, .act-card, .hadith-card {
    padding: 12px !important;
  }
}

/* Touch-friendly برای موبایل */
@media (hover: none) and (pointer: coarse) {
  .virtue-card:hover, .act-card:hover {
    transform: none !important;
  }

  .btn:hover {
    transform: none !important;
  }

  .main-btn:hover {
    transform: none !important;
  }
}

/* اطمینان از readability در موبایل */
@media (max-width: 768px) {
  .hadith-card p {
    font-size: 15px;
    line-height: 1.7;
  }

  .benefit-item p {
    font-size: 14px;
  }

  .act-card p {
    font-size: 14px;
    line-height: 1.6;
  }
}

/* Print styles */
@media print {
  nav,
  footer,
  .no-print {
    display: none !important;
  }

  body {
    font-size: 12pt;
  }
}
