/* ============================================
   Components — Buttons, Cards, Forms, Header...
   ============================================ */

/* ===== Buttons ===== */
.btn {
  --btn-bg: transparent;
  --btn-color: var(--text-primary);
  --btn-border: var(--border-default);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.875rem 1.5rem;
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  background: var(--btn-bg);
  color: var(--btn-color);
  border: 1px solid var(--btn-border);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-out);
  position: relative;
  isolation: isolate;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover {
  transform: translateY(-1px);
  color: var(--btn-color);
}
.btn:active { transform: translateY(0); }
.btn svg { width: 1em; height: 1em; flex-shrink: 0; }

.btn-primary {
  --btn-bg: var(--color-green);
  --btn-color: var(--color-black);
  --btn-border: var(--color-green);
  font-weight: 700;
}
.btn-primary:hover {
  --btn-bg: var(--color-green-light);
  --btn-border: var(--color-green-light);
  box-shadow: var(--shadow-glow);
}

.btn-ghost {
  --btn-bg: transparent;
  --btn-border: var(--border-default);
}
.btn-ghost:hover {
  --btn-border: var(--accent);
  background: var(--accent-soft);
}

.btn-outline {
  --btn-bg: transparent;
  --btn-color: var(--accent);
  --btn-border: var(--accent);
}
.btn-outline:hover {
  --btn-bg: var(--accent);
  --btn-color: var(--color-black);
}

.btn-lg { padding: 1.125rem 2rem; font-size: var(--fs-base); }
.btn-sm { padding: 0.625rem 1.125rem; font-size: var(--fs-xs); }
.btn-icon { padding: 0.75rem; aspect-ratio: 1; }

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  position: relative;
  transition: all var(--dur-base) var(--ease-out);
  overflow: hidden;
}
.card:hover {
  border-color: var(--border-default);
  transform: translateY(-4px);
}
.card-hover-glow:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 24px 48px rgba(0, 204, 102, 0.12);
}
.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ===== Header / Navigation ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  padding: var(--sp-4) 0;
  transition: all var(--dur-base) var(--ease-out);
}
.site-header.scrolled {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}
[data-theme="light"] .site-header.scrolled {
  background: rgba(255, 255, 255, 0.85);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-ar-primary);
  font-weight: 700;
  font-size: var(--fs-md);
}
.nav-logo img { height: 38px; width: auto; }

.nav-menu {
  display: none;
  align-items: center;
  gap: var(--sp-6);
  font-size: var(--fs-sm);
}
@media (min-width: 1024px) {
  .nav-menu { display: flex; }
}
.nav-menu a {
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
  padding-block: var(--sp-2);
}
.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  inset-inline-start: 50%;
  transform: translateX(50%);
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--dur-base) var(--ease-out);
}
[dir="rtl"] .nav-menu a::after { transform: translateX(-50%); }
.nav-menu a:hover, .nav-menu a.active {
  color: var(--text-primary);
}
.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--sp-3);
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--r-sm);
  cursor: pointer;
  position: relative;
  z-index: calc(var(--z-header) + 2);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--dur-base) var(--ease-out),
              opacity var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out);
  border-radius: 2px;
  pointer-events: none;
}
@media (min-width: 1024px) { .nav-toggle { display: none; } }
.nav-toggle.is-open span { background: var(--accent); }
.nav-toggle.is-open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: calc(var(--z-header) + 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
  padding: var(--sp-16) var(--sp-6) var(--sp-12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              visibility 0s linear var(--dur-base);
  overflow-y: auto;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}
.mobile-menu a {
  font-size: var(--fs-xl);
  font-family: var(--font-ar-primary);
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
  transition: background var(--dur-fast) var(--ease-out);
}
.mobile-menu a:hover,
.mobile-menu a:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ===== Forms ===== */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.field-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.input, .textarea, .select {
  width: 100%;
  padding: 0.875rem 1.125rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast);
  font-family: inherit;
}
.input::placeholder, .textarea::placeholder { color: var(--text-tertiary); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 204, 102, 0.04);
}
.textarea { min-height: 130px; resize: vertical; }

.checkbox, .radio {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}
.checkbox input, .radio input { accent-color: var(--accent); }

