:root {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-glass: rgba(255, 255, 255, 0.85);
  --bg-hover: #f1f5f9;
  --bg-active: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --border-light: #e2e8f0;
  --border-glass: rgba(15, 23, 42, 0.08);

  --color-border-hover: #cbd5e1;
  --color-primary-hover: #334155;
  --color-success: #16a34a;
  --color-error: #dc2626;
  --color-player-bg: #000000;
  --color-accent: #2563eb;
  --color-theme: #0f172a;
  --color-theme-aa: #0f172aaa;
  --color-theme-44: #0f172a44;
  --color-theme-11: #0f172a11;
  --color-success: #10b981;
  --color-danger: #ef4444;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glass-top: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
  --shadow-glass-bottom: 0 -10px 30px -10px rgba(0, 0, 0, 0.05);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-full: 9999px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s var(--ease-out);
  --transition-normal: 0.3s var(--ease-out);
  --font-xs: clamp(0.75rem, 0.7vw + 0.5rem, 0.875rem);
  --font-sm: clamp(0.875rem, 0.8vw + 0.5rem, 1rem);
  --font-base: clamp(1rem, 1vw + 0.5rem, 1.125rem);
  --bg-body: #f1f5f9; /* پس زمینه کمی تیره تر برای برجسته شدن کارت های سفید */
  --text-secondary: #64748b;
  --primary-accent: #0ea5e9;

  /* تم یکپارچه سفید و طوسی برای تمامی کارت‌ها */
  --card-gradient: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  --card-border: #e2e8f0;
  --card-shadow:
    0 4px 15px -3px rgba(0, 0, 0, 0.05), 0 2px 6px -2px rgba(0, 0, 0, 0.025);
  --card-shadow-hover:
    0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  --btn-bg: #f1f5f9;
  --btn-hover: #e2e8f0;

  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-xs: clamp(0.7rem, 0.75vw, 0.8rem);
  --font-sm: clamp(0.85rem, 0.9vw, 1rem);
  --font-base: clamp(1rem, 1.1vw, 1.125rem);
  --font-lg: clamp(1.25rem, 2vw, 1.8rem);

  --radius-sm: 0.375rem;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 15px rgba(14, 165, 233, 0.2);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --slider-aspect: 21 / 9;
  --font-lg: clamp(1.25rem, 1.5vw + 0.5rem, 1.5rem);
  --color-border: #e2e8f0;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;

  --footer-bg: #ffffff;
  --footer-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --accent-color: #3b82f6;
  --transition-speed: 0.2s;
  --badge-bg: #f8fafc;
  --badge-border: #cbd5e1;
  --top-color: #3b82f6;
  --top-glass: rgba(15, 23, 42, 0.3);
}
[data-theme="dark"] {
  --bg-base: #020617;
  --bg-surface: #0f172a;
  --bg-surface-glass: rgba(15, 23, 42, 0.85);
  --bg-hover: #1e293b;
  --bg-active: #334155;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #64748b;

  --border-light: #1e293b;
  --border-glass: rgba(255, 255, 255, 0.08);

  --color-accent: #3b82f6;
  --shadow-glass-top: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glass-bottom: 0 -10px 30px -10px rgba(0, 0, 0, 0.5);
  --footer-bg: #0f172a;
  --footer-border: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-color: #60a5fa;
  --top-color: #3b82f6;
  --badge-bg: #1e293b;
  --badge-border: #334155;
  --color-theme: #2563eb;
  --color-theme-aa: #2563ebaa;
  --color-theme-44: #2563eb44;
  --color-theme-11: #2563eb11;
  --top-glass: #2563eb;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
::-webkit-scrollbar {
  width: 4px;
  border-radius: var(--radius-md);
  display: none;
}
::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--border-light);
  border-radius: 3px;
}
.navbar-link *,
.close-modal *, .btn-drawer-close {
  pointer-events: none;
}
.hidden {
  display: none;
}
.navbar-link:hover {
  cursor: pointer;
}
body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal);
  overflow-x: hidden;
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 4.5rem;
}

/* --- login ---------------------------------------- */

.not-login {
  display: none !important;
}
.otp-card-login,
.phone-card-login {
  min-height: max-content;
  display: grid;
  place-items: center;
  color: var(--text-tertiary);
  margin-top: 1rem;
}

.otp-card-login {
}
.phone-card-login {
}
/* ------------------------------------------------- */
.upload-progress-wrap {
  margin-top: 10px;
}
.upload-progress-wrap.hidden {
  display: none;
}
.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #2a2a2a;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: #22c55e;
  transition: width 0.15s ease;
}
.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}
/* ------------------------------------------------- */
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
button {
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
  color: inherit;
  outline: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
}
.btn-primary {
  background-color: var(--text-primary);
  color: var(--bg-surface);
}
.btn-primary:active {
  transform: scale(0.98);
}
[data-theme="dark"] .btn-primary {
  background-color: var(--color-accent);
  color: #fff;
}

