/* ============================================================
   German Vibes — main.css
   Theme: German Flag (Black · Red · Gold)
   Font: Tajawal (AR) + Inter (EN/DE)
   ============================================================ */

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

:root {
  /* German flag */
  --black:        #000000;
  --black-soft:   #1a1a1a;
  --red:          #DD0000;
  --red-light:    #ff2222;
  --red-dark:     #a30000;
  --gold:         #FFCE00;
  --gold-light:   #ffdc4a;
  --gold-dark:    #c9a200;

  --red-glow:     rgba(221, 0, 0, .28);
  --gold-glow:    rgba(255, 206, 0, .25);

  /* Dark surface (default) */
  --bg-primary:   #0a0a0a;
  --bg-secondary: #131313;
  --bg-card:      #1a1a1a;
  --bg-card-hover:#222;
  --bg-input:     #131313;
  --border:       rgba(255, 255, 255, .08);
  --border-focus: var(--red);
  --text-primary: #f0f0f0;
  --text-secondary: #aaa;
  --text-muted:   #777;

  --shadow-sm: 0 2px 8px rgba(0,0,0,.4);
  --shadow-md: 0 4px 20px rgba(0,0,0,.5);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.6);
  --shadow-red:  0 4px 24px var(--red-glow);
  --shadow-gold: 0 4px 24px var(--gold-glow);

  --font-ar: 'Tajawal', 'Cairo', sans-serif;
  --font-en: 'Inter', 'Tajawal', sans-serif;

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   32px;
  --radius-full: 9999px;

  --t-fast:   .15s ease;
  --t-normal: .3s ease;
  --t-slow:   .5s ease;

  --nav-h: 76px;
}

/* Light mode */
body.light-mode {
  --bg-primary:   #fafafa;
  --bg-secondary: #ffffff;
  --bg-card:      #ffffff;
  --bg-card-hover:#f3f3f3;
  --bg-input:     #f5f5f5;
  --border:       rgba(0,0,0,.1);
  --text-primary: #0a0a0a;
  --text-secondary:#555;
  --text-muted:   #999;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.14);
}

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

body {
  font-family: var(--font-ar);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--t-normal), color var(--t-normal);
}
body[data-lang="en"], body[data-lang="de"] { font-family: var(--font-en); }

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; background: none; }
input, textarea, select { font-family: inherit; outline: none; }

.text-red    { color: var(--red); }
.text-gold   { color: var(--gold); }
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mt-4{margin-top:2rem}.mt-5{margin-top:3rem}
.mb-1{margin-bottom:.5rem}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}.mb-4{margin-bottom:2rem}
.gap-1{gap:.5rem}.gap-2{gap:1rem}.gap-3{gap:1.5rem}.gap-4{gap:2rem}
.flex { display:flex; }
.flex-center { display:flex; align-items:center; justify-content:center; }
.flex-between { display:flex; align-items:center; justify-content:space-between; }
.hidden { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar       { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--red), var(--gold)); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

::selection { background: var(--red); color: #fff; }

/* ════════════════════════════════════════════════════════════
   PAGE LOADER
   ════════════════════════════════════════════════════════════ */
#page-loader {
  position: fixed; inset: 0; z-index: 99999;
  background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { text-align: center; }
.loader-logo  { width: 84px; height:84px; object-fit:contain; margin: 0 auto 1.5rem; animation: logoPulse 1.4s ease infinite; border-radius:50%; }
.loader-flag  {
  width: 200px; height: 8px; border-radius: 4px; overflow: hidden;
  display:flex;
}
.loader-flag span { flex:1; }
.loader-flag span:nth-child(1) { background: var(--black); }
.loader-flag span:nth-child(2) { background: var(--red); }
.loader-flag span:nth-child(3) { background: var(--gold); }
.loader-bar   { width: 200px; height: 3px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; margin-top:.75rem; }
.loader-fill  { height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--gold)); animation: loaderProgress 1.4s ease forwards; }
@keyframes loaderProgress { to { width: 100%; } }
@keyframes logoPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ════════════════════════════════════════════════════════════
   FLASH MESSAGES
   ════════════════════════════════════════════════════════════ */
