/* ============================================================
   ZABAN ASAN ACADEMY — Main Stylesheet
   Brand: Royal Purple · Font: Modam · Direction: RTL
   Mood: Light, clean, premium, youth-oriented
   ============================================================ */

/* ============================================================
   0. WEBFONT — Modam
   Without these rules the font only renders on machines that
   happen to have Modam installed locally. Visitors on phones
   (and anyone else) fell back to Tahoma.
   ============================================================ */

@font-face {
  font-family: 'modam';
  src: url('../Fonts/Modam-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'modam';
  src: url('../Fonts/Modam-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'modam';
  src: url('../Fonts/Modam-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'modam';
  src: url('../Fonts/Modam-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'modam';
  src: url('../Fonts/Modam-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'modam';
  src: url('../Fonts/Modam-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   1. TOKENS & VARIABLES
   ============================================================ */

:root {
  /* Brand Colors */
  --purple-900: #3B0764;
  --purple-800: #4C1D8F;
  --purple-700: #6D2C8E;   /* Primary */
  --purple-600: #7C3AA0;
  --purple-400: #A855C8;
  --purple-300: #BB86FC;   /* Secondary / accent */
  --purple-100: #F3EAFF;
  --purple-50:  #FAF5FF;


  --dark:       #111118;
  --dark-2:     #1E1E2A;
  --gray-800:   #2D2D3A;
  --gray-600:   #555566;
  --gray-400:   #8888A0;
  --gray-200:   #E8E8F0;
  --gray-100:   #F4F4F8;
  --white:      #FFFFFF;

  --danger:     #E53E3E;
  --success:    #38A169;
  --warning:    #D97706;

  /* Warm accent — ruby (from brand palette) */
  --accent:      #C2244E;
  --accent-dark: #9E1C40;
  --accent-soft: #FBEBF0;

  /* Semantic aliases */
  --primary:        var(--purple-700);
  --primary-hover:  var(--purple-800);
  --secondary:      var(--purple-300);
  --text:           #1A1A2E;
  --text-light:     var(--gray-600);
  --text-muted:     var(--gray-400);
  --bg:             var(--white);
  --bg-tint:        var(--gray-100);
  --bg-purple:      var(--purple-50);
  --border:         var(--gray-200);

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Radius */
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs:  0 1px 4px rgba(109,44,142,0.06);
  --shadow-sm:  0 2px 12px rgba(109,44,142,0.08);
  --shadow-md:  0 8px 30px rgba(109,44,142,0.10);
  --shadow-lg:  0 16px 50px rgba(109,44,142,0.14);
  --shadow-xl:  0 28px 80px rgba(109,44,142,0.18);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.06);

  /* Transitions */
  --ease:       all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-slow:  all 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  direction: rtl;
  font-family: 'modam', 'Tahoma', sans-serif;
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
}


/* ============================================================
   3. LAYOUT UTILITIES
   ============================================================ */

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

section {
  padding: var(--space-3xl) 0;
}

/* Section label pill */
.section-label {
  display: inline-block;
  background: var(--purple-100);
  color: var(--primary);
  padding: 5px 16px;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
}

/* Section heading */
.section-heading {
  font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl));
  font-weight: 900;
  color: var(--text);
  margin-bottom: var(--space-xl);
  line-height: 1.3;
}

section h2 {
  text-align: center;
  font-size: var(--text-3xl);
  font-weight: 900;
  margin-bottom: var(--space-xl);
  color: var(--text);
}

.section-padded {
  padding: var(--space-3xl) 0;
}

.section-tinted {
  background: var(--bg-tint);
}


/* ============================================================
   4. NAVBAR
   ============================================================ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  height: 70px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(109,44,142,0.08);
  box-shadow: 0 1px 20px rgba(109,44,142,0.06);
  transition: var(--ease);
}

.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

/* Logo */
.logo img {
  height: 52px;
  transition: var(--ease);
}

.logo img:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

/* Nav links container */
.nav-links > ul {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links li {
  position: relative;
}

/* Link base */
.nav-links a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  border-radius: var(--r-sm);
  color: var(--text);
  font-weight: 500;
  font-size: var(--text-sm);
  transition: var(--ease);
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--primary);
  background: var(--purple-100);
}

/* Active link */
.nav-links a.active {
  color: var(--primary);
  font-weight: 700;
}


/* ============================================================
   5. DROPDOWN MENU
   ============================================================ */

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  display: none;
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transform-origin: top right;
  animation: dropIn 0.22s ease forwards;
}

@keyframes dropIn {
  from { opacity: 0; transform: scale(0.95) translateY(-6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Invisible bridge over the 8px gap so hover isn't lost
   while moving the cursor from the link down to the submenu */
.dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  height: 8px;
}

.dropdown:hover > .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  padding: 11px 18px;
  color: var(--text);
  font-size: var(--text-sm);
  border-radius: 0;
  transition: var(--ease);
  border-bottom: 1px solid rgba(109,44,142,0.04);
}

.dropdown-menu a:last-child {
  border-bottom: none;
}

.dropdown-menu a:hover {
  background: var(--purple-50);
  color: var(--primary);
  padding-right: 22px;
}

/* Dropdown arrow indicator */
.dropdown > a::after {
  content: "▾";
  font-size: 0.65rem;
  opacity: 0.5;
  margin-right: 2px;
}


/* ============================================================
   6. SIGN-UP BUTTON (Navbar CTA)
   ============================================================ */

.btn-signup {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--white) !important;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(194,36,78,0.35);
  transition: var(--ease);
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

.btn-signup:hover {
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-dark) 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(194,36,78,0.5);
  color: var(--white) !important;
}

/* Subtle pulse ring on btn-signup */
.btn-signup::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: calc(var(--r-sm) + 3px);
  border: 2px solid rgba(194,36,78,0.25);
  animation: ringPulse 2.2s infinite ease-out;
  pointer-events: none;
}

@keyframes ringPulse {
  0%   { transform: scale(0.94); opacity: 0.7; }
  100% { transform: scale(1.18); opacity: 0; }
}

/* Legacy CTA button (kept for backward compat) */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: var(--ease);
}