.btn-icon {
  width: 2rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.btn-icon:hover,
.btn-icon:active {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}
.btn-icon-ep {
  width: 1.5rem;
  height: 2rem;
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.btn-icon-ep:hover,
.btn-icon-ep:active {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}
/* .sys-ticker {
    background-color: var(--bg-base); border-bottom: 1px solid var(--border-light);
    height: 2rem; display: flex; align-items: center; overflow: hidden;
    font-size: var(--font-xs); font-weight: 500; z-index: 50; position: relative;
}
.ticker-track { display: flex; gap: 3rem; white-space: nowrap; animation: scrollTicker 40s linear infinite; }
.sys-ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes scrollTicker { 0% { transform: translateX(0); } 100% { transform: translateX(50%); } }
*/
.tick-item {
  display: inline-flex;
  gap: 0.5rem;
  color: var(--text-secondary);
}
.tick-sym {
  color: var(--text-primary);
  font-weight: 600;
}
.t-up {
  color: var(--color-success);
}
.t-down {
  color: var(--color-danger);
}

.sys-ticker {
  display: flex;
  overflow: hidden;
  width: 100%;
}

.ticker-track {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 100%; /* ضمانت پر شدن عرض */
  justify-content: space-around;
  animation: scrollRTL 30s linear infinite;
  width: 100%;
  background-color: var(--bg-base);
  border-bottom: 1px solid var(--border-light);
  height: 2rem;
  align-items: center;
  font-size: var(--font-xs);
  font-weight: 500;
}

.sys-ticker:hover .ticker-track {
  animation-play-state: paused;
}

/* انیمیشن برای صفحات راست‌به‌چپ (RTL) */
@keyframes scrollRTL {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100%); /* مثبت برای حرکت به سمت چپ در RTL */
  }
}

.sys-ticker:hover .ticker-track {
  animation-play-state: paused;
}

.sys-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 4rem;
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal);
}
.header-hidden {
  transform: translateY(-100%);
}
.header-visible {
  transform: translateY(0);
  box-shadow: var(--shadow-glass-top);
}
.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: var(--font-base);
}
.brand-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--color-accent), #60a5fa);
  display: grid;
  place-items: center;
  color: #fff;
}

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.mobile-header-center {
  display: flex;
  justify-content: center;
}
.mobile-header-end {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}

.desk-nav {
  display: none;
  flex: 1;
  height: 100%;
  margin-right: 2rem;
}
.desk-nav-list {
  display: flex;
  gap: 0.5rem;
  height: 100%;
}
.nav-item,
.desk-nav .navbar-link {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}
.desk-nav .navbar-link {
  color: var(--text-secondary);
  height: max-content;
  margin: auto;
  border-radius: 1rem;
  padding: 0.4rem 0.9rem;
}

.nav-trigger {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: all var(--transition-fast);
}
.nav-trigger:hover,
.nav-item.active .nav-trigger,
.desk-nav .navbar-link:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}
.nav-trigger svg {
  transition: transform var(--transition-fast);
}
.nav-item.active .nav-trigger svg {
  transform: rotate(180deg);
}

.dropdown-panel {
  position: absolute;
  top: calc(100% - 0.5rem);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  min-width: 600px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all var(--transition-fast);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  transform: translateY(10px);
  z-index: 60;
  transform-origin: top center;
}
.nav-item.active .dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}


.dropdown-col-title {
  font-size: var(--font-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-link {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  margin-left: -0.75rem;
  margin-right: -0.75rem;
}
.dropdown-link:hover {
  background: var(--bg-hover);
}
.link-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-base);
  display: grid;
  place-items: center;
  color: var(--color-accent);
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}
.link-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.link-title {
  font-weight: 600;
  font-size: var(--font-sm);
  color: var(--text-primary);
}
.link-desc {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  line-height: 1.4;
}

.sys-modal {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  opacity: 0;
  transition: all var(--transition-normal);
  padding: 1.5rem;
  z-index: 1000;
  margin: 0rem 1rem;
}
.modal-overlay.active .sys-modal {
  transform: scale(1);
  opacity: 1;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}
