/* 1. CSS Custom Properties (Design Tokens) .............. */
:root {
  --primary-color: #62a92b;
  --gradient-color: #659932;
  --bg-main: #16181b;
  --bg-surface: #1e2124;
  --bg-3: #252830;
  --text-primary: #e8e8e8;
  --text-secondary: #9a9a9a;
  --text-muted: #666666;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.18);
  --border-color-active: rgba(98, 169, 43, 0.4);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.45);
  --font-code: "DM Mono", "Courier New", monospace;
  --font-display: "Cairo", "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-body: "Cairo", "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  --text-hero: clamp(2.1rem, 4.6vw, 3.25rem);
  --text-section: clamp(1.75rem, 3vw, 2.25rem);
  --text-card-title: 1.125rem;
  --text-body: 1rem;
  --text-small: 0.875rem;
  --text-tiny: 0.75rem;
  --space-section-y: clamp(3rem, 6vw, 5rem);
  --space-card: 1.5rem;
  --space-card-lg: 2rem;
  --gap-sm: 0.75rem;
  --gap-md: 1rem;
  --gap-lg: 1.5rem;
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-full: 9999px;
}

[data-theme="light"] {
  --bg-main: #f5f5f0;
  --bg-surface: #ffffff;
  --bg-3: #f0f0eb;
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-hover: rgba(0, 0, 0, 0.18);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 34px rgba(0, 0, 0, 0.14);
}

/* 2. Base Reset & Defaults .............................. */
* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(22, 24, 27, 0.96), rgba(22, 24, 27, 0.96)),
    url("../vendor/aymanhood/static-bg.png") center top / 900px auto repeat;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  width: 100%;
}

[data-theme="light"] body {
  background:
    linear-gradient(rgba(245, 245, 240, 0.94), rgba(245, 245, 240, 0.94)),
    url("../vendor/aymanhood/static-bg.png") center top / 900px auto repeat;
}

img {
  max-width: 100%;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: #9ccf66;
}

main,
section,
.container,
.row,
[class*="col-"] {
  min-width: 0;
}

body * {
  letter-spacing: 0;
}

[data-aos] {
  opacity: 1 !important;
  transform: none !important;
  transition-property: transform, opacity !important;
}

::selection {
  background: rgba(98, 169, 43, 0.35);
  color: var(--text-primary);
}

.text-muted,
.text-muted-custom {
  color: var(--text-muted) !important;
}

.text-secondary,
.text-secondary-2 {
  color: var(--text-secondary) !important;
}

.text-primary {
  color: var(--text-primary) !important;
}

.bg-white,
.bg-light {
  background: var(--bg-surface) !important;
}

/* 3. Typography Rules ................................... */
.site-name-text,
.section-title,
.hero-title {
  font-family: var(--font-display);
}

.number-counter,
.price-tag,
.price-free,
.price-paid {
  font-family: var(--font-code);
}

.section-title {
  font-size: var(--text-section);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.fw-800 {
  font-weight: 800;
}

.fw-600 {
  font-weight: 600;
}

/* 4. Layout Utilities .................................. */
.academy-section {
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
}

.academy-panel,
.card,
.dropdown-menu,
.table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
}

.card {
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
  border-color: var(--border-color-hover);
}

.alert {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-3);
  color: var(--text-primary);
}

.alert-info {
  background: rgba(98, 169, 43, 0.09);
  border-color: var(--border-color-active);
  color: var(--text-primary);
}

.alert-success {
  background: rgba(25, 135, 84, 0.12);
  border-color: rgba(25, 135, 84, 0.35);
  color: var(--text-primary);
}

.table,
.table-dark {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-primary);
  --bs-table-border-color: var(--border-color);
}

.breadcrumb {
  gap: 0.35rem;
}

.breadcrumb-item,
.breadcrumb-item a {
  color: var(--text-secondary);
  font-size: var(--text-small);
}

.breadcrumb-item.active {
  color: var(--primary-color);
}

.z-999 {
  z-index: 999;
}

.icon-shape {
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  background: var(--bg-3);
  border-color: var(--border-color) !important;
  border-radius: var(--radius-sm);
}

.hover-up {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-up:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

/* 5. Navigation (Navbar + Offcanvas) .................... */
header {
  position: sticky;
  top: 0;
  z-index: 998;
  pointer-events: none;
}

header .container {
  pointer-events: auto;
}

.navbar-academy {
  background: rgba(22, 24, 27, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  position: relative;
  top: 16px;
  margin-top: 16px;
  transition: all 0.3s ease;
  min-height: 74px;
}

[data-theme="light"] .navbar-academy {
  background: rgba(255, 255, 255, 0.86);
}

.navbar-academy.scrolled {
  background: rgba(18, 20, 23, 0.96);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  top: 8px;
}

[data-theme="light"] .navbar-academy.scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.12);
}