.flash-container {
  position: fixed; top: calc(var(--nav-h) + 1rem); right: 1rem;
  z-index: 8000; display: flex; flex-direction: column; gap: .5rem;
  max-width: 400px; width: calc(100vw - 2rem);
}
[dir="rtl"] .flash-container { right: auto; left: 1rem; }
.flash {
  display:flex; align-items:center; gap:.75rem;
  padding:.9rem 1rem; border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: var(--shadow-md); animation: slideInRight .35s ease;
  font-size: .9rem;
}
[dir="rtl"] .flash { animation-name: slideInLeft; }
.flash-success { border-color: #00a152; }
.flash-success i { color: #00a152; }
.flash-error { border-color: var(--red); }
.flash-error i { color: var(--red); }
.flash-info i { color: var(--gold); }
.flash-close { margin-inline-start: auto; color: var(--text-muted); font-size: .8rem; }

@keyframes slideInRight { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInLeft  { from { transform: translateX(-110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ════════════════════════════════════════════════════════════
   NAVBAR
   ════════════════════════════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; inset-inline: 0; z-index: 1000;
  height: var(--nav-h);
  background: rgba(10,10,10, .82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-normal), box-shadow var(--t-normal);
}
body.light-mode .navbar { background: rgba(255,255,255,.92); }
.navbar.scrolled { background: var(--bg-secondary); box-shadow: var(--shadow-md); }

/* German flag strip on top */
.navbar::before {
  content: ""; position: absolute; top:0; left:0; right:0; height:3px;
  background: linear-gradient(to right, var(--black) 0% 33%, var(--red) 33% 66%, var(--gold) 66% 100%);
}

.nav-container {
  max-width: 1400px; margin: 0 auto; height: 100%; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 1rem;
}

.nav-logo {
  display: flex; align-items: center; gap: .65rem;
  flex-shrink: 0; transition: opacity var(--t-fast), transform var(--t-fast);
}
.nav-logo:hover { transform: scale(1.03); }
.nav-logo-img { height: 48px; width: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.nav-logo-text {
  font-size: 1.25rem; font-weight: 800;
  color: var(--text-primary); white-space: nowrap;
  letter-spacing: -.02em;
}
.nav-logo-text .red  { color: var(--red); }
.nav-logo-text .gold { color: var(--gold); }

.nav-links {
  display: flex; align-items: center; gap: .15rem;
  margin-inline-start: auto;
}
.nav-link {
  padding: .55rem .85rem; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--t-fast), background var(--t-fast);
  position: relative;
  white-space: nowrap;
}
.nav-link::after {
  content:""; position:absolute; bottom:.25rem; left:50%; transform: translateX(-50%);
  width: 0; height: 2px; background: var(--red);
  transition: width var(--t-normal);
}
.nav-link:hover { color: var(--text-primary); }
.nav-link.active { color: var(--red); }
.nav-link.active::after { width: 50%; }

.nav-actions { display:flex; align-items:center; gap:.5rem; }

.btn-icon, .btn-lang {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  color: var(--text-primary); font-size: .85rem; font-weight: 700;
  transition: all var(--t-fast);
}
.btn-icon:hover, .btn-lang:hover { background: var(--red); color: #fff; border-color: var(--red); transform: translateY(-2px); }
.btn-lang { width:auto; padding: 0 .85rem; font-size: .75rem; }

.btn-outline-sm, .btn-primary-sm {
  padding: .5rem 1rem; border-radius: var(--radius-sm);
  font-size: .85rem; font-weight: 700;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.btn-outline-sm { border: 1px solid var(--border); color: var(--text-primary); }
.btn-outline-sm:hover { border-color: var(--red); color: var(--red); }
.btn-primary-sm { background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff; }
.btn-primary-sm:hover { box-shadow: var(--shadow-red); transform: translateY(-2px); }

.nav-student-menu { position: relative; }
.btn-student-avatar {
  display: flex; align-items: center; gap: .35rem;
  padding: .25rem; border-radius: var(--radius-full);
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all var(--t-fast);
}
.btn-student-avatar:hover { border-color: var(--gold); }
.btn-student-avatar img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.avatar-initials { width:32px; height:32px; border-radius:50%; background:linear-gradient(135deg,var(--red),var(--gold)); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; }
.btn-student-avatar i { font-size: .65rem; color: var(--text-muted); padding-inline-end: .4rem; }

.student-dropdown {
  position: absolute; top: calc(100% + .5rem); inset-inline-end: 0;
  min-width: 240px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: .5rem; opacity: 0; visibility: hidden;
  transform: translateY(-10px); transition: all var(--t-fast); z-index: 100;
}
.student-dropdown.open { opacity:1; visibility:visible; transform: translateY(0); }
.student-dropdown a {
  display: flex; align-items: center; gap: .65rem;
  padding: .65rem .85rem; font-size: .875rem; border-radius: var(--radius-sm);
  color: var(--text-primary); transition: all var(--t-fast);
}
.student-dropdown a:hover { background: rgba(221,0,0,.08); color: var(--red); }
.student-dropdown a.dropdown-logout:hover { background: rgba(221,0,0,.12); color: var(--red); }
.student-dropdown .dropdown-header { padding: .75rem .85rem; border-bottom: 1px solid var(--border); margin-bottom: .35rem; }
.student-dropdown .dropdown-header strong { display: block; font-size: .9rem; }
.student-dropdown .dropdown-header small { color: var(--text-muted); font-size: .75rem; }
.student-dropdown hr { border: 0; border-top: 1px solid var(--border); margin: .35rem 0; }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--t-fast);
}
.nav-hamburger:hover { background: var(--red); border-color: var(--red); }
.nav-hamburger:hover span { background: #fff; }
.nav-hamburger span { width: 20px; height: 2.5px; background: var(--text-primary); border-radius: 2px; transition: all var(--t-fast); }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.nav-mobile {
  position: fixed; top: var(--nav-h); inset-inline: 0; bottom: 0;
  background: var(--bg-primary); padding: 1.25rem;
  transform: translateX(100%); transition: transform var(--t-normal);
  z-index: 1001; overflow-y: auto;
  border-top: 1px solid var(--border);
}
[dir="rtl"] .nav-mobile { transform: translateX(-100%); }
.nav-mobile.open { transform: translateX(0); }

.nav-mobile-backdrop {
  position: fixed; top: var(--nav-h); inset-inline: 0; bottom: 0;
  background: rgba(0,0,0,.55);
  z-index: 1000;
  opacity: 0; visibility: hidden;
  transition: all .3s;
}
.nav-mobile-backdrop.show { opacity: 1; visibility: visible; }

.nav-mobile-links { display: flex; flex-direction: column; gap: .4rem; }
.nav-mobile-link {
  display: flex; align-items: center; gap: .6rem; padding: .9rem 1rem;
  font-size: .95rem; font-weight: 600; border-radius: var(--radius-md);
  color: var(--text-primary); background: var(--bg-card); border: 1px solid var(--border);
  transition: all var(--t-fast);
}
.nav-mobile-link:hover { border-color: var(--red); color: var(--red); }
.nav-mobile-link.active { color: var(--red); border-color: var(--red); background: rgba(221,0,0,.08); }
.mobile-auth { display: flex; gap: .5rem; margin-top: 1rem; }
.mobile-auth a { flex: 1; text-align: center; padding: .75rem 1rem !important; font-size: .9rem !important; }

.nav-spacer { height: var(--nav-h); }

/* WhatsApp Float */
.whatsapp-float {
  position: fixed; bottom: 1.5rem; inset-inline-end: 1.5rem;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; box-shadow: 0 6px 20px rgba(37,211,102,.4);
  z-index: 999; transition: all var(--t-normal);
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(37,211,102,.6); }
.wa-pulse {
  position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25D366;
  animation: waPulse 2s infinite;
}
@keyframes waPulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Back to top */
.back-to-top {
  position: fixed; bottom: 6rem; inset-inline-end: 1.5rem;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--gold); font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: all var(--t-normal); z-index: 999;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--gold); color: var(--black); }

/* ════════════════════════════════════════════════════════════
   LAYOUT — Containers, Sections, Grids
   ════════════════════════════════════════════════════════════ */
.container    { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 900px;  margin: 0 auto; padding: 0 1.5rem; }

.section      { padding: 5rem 0; position: relative; }
.section-sm   { padding: 3rem 0; }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-label {
  display: inline-block; padding: .35rem 1rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold);
  background: var(--gold-glow);
  border: 1px solid var(--gold);
  border-radius: var(--radius-full); margin-bottom: 1rem;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900; line-height: 1.2;
  margin-bottom: .5rem;
}
.section-title span { color: var(--red); }
.section-subtitle { color: var(--text-secondary); max-width: 640px; margin: 0 auto; }

.divider {
  width: 80px; height: 4px; margin: 1.5rem auto 0;
  background: linear-gradient(to right, var(--red), var(--gold));
  border-radius: 2px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.grid-auto { display:grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 700;
  border: 1px solid transparent;
  transition: all var(--t-normal);
  cursor: pointer; text-align: center;
  white-space: nowrap;
}
.btn-lg { padding: 1.05rem 2rem; font-size: 1rem; }
.btn-sm { padding: .55rem 1rem; font-size: .82rem; }

.btn-primary { background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 32px var(--red-glow); }

.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--black); }
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 12px 32px var(--gold-glow); }

.btn-outline { border-color: var(--border); color: var(--text-primary); background: transparent; }
.btn-outline:hover { border-color: var(--red); color: var(--red); }

.btn-outline-gold { border-color: var(--gold); color: var(--gold); background: transparent; }
.btn-outline-gold:hover { background: var(--gold); color: var(--black); }

.btn-ghost { background: transparent; color: var(--text-primary); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-card); }

