/* =========================================================
   Home Page — أكاديمية الحنطي للتدريب
   Modern, interactive UI with brand identity (#0754a2 / #8dc73d)
========================================================= */

/* ============== Reveal-on-scroll animation ============== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.45s; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.55s; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.65s; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 0.75s; opacity: 1; transform: translateY(0); }

/* ============== HERO ============== */
.h-hero {
  position: relative;
  background:
    radial-gradient(1200px 600px at 100% -20%, rgba(141, 199, 61, 0.18), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(7, 84, 162, 0.18), transparent 60%),
    linear-gradient(135deg, #053f7d 0%, #0754a2 50%, #1466c9 100%);
  color: #fff;
  padding: 100px 0 120px;
  overflow: hidden;
}
.h-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0, transparent 8%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.06) 0, transparent 10%),
    radial-gradient(circle at 50% 50%, rgba(141,199,61,0.05) 0, transparent 30%);
  pointer-events: none;
}
.h-hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 960px) {
  .h-hero__grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .h-hero { padding: 60px 0 80px; }
}
@media (max-width: 640px) {
  .h-hero { padding: 40px 0 60px; }
  .h-hero__grid { gap: 30px; }
}

.h-hero__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(141, 199, 61, 0.18);
  border: 1px solid rgba(141, 199, 61, 0.4);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #d9f4a3;
  backdrop-filter: blur(10px);
  margin-bottom: 24px;
}
.h-hero__chip::before {
  content: '';
  width: 8px; height: 8px;
  background: #8dc73d;
  border-radius: 50%;
  box-shadow: 0 0 12px #8dc73d;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.6; }
}

.h-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.15;
  margin: 0 0 20px;
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.h-hero h1 .accent {
  background: linear-gradient(135deg, #8dc73d 0%, #b8e070 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  position: relative;
}
.h-hero h1 .accent::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, transparent, #8dc73d, transparent);
  border-radius: 2px;
}

.h-hero p {
  font-size: clamp(16px, 1.5vw, 19px);
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 32px;
  line-height: 1.7;
  max-width: 600px;
}
@media (max-width: 960px) { .h-hero p { margin-inline: auto; } }

.h-hero__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
@media (max-width: 960px) { .h-hero__cta { justify-content: center; } }

.h-hero__cta .btn {
  padding: 14px 28px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
}
.h-hero__cta .btn-cta {
  box-shadow: 0 10px 30px rgba(141, 199, 61, 0.35);
  transition: all 0.3s ease;
}
.h-hero__cta .btn-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(141, 199, 61, 0.45); }
.h-hero__cta .btn-outline {
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.4) !important;
  color: #fff !important;
  backdrop-filter: blur(10px);
}
.h-hero__cta .btn-outline:hover { background: rgba(255,255,255,0.18); }

.h-hero__quick-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
@media (max-width: 960px) { .h-hero__quick-stats { justify-content: center; } }
@media (max-width: 480px) { .h-hero__quick-stats { gap: 18px; } .h-hero__qs strong { font-size: 22px; } }

