/* أبصر — Abser design system */

:root {
  /* Palette (default: warm academic teal) */
  --primary: #0E7C86;
  --primary-dark: #0A5A62;
  --primary-soft: #E6F2F3;
  --accent: #E8B14F;
  --accent-soft: #FBF1DC;
  --ink: #0F1E22;
  --body: #3B4A4E;
  --muted: #6B7A7E;
  --surface: #FFFFFF;
  --cream: #FBF7F0;
  --border: #E8E6E0;
  --border-strong: #D6D2C7;

  /* Type */
  --font-body: 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;

  /* Layout */
  --max: 1240px;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 30, 34, 0.04);
  --shadow: 0 4px 24px rgba(15, 30, 34, 0.06);
  --shadow-lg: 0 20px 60px rgba(15, 30, 34, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--body);
  background: var(--surface);
  line-height: 1.7;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

/* ------------------------------------------------------------------ */
/* TOP BAR                                                             */
/* ------------------------------------------------------------------ */
.topbar {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  padding: 10px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.topbar-left, .topbar-right { display: flex; gap: 20px; align-items: center; }
.topbar a:hover { color: white; }
.topbar .sep { width: 1px; height: 14px; background: rgba(255,255,255,0.15); }

/* ------------------------------------------------------------------ */
/* NAV                                                                 */
/* ------------------------------------------------------------------ */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo img { height: 44px; width: auto; }
.nav-logo-text { font-weight: 700; font-size: 22px; color: var(--ink); letter-spacing: -0.01em; }
.nav-logo-sub { font-size: 11px; color: var(--muted); font-weight: 500; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--body);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); border-bottom-color: var(--primary); }

.nav-actions { display: flex; gap: 12px; align-items: center; }

/* ------------------------------------------------------------------ */
/* BUTTONS                                                             */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-sm);
  transition: all 0.18s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--primary-soft); color: var(--primary); }
.btn-outline { border-color: var(--border-strong); color: var(--ink); background: white; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ------------------------------------------------------------------ */
/* HERO                                                                */
/* ------------------------------------------------------------------ */
.hero {
  position: relative;
  background: var(--cream);
  padding: 80px 0 100px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-soft) 0%, transparent 70%);
  opacity: 0.7;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -200px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; text-align: center; max-width: 900px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 24px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
}

.hero h1 {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero h1 .accent {
  color: var(--primary);
  position: relative;
  display: inline-block;
}
.hero h1 .accent::after {
  content: '';
  position: absolute;
  bottom: 4px;
  right: 0; left: 0;
  height: 8px;
  background: var(--accent-soft);
  z-index: -1;
  border-radius: 4px;
}

.hero-sub {
  font-size: 18px;
  color: var(--body);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* Search */
.search-hero {
  background: white;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
.search-hero .search-icon {
  padding: 0 16px;
  color: var(--muted);
  display: flex;
}
.search-hero input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  padding: 12px 0;
}
.search-hero input::placeholder { color: var(--muted); }
.search-hero .btn { padding: 12px 24px; }

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}
.chip {
  padding: 6px 14px;
  border-radius: 100px;
  background: white;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--body);
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }

.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 32px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.hero-stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ------------------------------------------------------------------ */
/* SECTIONS                                                            */
/* ------------------------------------------------------------------ */
section { padding: 100px 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
  gap: 32px;
  flex-wrap: wrap;
}
.section-head-text { max-width: 620px; }
.section-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.02em;
  text-transform: none;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-eyebrow::before {
  content: '';
  width: 24px; height: 2px;
  background: var(--primary);
}
.section-head h2 {
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.section-head p {
  font-size: 17px;
  color: var(--body);
  line-height: 1.7;
}
.section-head .view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 600;
  font-size: 15px;
}
.section-head .view-all:hover { gap: 10px; transition: gap 0.2s; }

/* ------------------------------------------------------------------ */
/* CATEGORIES                                                          */
/* ------------------------------------------------------------------ */
.categories-section { background: var(--cream); }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.cat-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.cat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.cat-card:nth-child(2n) .cat-icon { background: var(--accent-soft); color: #B78528; }
.cat-title { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.cat-count { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ */
/* COURSE CARDS                                                        */
/* ------------------------------------------------------------------ */
.course-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.course-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.course-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.course-thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  position: relative;
  overflow: hidden;
}
.course-thumb-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.5;
}
.course-thumb-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 30, 34, 0.85);
  color: white;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 500;
  backdrop-filter: blur(8px);
}
.course-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.course-cat {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
}
.course-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 12px;
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 48px;
}
.course-instructor {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.course-instructor-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}
.course-instructor-name { font-size: 13px; color: var(--body); }

.course-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.course-meta-item { display: flex; align-items: center; gap: 5px; }
.course-rating { color: var(--ink); font-weight: 600; }
.course-rating .star { color: var(--accent); }