.btn-danger { background: #c0392b; color: #fff; }
.btn-success { background: #27ae60; color: #fff; }

.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* ════════════════════════════════════════════════════════════
   CARDS
   ════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--t-normal);
}
.card:hover { transform: translateY(-4px); border-color: rgba(221,0,0,.3); box-shadow: var(--shadow-md); }
.card-body   { padding: 1.5rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: .75rem; align-items: center; justify-content: space-between; }

/* ════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════ */
.hero {
  position: relative; min-height: 86vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 4rem 1.5rem;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse at top, #2a0000 0%, #000 70%);
}
.hero-bg img, .hero-bg video { width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.4), rgba(0,0,0,.85));
}

/* Animated German flag stripe behind hero */
.hero-flag-bg {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, var(--black) 0% 33%, var(--red) 33% 66%, var(--gold) 66% 100%);
  opacity: .07; filter: blur(2px);
}

.hero-content { position: relative; z-index: 2; max-width: 880px; text-align: center; padding: 2rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem 1rem; border-radius: var(--radius-full);
  background: rgba(255,206,0,.1); border: 1px solid var(--gold);
  color: var(--gold); font-size: .8rem; font-weight: 700;
  margin-bottom: 1.5rem;
  animation: fadeInDown .8s ease;
}
.hero-title {
  font-size: clamp(2rem, 5.5vw, 4rem);
  font-weight: 900; line-height: 1.1;
  margin-bottom: 1.25rem;
  animation: fadeInUp .8s ease .1s backwards;
}
.hero-title span {
  background: linear-gradient(135deg, var(--red), var(--gold));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}