.cta-button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cta-button.secondary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.cta-button.secondary:hover {
  background: var(--purple-100);
}


/* ============================================================
   7. MOBILE MENU TOGGLE
   ============================================================ */

.menu-toggle {
  display: none;
  font-size: 1.7rem;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: var(--ease);
}

.menu-toggle:hover {
  background: var(--purple-100);
  color: var(--primary);
}


/* ============================================================
   8. HERO SECTION
   ============================================================ */

#hero {
  position: relative;
  overflow: hidden;
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}


/* ============================================================
   9. IELTS / TOEFL / COURSE SECTION
   ============================================================ */

.ielts-section {
  padding: var(--space-3xl) 20px;
  background: var(--bg-tint);
}

.section-title {
  text-align: center;
  font-size: var(--text-4xl);
  font-weight: 900;
  margin-bottom: var(--space-xl);
  color: var(--text);
}


/* ============================================================
   10. COURSE GRID & CARDS
   ============================================================ */

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.course-card {
  background: var(--white);
  padding: var(--space-lg);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  transition: var(--ease);
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
}

/* Subtle top accent line */
.course-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: var(--ease);
}

.course-card:hover::before {
  opacity: 1;
}

/* Reveal animation (JS adds .animate) */
.course-card {
  opacity: 0;
  transform: translateY(24px);
}

.course-card.animate {
  opacity: 1;
  transform: translateY(0);
}

.course-card:hover {
  transform: translateY(-10px) rotateX(3deg) rotateY(-2deg);
  box-shadow: var(--shadow-lg);
  border-color: rgba(109,44,142,0.15);
}

/* Popular card */
.course-card.popular {
  background: linear-gradient(145deg, var(--purple-700), var(--purple-800));
  color: var(--white);
  border-color: transparent;
  box-shadow: var(--shadow-xl);
}