/* ------------------------------------------------------------------ */
/* STATS BAND                                                          */
/* ------------------------------------------------------------------ */
.stats-band {
  background: var(--ink);
  color: white;
  padding: 80px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat-block { text-align: center; padding: 0 20px; border-right: 1px solid rgba(255,255,255,0.08); }
.stat-block:last-child { border-right: none; }
.stat-num {
  font-size: 56px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 12px;
}
.stat-num .plus { color: var(--accent); }
.stat-label { font-size: 15px; color: rgba(255,255,255,0.6); }

/* ------------------------------------------------------------------ */
/* INSTRUCTORS                                                         */
/* ------------------------------------------------------------------ */
.instr-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.instr-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.2s;
}
.instr-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.instr-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-dark);
  border: 3px solid white;
  box-shadow: 0 0 0 1px var(--border);
}
.instr-name { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.instr-title { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.instr-stats { display: flex; justify-content: center; gap: 20px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 16px; }
.instr-stats strong { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ */
/* TESTIMONIALS                                                        */
/* ------------------------------------------------------------------ */
.testimonials-section { background: var(--cream); }
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testi-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
}
.testi-quote {
  font-size: 40px;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 16px;
  font-family: Georgia, serif;
}
.testi-text {
  font-size: 15px;
  color: var(--body);
  line-height: 1.8;
  margin-bottom: 24px;
  flex: 1;
}
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
}
.testi-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.testi-role { font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------------ */
/* NEWS                                                                */
/* ------------------------------------------------------------------ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.news-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  transition: all 0.2s;
  cursor: pointer;
}
.news-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.news-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  position: relative;
}
.news-thumb-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 500;
}
.news-body { padding: 24px; }
.news-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 12px; align-items: center; }
.news-meta .tag { color: var(--primary); font-weight: 600; }
.news-title { font-size: 18px; font-weight: 600; color: var(--ink); line-height: 1.5; margin-bottom: 12px; }
.news-excerpt { font-size: 14px; color: var(--body); line-height: 1.7; }

/* ------------------------------------------------------------------ */
/* CTA BAND                                                            */
/* ------------------------------------------------------------------ */
.cta-band {
  padding: 80px 0;
  background: var(--primary);
  color: white;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  top: -100px; left: -100px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.cta-band::after {
  content: '';
  position: absolute;
  bottom: -150px; right: -100px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(0,0,0,0.08);
}
.cta-inner { position: relative; text-align: center; max-width: 720px; margin: 0 auto; }
.cta-inner h2 {
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.2;
}
.cta-inner p { font-size: 17px; color: rgba(255,255,255,0.85); margin-bottom: 32px; }
.cta-inner .btn-primary { background: white; color: var(--primary); }
.cta-inner .btn-primary:hover { background: var(--cream); }
.cta-inner .btn-outline { color: white; border-color: rgba(255,255,255,0.3); background: transparent; }
.cta-inner .btn-outline:hover { border-color: white; background: rgba(255,255,255,0.1); }

/* ------------------------------------------------------------------ */
/* FOOTER                                                              */
/* ------------------------------------------------------------------ */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 72px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 48px;
  margin-bottom: 56px;
}
.footer-brand { max-width: 320px; }
.footer-brand img { height: 48px; filter: brightness(0) invert(1); margin-bottom: 20px; }
.footer-brand p { font-size: 14px; line-height: 1.7; color: rgba(255,255,255,0.6); margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: all 0.2s;
}
.footer-social a:hover { border-color: var(--primary); background: var(--primary); color: white; }

.footer-col h4 { color: white; font-size: 14px; font-weight: 600; margin-bottom: 20px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 14px; color: rgba(255,255,255,0.6); }
.footer-col a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 16px;
}

/* ------------------------------------------------------------------ */
/* COURSES LISTING PAGE                                                */
/* ------------------------------------------------------------------ */
.page-head {
  background: var(--cream);
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--border);
}
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border-strong); }
.page-head h1 { font-size: 40px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; margin-bottom: 12px; }
.page-head p { font-size: 16px; color: var(--body); max-width: 640px; margin-bottom: 28px; }

.page-search {
  background: white;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 520px;
  box-shadow: var(--shadow-sm);
}
.page-search .search-icon { padding: 0 14px; color: var(--muted); }
.page-search input { flex: 1; border: none; outline: none; font-family: inherit; font-size: 15px; background: transparent; padding: 10px 0; }
.page-search .btn { padding: 10px 20px; font-size: 14px; }

.courses-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  padding: 48px 0 100px;
}
.filters { position: sticky; top: 100px; align-self: start; }
.filter-group { margin-bottom: 32px; }
.filter-group h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.filter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--body);
  cursor: pointer;
}
.filter-item input { accent-color: var(--primary); width: 16px; height: 16px; }
.filter-item .count { margin-right: auto; color: var(--muted); font-size: 12px; }
.filter-item:hover { color: var(--primary); }

.results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.results-count { font-size: 14px; color: var(--body); }
.results-count strong { color: var(--ink); font-weight: 600; }
.results-sort { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.results-sort select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: white;
  cursor: pointer;
}

.courses-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
}
.pagination button {
  min-width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--body);
  font-family: inherit;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.15s;
}
.pagination button:hover { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ------------------------------------------------------------------ */
/* LAYOUT VARIANT: bordered vs shadowed cards                          */
/* ------------------------------------------------------------------ */
body[data-layout='shadowed'] .course-card,
body[data-layout='shadowed'] .cat-card,
body[data-layout='shadowed'] .instr-card,
body[data-layout='shadowed'] .testi-card,
body[data-layout='shadowed'] .news-card {
  border-color: transparent;
  box-shadow: var(--shadow);
}
body[data-layout='shadowed'] .course-card:hover,
body[data-layout='shadowed'] .cat-card:hover,
body[data-layout='shadowed'] .instr-card:hover,
body[data-layout='shadowed'] .news-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

/* ------------------------------------------------------------------ */
/* RESPONSIVE                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 1000px) {
  .cat-grid, .course-grid, .instr-grid { grid-template-columns: repeat(2, 1fr); }
  .testi-grid, .news-grid, .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .courses-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .courses-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .nav-links { display: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  section { padding: 60px 0; }
  .hero { padding: 60px 0 80px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .cat-grid, .course-grid, .instr-grid, .testi-grid, .news-grid, .stats-grid, .courses-grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .search-hero { flex-direction: column; padding: 12px; border-radius: 16px; }
  .search-hero .btn { width: 100%; }
}