.hero-subtitle {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--text-secondary); margin-bottom: 2.25rem;
  max-width: 640px; margin-inline: auto;
  animation: fadeInUp .8s ease .25s backwards;
}
.hero-cta {
  display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap;
  animation: fadeInUp .8s ease .4s backwards;
}
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  text-align: center; color: var(--text-muted);
  font-size: .75rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase;
  z-index: 2; animation: bounce 2s infinite;
}
.hero-scroll i { display: block; margin-top: .35rem; font-size: 1rem; color: var(--gold); }

@keyframes fadeInUp   { from { opacity: 0; transform: translateY(20px);  } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%     { transform: translateX(-50%) translateY(-8px); }
}

/* Floating particles */
.hero-particles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

/* ════════════════════════════════════════════════════════════
   COUNTERS
   ════════════════════════════════════════════════════════════ */
.counters-section { background: var(--bg-secondary); border-block: 1px solid var(--border); }
.counters-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 768px) { .counters-grid { grid-template-columns: repeat(2, 1fr); } }

.counter-item { text-align: center; padding: 1.5rem 1rem; }
.counter-icon {
  width: 56px; height: 56px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--red-glow), var(--gold-glow));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem; color: var(--gold); font-size: 1.5rem;
}
.counter-number {
  font-size: 2.25rem; font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--gold));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.counter-plus { color: var(--gold); }
.counter-label { color: var(--text-secondary); font-size: .9rem; margin-top: .25rem; }

/* ════════════════════════════════════════════════════════════
   LEVEL CARDS (A1, A2, B1, ...)
   ════════════════════════════════════════════════════════════ */
.level-card {
  position: relative; padding: 2rem 1.5rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); text-align: center;
  transition: all var(--t-normal); overflow: hidden;
}
.level-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent, transparent 70%, var(--level-color, var(--red)) 100%);
  opacity: 0; transition: opacity var(--t-normal);
}
.level-card:hover { transform: translateY(-6px); border-color: var(--level-color, var(--red)); box-shadow: var(--shadow-lg); }
.level-card:hover::before { opacity: .14; }

.level-icon {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem; font-size: 1.75rem;
  background: linear-gradient(135deg, var(--level-color, var(--red)), color-mix(in srgb, var(--level-color, var(--red)) 70%, black));
  color: #fff;
}
.level-code  { font-size: 2rem; font-weight: 900; color: var(--level-color, var(--red)); margin-bottom: .25rem; }
.level-name  { font-size: 1.1rem; font-weight: 700; margin-bottom: .35rem; }
.level-desc  { color: var(--text-secondary); font-size: .875rem; }

/* ════════════════════════════════════════════════════════════
   COURSE CARDS
   ════════════════════════════════════════════════════════════ */
.course-card { display: flex; flex-direction: column; position: relative; }
.course-card-thumb {
  position: relative; aspect-ratio: 16/10; overflow: hidden;
}
.course-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.course-card:hover .course-card-thumb img { transform: scale(1.05); }
.course-card-badge {
  position: absolute; top: .85rem; inset-inline-start: .85rem;
  padding: .25rem .75rem; border-radius: var(--radius-full);
  background: var(--red); color: #fff; font-size: .7rem; font-weight: 700;
}
.course-card-badge.featured { background: var(--gold); color: var(--black); }
.course-card-badge.level { background: rgba(0,0,0,.7); border: 1px solid var(--gold); color: var(--gold); }

.course-card-body { padding: 1.25rem; flex: 1; }
.course-card-title {
  font-size: 1.1rem; font-weight: 800; margin-bottom: .5rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.7rem;
}
.course-card-meta {
  display: flex; flex-wrap: wrap; gap: .85rem;
  font-size: .75rem; color: var(--text-muted); margin-top: .5rem;
}
.course-card-meta i { color: var(--gold); margin-inline-end: .25rem; }
.course-card-instructors {
  display: flex; align-items: center; gap: .5rem;
  margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--border);
  font-size: .8rem; color: var(--text-secondary);
}
.course-card-instructors img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg-card); }
.course-card-instructors img:not(:first-child) { margin-inline-start: -.5rem; }

.course-card-footer {
  padding: 1rem 1.25rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.course-price {
  font-size: 1.35rem; font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--gold));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.course-price-original {
  font-size: .8rem; color: var(--text-muted); text-decoration: line-through;
}