.h-hero__qs {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.h-hero__qs strong {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.h-hero__qs small {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}

/* Hero illustration (right column) */
.h-hero__visual {
  position: relative;
  height: 460px;
  min-width: 0;
}
@media (max-width: 1100px) {
  .h-hero__visual { height: 400px; }
}
@media (max-width: 960px) {
  .h-hero__visual {
    height: 380px;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }
}
@media (max-width: 480px) {
  .h-hero__visual { height: 340px; }
}

.h-hero__card {
  position: absolute;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  color: var(--gray-900);
  animation: float 6s ease-in-out infinite;
  max-width: 80%;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.h-hero__card--main {
  top: 4%;
  inset-inline-end: 6%;
  width: 280px;
  z-index: 3;
}
.h-hero__card--mini {
  bottom: 12%;
  inset-inline-start: 2%;
  width: 200px;
  animation-delay: -2s;
  z-index: 2;
}
.h-hero__card--badge {
  top: 48%;
  inset-inline-end: 0;
  background: linear-gradient(135deg, #fef3c7, #fff);
  padding: 12px 16px;
  border-radius: 14px;
  animation-delay: -4s;
  z-index: 4;
  max-width: 200px;
}

@media (max-width: 1100px) {
  .h-hero__card--main { width: 240px; }
  .h-hero__card--mini { width: 180px; }
}

@media (max-width: 640px) {
  .h-hero__card--main { width: 240px; top: 0; }
  .h-hero__card--mini { width: 170px; bottom: 6%; }
  .h-hero__card--badge {
    padding: 10px 14px;
    top: 46%;
    max-width: 160px;
  }
  .h-hero__card--badge strong { font-size: 12px !important; }
  .h-hero__card--badge small { font-size: 11px !important; }
  .h-hero__card-thumb { height: 80px; font-size: 28px; }
  .h-hero__card-title { font-size: 13px; }
}

@media (max-width: 380px) {
  .h-hero__card--badge { display: none; }
  .h-hero__card--main { width: 90%; inset-inline-end: 5%; }
  .h-hero__card--mini { width: 70%; }
}

.h-hero__card-thumb {
  width: 100%; height: 100px;
  background: linear-gradient(135deg, #0754a2, #1466c9);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  margin-bottom: 10px;
}
.h-hero__card-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}
.h-hero__card-meta {
  font-size: 12px;
  color: var(--gray-500);
}
.h-hero__card-progress {
  margin-top: 10px;
  height: 6px;
  background: var(--gray-100);
  border-radius: 3px;
  overflow: hidden;
}
.h-hero__card-progress span {
  display: block;
  height: 100%;
  width: 68%;
  background: linear-gradient(90deg, #8dc73d, #b8e070);
  border-radius: 3px;
}

.h-hero__card-mini-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #8dc73d, #6fa31a);
  color: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 8px;
}

/* ============== STATS BAR ============== */
.h-stats {
  background: #fff;
  margin-top: -50px;
  position: relative;
  z-index: 5;
}
.h-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(7, 84, 162, 0.12);
  overflow: hidden;
}
@media (max-width: 720px) { .h-stats__grid { grid-template-columns: repeat(2, 1fr); } }

.h-stats__item {
  padding: 32px 24px;
  text-align: center;
  border-inline-end: 1px solid var(--border);
  transition: background 0.2s ease;
}
.h-stats__item:last-child { border-inline-end: none; }
@media (max-width: 720px) {
  .h-stats__item { padding: 20px 12px; }
  .h-stats__item:nth-child(2) { border-inline-end: none; }
  .h-stats__item:nth-child(1),
  .h-stats__item:nth-child(2) { border-bottom: 1px solid var(--border); }
  .h-stats__icon { width: 44px; height: 44px; font-size: 20px; margin-bottom: 10px; }
  .h-stats__value { font-size: 26px; }
  .h-stats__label { font-size: 11px; }
}
.h-stats__item:hover { background: var(--blue-50); }
.h-stats__icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--blue-50), #fff);
  border: 1.5px solid var(--blue-100);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 14px;
}
.h-stats__value {
  font-size: 36px;
  font-weight: 800;
  color: var(--blue-700);
  line-height: 1;
  margin-bottom: 6px;
}
.h-stats__label {
  font-size: 13px;
  color: var(--gray-600);
  font-weight: 600;
}

/* ============== SECTION HEADERS ============== */
.h-section {
  padding: 100px 0;
}
@media (max-width: 768px) { .h-section { padding: 60px 0; } }
@media (max-width: 480px) { .h-section { padding: 50px 0; } }

.h-section--soft {
  background: linear-gradient(180deg, #fafbfd 0%, #fff 100%);
}

.h-section__head {
  text-align: center;
  margin-bottom: 60px;
}
.h-section__eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-600);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 14px;
  position: relative;
  padding-inline: 24px;
}
.h-section__eyebrow::before,
.h-section__eyebrow::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 16px; height: 2px;
  background: var(--green-400);
  border-radius: 2px;
}
.h-section__eyebrow::before { inset-inline-start: 0; }
.h-section__eyebrow::after  { inset-inline-end: 0; }

.h-section__title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  color: var(--gray-900);
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}
.h-section__sub {
  font-size: 17px;
  color: var(--gray-600);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============== FEATURES (Why us) ============== */
.h-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 960px) { .h-features { grid-template-columns: 1fr; } }

.h-feature {
  position: relative;
  padding: 36px 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
.h-feature::before {
  content: '';
  position: absolute;
  top: 0; inset-inline-start: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--blue-500), var(--green-400));
  transform: scaleX(0);
  transform-origin: start;
  transition: transform 0.4s ease;
}
.h-feature:hover {
  border-color: transparent;
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(7, 84, 162, 0.15);
}
.h-feature:hover::before { transform: scaleX(1); }

.h-feature__icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--blue-50), #fff);
  border: 1.5px solid var(--blue-100);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}
.h-feature:hover .h-feature__icon {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  border-color: var(--blue-700);
  color: #fff;
  transform: rotate(-6deg) scale(1.05);
}

.h-feature h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0 0 10px;
}
.h-feature p {
  color: var(--gray-600);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}

/* ============== CATEGORIES ============== */
.h-categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 900px) { .h-categories { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .h-categories { grid-template-columns: 1fr; } }

.h-category {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--gray-900);
  transition: all 0.25s ease;
  position: relative;
}
.h-category:hover {
  border-color: var(--blue-500);
  transform: translateX(4px);
  box-shadow: 0 8px 24px rgba(7, 84, 162, 0.1);
}
[dir="rtl"] .h-category:hover { transform: translateX(-4px); }