.navbar-brand {
  color: var(--text-primary) !important;
}

.nav-link {
  color: var(--text-secondary) !important;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.5rem 1rem !important;
  transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color) !important;
}

.btn-nav-auth,
.btn-outline-custom {
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-nav-auth:hover,
.btn-outline-custom:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(98, 169, 43, 0.08);
}

.btn-primary,
.btn-primary-2 {
  background: var(--primary-color) !important;
  color: #ffffff !important;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 700;
  min-height: 44px;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover,
.btn-primary-2:hover {
  background: var(--gradient-color) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.btn-outline-primary {
  border-color: var(--primary-color) !important;
  color: var(--primary-color) !important;
  background: transparent !important;
}

.btn-outline-primary:hover {
  background: var(--primary-color) !important;
  color: #fff !important;
}

.site-name-text {
  font-weight: 500;
  color: var(--text-primary);
}

.main-logo .site-name-text {
  font-size: clamp(1.1rem, 2vw, 1.45rem) !important;
  font-weight: 800;
}

.theme-toggle .dark-icon {
  display: none;
}

.burger-icon {
  width: 44px;
  height: 44px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
  cursor: pointer;
  background: var(--bg-3);
  border-color: var(--border-color) !important;
}

.burger-icon span {
  display: block;
  height: 2px;
  border-radius: var(--radius-full);
  background: var(--text-primary);
}

.body-overlay-1 {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.25s ease;
}

.body-overlay-1.active {
  opacity: 1;
  pointer-events: auto;
}

.offcanvas-info {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  width: min(360px, 86vw);
  background: var(--bg-surface);
  border-inline-start: 1px solid var(--border-color);
  z-index: 1001;
  padding: 2rem;
  transform: translateX(105%);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-hover);
}

[dir="rtl"] .offcanvas-info {
  transform: translateX(-105%);
}

.offcanvas-info.active {
  transform: translateX(0);
}

.offcanvas-close {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.25rem;
}

.offcanvas-close button {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-3);
  color: var(--text-primary);
}

.mobile-menu a {
  display: block;
  color: var(--text-primary);
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
}

.badge-country {
  cursor: pointer;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: var(--text-tiny);
  font-weight: 700;
}

.badge-country.active {
  background: rgba(98, 169, 43, 0.16);
  border-color: var(--border-color-active);
  color: var(--primary-color);
}

/* 6. Hero Section ....................................... */
.section-hero-2 {
  padding-top: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.hero-shell {
  overflow: hidden;
  background: var(--bg-surface);
  min-height: auto;
}



.hero-copy {
  max-width: 680px;
}

.hero-kicker {
  color: var(--primary-color);
  font-family: var(--font-code);
  font-size: 0.8rem;
}



.hero-title {
  line-height: 1.15;
  color: var(--text-primary);
  font-weight: 800;
}



.typewriter {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
}

.brand-logo,
.tech-tile {
  background: var(--bg-3);
  border: 1px solid var(--border-color);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.brand-logo:hover,
.tech-tile:hover {
  border-color: var(--border-color-active);
  transform: translateY(-2px);
}

/* 7. Stats/Counter Section .............................. */
.stats-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.stat-card {
  min-height: 150px;
  padding: 1.5rem;
  border-inline-end: 1px solid var(--border-color);
  display: grid;
  place-items: center;
  gap: 0.35rem;
}

.stat-card:last-child {
  border-inline-end: 0;
}

.stat-icon {
  color: var(--primary-color);
  font-size: 1.5rem;
}

.number-counter {
  color: var(--text-primary);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 500;
}

/* 8. Course Cards ....................................... */
.course-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.3s ease;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-color-hover);
}

.course-card .thumbnail-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.course-card .thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.course-card:hover .thumbnail-wrapper img {
  transform: scale(1.07);
}

.course-card .card-body {
  padding: var(--space-card);
  background: var(--bg-surface);
}

.course-title {
  font-family: var(--font-body);
  font-size: var(--text-card-title);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: var(--text-tiny);
  color: var(--text-muted);
  margin: 0.65rem 0;
}

.course-meta i {
  color: var(--primary-color);
  margin-inline-end: 0.25rem;
}

.price-free {
  color: var(--primary-color);
  font-weight: 700;
  font-size: var(--text-card-title);
}

.price-paid {
  font-weight: 700;
  font-size: var(--text-card-title);
  color: var(--text-primary);
}

.price-original,
.old-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: var(--text-small);
  margin-inline-start: 0.5rem;
}

.category-badge,
.difficulty-badge {
  position: absolute;
  top: 0.75rem;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0;
}

.category-badge {
  inset-inline-start: 0.75rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #fff;
}