/* ════════════════════════════════════════════════════════════
   FORMS
   ════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block; margin-bottom: .5rem;
  font-size: .85rem; font-weight: 600; color: var(--text-secondary);
}
.form-input, .form-textarea, .form-select {
  width: 100%; padding: .85rem 1rem;
  background: var(--bg-input); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .95rem; transition: all var(--t-fast);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--red); box-shadow: 0 0 0 3px var(--red-glow);
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-hint { font-size: .75rem; color: var(--text-muted); margin-top: .35rem; }
.form-error { color: var(--red); font-size: .8rem; margin-top: .25rem; }

.form-file-wrap {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; border: 2px dashed var(--border); border-radius: var(--radius-md);
  cursor: pointer; transition: all var(--t-fast); text-align: center;
}
.form-file-wrap:hover { border-color: var(--red); background: rgba(221,0,0,.04); }
.form-file-wrap input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.form-file-wrap i { font-size: 1.5rem; color: var(--gold); margin-inline-end: .65rem; }
.form-file-wrap .file-name { font-size: .85rem; color: var(--text-secondary); }

/* Auth pages */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 5rem 1.5rem; background: radial-gradient(ellipse at top, #1a0000, #000 80%);
}
.auth-card {
  max-width: 480px; width: 100%;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 { font-size: 1.75rem; font-weight: 900; text-align: center; margin-bottom: .35rem; }
.auth-card p.auth-sub { text-align: center; color: var(--text-muted); margin-bottom: 2rem; font-size: .9rem; }
.auth-card .auth-divider { text-align:center; margin: 1.25rem 0; font-size: .8rem; color: var(--text-muted); position: relative; }
.auth-card .auth-divider::before, .auth-card .auth-divider::after { content:""; position:absolute; top:50%; width: 40%; height: 1px; background: var(--border); }
.auth-card .auth-divider::before { inset-inline-start: 0; }
.auth-card .auth-divider::after  { inset-inline-end: 0; }
.auth-link { display: block; text-align: center; margin-top: 1rem; font-size: .85rem; color: var(--text-secondary); }
.auth-link a { color: var(--gold); font-weight: 700; }

/* ════════════════════════════════════════════════════════════
   PAGE HERO (inner pages)
   ════════════════════════════════════════════════════════════ */
.page-hero {
  padding: 4rem 1.5rem 3rem;
  background: linear-gradient(135deg, var(--black) 0%, var(--red-dark) 100%);
  position: relative; overflow: hidden;
  border-bottom: 3px solid var(--gold);
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,206,0,.15), transparent 60%);
}
.page-hero-content { position: relative; z-index: 2; max-width: 1280px; margin: 0 auto; }
.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 900; color: #fff; line-height: 1.2;
  margin-bottom: .5rem;
}
.page-hero h1 .gold { color: var(--gold); }
.page-hero p { color: rgba(255,255,255,.8); font-size: 1rem; max-width: 640px; }

.breadcrumb {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  font-size: .8rem; color: rgba(255,255,255,.65); margin-bottom: 1rem;
}
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb-current { color: var(--gold); }
.breadcrumb-sep { color: rgba(255,255,255,.4); }