.course-card.popular::before {
  background: linear-gradient(90deg, var(--purple-300), rgba(255,255,255,0.4));
  opacity: 1;
}

.course-card.popular .feature-list li::before {
  color: var(--purple-300);
}

.course-card.popular .course-title {
  color: var(--white);
}

.course-card.popular .course-desc,
.course-card.popular .feature-list li {
  color: var(--white);
}

.course-card.popular .more-btn {
  background: var(--white);
  color: var(--primary);
}

.course-card.popular .more-btn:hover {
  background: var(--purple-100);
}

.course-card.popular:hover {
  transform: translateY(-10px) rotateX(3deg) rotateY(-2deg);
  box-shadow: 0 28px 70px rgba(109,44,142,0.35);
}

/* Tags */
.tag {
  background: var(--primary);
  color: var(--white);
  padding: 4px 12px;
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--r-full);
  display: inline-block;
  margin-bottom: var(--space-md);
  letter-spacing: 0.02em;
}

.tag-premium {
  background: linear-gradient(135deg, var(--purple-700), var(--purple-400));
  color: var(--white);
  padding: 4px 12px;
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--r-full);
  display: inline-block;
  margin-bottom: var(--space-md);
}

.tag-popular {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: var(--white);
  padding: 4px 12px;
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--r-full);
  display: inline-block;
  margin-bottom: var(--space-md);
}

.course-title {
  font-size: var(--text-xl);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  color: var(--text);
  line-height: 1.3;
}

.course-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

/* Feature list */
.feature-list {
  list-style: none;
  margin-bottom: var(--space-lg);
}

.feature-list li {
  margin: 10px 0;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-light);
}

.feature-list li::before {
  content: "✔";
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* More button */
.more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: var(--ease);
}

.more-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(109,44,142,0.3);
}


/* ============================================================
   11. ABOUT SECTION
   ============================================================ */

#about {
  background: var(--bg-tint);
}

#about p {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-light);
  font-size: var(--text-lg);
  line-height: 1.9;
}


/* ============================================================
   12. CONTACT / FORM SECTION
   ============================================================ */

#contact {
  background: var(--white);
}

#contact h2 {
  color: var(--text);
}

#contact > .container > p {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
  font-size: var(--text-lg);
}

#contact form {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

#contact input,
#contact textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--bg-tint);
  transition: var(--ease);
}

#contact input:focus,
#contact textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(109,44,142,0.08);
}

#contact input::placeholder,
#contact textarea::placeholder {
  color: var(--text-muted);
}

#contact textarea {
  resize: vertical;
  min-height: 140px;
}

#contact .cta-button {
  align-self: flex-start;
  padding: 14px 32px;
  font-size: var(--text-base);
}

@media (max-width: 600px) {
  #contact .cta-button {
    width: 100%;
    justify-content: center;
  }
}


/* ============================================================
   13. FOOTER
   ============================================================ */

/* ============================================================
   13. FOOTER
   ============================================================ */

.site-footer {
  background: var(--dark-2);
  color: rgba(255,255,255,0.65);
  font-size: var(--text-sm);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sf-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.4fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}

/* Brand column */
.sf-brand-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.sf-brand-top img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
}

.sf-brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sf-company-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}

.sf-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
  margin: 0;
}

/* Columns */
.sf-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sf-col-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  margin: 0;
}

.sf-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sf-col ul a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.18s;
}

.sf-col ul a:hover {
  color: var(--purple-300);
}

.sf-social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.7) !important;
  transition: color 0.18s;
}

.sf-social-link:hover {
  color: var(--purple-300) !important;
}

/* Newsletter */
.sf-newsletter {
  position: relative;
}

.sf-input-wrap {
  display: flex;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  overflow: hidden;
}

.sf-input-wrap input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  padding: 10px 16px;
  color: var(--white);
  font-size: 13px;
  font-family: inherit;
}

.sf-input-wrap input::placeholder {
  color: rgba(255,255,255,0.3);
}