.sheet-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}
.sheet-overlay.active {
  opacity: 1;
  visibility: visible;
}
.mobile-learning-sheet {
  position: fixed;
  /* bottom: 0; */
  left: 0;
  right: 0;
  top: 5%;
  max-height: 98%;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1.5rem;
  z-index: 85;
  transform: translateY(100%);
  transition:
    transform var(--transition-normal),
    visibility var(--transition-normal);
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  visibility: hidden;
}
.mobile-learning-sheet.active {
  transform: translateY(0);
  visibility: visible;
  box-shadow: var(--shadow-glass-top);
}
.drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}
.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sys-drawer {
  position: absolute;
  /* top: 0;
  right: 0;
  bottom: 0; */
  top: 90%;
  left: 10%;
  /* bottom: 0; */

  width: 85vw;
  max-width: 320px;
  background-color: var(--bg-surface);
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  /* transform: translateX(-10%); */
  /* transition: transform var(--transition-normal); */
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.sys-drawer.active {
  display: flex;
  transform: translateX(0);
}

/* Drawer internal */
.drawer-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.user-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  /* padding: 0.7rem;
  background-color: var(--bg-base);
  border-radius: var(--radius-lg); */
  cursor: pointer;
}
.user-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background-color: var(--border-light);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
}
.user-info h3 {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.user-info p {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
}
.btn-add-ep-admin {
  background-color: var(--btn-primary);
  color: var(--primary-accent);
  border: 1px solid var(--primary-accent);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--font-xs);
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.drawer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.5rem;
  width: 100%;
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--text-primary);
  transition: background-color var(--transition-fast);
  text-align: right;
}
.drawer-link:active {
  background-color: var(--bg-active);
}
.drawer-link svg {
  color: var(--text-tertiary);
}
.drawer-links .btn-add-ep-admin {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0.5rem;
  width: 100%;
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--text-primary);
  transition: background-color var(--transition-fast);
  text-align: right;
  border: none;
}
.drawer-footer {
  padding: 0.5rem 1.5rem;
  border-top: 1px solid var(--border-light);
}
.link-danger {
  color: var(--color-danger);
}
.link-danger svg {
  color: var(--color-danger);
}
/* Support Grid & Forms */
.support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.support-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}
.support-item:hover {
  transform: translateY(-2px);
}
.support-item.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.support-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 1px solid var(--border-light);
  display: grid;
  place-items: center;
  color: var(--color-accent);
  font-size: 1.2rem;
  overflow: hidden;
}
.support-name {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.support-status {
  font-size: 0.65rem;
  color: var(--text-tertiary);
}
.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-base);
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-family: inherit;
  font-size: var(--font-sm);
  outline: none;
}
.form-control:focus {
  border-color: var(--color-accent);
}

/* Bottom Nav */
.sys-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4.5rem;
  z-index: 40;
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom);
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal);
}
.bottom-nav-hidden {
  transform: translateY(100%);
}
.bottom-nav-visible {
  transform: translateY(0);
  box-shadow: var(--shadow-glass-bottom);
}
.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: var(--text-tertiary);
  width: 100%;
  height: 100%;
  transition: color var(--transition-fast);
}
.bnav-item.active {
  color: var(--color-accent);
}
.bnav-item span {
  font-size: 0.65rem;
  font-weight: 500;
}
.bnav-icon {
  transition: transform var(--transition-fast);
}
.bnav-item:active .bnav-icon {
  transform: scale(0.9);
}
.container {
  flex: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.7rem 0.0rem;
  width: 100%;
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-hover) 25%,
    var(--bg-active) 50%,
    var(--bg-hover) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
/* ----file 2------------------------------------------------------------------------------------------------*/

.main-container {
  width: 100%;
  height: 80vh;
  /* display: grid;
  grid-template-columns: 3.5fr 1.2fr; */
  display: flex;
  flex-direction: row;
  gap: 24px;
  width: 100%;
  max-width: 1600px;
  align-items: stretch;
}

/* Slider */
/* Container اصلى برای حفظ ساختار عمودی */
.slider-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Slider - بدون تغییر در ابعاد و نسبت تصویر */
.slider-section {
  width: 100%;
  height: 100%; /* تغییر از 100% به auto برای جلوگیری از کلاپس شدن در wrapper جدید */
  /* aspect-ratio: var(--slider-aspect); */
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background-color: #cbd5e1;
  box-shadow: var(--card-shadow);
  touch-action: pan-y;
  /* border: 1px solid var(--card-border); */
}

.slider-track {
  display: flex;
  height: 100%;
  cursor: grab;
  will-change: transform;
}
.slider-track:active {
  cursor: grabbing;
}

.slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  user-select: none;
  -webkit-user-drag: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
}

.slide-title {
  width: max-content;
  position: absolute;
  min-width: 30%;
  max-width: 70%;
  right: 0;
  top: 10%;
  padding: 1rem 1.5rem;
  background: linear-gradient(
    to left,
    var(--color-theme-aa),
    var(--color-theme-aa),
    var(--color-theme-44),
    var(--color-theme-11),
    #0000
  );
  color: #fff;
  font-weight: bold;
  font-size: 1.1rem;
}