.difficulty-badge {
  inset-inline-end: 0.75rem;
  background: rgba(98, 169, 43, 0.2);
  color: var(--primary-color);
}

/* 9. Blog Cards ......................................... */
.blog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 100%;
}

.blog-card .thumbnail-wrapper {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
}

.blog-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.blog-card:hover img {
  transform: scale(1.06);
}

.blog-arrow {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-color);
  color: #fff;
  opacity: 0;
  transition: all 0.25s ease;
}

.blog-card:hover .blog-arrow {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* 10. Section Labels & Headings ......................... */
.text-linear-4 {
  background: linear-gradient(90deg, var(--primary-color) 0%, #9ccf66 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
}

.section-label {
  color: var(--primary-color);
}

/* 11. box-linear-animation .............................. */
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.box-linear-animation {
  position: relative;
  border-radius: inherit;
}

.box-linear-animation::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), transparent 70%, var(--primary-color) 80%, #9ccf66 85%, var(--primary-color) 90%, transparent 100%);
  animation: rotate-border 4s linear infinite;
  z-index: 0;
  opacity: 0.6;
}

.box-linear-animation::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: var(--bg-surface);
  z-index: 1;
}

.box-linear-animation > * {
  position: relative;
  z-index: 2;
}

/* 12. Buttons ............................................ */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 700;
}