.sf-input-wrap button {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--white);
  border: none;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s;
  flex-shrink: 0;
  order: -1;
}

.sf-input-wrap button:hover {
  background: var(--accent-dark);
}

.sf-status {
  font-size: 13px;
  margin-top: 8px;
  min-height: 18px;
  line-height: 1.5;
  opacity: 0;
  transition: opacity 0.3s;
}

.sf-status--show { opacity: 1; }
.sf-status--success { color: #4ade80; }
.sf-status--error { color: #f87171; }

/* Bottom bar */
.sf-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

.sf-bottom p { margin: 0; }

.sf-bottom-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sf-bottom-links a {
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  transition: color 0.18s;
}

.sf-bottom-links a:hover { color: rgba(255,255,255,0.7); }
.sf-bottom-links span   { color: rgba(255,255,255,0.15); }

@media (max-width: 900px) {
  .sf-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 560px) {
  .sf-grid {
    grid-template-columns: 1fr;
    padding: 40px 16px 28px;
  }
  .sf-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}


/* ============================================================
   14. ARTICLES SECTION
   ============================================================ */

#latest-articles {
  background: var(--white);
}

.article-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.article-item {
  background: var(--white);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  transition: var(--ease);
}

.article-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(109,44,142,0.12);
}

.article-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--purple-100);
}

.article-item h3 {
  padding: var(--space-md) var(--space-md) var(--space-sm);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
}

.article-item .excerpt {
  padding: 0 var(--space-md) var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
}

.article-item .read-more {
  display: inline-block;
  margin: 0 var(--space-md) var(--space-md);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--primary);
  transition: var(--ease);
}

.article-item .read-more:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}


/* ============================================================
   15. COURSE ITEMS (generic, for other pages)
   ============================================================ */

.course-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.course-item {
  background: var(--white);
  padding: var(--space-lg);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--ease);
}

.course-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.course-item h3 {
  margin-bottom: var(--space-md);
  color: var(--primary);
  font-size: var(--text-xl);
  font-weight: 700;
}

.course-item p {
  color: var(--text-light);
  font-size: var(--text-sm);
}


/* ============================================================
   16. RESPONSIVE — TABLET (≤ 900px)
   ============================================================ */

@media (max-width: 900px) {

  .navbar {
    padding: 0 var(--space-md);
    height: 64px;
    position: relative;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    display: none;
    background: var(--white);
    padding: var(--space-lg);
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border);
    z-index: 999;
  }

  .nav-links.active {
    display: block;
  }

  .nav-links > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--r-sm);
  }

  /* Mobile dropdown */
  .dropdown-menu {
    position: static;
    min-width: 100%;
    display: none;
    box-shadow: none;
    border-radius: var(--r-sm);
    border: none;
    background: var(--purple-50);
    padding: var(--space-sm);
    margin-top: 4px;
    animation: none;
  }

  .dropdown.open > .dropdown-menu {
    display: block;
  }

  .dropdown > a::after {
    margin-right: auto;
    margin-left: 0;
  }

  section {
    padding: var(--space-2xl) 0;
  }

  .section-title {
    font-size: var(--text-3xl);
  }
}


/* ============================================================
   17. RESPONSIVE — MOBILE (≤ 480px)
   ============================================================ */

@media (max-width: 480px) {

  .logo img {
    height: 42px;
  }

  section h2 {
    font-size: var(--text-2xl);
  }

  .section-title {
    font-size: var(--text-2xl);
  }

  .course-card {
    padding: var(--space-md);
  }

  .btn-signup,
  .cta-button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  .article-list {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   18. SCROLL REVEAL UTILITY
       (Used by index.php — keep here so it works site-wide)
   ============================================================ */

.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1),
              transform 0.7s cubic-bezier(0.4,0,0.2,1);
  transition-delay: var(--delay, 0s);
}

.reveal-up    { transform: translateY(28px); }
.reveal-left  { transform: translateX(-28px); }
.reveal-right { transform: translateX(28px); }