.slide img {
  width: 100%;
  height: 100%;
  /* border: 1px solid var(--border-glass); */
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.slider-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 12px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.slider-dot:hover {
  background: rgba(255, 255, 255, 1);
}

.slider-dot.active {
  width: 28px;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   استایل‌های گالری زیر اسلایدر
   ========================================== */
.slider-gallery-container {
  width: 100%;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  padding: 0.5rem;
  box-shadow: var(--shadow-md);
  flex-direction: row;
  justify-content: space-between;
  /* gap: 0.2rem; */
  margin-top: 0.5rem;
  border-radius: 12px;
}
.slide {
  position: relative;
}
.slide-edit-btn,
.slide-delete-btn {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px; /* راست در LTR، چپ در RTL */
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: var(--accent-color);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  padding-bottom: 0.2rem;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  box-shadow: var(--shadow-lg);
}
.slide-edit-btn {
  left: 4rem;
}
.slide-delete-btn {
  left: 1rem;
}

.slide-delete-btn:hover {
  background: var(--accent-color); /* قرمز روی هاور */
  opacity: 0.8;
}
.gallery-header {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  /* gap: 0.5rem; */
  /* margin-bottom: 16px; */
}
/* .gallery-header button { */
.slider-gallery-container button {
  height: max-content;
  width: max-content;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--text-primary);
  color: var(--bg-surface);
  padding: 0.5rem;
  font-size: var(--font-sm);
  border-radius: var(--radius-md);
}
/* .gallery-header h3 { */
.slider-gallery-container h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.gallery-grid {
  width: 80%;
  height: 100%;
  display: flex;
  flex-direction: row;
  background-color: #0000;
  overflow-x: scroll;
  flex-wrap: nowrap;
  gap: 0.2rem;
}
.gallery-grid::-webkit-scrollbar {
  /* width: 4px; */
  height: 4px;
}

.gallery-item {
  flex-shrink: 0;
  position: relative;
  width: 150px;
  height: 100%;
  /* aspect-ratio: 16 / 9; */
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  background-color: var(--bg-surface);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-item .item-title {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 0.5rem;
  background: #000a;
  font-size: var(--font-xs);
  width: 100%;
  color: #fff;
}
/* Sidebar Base Elements */
.sidebar-section {
  flex: 35%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  min-height: 0;
}

.unified-card {
  /* background: var(--card-gradient); */
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* Wallet */
.integrated-wallet {
  width: 100%;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  min-height: 0;
}

.integrated-wallet::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -30%;
  width: 250px;
  height: 250px;
  background: radial-gradient(
    circle,
    rgba(14, 165, 233, 0.05) 0%,
    transparent 60%
  );
  border-radius: 50%;
  pointer-events: none;
}
.wallet-info-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 2;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.card-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}
.card-balance-wrapper {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.card-balance {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}
.card-currency {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.wallet-address {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glass-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.glass-btn:hover {
  background: var(--btn-hover);
  color: var(--text-primary);
}
.card-bottom .glass-btn {
  background: var(--bg-surface);
}
.text-mute {
  margin-top: 0.5rem;
  font-size: clamp(0.78rem, 0.75vw + 0.5rem, 0.9rem);
  color: var(--text-tertiary);
}
.wallet-actions-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  margin-top: 0.5rem;
  z-index: 2;
}
.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}
.action-icon-wrapper {
  width: 44px;
  height: 44px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  transition: var(--transition);
}
.action-item:hover .action-icon-wrapper {
  background: #ffffff;
  box-shadow: var(--card-shadow);
  color: var(--primary-accent);
  transform: translateY(-3px);
  border-color: rgba(14, 165, 233, 0.2);
}

.action-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  transition: var(--transition);
}
.action-item:hover .action-label {
  color: var(--text-primary);
}

.action-item[data-action="smart"] .action-icon-wrapper {
  border-color: rgba(14, 165, 233, 0.3);
  background: rgba(14, 165, 233, 0.05);
  color: var(--primary-accent);
}

/* Courses - Unified Design */
.courses-wrapper-one {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.course-card-one {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 64px;
  cursor: pointer;
  transition: var(--transition);
}
.course-card-one:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(14, 165, 233, 0.3);
  transform: translateY(-2px);
}

.course-info-one {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.course-icon-wrapper-one {
  width: 36px;
  height: 36px;
  background: var(--bg-surface);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  transition: var(--transition);
}
.course-card-one:hover .course-icon-wrapper-one {
  color: var(--primary-accent);
  border-color: rgba(14, 165, 233, 0.3);
  background: rgba(14, 165, 233, 0.05);
}
.course-arrow-one {
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: var(--transition);
}
.course-card-one:hover .course-arrow-one {
  color: var(--primary-accent);
  transform: translateX(-4px);
}
.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: #0f172a;
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
  white-space: nowrap;
}
.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
/* ----file 3----------------------------------------------------------------------------------------------------- */
/* ========================================================================
      LAYOUT
   ======================================================================== */
.app-main {
  width: 100%;
  padding: var(--space-lg) 0px;
}
.state-container {
  text-align: center;
  padding: var(--space-xl) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  justify-content: center;
}
.spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid var(--border-light);
  border-top-color: var(--color-primary);
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 900px) {
  .course-card {
    grid-template-columns: repeat(3, 1fr);
  }
  .mobile-learning-sheet {
    max-width: 500px;
    margin: auto;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
  }
}