.h-category__icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--blue-50), var(--green-50));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  transition: all 0.25s ease;
}
.h-category:hover .h-category__icon {
  background: linear-gradient(135deg, var(--blue-500), var(--green-400));
  color: #fff;
}
.h-category__body { flex: 1; min-width: 0; }
.h-category__title {
  font-weight: 700;
  font-size: 15px;
  color: var(--gray-900);
  margin-bottom: 2px;
}
.h-category__count {
  font-size: 12px;
  color: var(--gray-500);
}
.h-category__arrow {
  color: var(--gray-300);
  transition: all 0.25s ease;
}
.h-category:hover .h-category__arrow { color: var(--blue-500); transform: translateX(-3px); }
[dir="rtl"] .h-category:hover .h-category__arrow { transform: translateX(3px); }

/* ============== COURSES GRID ============== */
.h-courses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .h-courses { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .h-courses { grid-template-columns: 1fr; } }

.h-course {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.h-course:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(7, 84, 162, 0.12);
  border-color: transparent;
}

.h-course__thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.h-course__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.h-course:hover .h-course__thumb img { transform: scale(1.08); }
.h-course__thumb-icon { font-size: 48px; opacity: 0.5; }
.h-course__cat-badge {
  position: absolute;
  top: 12px; inset-inline-start: 12px;
  background: rgba(255,255,255,0.95);
  color: var(--blue-700);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.h-course__level-badge {
  position: absolute;
  top: 12px; inset-inline-end: 12px;
  background: var(--green-400);
  color: #1a2742;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.h-course__body {
  padding: 18px 20px;
  flex: 1;
  display: flex; flex-direction: column;
}
.h-course__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.h-course__instructor {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.h-course__meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--gray-600);
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}
.h-course__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.h-course__meta strong { color: var(--gray-900); }

.h-course__footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto;
}
.h-course__price {
  font-size: 18px;
  font-weight: 800;
  color: var(--blue-700);
}
.h-course__price--free { color: var(--green-600); }
.h-course__price-old {
  font-size: 13px;
  color: var(--gray-400);
  text-decoration: line-through;
  margin-inline-end: 8px;
  font-weight: 500;
}
.h-course__rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
  color: #f59e0b;
}
.h-course__rating small {
  color: var(--gray-500);
  font-weight: 500;
  font-size: 12px;
}

/* ============== HOW IT WORKS ============== */
.h-how {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
}
@media (max-width: 900px) { .h-how { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .h-how { grid-template-columns: 1fr; } }

.h-how__step {
  position: relative;
  padding: 30px 24px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.3s ease;
}
.h-how__step:hover {
  border-color: var(--green-400);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(141, 199, 61, 0.15);
}
.h-how__num {
  position: absolute;
  top: -18px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(7, 84, 162, 0.3);
}
[dir="rtl"] .h-how__num { transform: translateX(50%); }

.h-how__icon {
  font-size: 38px;
  margin: 24px 0 12px;
}
.h-how__step h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0 0 8px;
}
.h-how__step p {
  font-size: 13px;
  color: var(--gray-600);
  margin: 0;
  line-height: 1.6;
}

/* ============== CTA (Become Instructor) ============== */
.h-cta {
  background:
    radial-gradient(circle at 100% 0%, rgba(141,199,61,0.25), transparent 50%),
    linear-gradient(135deg, var(--blue-700), var(--blue-900));
  border-radius: 24px;
  padding: 60px 48px;
  color: #fff;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.h-cta::before {
  content: '';
  position: absolute;
  bottom: -40px; inset-inline-end: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(141,199,61,0.3), transparent);
  border-radius: 50%;
}
@media (max-width: 800px) {
  .h-cta { grid-template-columns: 1fr; padding: 40px 28px; text-align: center; }
}

.h-cta__eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-400);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 14px;
}
.h-cta h2 {
  color: #fff;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  margin: 0 0 14px;
  line-height: 1.3;
}
.h-cta p {
  color: rgba(255,255,255,0.85);
  font-size: 16px;
  margin: 0 0 24px;
  line-height: 1.7;
}
.h-cta__benefits {
  display: flex; gap: 14px; flex-wrap: wrap;
}
@media (max-width: 800px) { .h-cta__benefits { justify-content: center; } }
.h-cta__chip {
  background: rgba(255,255,255,0.1);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.h-cta__visual {
  text-align: center;
  position: relative;
  z-index: 1;
}
.h-cta__visual-icon {
  font-size: 120px;
  display: inline-block;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.3));
  animation: floatBig 4s ease-in-out infinite;
}
@media (max-width: 800px) { .h-cta__visual-icon { font-size: 80px; } }
@media (max-width: 800px) { .h-cta { padding: 36px 24px; border-radius: 18px; } }
@keyframes floatBig {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-10px) rotate(3deg); }
}
.h-cta__visual .btn {
  margin-top: 20px;
  padding: 14px 28px !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
}
