/* أثير — أنماط مساعدة فوق Tailwind CDN */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap");

:root {
  --atheer-canvas: #f3f5f7;
  --atheer-ink: #0b1220;
  --atheer-accent: #0f5c57;
  --atheer-metal: #b08d57;
  --atheer-line: #d7dde6;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(15, 92, 87, 0.08), transparent 55%),
    radial-gradient(900px 500px at 0% 20%, rgba(176, 141, 87, 0.07), transparent 50%),
    var(--atheer-canvas);
  color: var(--atheer-ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.admin-body {
  background: #F4F7FC;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

:focus-visible {
  outline: 2px solid var(--atheer-accent);
  outline-offset: 3px;
}

/* توكنات احتياطية — تعمل حتى لو فشل إعداد Tailwind CDN */
.bg-canvas { background-color: #f3f5f7; }
.bg-canvas-muted { background-color: #e8ecf0; }
.bg-surface { background-color: #ffffff; }
.bg-ink { background-color: #0b1220; }
.bg-accent { background-color: #0f5c57; }
.bg-accent-soft { background-color: #e6f2f1; }
.text-ink { color: #0b1220; }
.text-ink-soft { color: #1c2738; }
.text-muted { color: #5b6577; }
.text-accent { color: #0f5c57; }
.text-metal { color: #b08d57; }
.text-danger { color: #b42318; }
.text-success { color: #067647; }
.border-line { border-color: #d7dde6; }
.shadow-soft { box-shadow: 0 8px 30px rgba(11, 18, 32, 0.06); }
.shadow-lift { box-shadow: 0 18px 50px rgba(11, 18, 32, 0.1); }

.container-atheer {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.25rem;
  box-sizing: border-box;
}

.container-wide {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: 1.25rem;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .container-wide,
  .container-atheer {
    padding-inline: 1.75rem;
  }
}

@media (min-width: 1024px) {
  .container-wide,
  .container-atheer {
    padding-inline: 2rem;
  }
}

/* هيرو: تدرج ثابت لا يعتمد على كلاسات Tailwind الديناميكية */
.hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to left, rgba(11, 18, 32, 0.28) 0%, rgba(11, 18, 32, 0.72) 48%, #0b1220 100%);
}
[dir="ltr"] .hero-scrim {
  background: linear-gradient(to right, rgba(11, 18, 32, 0.28) 0%, rgba(11, 18, 32, 0.72) 48%, #0b1220 100%);
}

.site-header-shell {
  overflow-x: clip;
}

.announce-bar {
  background-color: #0b1220;
  color: #fff;
}

.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.fade-up {
  animation: fade-up 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.fade-up-delay-1 { animation-delay: 100ms; }
.fade-up-delay-2 { animation-delay: 200ms; }
.fade-up-delay-3 { animation-delay: 300ms; }

.page-enter {
  animation: page-enter 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.page-leave {
  animation: page-leave 180ms ease both;
}

.card-lift {
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 280ms ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 50px rgba(11, 18, 32, 0.1);
}

.nav-link {
  transition: background-color 200ms ease, color 200ms ease, transform 200ms ease;
}
[dir="rtl"] .nav-link:hover {
  transform: translateX(-2px);
}
[dir="ltr"] .nav-link:hover {
  transform: translateX(2px);
}

.btn-press {
  transition: transform 160ms ease, opacity 160ms ease, background-color 200ms ease;
}
.btn-press:active {
  transform: scale(0.97);
}

.img-zoom {
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.group:hover .img-zoom {
  transform: scale(1.03);
}

#mobile-nav:not(.hidden) {
  animation: mobile-nav-in 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes mobile-nav-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes page-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes page-leave {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-6px); }
}

@keyframes drawer-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-panel {
  animation: drawer-in 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (max-width: 639px) {
  .hero-cta-row > .btn-press,
  .hero-cta-row > a,
  .hero-cta-row > button {
    width: 100%;
    justify-content: center;
  }

  .announce-bar p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(72vw, 18rem);
  }

  .course-card-actions a {
    font-size: 0.7rem;
    padding-inline: 0.35rem;
  }

  .flash-countdown > div {
    min-width: 3.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.admin-sidebar {
  background: #0b1220;
}

/* Auth pages — fields & shell */
.auth-input {
  width: 100%;
  height: 3rem;
  border-radius: 0.75rem;
  border: 1px solid var(--atheer-line, #d7dde6);
  background: #fff;
  padding: 0 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--atheer-ink);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.auth-input:hover {
  border-color: #c3cbd6;
}
.auth-input:focus {
  outline: none;
  border-color: var(--atheer-accent);
  box-shadow: 0 0 0 3px rgba(15, 92, 87, 0.14);
}
.auth-input::placeholder {
  color: #8b93a3;
  font-weight: 400;
}
.auth-input.has-error {
  border-color: #b42318;
}
.auth-input.has-error:focus {
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}
.auth-input-icon {
  padding-inline-start: 2.75rem;
}
.auth-input-icon-both {
  padding-inline-start: 2.75rem;
  padding-inline-end: 2.75rem;
}

.auth-phone {
  display: flex;
  height: 3rem;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid #d7dde6;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.auth-phone:hover {
  border-color: #c3cbd6;
}
.auth-phone:focus-within {
  border-color: var(--atheer-accent);
  box-shadow: 0 0 0 3px rgba(15, 92, 87, 0.14);
}
.auth-phone.has-error {
  border-color: #b42318;
}
.auth-phone select,
.auth-phone input {
  border: none;
  background: transparent;
  outline: none;
  height: 100%;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--atheer-ink);
  padding: 0 0.75rem;
}
.auth-phone select {
  flex-shrink: 0;
  min-width: 7.5rem;
  max-width: 11rem;
  border-inline-end: 1px solid #d7dde6;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%235b6577'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem;
  padding-inline-end: 1.75rem;
}
.auth-phone input {
  flex: 1;
  min-width: 0;
}

.auth-brand-panel {
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(15, 92, 87, 0.55), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(176, 141, 87, 0.28), transparent 50%),
    #0b1220;
}

@media (max-width: 640px) {
  .auth-phone select {
    min-width: 6.5rem;
    max-width: 42%;
    font-size: 0.875rem;
  }
}