.instructor-profile {
  display: flex;
  gap: var(--space-sm);
  width: 100%;
  min-width: 0;
}
.instructor-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 1px solid var(--border-light);
  font-weight: 900;
  font-size: var(--font-sm);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.instructor-text {
  min-width: 0;
  flex: 1;
}
.instructor-main-title {
  font-size: clamp(14px, 4vw, 17px);
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.instructor-subtitle {
  font-size: clamp(11px, 3.2vw, 14px);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.course-stats {
  display: flex;
  gap: var(--space-sm);
  align-items: stretch;
  margin-right: auto;
  flex-direction: row;
  justify-content: end;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-muted);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  transition: 0.2s;
  white-space: nowrap;
  width: max-content;
}
.stat-item:hover {
  background: var(--bg-surface);
  border-color: var(--color-border-hover);
}
.stat-value {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  display: block;
  direction: rtl;
  white-space: nowrap;
}
.stat-label {
  font-size: 10.5px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
}

/* ========================================================================
       COLUMN 1 – COURSE META
    ======================================================================== */

.meta-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border-light);
}
.meta-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.meta-label {
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

/* ========================================================================
   MODAL STYLES (استایل‌های مدال افزودن قسمت)
   ======================================================================== */

.modal-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-secondary);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0.5rem;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  background: var(--bg-base);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
}

.form-group input:focus {
  border-color: var(--text-primary);
}

.form-group small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #888;
}
.btn-submit {
  background-color: var(--color-theme);
  color: var(--text-primary);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}
.btn-cancel {
  background: var(--bg-secondary);
  color: #333;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

.modal-actions {
  width: 100%;
  position: sticky;
  bottom: 0;
  left: 0;
  background-color: var(--bg-surface);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 0.5rem 1rem;
}
.modal-actions button {
  flex: 1;
  height: 44px;
  border-radius: var(--radius-md);
  padding: 0;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-surface);
  border: none;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
}

.error-message {
  color: #ef4444;
  font-size: 11px;
  margin-top: 4px;
}

.episode-card-broker {
  background: var(--bg-surface);
  padding: 8px var(--space-sm);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: 0.25s ease;
  opacity: 0.7;
  width: 100%;
  height: 54px;
  flex-shrink: 0;
}
.episode-card-broker:hover {
  opacity: 1;
  background: var(--color-bg);
}
.episode-card-broker.active {
  opacity: 1;
  border-color: var(--text-primary);
  box-shadow: var(--shadow-md);
  transform: scale(1.01);
  background: var(--color-bg);
}

.episode-card-broker.active .ep-file-type {
  background: var(--bg-secondary);
  color: var(--text-base);
}
.ep-title {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-meta {
  font-size: 11px;
  color: var(--text-secondary);
}
.ep-text-content {
  min-width: 0;
  flex: 1;
}

/* ========================================================================
       COLUMN 3 – VIDEO PLAYER (ADVANCED)
    ======================================================================== */
.player-wrapper {
  background: var(--color-player-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  display: flex;
  width: 100%;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  user-select: none;
  height: 100%;
  min-height: 0;
  touch-action: none;
  direction: ltr;
}
video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  transition: opacity 0.3s;
  cursor: pointer;
}

.player-wrapper:fullscreen,
.player-wrapper:-webkit-full-screen {
  aspect-ratio: unset;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}
.player-wrapper:fullscreen video,
.player-wrapper:-webkit-full-screen video {
  object-fit: contain;
}

.brightness-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  z-index: 2;
  transition: background 0.1s;
}

.gesture-indicator {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 20;
  pointer-events: none;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 8px;
}
.gesture-indicator svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gesture-indicator.show {
  opacity: 1;
}

/* آیکون های راهنمای کناری */
.side-hint-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  color: rgba(255, 255, 255, 0.7);
  width: 32px;
  height: 32px;
  display: none;
  place-items: center;
  z-index: 15;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.side-hint-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.side-hint-icon.left-hint {
  left: 1rem;
}
.side-hint-icon.right-hint {
  right: 1rem;
}

@media (pointer: coarse) {
  .side-hint-icon {
    display: grid;
  }
  .player-wrapper.playing.idle .side-hint-icon {
    opacity: 0;
  }
  .player-wrapper.paused .side-hint-icon {
    opacity: 0;
  }
}

.audio-equalizer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-player-bg);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 3;
  pointer-events: none;
}
.player-wrapper.is-audio .audio-equalizer {
  display: flex;
}
.player-wrapper.is-audio video {
  opacity: 0;
}
.eq-bar {
  width: 8px;
  height: 15px;
  background: var(--color-success);
  border-radius: 4px;
  animation: eqAnim 1s ease-in-out infinite;
}
.eq-bar:nth-child(2) {
  animation-delay: 0.2s;
}
.eq-bar:nth-child(3) {
  animation-delay: 0.4s;
}
.eq-bar:nth-child(4) {
  animation-delay: 0.1s;
}
.eq-bar:nth-child(5) {
  animation-delay: 0.3s;
}
@keyframes eqAnim {
  0%,
  100% {
    height: 15px;
  }
  50% {
    height: 60px;
  }
}
.player-wrapper.paused .eq-bar {
  animation-play-state: paused;
}

.center-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  cursor: pointer;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  z-index: 10;
}
.player-wrapper.playing .center-play {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.3);
  pointer-events: none;
}
.center-play svg {
  width: 32px;
  height: 32px;
  fill: white;
  stroke: none;
  margin-left: 4px;
}

.custom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem var(--space-md) var(--space-md);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 10;
}
.player-wrapper.playing.idle .custom-controls {
  opacity: 0;
  pointer-events: none;
}