/* ===== Tags / Badges ===== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 0.25rem 0.625rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--r-pill);
  font-size: var(--fs-2xs);
  font-weight: 600;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 0.375rem 0.75rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-default);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

/* ===== Hero pyramid ===== */
.pyramid-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: min(560px, 80vw);
  aspect-ratio: 1.15 / 1;
  margin-inline: auto;
  perspective: 1200px;
}
.pyramid {
  position: relative;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 20px 40px rgba(0, 204, 102, 0.25));
  animation: pyramid-float 6s ease-in-out infinite;
}
@keyframes pyramid-float {
  0%, 100% { transform: translateY(0) rotateZ(0); }
  50% { transform: translateY(-12px) rotateZ(0.6deg); }
}
.pyramid svg { width: 100%; height: 100%; overflow: visible; }
.pyramid-glow {
  position: absolute;
  inset: 10%;
  background: radial-gradient(ellipse at center, var(--color-green-glow) 0%, transparent 60%);
  filter: blur(60px);
  z-index: -1;
  animation: glow-pulse 4s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* ===== Stat ===== */
.stat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.stat-value {
  font-size: clamp(2rem, 4vw, var(--fs-3xl));
  font-weight: 800;
  font-family: var(--font-en-primary);
  color: var(--text-primary);
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding-block: var(--sp-16) var(--sp-6);
  margin-top: var(--sp-24);
  position: relative;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--sp-12);
  margin-bottom: var(--sp-12);
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
  .footer-brand { grid-column: 1 / -1; }
}
.footer-col h4 {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: var(--sp-4);
  font-weight: 600;
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-col a { color: var(--text-secondary); font-size: var(--fs-sm); }
.footer-col a:hover { color: var(--accent); }
.footer-brand p {
  font-size: var(--fs-sm);
  max-width: 36ch;
  margin-block: var(--sp-4);
}
.social-row {
  display: flex;
  gap: var(--sp-3);
}
.social-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-default);
  border-radius: 50%;
  transition: all var(--dur-fast) var(--ease-out);
}
.social-icon:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--color-black);
  transform: translateY(-2px);
}
.social-icon svg { width: 16px; height: 16px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
}
.footer-bottom-links { display: flex; gap: var(--sp-6); flex-wrap: wrap; }

/* ===== Built by attribution ===== */
.built-by {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
}
.built-by-label {
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.built-by-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border-default);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-en-secondary);
  transition: all var(--dur-base) var(--ease-out);
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  isolation: isolate;
}
.built-by-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(0, 204, 102, 0.15), rgba(30, 224, 130, 0.04));
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
  z-index: -1;
}
.built-by-link:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.built-by-link:hover::before { opacity: 1; }
.built-by-link:hover .built-by-spark { transform: rotate(45deg); color: var(--accent); }
.built-by-link:hover .built-by-arrow { transform: translate(2px, -2px); color: var(--accent); }
.built-by-spark, .built-by-arrow {
  transition: transform var(--dur-base) var(--ease-spring), color var(--dur-base) var(--ease-out);
}
.built-by-divider { color: var(--text-tertiary); opacity: 0.5; }
.built-by-by { color: var(--text-tertiary); font-weight: 500; }
[dir="rtl"] .built-by-arrow { transform: scaleX(-1); }
[dir="rtl"] .built-by-link:hover .built-by-arrow { transform: scaleX(-1) translate(2px, -2px); }

/* ===== Pricing ===== */
.price {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-1);
  font-family: var(--font-en-primary);
}
.price-amount {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--text-primary);
}
.price-currency { font-size: var(--fs-sm); color: var(--text-tertiary); }
.price-period { font-size: var(--fs-xs); color: var(--text-tertiary); }
.price-old {
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
  text-decoration: line-through;
}

/* ===== Avatar ===== */
.avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: var(--fs-sm);
  border: 1px solid var(--border-default);
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  z-index: 1;
}
/* When .has-photo is set and the image loads OK, the image covers
   the fallback initials. The onerror handler removes .has-photo if
   loading fails, revealing the initials placed via JS. */
.avatar.has-photo {
  background: var(--bg-elevated);
  color: transparent; /* hide any stray fallback text */
}
.avatar-lg { width: 64px; height: 64px; font-size: var(--fs-lg); }
.avatar-xl { width: 96px; height: 96px; font-size: var(--fs-xl); }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: var(--sp-6);
  inset-inline-end: var(--sp-6);
  z-index: var(--z-toast);
  padding: var(--sp-3) var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm);
  animation: toast-in var(--dur-base) var(--ease-spring);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast--error {
  border-color: #ff6b6b;
  color: #ff8585;
  background: linear-gradient(135deg, var(--bg-elevated), rgba(255, 107, 107, 0.08));
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.in { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal-stagger.in > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.15s; }
.reveal-stagger.in > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.25s; }
.reveal-stagger.in > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.35s; }
.reveal-stagger.in > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.45s; }
.reveal-stagger.in > *:nth-child(n+6) { opacity: 1; transform: none; transition-delay: 0.55s; }

/* ===== Marquee ===== */
.marquee {
  display: flex;
  overflow: hidden;
  gap: var(--sp-12);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}
.marquee-track {
  display: flex;
  gap: var(--sp-12);
  animation: marquee 30s linear infinite;
  white-space: nowrap;
  flex-shrink: 0;
  align-items: center;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}