/* 13. Forms & Inputs .................................... */
.form-control,
.form-select,
.form-control-academy {
  background: var(--bg-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body);
  min-height: 48px;
  padding: 0.75rem 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus,
.form-select:focus,
.form-control-academy:focus {
  background: var(--bg-3);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(98, 169, 43, 0.12);
  color: var(--text-primary);
  outline: none;
}

.form-control:disabled,
.form-select:disabled,
.form-control[readonly] {
  background: var(--bg-3);
  border-color: var(--border-color);
  color: var(--text-muted);
  opacity: 1;
}

.form-label,
.form-label-academy {
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.invalid-feedback,
.form-error {
  color: #dc3545;
  font-size: var(--text-tiny);
  margin-top: 0.35rem;
}

.form-check-input {
  background-color: var(--bg-3);
  border-color: var(--border-color);
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* 14. Auth Pages ......................................... */
.auth-container {
  min-height: calc(100dvh - 90px);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(rgba(22, 24, 27, 0.96), rgba(22, 24, 27, 0.96)),
    url("../vendor/aymanhood/static-bg.png") center / cover;
}

.auth-card {
  position: relative;
  z-index: 2;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  width: 100%;
  max-width: 480px;
  margin: 2rem 1rem;
  box-shadow: var(--shadow-card);
}

/* 15. Course Single Page ................................ */
.course-detail-hero {
  padding: clamp(4.5rem, 8vw, 3rem) 0 2rem;
}

.course-preview {
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.course-preview img,
.course-preview iframe {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.course-sticky-sidebar {
  position: sticky;
  top: 110px;
}

.lesson-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: var(--text-small);
  color: var(--text-secondary);
}

.lesson-item:last-child {
  border-bottom: 0;
}

.lesson-item i {
  color: var(--primary-color);
  font-size: 16px;
  flex-shrink: 0;
}

.mobile-course-cta {
  display: none;
}

/* 16. Blog Content Typography ........................... */
.blog-content {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 72ch;
}

.content-prose {
  color: var(--text-secondary);
  line-height: 1.9;
}

.content-prose h2,
.content-prose h3,
.content-prose h4 {
  color: var(--text-primary);
  font-weight: 800;
}

.blog-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-inline-start: 1rem;
  border-inline-start: 3px solid var(--primary-color);
}

.blog-content h3 {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2rem;
}

.blog-content p {
  margin-bottom: 1.5rem;
}

.blog-content code {
  background: var(--bg-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.15em 0.5em;
  font-family: var(--font-display);
  font-size: 0.875em;
  color: var(--primary-color);
}

.blog-content pre {
  background: var(--bg-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.blog-content blockquote {
  border-inline-start: 3px solid var(--primary-color);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-style: italic;
}

/* 17. Profile / Dashboard User Pages .................... */
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), #9ccf66);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
}

.course-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.course-row img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.progress-bar-academy {
  background: var(--bg-3);
  border-radius: var(--radius-full);
  height: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  background: linear-gradient(90deg, var(--primary-color), #9ccf66);
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 18. Tech Ticker ....................................... */
.ticker-container {
  overflow: hidden;
  max-width: 100%;
}

.ticker-row {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: tickerLeft 25s linear infinite;
}

.ticker-row.reverse {
  animation: tickerRight 25s linear infinite;
}

.ticker-container:hover .ticker-row {
  animation-play-state: paused;
}

.tech-tile {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.tech-tile img {
  max-width: 42px;
  max-height: 42px;
}

/* 19. Testimonials Swiper ............................... */
.testimonial-card {
  background: var(--bg-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-card);
  height: 100%;
}

.swiper-slide-active .testimonial-card {
  border-color: var(--border-color-active);
}

/* 20. Footer ............................................ */
.footer {
  position: relative;
  padding: 4rem 0 2rem;
  background:
    linear-gradient(rgba(22, 24, 27, 0.92), rgba(22, 24, 27, 0.98)),
    url("../vendor/aymanhood/footer-bg.png") center / cover;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.footer-title {
  color: var(--text-primary);
  font-weight: 800;
  margin-bottom: 1rem;
}

.footer-link {
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.6rem;
}

.footer-link:hover {
  color: var(--primary-color);
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all 0.25s ease;
}

.social-link:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-3px);
}

/* 21. Scroll-to-Top Button .............................. */
.btn-scroll-top {
  position: fixed;
  inset-inline-end: 22px;
  bottom: 22px;
  width: 48px;
  height: 48px;
  z-index: 997;
  display: grid;
  place-items: center;
  color: var(--primary-color);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.btn-scroll-top svg {
  position: absolute;
  inset: 0;
  fill: var(--bg-surface);
}

.btn-scroll-top path {
  fill: none;
  stroke: var(--primary-color);
  stroke-width: 2;
}

.btn-scroll-top i {
  position: relative;
  z-index: 2;
}

/* 22. Preloader ......................................... */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-main);
  display: grid;
  place-items: center;
  z-index: 2000;
}

.preloader-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  animation: spin 0.8s linear infinite;
}

/* 23. Flash Messages / Toasts ........................... */
.flash-stack {
  position: fixed;
  top: 100px;
  inset-inline-end: 18px;
  z-index: 1100;
  width: min(360px, calc(100vw - 36px));
}

.flash-message {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-inline-start: 4px solid var(--primary-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.flash-message.error {
  border-inline-start-color: #dc3545;
}

/* 24. Animations & Keyframes ............................ */
@keyframes rotate-border {
  to {
    --angle: 360deg;
  }
}



@keyframes tickerLeft {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes tickerRight {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 25. Mobile Responsive (max-width: 768px) .............. */
  @media (max-width: 991.98px) {
  .burger-icon {
    display: flex;
  }

  .navbar-academy .container {
    padding-inline: 1rem !important;
  }

  .navbar-social {
    gap: 0.5rem !important;
  }

  .site-name-text {
    font-size: 1.1rem !important;
  }

  .stat-card {
    border-inline-end: 0;
    border-bottom: 1px solid var(--border-color);
  }

  .section-title {
    text-align: center;
  }

  .course-sticky-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .box-linear-animation::before {
    animation: none;
    background: none;
  }

  .box-linear-animation::after {
    inset: 0;
  }

  .hover-up:hover,
  .course-card:hover {
    transform: none;
    box-shadow: none;
  }

  .section-hero-2 {
    padding-top: 1.5rem;
  }

  .hero-portrait {
    width: min(250px, 72vw);
  }

  .ticker-row {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 100%;
  }

  .tech-tile {
    width: 58px;
    height: 58px;
  }

  .tech-tile img {
    max-width: 34px;
    max-height: 34px;
  }

  .course-row {
    grid-template-columns: 92px 1fr;
  }

  .course-row img {
    width: 92px;
    height: 70px;
  }

  .course-row .course-row-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .mobile-course-cta {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 996;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
  }

  body.has-mobile-cta {
    padding-bottom: 78px;
  }
}

/* 26. Extra Small Mobile (max-width: 480px) ............. */
@media (max-width: 480px) {
  .navbar-brand img {
    max-height: 32px !important;
  }

  .navbar-academy {
    margin-top: 8px;
    top: 8px;
  }

  .icon-shape,
  .burger-icon {
    width: 42px;
    min-width: 42px;
    height: 42px;
  }

  .auth-card,
  .academy-panel {
    padding: 1.25rem !important;
  }
}

/* 27. Dark / Light Mode Overrides ....................... */
[data-theme="light"] .footer {
  background:
    linear-gradient(rgba(245, 245, 240, 0.9), rgba(245, 245, 240, 0.98)),
    url("../vendor/aymanhood/footer-bg.png") center / cover;
}

[data-theme="light"] .category-badge {
  background: rgba(22, 24, 27, 0.82);
}

[data-theme="light"] .section-hero-2::before {
  background: linear-gradient(135deg, rgba(245, 245, 240, 0.88) 0%, rgba(245, 245, 240, 0.75) 50%, rgba(245, 245, 240, 0.65) 100%);
}

[data-theme="light"] .hero-shell {
  background: rgba(255, 255, 255, 0.72);
}

/* 28. Print Styles ...................................... */
@media print {
  header,
  .footer,
  .btn-scroll-top,
  .offcanvas-info,
  .body-overlay-1 {
    display: none !important;
  }
}

/* Phase 2: Dynamic Homepage / FAQ / Dashboard Touches ... */
@property --border-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.glowing-border {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.glowing-border::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(from var(--border-angle), transparent 75%, var(--primary-color) 85%, rgba(98, 169, 43, 0.6) 90%, var(--primary-color) 95%, transparent 100%);
  animation: rotateBorder 6s linear infinite;
  z-index: 0;
  opacity: var(--glow-opacity, 0.5);
}

.glowing-border::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: var(--bg-main);
  z-index: 1;
}

.glowing-border > * {
  position: relative;
  z-index: 2;
}

.section-hero-2 {
  position: relative;
}

.section-hero-2::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(22, 24, 27, 0.88) 0%, rgba(22, 24, 27, 0.75) 50%, rgba(22, 24, 27, 0.65) 100%);
  z-index: 0;
}

.section-hero-2 .container {
  position: relative;
  z-index: 2;
}

.hero-shell {
  background: rgba(30, 33, 36, 0.72);
}

.hero-shell .box-linear-animation::after {
  background: transparent;
}





.code-syntax-tag,
.hero-kicker {
  color: #e06c75 !important;
  font-family: var(--font-code);
  font-size: 13px;
}

.hero-title .code-accent {
  color: #e06c75;
}

.hero-portrait-stage {
  min-width: min(420px, 86vw);
}

.hero-portrait-wrapper,
.instructor-portrait-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-portrait-rect,
.instructor-portrait-rect {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-hover);
  display: block;
  filter: grayscale(1);
}

.hero-portrait-rect {
  max-width: 380px;
}

.instructor-portrait-rect {
  max-width: 360px;
}

.hero-floating-icon {
  position: absolute;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  animation: floatIcon var(--float-duration, 3s) ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  will-change: transform;
  pointer-events: none;
  box-shadow: var(--shadow-card);
}

.hero-floating-icon-1 { top: 8%; inset-inline-start: 1%; --float-duration: 3.2s; --float-delay: 0s; }
.hero-floating-icon-2 { top: 20%; inset-inline-end: 0; --float-duration: 2.8s; --float-delay: 0.6s; }
.hero-floating-icon-3 { bottom: 22%; inset-inline-start: 0; --float-duration: 3.5s; --float-delay: 1.2s; }
.hero-floating-icon-4 { bottom: 9%; inset-inline-end: 7%; --float-duration: 2.6s; --float-delay: 0.4s; }
.hero-floating-icon-5 { top: 48%; inset-inline-end: -4%; --float-duration: 3.8s; --float-delay: 1.8s; }

.tech-ticker-container {
  max-width: 380px;
  position: relative;
  mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
}

.tech-ticker-track,
.tech-ticker-track-full {
  display: flex;
  width: max-content;
  will-change: transform;
  align-items: center;
}

.tech-ticker-track {
  gap: 1rem;
  animation: tickerScroll 20s linear infinite;
}

.tech-ticker-container:hover .tech-ticker-track,
.tech-ticker-full:hover .tech-ticker-track-full {
  animation-play-state: paused;
}

.tech-ticker-item .brand-logo {
  width: 52px;
  height: 52px;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tech-ticker-item:hover .brand-logo,
.tech-ticker-item-full:hover .tech-icon-box {
  border-color: var(--primary-color) !important;
  transform: scale(1.06);
}

/* stats-panel-bg defined below in Phase 2 section */

.stats-overlay {
  position: absolute;
  inset: 0;
  background: rgba(22, 24, 27, 0.82);
  z-index: 0;
}

.counter-wrapper {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem;
  color: var(--text-primary);
}

.plus-icon-counter {
  color: var(--text-secondary);
  font-family: var(--font-code);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.tech-ticker-full {
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.tech-ticker-track-full {
  gap: 1.5rem;
  animation: tickerFullScroll 30s linear infinite;
}

.tech-icon-box {
  width: 72px;
  height: 72px;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  border-color: var(--border-color) !important;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.tech-icon-label {
  display: block;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-family: var(--font-body);
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover,
.faq-item.is-open {
  border-color: var(--border-color-active);
}

.faq-item.is-open {
  box-shadow: 0 0 0 1px rgba(98, 169, 43, 0.15);
}

.faq-question {
  background: transparent;
  border: none;
  padding: 1.25rem 1.5rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 700;
  cursor: pointer;
  gap: 1rem;
  transition: color 0.25s ease;
  text-align: start;
  min-height: 44px;
}

.faq-question:hover,
.faq-item.is-open .faq-question {
  color: var(--primary-color);
}

.faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  color: var(--text-muted);
  font-size: 14px;
}

.faq-item.is-open .faq-icon {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  transform: rotate(180deg);
}

.faq-icon-minus,
.faq-item.is-open .faq-icon-plus {
  display: none;
}

.faq-item.is-open .faq-icon-minus {
  display: block;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.faq-item.is-open .faq-answer {
  max-height: 600px;
}

.faq-answer-inner {
  padding: 1rem 1.5rem 1.25rem;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-small);
  line-height: 1.8;
  border-top: 1px solid var(--border-color);
}

.faq-category-tag {
  background: var(--bg-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  font-size: var(--text-tiny);
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
}

.dropdown-academy {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  box-shadow: var(--shadow-hover);
  min-width: 200px;
}

.dropdown-academy .dropdown-item {
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-small);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-academy .dropdown-item:hover {
  background: var(--bg-3);
  color: var(--text-primary);
}

.user-avatar-thumb {
  border-color: var(--border-color) !important;
  object-fit: cover;
}

.student-quick-access {
  position: fixed;
  bottom: 5rem;
  inset-inline-start: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--primary-color);
  color: #fff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 16px rgba(98, 169, 43, 0.4);
  z-index: 100;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.student-quick-access:hover {
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(98, 169, 43, 0.6);
}

.video-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.video-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.video-modal-inner {
  position: relative;
  width: 100%;
  max-width: 900px;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.video-modal-overlay.is-open .video-modal-inner {
  transform: scale(1);
}

.video-modal-frame-wrap {
  position: relative;
  padding-top: 56.25%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.video-modal-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-modal-close {
  position: absolute;
  top: -2.75rem;
  inset-inline-end: 0;
  width: 36px;
  height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
}

.coupon-feedback {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 13px;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
}

.coupon-feedback.success {
  background: rgba(98, 169, 43, 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(98, 169, 43, 0.25);
}

.coupon-feedback.error {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.25);
}

.course-final-price {
  font-family: var(--font-code);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.course-original-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 1rem;
}

.theater-mode .lesson-progress-bar {
  position: sticky;
  top: 0;
  z-index: 100;
}

.theater-mode #videoContainer {
  max-width: 1100px;
  margin: 0 auto;
}

.paths-hero-bg {
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: center;
}

.paths-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(22, 24, 27, 0.9) 0%, rgba(22, 24, 27, 0.7) 100%);
}

.filter-input {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 0.65rem 1rem;
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  outline: none;
  min-width: 160px;
}

.filter-input:focus {
  border-color: var(--border-color-active);
  box-shadow: 0 0 0 3px rgba(98, 169, 43, 0.12);
}

.filter-input option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.filter-input-search {
  padding-inline-start: 2.5rem;
  flex-grow: 1;
  width: 100%;
}

.filter-search-wrapper {
  position: relative;
}

.filter-search-icon {
  position: absolute;
  inset-inline-start: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

.btn-filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  padding: 0.65rem 1rem;
  font-size: 13px;
  text-decoration: none;
  transition: border-color 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}

.btn-filter-reset:hover {
  border-color: rgba(224, 108, 117, 0.4);
  color: #e06c75;
}

.filter-results-count {
  font-size: 13px;
  color: var(--text-muted);
}

@keyframes rotateBorder {
  to {
    --border-angle: 360deg;
  }
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-8px) rotate(2deg); }
  66% { transform: translateY(-4px) rotate(-1deg); }
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes tickerFullScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 992px) {
  .hero-portrait-rect { max-width: 280px; }
}

@media (max-width: 768px) {
  .glowing-border::before {
    animation: none;
    background: none;
  }

  .glowing-border::after {
    inset: 0;
  }

  .min-vh-section {
    min-height: auto;
    padding: 3rem 0;
  }

  .tech-ticker-container {
    max-width: 100%;
  }

  .tech-ticker-track {
    animation-duration: 15s;
  }

  .paths-hero-bg {
    min-height: 180px;
    border-radius: var(--radius-md);
  }
}

@media (max-width: 576px) {
  .hero-portrait-rect { max-width: 220px; }
}

@media (min-width: 992px) {
  .student-quick-access { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-floating-icon,
  .tech-ticker-track,
  .tech-ticker-track-full,
  .glowing-border::before {
    animation: none !important;
  }

  .tech-ticker-container,
  .tech-ticker-full {
    mask-image: none;
    -webkit-mask-image: none;
  }

  .tech-ticker-track,
  .tech-ticker-track-full {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
}

@media (hover: none) {
  .hover-up:hover {
    transform: none;
    box-shadow: none;
  }
}

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

/* Phase 2 hotfix: landing background, hero visibility, and GPU-friendly glow */
body.home-page {
  background:
    linear-gradient(rgba(22, 24, 27, 0.96), rgba(22, 24, 27, 0.96)),
    url("../vendor/aymanhood/static-bg.png") center top / 900px auto repeat;
  background-color: var(--bg-main);
}

body.home-page header {
  background: transparent;
}

body.home-page .navbar-academy {
  background: rgba(22, 24, 27, 0.58);
}

body.home-page .navbar-academy.scrolled {
  background: rgba(18, 20, 23, 0.9);
}

body.home-page .section-hero-2 {
  background: transparent;
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
}

body.home-page .section-hero-2::before {
  content: none;
}

.hero-shell {
  --glow-inner-bg: rgba(22, 24, 27, 0.74);
  background: transparent;
  min-height: 0;
}

.hero-shell-inner {
  border-radius: inherit;
}

.hero-shell .row {
  position: relative;
  z-index: 3;
}

.glowing-border {
  overflow: hidden;
  isolation: isolate;
}

.glowing-border::before {
  inset: -40%;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    transparent 0 72%,
    rgba(98, 169, 43, 0.15) 76%,
    var(--primary-color) 82%,
    rgba(156, 207, 102, 0.75) 88%,
    transparent 94% 100%
  );
  animation: glowingBorderSpin 8s linear infinite;
  opacity: var(--glow-opacity, 0.72);
  transform-origin: center;
  will-change: transform;
}

.glowing-border::after {
  inset: 1px;
  background: var(--glow-inner-bg, var(--bg-surface));
  pointer-events: none;
}

.glowing-border > * {
  position: relative;
  z-index: 2;
}

@keyframes glowingBorderSpin {
  to {
    transform: rotate(360deg);
  }
}

.stats-panel-bg {
  background-image: url("../images/sec2-bg.png");
  background-size: cover;
  background-position: center;
}

@media (max-width: 768px) {
  body.home-page {
    background:
      linear-gradient(rgba(22, 24, 27, 0.94), rgba(22, 24, 27, 0.94)),
      url("../vendor/aymanhood/static-bg.png") center top / 900px auto repeat;
  }

  .glowing-border::before {
    animation: none;
    background: transparent;
  }

  .glowing-border::after {
    inset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .glowing-border::before {
    animation: none !important;
  }
}

/* Phase 2 visual correction pass */
body.home-page {
  position: relative;
  background:
    linear-gradient(rgba(22, 24, 27, 0.96), rgba(22, 24, 27, 0.96)),
    url("../vendor/aymanhood/static-bg.png") center top / 900px auto repeat;
  background-color: var(--bg-main);
}

body.home-page::before {
  content: none;
}

body.home-page header,
body.home-page main,
body.home-page footer {
  position: relative;
  z-index: 1;
}

body.home-page .section-hero-2 {
  background: transparent;
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.hero-shell {
  --glow-inner-bg: rgba(30, 33, 36, 0.9);
  box-shadow: var(--shadow-hover);
}

.hero-shell .min-vh-section {
  min-height: clamp(560px, 72vh, 680px);
}

.hero-shell .tech-ticker-container,
.tech-ticker-full {
  max-width: 390px;
}

.tech-ticker-track,
.tech-ticker-track-full {
  gap: 1rem;
}

.glowing-border::before {
  inset: -2px;
  background: conic-gradient(
    from 0deg,
    transparent 0 70%,
    rgba(98, 169, 43, 0.16) 74%,
    rgba(156, 207, 102, 0.96) 82%,
    var(--primary-color) 88%,
    transparent 94% 100%
  );
  opacity: var(--glow-opacity, 0.95);
  animation: glowingBorderSpin 5.5s linear infinite;
}

.stats-overlay {
  background: rgba(22, 24, 27, 0.62);
}

.stats-panel-bg {
  background-image: url("../images/sec2-bg.png") !important;
  background-size: cover;
  background-position: center;
}





.lesson-item-preview {
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lesson-item-preview:hover,
.lesson-item-preview:focus-visible {
  background: rgba(98, 169, 43, 0.08);
  outline: none;
}

.lesson-meta-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.preview-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 34px;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-full);
  background: rgba(98, 169, 43, 0.12);
  border: 1px solid rgba(98, 169, 43, 0.34);
  color: var(--primary-color);
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  body.home-page::before {
    height: 760px;
  }

  .hero-shell .min-vh-section {
    min-height: auto;
  }

  .glowing-border::before {
    animation: none;
    background: transparent;
  }



  .lesson-meta-actions {
    flex-direction: column;
    gap: 0.4rem;
  }
}

/* Phase 2 final visual lock: exactly five icons, clear hero, scoped background */
body.home-page {
  position: relative;
  background:
    linear-gradient(rgba(22, 24, 27, 0.96), rgba(22, 24, 27, 0.96)),
    url("../vendor/aymanhood/static-bg.png") center top / 900px auto repeat !important;
  background-color: var(--bg-main) !important;
}

body.home-page::before {
  content: none;
}

body.home-page .section-hero-2,
body.home-page .section-hero-2::before {
  background: transparent !important;
}

.hero-shell {
  --glow-inner-bg: transparent;
  background: transparent !important;
}

.hero-shell-inner {
  background: rgba(30, 33, 36, 0.82);
  border-radius: inherit;
}

.hero-shell .row {
  opacity: 1;
  filter: none;
}

.glowing-border::before {
  inset: -35%;
  background: conic-gradient(
    from 0deg,
    transparent 0 72%,
    rgba(98, 169, 43, 0.08) 76%,
    rgba(156, 207, 102, 0.98) 83%,
    var(--primary-color) 88%,
    transparent 94% 100%
  ) !important;
  animation: glowingBorderSpin 7s linear infinite;
  opacity: var(--glow-opacity, 0.85);
  z-index: 0;
}

.glowing-border::after {
  background: transparent !important;
  pointer-events: none;
}

.hero-shell .tech-ticker-container {
  max-width: 360px;
  margin-inline: 0;
}

.tech-ticker-full {
  max-width: 560px;
  margin-inline: auto;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
}

.tech-ticker-track,
.tech-ticker-track-full {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-start !important;
  width: max-content !important;
  max-width: none !important;
  will-change: transform;
}

.tech-ticker-track {
  animation: fiveIconRibbon 6s ease-in-out infinite alternate !important;
}

.tech-ticker-track-full {
  animation: fiveIconRibbonFull 7s ease-in-out infinite alternate !important;
}

.tech-ticker-item,
.tech-ticker-item-full {
  flex: 0 0 auto;
}

@keyframes fiveIconRibbon {
  from { transform: translateX(16px); }
  to { transform: translateX(-16px); }
}

@keyframes fiveIconRibbonFull {
  from { transform: translateX(28px); }
  to { transform: translateX(-28px); }
}

@media (prefers-reduced-motion: reduce) {
  .tech-ticker-track,
  .tech-ticker-track-full {
    animation: none !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
  }
}

@media (max-width: 768px) {
  body.home-page::before {
    height: 700px;
  }

  .tech-ticker-full {
    max-width: 100%;
  }
}

/* Phase 2 hero clarity guard: keep glow behind content and prevent legacy overlays */
.hero-shell.glowing-border::after {
  content: none !important;
}

.hero-shell > .hero-shell-inner {
  position: relative;
  z-index: 2 !important;
  background: rgba(30, 33, 36, 0.66) !important;
}

.hero-shell,
.hero-shell-inner,
.hero-shell .row,
.hero-shell [class*="col-"],
.hero-shell .hero-portrait-wrapper,
.hero-shell .hero-content-stack,
.hero-shell .hero-title,
.hero-shell .hero-description,
.hero-shell .tech-ticker-container {
  opacity: 1 !important;
  filter: none !important;
}

.hero-shell .tech-ticker-track,
.section-tech .tech-ticker-track-full {
  gap: 1rem !important;
  flex-direction: row !important;
}

.section-tech .tech-ticker-full {
  min-height: 112px;
}

/* Fixes for Light Theme on Landing Page */
[data-theme="light"] body.home-page {
  background:
    linear-gradient(rgba(245, 245, 240, 0.94), rgba(245, 245, 240, 0.94)),
    url("../vendor/aymanhood/static-bg.png") center top / 900px auto repeat !important;
  background-color: var(--bg-main) !important;
}

[data-theme="light"] body.home-page .navbar-academy {
  background: rgba(255, 255, 255, 0.58) !important;
}

[data-theme="light"] body.home-page .navbar-academy.scrolled {
  background: rgba(245, 245, 240, 0.9) !important;
}

[data-theme="light"] .hero-shell-inner,
[data-theme="light"] .hero-shell > .hero-shell-inner {
  background: rgba(255, 255, 255, 0.82) !important;
}

[data-theme="light"] .stats-overlay {
  background: rgba(245, 245, 240, 0.82) !important;
}

[data-theme="light"] .paths-hero-overlay {
  background: linear-gradient(135deg, rgba(245, 245, 240, 0.9) 0%, rgba(245, 245, 240, 0.7) 100%) !important;
}

/* Highly professional learning experience features icons */
.icon-shape-lg {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(98, 169, 43, 0.1);
  color: var(--primary-color);
  border-radius: 20px;
  border: 1px solid rgba(98, 169, 43, 0.2);
}
[data-theme="light"] .icon-shape-lg {
  background: rgba(98, 169, 43, 0.15);
  border-color: rgba(98, 169, 43, 0.3);
}