.progress-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  margin-bottom: var(--space-sm);
  cursor: pointer;
  position: relative;
  transition: height 0.2s;
}
.progress-container:hover {
  height: 8px;
}
.progress-filled {
  width: 0%;
  height: 100%;
  background: var(--color-success);
  border-radius: 5px;
  pointer-events: none;
  position: relative;
}
.progress-filled::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  transition: 0.2s;
}
.progress-container:hover .progress-filled::after {
  opacity: 1;
}

.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}
.controls-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ctrl-btn {
  padding: 4px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}
.ctrl-btn:hover {
  color: var(--color-success);
}
.ctrl-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ctrl-btn.filled svg {
  fill: currentColor;
  stroke: none;
}

.time-display {
  font-size: var(--font-xs);
  font-variant-numeric: tabular-nums;
  direction: ltr;
  margin-left: 0.5rem;
}

.volume-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.vol-slider {
  width: 0;
  opacity: 0;
  transition: all 0.3s;
  cursor: pointer;
  accent-color: var(--color-success);
  height: 4px;
}
.volume-group:hover .vol-slider {
  width: 60px;
  opacity: 1;
}

.speed-btn {
  font-size: var(--font-xs);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* ----file 4----------------------------------------------------------------------------------------------- */
.banner-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
}

.banner-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 0.9rem;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.8rem;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: 0.2s;
  cursor: pointer;

  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;

  text-decoration: none;
  color: inherit;
}
.banner-card:hover {
  border-color: var(--border-light);
  background: var(--color-surface-muted);
}
.banner-card:active {
  background: var(--color-surface-muted);
}

/* زیرساخت آواتار: فقط src را عوض کن */
.banner-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--color-bg);
  object-fit: cover;
  display: block;
}

.banner-content h3 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}
.banner-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.banner-cta {
  font-size: 0.8rem;
  color: var(--text-primary);
  background: var(--color-bg);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  white-space: nowrap;
}
/* ---file 6------------------------------------------------------------------------------------------------ */
.lovely-wrapper {
  width: 100%;
  padding: var(--space-lg) 0;
  text-align: right;
}

.section-title {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 800;
  margin-bottom: 0.25rem; /* کاهش فاصله */
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.title-icons {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.title-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
}

.intro-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

/* Cards Grid */
.topic-cards {
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  width: 100%;
}
.topic-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  justify-content: start;
  padding: 10px;
  height: 120px;
  transition: 0.2s ease;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent; /* جلوگیری از افکت لمس نامطلوب */
}
.topic-card:hover {
  background: var(--bg-surface);
  border-color: var(--color-border-hover);
}
.topic-card:active {
  background: var(--color-surface-muted);
} /* جلوگیری از "آب شدن" */

/* آواتار حرفه‌ای */
.topic-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  border: 1px solid var(--color-border);
  display: block;
  flex-shrink: 0;
  place-items: center;
  font-weight: 800;
  color: var(--color-primary);
  font-size: 12px;
  overflow: hidden;
  text-transform: uppercase;
}
.topic-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.topic-avatar.has-image img {
  display: block;
}
.topic-avatar.has-image .avatar-fallback {
  display: none;
}

.topic-title {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.topic-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.8;
  text-align: center;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  padding: 1rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(14px) scale(0.98);
  opacity: 0;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}
.modal.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.modal-title {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-primary);
}
.modal-close {
  background: transparent;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-secondary);
}

.modal-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border-light);
  border-radius: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  background: var(--bg-surface);
  transition: 0.2s ease;
}
.modal-link:hover {
  border-color: var(--color-border-hover);
  background: var(--bg-surface);
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  color: var(--color-icon);
}
.icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* --------------------------------------------------------------------------------------------------------- */
.spacer {
  flex-grow: 1; /* Pushes footer to the bottom */
}

/* Footer Architecture - Desktop Base */
.enterprise-footer {
  background-color: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  padding-top: 1.5rem;
  width: 100%;
}

.footer-container {
  max-width: 100%;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

/* Brand Section (Logo + Text) */
.brand-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 380px;
}

.brand-logo-box {
  width: 48px;
  height: 48px;
  background-color: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: border-color var(--transition-speed) ease;
}

.brand-logo-box:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.brand-logo-box svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.brand-name {
  font-weight: 700;
  color: var(--text-main);
  font-size: 1.1rem;
}

.brand-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

/* Horizontal Navigation */
.footer-nav {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

.footer-nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color var(--transition-speed) ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--accent-color);
  outline: none;
}

/* Interactive Elements (Social + Licenses) */
.interactive-section {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.social-links {
  display: flex;
  gap: 0.5rem;
  border-right: 1px solid var(--border-light);
  padding-right: 1.25rem;
}

.social-links a {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed) ease;
  padding: 0.4rem;
  border-radius: 6px;
  background-color: var(--badge-bg);
  border: 1px solid var(--badge-border);
}