/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--black-soft); color: var(--text-secondary);
  position: relative; padding-top: 4rem;
  margin-top: 4rem;
}
.site-footer::before {
  content:""; position:absolute; top:0; left:0; right:0; height:3px;
  background: linear-gradient(to right, var(--black) 0% 33%, var(--red) 33% 66%, var(--gold) 66% 100%);
}
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem;
  padding-bottom: 3rem;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-logo {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 1rem;
}
.footer-logo img { height: 56px; width: 56px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; }
.footer-logo span { font-size: 1.2rem; font-weight: 800; color: #fff; }
.footer-tagline { font-size: .9rem; line-height: 1.6; margin-bottom: 1.25rem; }

.footer-social { display: flex; gap: .5rem; margin-bottom: 1.25rem; }
.social-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.05); color: var(--text-secondary);
  font-size: .95rem; transition: all var(--t-fast);
}
.social-icon:hover { background: var(--red); color: #fff; transform: translateY(-3px); }
.social-icon.social-facebook:hover { background: #1877f2; }
.social-icon.social-instagram:hover { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.social-icon.social-youtube:hover { background: #ff0000; }
.social-icon.social-tiktok:hover { background: #000; border: 1px solid var(--text-muted); }
.social-icon.social-telegram:hover { background: #229ED9; }

.footer-contact-item {
  display: flex; align-items: center; gap: .5rem;
  font-size: .85rem; color: var(--text-secondary);
  margin-bottom: .5rem;
}
.footer-contact-item i { color: var(--gold); }

.footer-col-title { color: #fff; font-size: 1rem; font-weight: 800; margin-bottom: 1.25rem; position: relative; padding-bottom: .5rem; }
.footer-col-title::after { content:""; position: absolute; bottom: 0; inset-inline-start: 0; width: 32px; height: 2px; background: linear-gradient(to right, var(--red), var(--gold)); }

.footer-links li { margin-bottom: .65rem; }
.footer-links a {
  display: flex; align-items: center; gap: .5rem;
  font-size: .85rem; transition: all var(--t-fast);
}
.footer-links a:hover { color: var(--gold); transform: translateX(3px); }
[dir="rtl"] .footer-links a:hover { transform: translateX(-3px); }

.footer-newsletter h5 { color: #fff; font-size: .95rem; margin-bottom: .5rem; }
.footer-newsletter p { font-size: .8rem; color: var(--text-muted); margin-bottom: 1rem; }
.newsletter-input-wrap {
  display: flex; background: rgba(255,255,255,.06);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden;
}
.newsletter-input-wrap input {
  flex: 1; padding: .65rem .85rem; background: transparent;
  color: #fff; border: none; font-size: .85rem;
}
.newsletter-input-wrap button {
  width: 44px; background: var(--red); color: #fff;
  font-size: .9rem; transition: background var(--t-fast);
}
.newsletter-input-wrap button:hover { background: var(--gold); color: var(--black); }
.newsletter-msg { font-size: .75rem; margin-top: .35rem; min-height: 1em; }
.newsletter-msg.success { color: #2ecc71; }
.newsletter-msg.error   { color: var(--red); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  font-size: .8rem;
}
.footer-copy a {
  color: var(--gold); font-weight: 800;
  text-shadow: 0 0 8px var(--gold-glow);
  transition: all var(--t-fast);
}
.footer-copy a:hover { color: var(--gold-light); text-shadow: 0 0 14px var(--gold); }
.footer-bottom-links { display: flex; gap: .65rem; }
.footer-bottom-links a:hover { color: var(--gold); }

/* ════════════════════════════════════════════════════════════
   REVEAL ANIMATIONS
   ════════════════════════════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.stagger > * { transition-delay: 0s; }
.stagger > *.visible:nth-child(1) { transition-delay: .05s; }
.stagger > *.visible:nth-child(2) { transition-delay: .1s; }
.stagger > *.visible:nth-child(3) { transition-delay: .15s; }
.stagger > *.visible:nth-child(4) { transition-delay: .2s; }
.stagger > *.visible:nth-child(5) { transition-delay: .25s; }
.stagger > *.visible:nth-child(6) { transition-delay: .3s; }

/* ════════════════════════════════════════════════════════════
   ALERTS / BADGES
   ════════════════════════════════════════════════════════════ */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius-md); margin-bottom: 1rem; display: flex; align-items: center; gap: .65rem; }
.alert i { font-size: 1.1rem; }
.alert-success { background: rgba(46,204,113,.1); border: 1px solid #2ecc71; color: #2ecc71; }
.alert-warning { background: rgba(255,206,0,.1);  border: 1px solid var(--gold); color: var(--gold); }
.alert-danger  { background: rgba(221,0,0,.1);    border: 1px solid var(--red);  color: var(--red); }
.alert-info    { background: rgba(255,255,255,.05); border: 1px solid var(--border); }

.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .65rem; border-radius: var(--radius-full);
  font-size: .7rem; font-weight: 700;
}
.badge-red    { background: var(--red-glow);  color: var(--red); }
.badge-gold   { background: var(--gold-glow); color: var(--gold); }
.badge-green  { background: rgba(46,204,113,.15); color: #2ecc71; }
.badge-grey   { background: rgba(255,255,255,.08); color: var(--text-secondary); }

/* ════════════════════════════════════════════════════════════
   TESTIMONIALS SLIDER
   ════════════════════════════════════════════════════════════ */
.slider-track { display: flex; gap: 1rem; animation: scrollLeft 40s linear infinite; width: max-content; }
[dir="rtl"] .slider-track { animation-name: scrollRight; }
.slider-track:hover { animation-play-state: paused; }
@keyframes scrollLeft  { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes scrollRight { 0% { transform: translateX(0); } 100% { transform: translateX(50%); } }

.testimonial-card {
  flex: 0 0 320px;
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 1.5rem; border-radius: var(--radius-md); position: relative;
}
.testimonial-stars { color: var(--gold); font-size: .85rem; margin-bottom: .75rem; }
.testimonial-text { font-size: .9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1rem; }
.testimonial-author { display: flex; align-items: center; gap: .65rem; }
.testimonial-author img, .testimonial-author .avatar-initials { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.testimonial-author strong { display: block; font-size: .9rem; }
.testimonial-author small  { color: var(--text-muted); font-size: .75rem; }

/* ════════════════════════════════════════════════════════════
   CLASSROOM / LESSON VIEWER
   ════════════════════════════════════════════════════════════ */
.classroom { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; max-width: 1400px; margin: 0 auto; padding: 1.5rem; }
@media (max-width: 1024px) { .classroom { grid-template-columns: 1fr; } }

.lesson-player {
  background: #000; border-radius: var(--radius-md);
  aspect-ratio: 16/9; position: relative; overflow: hidden;
}
.lesson-player iframe { width: 100%; height: 100%; border: 0; }
.lesson-info { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.5rem; margin-top: 1rem; }
.lesson-info h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: .5rem; }
.lesson-info .meta { display: flex; gap: 1rem; font-size: .8rem; color: var(--text-muted); margin-bottom: 1rem; }

.lessons-sidebar { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; max-height: 80vh; overflow-y: auto; }
.lessons-sidebar-header { padding: 1rem 1.25rem; background: var(--bg-secondary); border-bottom: 1px solid var(--border); }
.lessons-sidebar-header h3 { font-size: .95rem; font-weight: 800; }
.lessons-sidebar-progress { font-size: .75rem; color: var(--text-muted); margin-top: .25rem; }

.lesson-item {
  display: flex; align-items: center; gap: .65rem; padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--border); cursor: pointer;
  transition: all var(--t-fast); font-size: .85rem;
}
.lesson-item:hover { background: var(--bg-card-hover); }
.lesson-item.active { background: rgba(221,0,0,.12); border-inline-start: 3px solid var(--red); }
.lesson-item.completed .lesson-circle { background: #2ecc71; color: #fff; border-color: #2ecc71; }
.lesson-circle {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-size: .65rem; color: var(--text-muted); flex-shrink: 0;
}
.lesson-title { flex: 1; }
.lesson-duration { font-size: .7rem; color: var(--text-muted); }

.progress-bar { width: 100%; height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden; margin-top: .5rem; }
.progress-bar-fill { height: 100%; background: linear-gradient(to right, var(--red), var(--gold)); transition: width .5s ease; border-radius: 3px; }

/* ════════════════════════════════════════════════════════════
   QUIZ
   ════════════════════════════════════════════════════════════ */
.quiz-question {
  padding: 1.5rem; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); margin-bottom: 1rem;
}
.quiz-question-num { color: var(--gold); font-weight: 800; font-size: .85rem; margin-bottom: .25rem; }
.quiz-question-text { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.5; }
.quiz-option {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; margin-bottom: .5rem; font-size: .9rem;
  transition: all var(--t-fast); background: var(--bg-secondary);
}
.quiz-option:hover { border-color: var(--red); background: rgba(221,0,0,.05); }
.quiz-option input { display: none; }
.quiz-option-letter {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--border);
  font-weight: 700; font-size: .8rem; text-transform: uppercase;
  flex-shrink: 0;
}
.quiz-option.selected { border-color: var(--red); background: rgba(221,0,0,.08); }
.quiz-option.selected .quiz-option-letter { background: var(--red); color: #fff; border-color: var(--red); }

/* ════════════════════════════════════════════════════════════
   ADMIN LAYOUT
   ════════════════════════════════════════════════════════════ */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 250px; background: var(--bg-card); border-inline-end: 1px solid var(--border);
  padding: 1rem; flex-shrink: 0; overflow-y: auto; max-height: 100vh;
  position: sticky; top: 0;
}
.admin-sidebar-brand { display: flex; align-items: center; gap: .5rem; padding: .5rem; margin-bottom: 1.5rem; }
.admin-sidebar-brand img { height: 36px; border-radius: 50%; }
.admin-sidebar-brand strong { font-size: 1rem; font-weight: 800; }
.admin-nav { display: flex; flex-direction: column; gap: .15rem; }
.admin-nav-section { font-size: .7rem; color: var(--text-muted); padding: .85rem .85rem .35rem; text-transform: uppercase; letter-spacing: .1em; }
.admin-nav a {
  display: flex; align-items: center; gap: .65rem;
  padding: .65rem .85rem; border-radius: var(--radius-sm);
  font-size: .85rem; color: var(--text-secondary);
  transition: all var(--t-fast);
}
.admin-nav a i { width: 18px; text-align: center; }
.admin-nav a:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.admin-nav a.active { background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff; }

.admin-main { flex: 1; padding: 1.5rem; overflow-x: hidden; min-width: 0; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; gap: 1rem; }
.admin-topbar h1 { font-size: 1.5rem; font-weight: 800; }

.admin-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.5rem; margin-bottom: 1rem; }
.admin-card canvas { max-width: 100%; max-height: 100%; }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem; position: relative; overflow: hidden; }
.stat-card::after { content:""; position:absolute; top:0; right:0; width: 80px; height: 80px; border-radius: 50%; opacity: .08; background: var(--red); filter: blur(20px); }
.stat-card .stat-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--red), var(--gold-dark)); display: flex; align-items: center; justify-content: center; color: #fff; margin-bottom: .65rem; }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 900; }
.stat-card .stat-label { font-size: .75rem; color: var(--text-muted); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table thead { background: var(--bg-secondary); }
.data-table th { padding: .85rem 1rem; text-align: start; font-size: .75rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); }
.data-table td { padding: .85rem 1rem; font-size: .875rem; border-bottom: 1px solid var(--border); }
.data-table tbody tr:hover { background: var(--bg-card-hover); }
.data-table img.thumb { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; }

.admin-toggle-sidebar { display: none; }
.admin-sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65); z-index: 150;
  opacity: 0; transition: opacity .3s;
}
.admin-sidebar-backdrop.show { display: block; opacity: 1; }

@media (max-width: 900px) {
  .admin-wrap { display: block; }
  .admin-sidebar {
    position: fixed;
    inset-inline-start: -280px;
    top: 0; bottom: 0; width: 260px;
    z-index: 200;
    transition: inset-inline-start .3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    overflow-y: auto;
  }
  .admin-sidebar.open { inset-inline-start: 0; }

  .admin-main { padding: 1rem; min-height: 100vh; }

  .admin-toggle-sidebar {
    display: inline-flex !important;
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border: 0;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(221,0,0,.4);
  }
  .admin-toggle-sidebar:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(221,0,0,.5); }
  .admin-toggle-sidebar:active { transform: translateY(0); }

  /* Stack the topbar items */
  .admin-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
    padding: .5rem .75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
  }
  .admin-topbar h1 { font-size: 1.05rem; flex: 1; min-width: 0; line-height: 1.3; margin: 0; }

  /* Hide admin name text on mobile to save space */
  .admin-topbar > div:last-child > span { display: none; }
  .admin-topbar .btn-sm { padding: .35rem .65rem; font-size: .75rem; }

  /* Tables: allow horizontal scroll inside cards */
  .admin-card { padding: 1rem; overflow-x: auto; }
  .admin-card > .data-table,
  .admin-card table.data-table { min-width: 560px; }

  /* Stat cards: 2 columns instead of auto-fit */
  .admin-stats { grid-template-columns: repeat(2, 1fr); gap: .65rem; }
  .stat-card { padding: 1rem; }
  .stat-card .stat-value { font-size: 1.3rem; }
  .stat-card .stat-label { font-size: .7rem; }
  .stat-card .stat-icon { width: 32px; height: 32px; font-size: .85rem; margin-bottom: .35rem; }

  /* Forms in admin */
  .admin-card .grid-2,
  .admin-card .grid-3 { grid-template-columns: 1fr !important; gap: .75rem; }

  /* Side-by-side admin layouts collapse */
  [style*="grid-template-columns:1fr 400px"],
  [style*="grid-template-columns:1fr 380px"],
  [style*="grid-template-columns:1fr 420px"],
  [style*="grid-template-columns:1fr 440px"],
  [style*="grid-template-columns:1fr 480px"],
  [style*="grid-template-columns:1fr 360px"],
  [style*="grid-template-columns:380px 1fr"],
  [style*="grid-template-columns:300px 1fr"],
  [style*="grid-template-columns:1.4fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .admin-main { padding: .75rem; }
  .admin-card { padding: .85rem; }
  .admin-topbar h1 { font-size: 1.05rem; }
  .admin-stats { grid-template-columns: 1fr; }
  .stat-card .stat-value { font-size: 1.5rem; }
  /* Stack the "view site" + name in topbar */
  .admin-topbar { flex-direction: column; align-items: stretch; }
  .admin-topbar h1 { width: 100%; }
}