[dir="rtl"] .marquee-track { animation-name: marquee-rtl; }
@keyframes marquee-rtl {
  to { transform: translateX(50%); }
}

/* ===== Cookie Consent Banner (PDPL-aligned) ===== */
.cookie-banner {
  position: fixed;
  inset-inline: var(--sp-4);
  bottom: var(--sp-4);
  z-index: 9999;
  max-width: 720px;
  margin-inline: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--border-subtle);
  transform: translateY(calc(100% + var(--sp-8)));
  opacity: 0;
  visibility: hidden;
  transition: transform var(--dur-base) var(--ease-out),
              opacity var(--dur-base) var(--ease-out),
              visibility 0s linear var(--dur-base);
}
.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.cookie-banner__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.cookie-banner__icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--r-sm);
  flex-shrink: 0;
}
.cookie-banner__title {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.cookie-banner__body {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--sp-5);
}
.cookie-banner__body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  justify-content: flex-end;
}
.cookie-banner__actions .btn { padding: 0.625rem 1.125rem; }

.cookie-banner__details {
  display: none;
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border-subtle);
}
.cookie-banner.is-expanded .cookie-banner__details { display: block; }

.cookie-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.cookie-row:last-child { border-bottom: 0; }
.cookie-row__info { flex: 1; }
.cookie-row__name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
}
.cookie-row__desc {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0;
  line-height: 1.6;
}
.cookie-row__toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}
.cookie-row__toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.cookie-row__slider {
  position: absolute;
  inset: 0;
  background: var(--border-default);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.cookie-row__slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 3px;
  inset-inline-start: 3px;
  background: var(--text-primary);
  border-radius: 50%;
  transition: inset-inline-start var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
.cookie-row__toggle input:checked + .cookie-row__slider { background: var(--accent); }
.cookie-row__toggle input:checked + .cookie-row__slider::before {
  inset-inline-start: 21px;
  background: var(--color-black);
}
.cookie-row__toggle input:disabled + .cookie-row__slider {
  background: var(--accent-soft);
  cursor: not-allowed;
}
.cookie-row__toggle input:disabled + .cookie-row__slider::before {
  inset-inline-start: 21px;
  background: var(--accent);
}

@media (max-width: 560px) {
  .cookie-banner {
    inset-inline: var(--sp-3);
    bottom: var(--sp-3);
    padding: var(--sp-5);
  }
  .cookie-banner__actions { justify-content: stretch; }
  .cookie-banner__actions .btn { flex: 1; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner { transition: opacity var(--dur-fast) linear; transform: none; }
}

/* ===== Courses Search Bar (search input + sort) ===== */
.courses-search-row {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: var(--sp-3);
  align-items: stretch;
}
.courses-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.courses-search-icon {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}
.courses-search-wrap .input {
  width: 100%;
  padding-inline-start: 46px;
  padding-inline-end: 40px;
}
.courses-search-clear {
  position: absolute;
  inset-inline-end: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.courses-search-clear:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.courses-sort {
  min-width: 0;
}
@media (max-width: 720px) {
  .courses-search-row { grid-template-columns: 1fr; }
}

/* ===== Courses Empty State ===== */
.courses-empty {
  text-align: center;
  padding: var(--sp-12) var(--sp-6);
  margin-bottom: var(--sp-8);
  background: var(--bg-card);
  border: 1px dashed var(--border-default);
  border-radius: var(--r-lg);
}
.courses-empty__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--sp-5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--r-2xl);
}
.courses-empty h3 {
  font-size: var(--fs-lg);
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.courses-empty p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-bottom: var(--sp-5);
  max-width: 40ch;
  margin-inline: auto;
}

/* ===== Translation Notice Banner (EN pages) ===== */
.translation-notice {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-3) var(--sp-5);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.translation-notice svg {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.translation-notice strong {
  color: var(--text-primary);
  font-weight: 600;
}
.translation-notice a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.translation-notice--legal {
  background: linear-gradient(135deg, var(--bg-card), var(--accent-soft));
  border-bottom: 2px solid var(--accent);
  font-size: 14px;
}
@media (max-width: 600px) {
  .translation-notice { padding: var(--sp-3) var(--sp-4); font-size: 12px; }
}

/* ===== Language Switcher (header) ===== */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--r-pill);
  color: var(--accent);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.lang-switch:hover {
  background: var(--accent);
  color: var(--color-black);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--color-green-glow);
}
.lang-switch svg {
  flex-shrink: 0;
}
@media (prefers-reduced-motion: reduce) {
  .lang-switch:hover { transform: none; }
}
/* Hide label text on very narrow screens, keep the globe icon */
@media (max-width: 480px) {
  .lang-switch span { display: none; }
  .lang-switch { padding: 7px 9px; }
}