.social-links a:hover,
.social-links a:focus-visible {
  color: var(--accent-color);
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.icon {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

/* Compact Licenses */
.licenses-container {
  display: flex;
  gap: 0.5rem;
}

.license-badge {
  width: 42px;
  height: 42px;
  background-color: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-speed) ease;
  filter: grayscale(100%);
  opacity: 0.8;
}

.license-badge:hover,
.license-badge:focus-visible {
  filter: grayscale(0%);
  opacity: 1;
  border-color: var(--text-muted);
  transform: translateY(-2px);
  color: var(--text-main);
}

.license-badge svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Bottom Copyright Bar */
.footer-bottom {
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--footer-border);
  text-align: center;
  background-color: var(--badge-bg);
}

.copyright-text {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

/* --- Responsive Design (Mobile & Tablet) --- */

/* Tablet / Small Desktop */

/* --------------------------------------------------------------------------------------------------------- */

.login-btn {
  display: block;
}
.login-icon {
  display: none;
}
.course-actions-group {
  width: 100%;
}

/* دکمه‌های ادمین */
.btn-primary-admin {
  background-color: var(--btn-primary);
  color: var(--text-main);
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}
.btn-primary-admin:hover {
  background-color: var(--btn-hover);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all var(--transition-normal);
  max-height: 100%;
}
.modal-overlay.active,
.modal-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: var(--radius-md, 8px) !important;
  width: 100%;
  position: relative;
  max-width: 420px;
  max-height: 99vh;
  padding: 1.25rem 1.25rem 0.1rem;
  box-shadow: var(--shadow-md);
  direction: rtl;
  overflow: hidden scroll;
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group input[type="file"],
.form-group select {
  padding: 12px;
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  background-color: var(--bg-base);
  color: var(--text-primary);
}

.file-preview {
  width: 100%;
  max-height: 150px;
  margin-bottom: 14px;
  border-radius: 6px;
  overflow: hidden;
}

.file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-actions-gallery {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.edit-course-btn,
.add-ep-btn,
.action-item:active {
  background-color: var(--btn-primary);
  color: var(--primary-accent);
  border: 1px solid var(--primary-accent);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--font-xs);
}

.add-ep-btn {
  display: flex;
  justify-content: center;
  align-items: center;
}
/* .btn-primary { background: #10b981; color: #fff; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; }
.btn-secondary { background: #6b7280; color: #fff; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; } */
.error-message {
  color: #ef4444;
  font-size: 13px;
  margin-top: 6px;
}
.active-page {
  background-color: var(--bg-active);
}
/* ------------------------------ */
/* ============================================
User menu → Hover Dropdown (فقط دسکتاپ)
============================================ */
.user-menu-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.user-card .sys-drawer {
  position: absolute !important;
  width: 300px !important;
  max-width: 300px !important;
  height: auto !important;
  max-height: 75vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast),
    visibility var(--transition-fast);
}

.user-card:hover .sys-drawer,
.user-card .sys-drawer:hover {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  /* transform: translateY(0) !important; */
}
.user-card:hover .sys-drawer {
  display: flex !important;
  left: 0%;
}
.only-mobile {
  display: none;
}
.sys-drawer-menu {
  display: none;
}
/*========================================================================
     MOBILE RESPONSIVE TWEAKS 
  ======================================================================== */

@media (max-width: 992px) {
  .footer-container {
    justify-content: center;
    gap: 1.5rem 2rem;
  }
   .sub-title-main {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
    gap: 0;
  }
  .brand-section {
    max-width: 100%;
    width: 100%;
    justify-content: center;
  }
}

