/* =========================================================
   Etesam Academy — main.css
   استایل‌های عمومی کل سایت (بدون inline در HTML)
   ========================================================= */

/* ----- Base ----- */
body {
  font-family: 'Vazirmatn', Tahoma, system-ui, sans-serif;
}

/* ----- Glass nav ----- */
.glass {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ----- Logos ----- */
.logo-header {
  height: 6.25rem;
  width: auto;
  object-fit: contain;
  max-width: 160px;
}
.logo-footer {
  height: 9rem;
  width: auto;
  object-fit: contain;
  max-width: 160px;
}
.logo-panel {
  height: 6.25rem;
  width: auto;
  object-fit: contain;
  max-width: 140px;
}
.object-contain {
  object-fit: contain;
  border-radius: 25px;
}

/* ----- Buttons (component) ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 0.75rem;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  transition: 0.15s ease;
}
.btn-primary {
  background: #0284c7;
  color: #fff;
}
.btn-primary:hover {
  background: #0369a1;
}
.btn-block {
  display: flex;
  width: 100%;
  margin-top: 1rem;
}

/* ----- Select / form (RTL fix) ----- */
select,
select.bg-white {
  direction: rtl !important;
  text-align: right !important;
  background-color: #fff !important;
  color: #0f172a !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 0.625rem 2.25rem 0.625rem 0.75rem !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
  background-size: 12px 8px;
  line-height: 1.5;
  min-height: 2.5rem;
}
select option {
  direction: rtl;
  text-align: right;
  background: #fff;
  color: #0f172a;
  padding: 8px 12px;
}
select:focus {
  outline: 2px solid #0ea5e9;
  outline-offset: 1px;
}
input,
textarea {
  background-color: #fff;
  color: #0f172a;
}

/* ----- Mobile hamburger menu ----- */
.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  cursor: pointer;
  gap: 4px;
}
.hamburger span {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: #334155;
}
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  z-index: 60;
}
.mobile-menu.open {
  display: block;
}
.mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: #334155;
  font-weight: 500;
}
.mobile-menu a:hover {
  background: #f8fafc;
  color: #0284c7;
}
@media (min-width: 768px) {
  .hamburger {
    display: none;
  }
  .mobile-menu {
    display: none !important;
  }
}

/* ----- Skeleton loading ----- */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
  border-radius: 0.75rem;
  min-height: 120px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ----- Error box ----- */
.error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
}
.error-box button {
  margin-top: 0.75rem;
  background: #b91c1c;
  color: #fff;
  border: 0;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

/* ----- CTA pattern (home) ----- */
.cta-dot-pattern {
  background-image: radial-gradient(circle at 20% 50%, white 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ----- Register: language box (hidden by default) ----- */
.lang-box-hidden {
  display: none;
}
.lang-box-visible {
  display: block;
}

/* ----- Horizontal scroll thin scrollbar ----- */
.scroll-x-thin {
  scrollbar-width: thin;
}

/* ----- Accessibility ----- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}


/* ----- Teacher avatar ----- */
.teacher-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  object-fit: cover;
  flex-shrink: 0;
  background: #e2e8f0;
}
.teacher-avatar-fallback {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #38bdf8, #8b5cf6);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
}

/* چرخش مداوم ۳۶۰ درجه تصویر هیرو — در جای خودش */
@keyframes etesam-spin-360 {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.rotate-image {
  transform-origin: center center;
  animation: etesam-spin-360 12s linear infinite;
  will-change: transform;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* احترام به کاهش حرکت در تنظیمات سیستم */
@media (prefers-reduced-motion: reduce) {
  .rotate-image {
    animation: none;
  }
}