/* ════════════════════════════════════════════════════════════
   UTILITIES
   ════════════════════════════════════════════════════════════ */
.cursor-pointer { cursor: pointer; }
.font-bold { font-weight: 700; }
.text-sm { font-size: .85rem; }
.text-xs { font-size: .75rem; }
.text-lg { font-size: 1.1rem; }
.w-100 { width: 100%; }

.hide-mobile { display: inline; }
@media (max-width: 768px) { .hide-mobile { display: none !important; } }
.show-mobile { display: none; }
@media (max-width: 768px) { .show-mobile { display: inline; } }

/* Global mobile collapse for any 2-column grid using inline styles */
@media (max-width: 768px) {
  .container[style*="grid-template-columns:1fr 1fr"],
  .container[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  /* Side-by-side aside sticky → static on mobile */
  aside[style*="position:sticky"] { position: static !important; }
}

/* ── Tablet / Mobile breakpoint ─────────────────────────── */
@media (max-width: 900px) {
  .navbar { height: 64px; }
  .nav-spacer { height: 64px; }
  .nav-mobile { top: 64px !important; }
  .nav-mobile-backdrop { top: 64px !important; }

  .nav-links { display: none; }

  /* Hamburger is FIRST in HTML — appears at opposite end of logo (left in RTL) */
  .nav-hamburger {
    display: flex !important;
    order: -1;
  }
  /* Push the logo + actions to the OPPOSITE end so the row spreads out */
  .nav-logo { margin-inline-start: auto; }

  /* Hide topbar auth buttons on mobile — they're inside the mobile menu */
  .nav-actions > .nav-auth-btn { display: none; }

  /* Compact spacing */
  .nav-container { padding: 0 .65rem; gap: .3rem; }

  .nav-logo-img  { height: 36px; width: 36px; }
  .nav-logo-text { font-size: .95rem; }

  .nav-actions { gap: .2rem; }
  .btn-icon { width: 36px; height: 36px; font-size: .85rem; }
  .btn-lang { width: auto; padding: 0 .5rem; height: 36px; font-size: .72rem; gap: .25rem; }
  .lang-chevron { font-size: .55rem !important; }
  .nav-hamburger { width: 38px; height: 38px; }
  .nav-hamburger span { width: 18px; height: 2px; }

  .btn-student-avatar { padding: .2rem; }
  .btn-student-avatar img,
  .btn-student-avatar .avatar-initials { width: 28px; height: 28px; font-size: .85rem; }
  .avatar-chevron { font-size: .55rem !important; }
}

@media (max-width: 768px) {
  .hero { min-height: 70vh; padding-top: 5rem; }
  .section { padding: 3rem 0; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .page-hero { padding: 2.5rem 1rem 2rem; }
  .page-hero h1 { font-size: 1.5rem; }
  .page-hero p { font-size: .9rem; }
}

/* Small screens (≤ 480px) — extra compact */
@media (max-width: 480px) {
  .nav-container { padding: 0 .5rem; gap: .2rem; }
  .nav-logo-img { height: 34px; width: 34px; border-width: 1.5px; }
  .nav-logo-text { display: none; }
  .btn-icon { width: 34px; height: 34px; font-size: .8rem; }
  .btn-lang { padding: 0 .4rem; height: 34px; font-size: .65rem; }
  .lang-chevron { display: none !important; }
  .nav-hamburger { width: 36px; height: 36px; }
  .nav-hamburger span { width: 16px; }
  .btn-student-avatar { padding: .15rem; }
  .btn-student-avatar img,
  .btn-student-avatar .avatar-initials { width: 26px; height: 26px; font-size: .8rem; }
  .avatar-chevron { display: none !important; }
}

/* Very small screens (≤ 360px) — drop the theme toggle */
@media (max-width: 360px) {
  .nav-theme-btn { display: none; }
  .lang-code { display: none; }
  .btn-lang { padding: 0 .3rem; }
}