/* Mobile Phones */
@media (max-width: 640px) {
  .footer-container {
    flex-direction: column;
    align-items: center; /* وسط چین کردن محتوای کلی در موبایل */
    gap: 1.5rem;
    padding: 0 1.25rem;
  }

  .brand-section {
    align-self: flex-start; /* راست‌چین نگه‌داشتن فقط بخش برند */
    justify-content: flex-start;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center; /* وسط چین کردن منو */
    gap: 1rem 1.5rem;
    width: 100%;
  }

  .footer-nav a {
    padding: 0.25rem;
  }

  .interactive-section {
    width: 100%;
    justify-content: center; /* وسط چین کردن شبکه‌های اجتماعی و مجوزها */
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .social-links {
    /* حذف خط جداکننده در موبایل */
    border-right: none;
    padding-right: 0;
  }

  .footer-bottom {
    margin-top: 1.25rem;
  }
}

@media (max-width: 768px) {
  .sys-drawer-menu {
    position: fixed;
    display: none;
    inset: 0;
    max-width: 320px;
    background-color: var(--bg-surface);
    z-index: 95;
    box-shadow: var(--shadow-lg);
    transform: translateX(-10%);
    transition: transform var(--transition-normal);
    flex-direction: column;
    overflow: hidden;
  }
  .sys-drawer-menu.active {
    display: flex;
    transform: translateX(0);
  }
  /* هر ردیف = یک کارت */
  .table-wrapper tr {
    display: block;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.9rem;
    box-shadow: var(--shadow-sm);
  }

  
  .modal-overlay {
    padding: 0;
  }
  .modal-header {
    padding: 1rem 1rem 1rem;
  }
  .slide-title {
    width: 90%;
    padding: 0.5rem 1rem;
  }
  .modal-card {
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow-y: scroll;
    padding: 1rem 0.5rem;
    margin: 0;
  }
  form {
    margin-bottom: 3rem;
  }
  .modal-actions {
    position: fixed;
    bottom: 0;
  }
  .mobile-header-end {
    gap: 0;
  }
  .course-stats {
    flex-wrap: wrap;
    flex-direction: row;
    /* overflow-x: scroll; */
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    justify-content: start;
  }
  .stat-item {
    padding: 8px 5px;
  }
  .login-btn {
    padding: 0.5rem;
    white-space: nowrap;
  }
  
  .login-icon {
    display: block;
    margin-top: 0.2rem;
    padding: 0;
    color: var(--color-icon);
  }
  .wallet-actions-section {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-balance {
    font-size: 1.7rem;
  }
  .courses-wrapper-one {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .course-card-one {
    padding: 0 12px;
    height: 56px;
   
  }
  .course-info-one {
    font-size: 0.8rem;
    gap: 8px;
  }
  .course-icon-wrapper-one {
    width: 32px;
    height: 32px;
  }
  .course-icon-wrapper-one svg {
    width: 14px;
    height: 14px;
  }

  .courses-wrapper-one {
    grid-template-columns: 1fr 1fr;
  }
  .app-main {
    padding: 0.5rem 0;
  }
  .stat-item {
    /* flex: 1; */
    width: max-content;
    padding: 6px;
    min-width: 30%;
  }
  .stat-value {
    font-size: clamp(12px, 3vw, 14px);
  }

  .header-inner {
    padding: 0 1rem;
    margin: 0;
  }
  .logo-text {
    font-size: var(--font-sm);
  }
  .banner-avatar {
    width: 48px;
    height: 48px;
  }

  .banner-content h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
  }
  .banner-content h3::after {
    content: "›";
    color: var(--text-primary);
    font-size: 1.25rem;
    line-height: 1;
    margin-inline-start: auto;
  }
  .lovely-wrapper {
    padding: var(--space-xs);
    margin: 0;
  }
  .topic-card {
    background-color: var(--bg-surface);
    height: 100%;
  }
  .topic-cards {
    grid-template-columns: repeat(3, 1fr);
    padding: 0;
    gap: var(--space-xs);
  }
  .ticker-track {
    margin-right: 15rem;
  }
  .mobile-header-actions {
    gap: 0rem;
  }
  .mobile-learning-sheet {
    top: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0px;
    margin: 0;
    padding: 0.5rem 1rem;
  }
  .only-mobile {
    display: flex;
  }
  .course-card {
     border-radius: 0px;
  }
}
@media (max-width: 900px) {
  .brand {
    width: 100%;
    padding: 0;
  }
  .banner-cards {
    grid-template-columns: 1fr;
    padding: 0.5rem 1rem;
  }
  .banner-card {
    grid-template-columns: 48px 1fr;
  }
  .banner-cta {
    display: none;
  }

  .slider-wrapper {
    height: auto;
    min-height: 0;
    padding: 0 1rem;
  }

  .slider-section {
    height: auto;
    flex: none;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
  }

  .slider-track {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
  }

  .slide {
    position: relative;
    height: 100%;
  }

  .slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .gallery-header {
    gap: 0.6rem;
    justify-content: center;
  }
  .gallery-header h3 {
    font-size: var(--font-xs);
  }
  .gallery-header button {
    /* width: 100%; */
    font-size: var(--font-xs);
    /* padding: 0.2rem 0.1rem; */
    border-radius: var(--radius-sm);
  }
  .topic-avatar img {
    width: 100%;
    height: 100%;
  }
  .topic-avatar {
    height: max-content;
  }
  .main-container {
    width: 100%;
    height: max-content;
    flex-direction: column;
    gap: 0.5rem;
  }
  .sidebar-section {
    width: 100%;
    gap: 0.5rem;
  }
}
@media (max-width: 1023px) {
  /* .sys-ticker { display: none; } */
  .desk-only {
    display: none !important;
  }
  .mobile-header-actions {
    width: auto;
    margin-left: auto;
  }
  .mobile-header-center {
    display: none;
  }
}

@media (min-width: 1024px) {
  .mobile-only {
    display: none !important;
  }
  body {
    padding-bottom: 0;
  }
  .slider-wrapper {
    width: 100%;
    /* width: 90%; */
  }
  .sidebar-section {
    width: 20%;
  }
  .sys-bottom-nav,
  .mobile-only {
    display: none !important;
  }
  .desk-nav {
    display: flex;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .mobile-header-actions {
    width: auto;
  }
  .mobile-header-center {
    width: auto;
  }
  .mobile-header-end {
    width: auto;
  }

  .container {
    padding: 1rem 1rem;
  }
}
.mobile-learning-sheet ,.sheet-overlay {

}