/* On a narrow screen the sideways offset sits outside the viewport until the
   element scrolls into view, which gives the whole page a horizontal scroll.
   Reveal vertically there instead — same effect, nothing sticks out. */
@media (max-width: 900px) {
  .reveal-left, .reveal-right { transform: translateY(28px); }
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: none;
}


/* ============================================================
   19. GLASSMORPHISM UTILITY
       Add class .glass to any card for frosted effect
   ============================================================ */

.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.glass-purple {
  background: rgba(109, 44, 142, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(109, 44, 142, 0.12);
}


/* ============================================================
   20. 3D PERSPECTIVE UTILITY
       Wrap any group of cards in .scene-3d to enable depth
   ============================================================ */

.scene-3d {
  perspective: 1000px;
  perspective-origin: 50% 50%;
}

.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease;
}

.card-3d:hover {
  transform: translateY(-10px) rotateX(4deg) rotateY(-3deg);
  box-shadow: var(--shadow-xl);
}


/* ============================================================
   21. BADGE / CHIP UTILITIES
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 700;
}

.badge-purple  { background: var(--purple-100); color: var(--primary); }
.badge-success { background: #DCFCE7; color: var(--success); }
.badge-warning { background: #FEF3C7; color: var(--warning); }
.badge-danger  { background: #FEE2E2; color: var(--danger); }


/* ============================================================
   22. DIVIDER
   ============================================================ */

.divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: var(--r-full);
  margin: var(--space-md) auto;
}

.divider.right {
  margin-right: 0;
}


/* ============================================================
   23. SKELETON LOADER (for dynamic content)
   ============================================================ */

.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ============================================================
   24. FOCUS & ACCESSIBILITY
   ============================================================ */

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ============================================================
   25. PRINT
   ============================================================ */

@media print {
  .navbar, .sticky-cta, .popup-overlay, .menu-toggle { display: none; }
  body { background: white; color: black; }
  a { color: black; }
}

/* ================================================================
   GLOW HERO — shared page-top background (matches the index hero):
   light lavender wash + dot grid + drifting purple/crimson glows
   ================================================================ */
.glow-hero {
  position: relative;
  overflow: hidden;
  background: var(--white);
}

.glow-hero::before,
.glow-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

.glow-hero::before {
  width: 640px; height: 640px;
  top: -180px; left: -140px;
  background: none;
  animation: glowDrift 16s ease-in-out infinite alternate;
}

.glow-hero::after {
  width: 560px; height: 560px;
  bottom: -180px; right: -110px;
  background: none;
  animation: glowDrift 22s ease-in-out infinite alternate-reverse;
}

@keyframes glowDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(48px, 36px) scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .glow-hero::before, .glow-hero::after { animation: none; }
}

.glow-hero > * { position: relative; z-index: 1; }

/* ----------------------------------------------------------------
   PURPLE HERO — modifier for .glow-hero. The top of the page reads
   purple and dissolves into the white page body, so the hero and the
   content below it read as one surface instead of two stacked blocks.
   ---------------------------------------------------------------- */
.glow-hero.hero-purple {
  background:
    linear-gradient(180deg,
      #E3D2F8 0%,
      #EDE1FB 28%,
      #F6EFFE 55%,
      #FCF9FF 80%,
      var(--white) 100%);
}

/* reuse the drifting glow circles to keep the wash from looking flat */
.glow-hero.hero-purple::before {
  background: radial-gradient(circle, rgba(124,58,160,0.20), transparent 68%);
}

.glow-hero.hero-purple::after {
  background: radial-gradient(circle, rgba(187,134,252,0.16), transparent 70%);
}

/* pills sitting on the wash need a lighter fill than --purple-100 to read */
.glow-hero.hero-purple .team-badge,
.glow-hero.hero-purple .section-label {
  background: rgba(255,255,255,0.72);
}

/* simple centered page heading inside a glow-hero */
.page-hero { padding: 90px 0 60px; text-align: center; }
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 12px;
}
.page-hero p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto;
}
