/* ============================================================
   AAA Hub — main.css
   Design System: Dark Mode · Green #007E3F · Gold #D2AF1A
   Font: Tajawal
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand */
  --green:        #007E3F;
  --green-light:  #00a152;
  --green-dark:   #005c2e;
  --green-glow:   rgba(0,126,63,.25);
  --gold:         #D2AF1A;
  --gold-light:   #e8c821;
  --gold-dark:    #a88a12;
  --gold-glow:    rgba(210,175,26,.2);

  /* Dark Mode (default) */
  --bg-primary:   #0d1117;
  --bg-secondary: #161b22;
  --bg-card:      #1a2030;
  --bg-card-hover:#1f2840;
  --bg-input:     #161b22;
  --border:       rgba(255,255,255,.08);
  --border-focus: var(--green);
  --text-primary: #e6edf3;
  --text-secondary:#8b949e;
  --text-muted:   #6e7681;
  --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-green: 0 4px 24px var(--green-glow);
  --shadow-gold:  0 4px 24px var(--gold-glow);

  /* Typography */
  --font:         'Tajawal', sans-serif;
  --radius-sm:    6px;
  --radius-md:    12px;
  --radius-lg:    20px;
  --radius-xl:    32px;
  --radius-full:  9999px;

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

  /* Nav height */
  --nav-h: 72px;
}

/* Light Mode Override */
body.light-mode {
  --bg-primary:   #f4f6f9;
  --bg-secondary: #ffffff;
  --bg-card:      #ffffff;
  --bg-card-hover:#f0f4f8;
  --bg-input:     #f4f6f9;
  --border:       rgba(0,0,0,.1);
  --text-primary: #0d1117;
  --text-secondary:#555f6b;
  --text-muted:   #8a9099;
  --shadow-sm:    0 2px 8px rgba(0,0,0,.08);
  --shadow-md:    0 4px 20px rgba(0,0,0,.12);
  --shadow-lg:    0 8px 40px rgba(0,0,0,.16);
}

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

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--t-normal), color var(--t-normal);
}

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

.gold   { color: var(--gold); }
.green  { color: var(--green); }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--green); border-radius: 3px; }

/* ── Selection ───────────────────────────────────────────── */
::selection { background: var(--green); color: #fff; }

/* ════════════════════════════════════════════════════════════
   PAGE LOADER
   ════════════════════════════════════════════════════════════ */
#page-loader {
  position: fixed; inset: 0; z-index: 9999;
  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; }

.loader-inner { text-align: center; }
.loader-logo  { width: 80px; margin: 0 auto 1.5rem; animation: pulse 1.2s ease infinite; }
.loader-bar   { width: 200px; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.loader-fill  {
  height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--gold));
  border-radius: 2px; animation: loader-progress 1.5s ease forwards;
}
@keyframes loader-progress { to { width: 100%; } }
@keyframes pulse { 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: 380px; width: calc(100vw - 2rem);
}
[dir="rtl"] .flash-container { right: auto; left: 1rem; }

.flash {
  display: flex; align-items: center; gap: .75rem;
  padding: .875rem 1rem; border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: var(--shadow-md); animation: slideInRight .3s ease;
  font-size: .9rem;
}
[dir="rtl"] .flash { animation-name: slideInLeft; }
.flash-success { border-color: var(--green); }
.flash-success i { color: var(--green); }
.flash-error { border-color: #e74c3c; }
.flash-error i { color: #e74c3c; }
.flash-info i { color: var(--gold); }
.flash-close { margin-inline-start: auto; background: none; color: var(--text-muted); font-size: .8rem; padding: 2px; }

@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInLeft  { from { transform: translateX(-100%); 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(13,17,23,.85);
  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(244,246,249,.92);
}
.navbar.scrolled {
  background: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
}

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

/* Logo */
.nav-logo {
  display: flex; align-items: center; gap: .6rem;
  flex-shrink: 0; transition: opacity var(--t-fast);
}
.nav-logo:hover { opacity: .85; }
.nav-logo-img { height: 40px; width: auto; }
.nav-logo-text {
  font-size: 1.3rem; font-weight: 800;
  color: var(--text-primary); white-space: nowrap;
}

/* Nav Links */
.nav-links {
  display: flex; align-items: center; gap: .25rem;
  margin-inline-start: auto; flex-wrap: nowrap;
}
.nav-link {
  padding: .5rem .75rem; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--t-fast), background var(--t-fast);
  white-space: nowrap;
}
.nav-link:hover,
.nav-link.active {
  color: var(--green);
  background: var(--green-glow);
}

/* Nav Actions */
.nav-actions {
  display: flex; align-items: center; gap: .5rem;
  flex-shrink: 0; margin-inline-start: auto;
}
[dir="rtl"] .nav-links { margin-inline-start: 0; margin-inline-end: auto; }

/* Icon Buttons */
.btn-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full); background: var(--bg-card);
  border: 1px solid var(--border); color: var(--text-secondary);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.btn-icon:hover { color: var(--gold); border-color: var(--gold); }

/* Lang Button */
.btn-lang {
  padding: .35rem .75rem; border-radius: var(--radius-full);
  font-size: .8rem; font-weight: 700; letter-spacing: .05em;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.btn-lang:hover { color: var(--green); border-color: var(--green); }

/* Auth Buttons */
.btn-outline-sm {
  padding: .4rem 1rem; border-radius: var(--radius-full);
  font-size: .85rem; font-weight: 600;
  border: 1.5px solid var(--green); color: var(--green);
  transition: all var(--t-fast);
}
.btn-outline-sm:hover { background: var(--green); color: #fff; }

.btn-primary-sm {
  padding: .4rem 1rem; border-radius: var(--radius-full);
  font-size: .85rem; font-weight: 600;
  background: var(--green); color: #fff;
  transition: all var(--t-fast);
}
.btn-primary-sm:hover { background: var(--green-light); box-shadow: var(--shadow-green); }

/* Student Avatar Dropdown */
.nav-student-menu { position: relative; }
.btn-student-avatar {
  display: flex; align-items: center; gap: .5rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-full); padding: .25rem .75rem .25rem .25rem;
  color: var(--text-primary); font-size: .85rem;
  transition: border-color var(--t-fast);
}
.btn-student-avatar:hover { border-color: var(--green); }
.btn-student-avatar img,
.btn-student-avatar .avatar-initials {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
}
.avatar-initials {
  display: flex; align-items: center; justify-content: center;
  background: var(--green); color: #fff; font-weight: 700; font-size: .85rem;
}

.student-dropdown {
  position: absolute; top: calc(100% + .5rem);
  inset-inline-end: 0;
  min-width: 200px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: all var(--t-fast);
}
.student-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-header { padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.dropdown-header strong { display: block; font-size: .9rem; }
.dropdown-header small { color: var(--text-muted); font-size: .75rem; }
.student-dropdown a {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem 1rem; font-size: .85rem; color: var(--text-secondary);
  transition: background var(--t-fast), color var(--t-fast);
}
.student-dropdown a:hover { background: var(--green-glow); color: var(--green); }
.student-dropdown hr { border-color: var(--border); margin: .25rem 0; }
.dropdown-logout:hover { color: #e74c3c !important; }

/* Hamburger */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; width: 32px; padding: 4px;
}
.nav-hamburger span {
  display: block; height: 2px; border-radius: 2px;
  background: var(--text-primary);
  transition: all var(--t-normal);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.nav-mobile {
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--bg-secondary);
  transform: translateX(110%); transition: transform var(--t-normal);
  overflow-y: auto; z-index: 1001;
  padding: 1.5rem;
  box-shadow: -4px 0 20px rgba(0,0,0,.3);
}
[dir="rtl"] .nav-mobile { transform: translateX(-110%); }
.nav-mobile.open { transform: translateX(0) !important; }

.nav-mobile-links { display: flex; flex-direction: column; gap: .25rem; }
.nav-mobile-link {
  display: block; padding: .85rem 1rem; border-radius: var(--radius-md);
  font-size: 1rem; font-weight: 500; color: var(--text-secondary);
  transition: all var(--t-fast);
}
.nav-mobile-link:hover, .nav-mobile-link.active { background: var(--green-glow); color: var(--green); }
.mobile-auth { display: flex; gap: .5rem; margin-top: 1rem; }

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

/* ════════════════════════════════════════════════════════════
   WHATSAPP FLOAT
   ════════════════════════════════════════════════════════════ */
.whatsapp-float {
  position: fixed; bottom: 2rem; inset-inline-end: 2rem; z-index: 900;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; box-shadow: 0 4px 20px rgba(37,211,102,.4);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 30px rgba(37,211,102,.6); }

.wa-pulse {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid #25D366; opacity: .6;
  animation: wa-pulse 2s ease infinite;
}
@keyframes wa-pulse {
  0%   { transform: scale(1); opacity: .6; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ════════════════════════════════════════════════════════════
   BACK TO TOP
   ════════════════════════════════════════════════════════════ */
.back-to-top {
  position: fixed; bottom: 5.5rem; inset-inline-end: 2rem; z-index: 900;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; box-shadow: var(--shadow-sm);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all var(--t-normal);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--green); color: #fff; border-color: var(--green); }

/* ════════════════════════════════════════════════════════════
   LAYOUT UTILITIES
   ════════════════════════════════════════════════════════════ */
.container       { max-width: 1300px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm    { max-width: 860px;  margin: 0 auto; padding: 0 1.5rem; }
.section         { padding: 5rem 0; }
.section-sm      { padding: 3rem 0; }

.section-header  { text-align: center; margin-bottom: 3rem; }
.section-label {
  display: inline-block;
  font-size: .75rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold);
  padding: .3rem .9rem; border-radius: var(--radius-full);
  background: var(--gold-glow); border: 1px solid var(--gold-dark);
  margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800; line-height: 1.2;
  color: var(--text-primary);
}
.section-title span { color: var(--green); }
.section-subtitle {
  margin-top: .75rem; font-size: 1.05rem;
  color: var(--text-secondary); max-width: 600px; margin-inline: auto;
}

/* Divider */
.divider {
  width: 60px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  margin: 1rem auto 0;
}

/* Grid */
.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.5rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }

/* Flex */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap    { flex-wrap: wrap; }
.gap-1  { gap: .5rem; }
.gap-2  { gap: 1rem; }
.gap-3  { gap: 1.5rem; }
.gap-4  { gap: 2rem; }

/* Spacing */
.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mt-4{margin-top:2rem}
.mb-1{margin-bottom:.5rem}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}.mb-4{margin-bottom:2rem}

/* Text */
.text-center { text-align: center; }
.text-start  { text-align: start; }
.text-muted  { color: var(--text-muted); }
.text-green  { color: var(--green); }
.text-gold   { color: var(--gold); }

/* ════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .75rem 1.75rem;
  border-radius: var(--radius-full); font-family: var(--font);
  font-size: .95rem; font-weight: 700; letter-spacing: .02em;
  transition: all var(--t-fast); cursor: pointer; border: 2px solid transparent;
  white-space: nowrap;
}
.btn-lg { padding: .9rem 2.25rem; font-size: 1.05rem; }
.btn-sm { padding: .5rem 1.25rem; font-size: .85rem; }

.btn-primary {
  background: var(--green); color: #fff; border-color: var(--green);
}
.btn-primary:hover {
  background: var(--green-light); border-color: var(--green-light);
  box-shadow: var(--shadow-green); transform: translateY(-2px);
}

.btn-gold {
  background: var(--gold); color: #0d1117; border-color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold-light); border-color: var(--gold-light);
  box-shadow: var(--shadow-gold); transform: translateY(-2px);
}

.btn-outline {
  background: transparent; color: var(--green); border-color: var(--green);
}
.btn-outline:hover {
  background: var(--green); color: #fff;
  box-shadow: var(--shadow-green); transform: translateY(-2px);
}

.btn-outline-gold {
  background: transparent; color: var(--gold); border-color: var(--gold);
}
.btn-outline-gold:hover {
  background: var(--gold); color: #0d1117;
  box-shadow: var(--shadow-gold); transform: translateY(-2px);
}

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

.btn-danger { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.btn-danger:hover { background: #c0392b; }

.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.btn .fa-spin { animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════════
   CARDS
   ════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: transform var(--t-normal), box-shadow var(--t-normal), border-color var(--t-normal);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green);
}
.card-body  { padding: 1.5rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); }

/* Course Card */
.course-card { display: flex; flex-direction: column; }
.course-card-thumb {
  position: relative; overflow: hidden;
  aspect-ratio: 16/9;
}
.course-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-slow);
}
.course-card:hover .course-card-thumb img { transform: scale(1.05); }
.course-card-badge {
  position: absolute; top: .75rem; inset-inline-start: .75rem;
  padding: .25rem .7rem; border-radius: var(--radius-full);
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  background: var(--gold); color: #0d1117;
}
.course-card-badge.featured { background: var(--green); color: #fff; }
.course-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.course-card-title {
  font-size: 1rem; font-weight: 700; line-height: 1.4;
  margin-bottom: .5rem; color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.course-card-meta {
  display: flex; gap: 1rem; font-size: .8rem;
  color: var(--text-muted); margin-bottom: .75rem; flex-wrap: wrap;
}
.course-card-meta span { display: flex; align-items: center; gap: .3rem; }
.course-card-instructors {
  display: flex; gap: .4rem; align-items: center;
  margin-bottom: .75rem; font-size: .8rem; color: var(--text-secondary);
}
.course-card-instructors img {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--green);
  object-fit: cover;
}
.course-card-footer {
  margin-top: auto; padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.course-price { font-size: 1.25rem; font-weight: 800; color: var(--green); }
.course-price-local { font-size: .75rem; color: var(--text-muted); }
.course-price-original { font-size: .85rem; color: var(--text-muted); text-decoration: line-through; }

/* Service Card */
.service-card {
  display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem 1.5rem;
  transition: all var(--t-normal); position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--green-glow), transparent);
  opacity: 0; transition: opacity var(--t-normal);
  z-index: 0; pointer-events: none;
}
.service-card > * { position: relative; z-index: 1; }
.service-card:hover::before { opacity: 1; }
.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--green); box-shadow: var(--shadow-green);
}
.service-icon {
  width: 64px; height: 64px; border-radius: var(--radius-md);
  background: var(--green-glow); border: 1px solid var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; color: var(--green); margin-bottom: 1.25rem;
  transition: background var(--t-normal), transform var(--t-normal);
}
.service-card:hover .service-icon {
  background: var(--green); color: #fff; transform: scale(1.1);
}
.service-title { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.service-desc  { font-size: .9rem; color: var(--text-secondary); flex: 1; margin-bottom: 1.25rem; line-height: 1.6; }
.service-card-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Blog Card */
.blog-card { display: flex; flex-direction: column; }
.blog-card-thumb {
  aspect-ratio: 9/6; overflow: hidden;
}
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.blog-card:hover .blog-card-thumb img { transform: scale(1.05); }
.blog-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.blog-card-cat {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--gold); margin-bottom: .5rem;
}
.blog-card-title {
  font-size: 1rem; font-weight: 700; line-height: 1.4; margin-bottom: .5rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card-excerpt {
  font-size: .85rem; color: var(--text-secondary);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1; margin-bottom: 1rem;
}
.blog-card-meta {
  display: flex; gap: .75rem; font-size: .78rem;
  color: var(--text-muted); align-items: center;
}

/* Portfolio Card */
.portfolio-card { position: relative; overflow: hidden; border-radius: var(--radius-lg); height: 280px; }
.portfolio-card img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform var(--t-slow); }
.portfolio-card:hover img { transform: scale(1.08); }
.portfolio-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 40%, transparent);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem; opacity: 0; transform: translateY(10px);
  transition: all var(--t-normal);
}
.portfolio-card:hover .portfolio-overlay { opacity: 1; transform: translateY(0); }
.portfolio-cat { font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--gold); margin-bottom: .4rem; }
.portfolio-title { font-size: 1rem; font-weight: 700; color: #fff; }

/* ════════════════════════════════════════════════════════════
   HERO SECTION
   ════════════════════════════════════════════════════════════ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg video,
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.85) 0%, rgba(0,50,25,.7) 50%, rgba(0,0,0,.6) 100%);
}
.hero-particles { position: absolute; inset: 0; overflow: hidden; }

.hero-content {
  position: relative; z-index: 2; text-align: center;
  max-width: 800px; padding: 2rem 1.5rem;
  animation: heroIn .8s ease both;
}
@keyframes heroIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem 1.1rem; border-radius: var(--radius-full);
  background: var(--gold-glow); border: 1px solid var(--gold);
  color: var(--gold); font-size: .8rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 1.25rem; animation: heroIn .8s .1s ease both;
}
.hero-badge i { color: var(--gold); }

.hero-title {
  font-size: clamp(2rem, 6vw, 3.75rem);
  font-weight: 900; line-height: 1.15;
  color: #fff; margin-bottom: 1rem;
  animation: heroIn .8s .2s ease both;
}
.hero-title .highlight {
  color: var(--green);
  text-shadow: 0 0 30px var(--green-glow);
}
.hero-title .highlight-gold {
  color: var(--gold);
  text-shadow: 0 0 30px var(--gold-glow);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,.8);
  margin-bottom: 2rem; line-height: 1.7;
  animation: heroIn .8s .3s ease both;
}

.hero-cta {
  display: flex; gap: 1rem; justify-content: center;
  flex-wrap: wrap; animation: heroIn .8s .4s ease both;
}

.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: .4rem;
  color: rgba(255,255,255,.5); font-size: .75rem; animation: bounce 2s ease infinite;
}
.hero-scroll i { font-size: 1rem; }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* ════════════════════════════════════════════════════════════
   COUNTERS
   ════════════════════════════════════════════════════════════ */
.counters-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.counters-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.counter-item {
  text-align: center; padding: 2.5rem 1rem;
  border-inline-end: 1px solid var(--border);
  transition: background var(--t-normal);
}
.counter-item:last-child { border-inline-end: none; }
.counter-item:hover { background: var(--bg-card); }
.counter-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  background: var(--green-glow); border: 1px solid var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: var(--green); margin: 0 auto .75rem;
}
.counter-number {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900; color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.counter-number .counter-val { display: inline-block; }
.counter-number .counter-plus { color: var(--green); }
.counter-label { font-size: .875rem; color: var(--text-secondary); margin-top: .25rem; }

/* ════════════════════════════════════════════════════════════
   TESTIMONIALS SLIDER
   ════════════════════════════════════════════════════════════ */
.slider-section { overflow: hidden; }
.slider-track {
  display: flex; gap: 1.5rem;
  animation: autoScroll 35s linear infinite;
  width: max-content;
}
.slider-track:hover { animation-play-state: paused; }
@keyframes autoScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.testimonial-card {
  min-width: 320px; max-width: 320px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  flex-shrink: 0;
}
.testimonial-stars { color: var(--gold); font-size: .9rem; margin-bottom: .75rem; }
.testimonial-text { font-size: .9rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 1rem; }
.testimonial-author { display: flex; align-items: center; gap: .75rem; }
.testimonial-author img {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--green); object-fit: cover;
}
.testimonial-author-info strong { display: block; font-size: .9rem; }
.testimonial-author-info small { color: var(--text-muted); font-size: .78rem; }

/* Results Slider */
.results-track {
  display: flex; gap: 1rem;
  animation: autoScroll 40s linear infinite reverse;
  width: max-content;
}
.result-card {
  min-width: 200px; border-radius: var(--radius-md); overflow: hidden;
  flex-shrink: 0; height: 300px;
}
.result-card img { width: 100%; height: 100%; object-fit: contain; background: var(--bg-secondary); }

/* ════════════════════════════════════════════════════════════
   FORMS
   ════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block; font-size: .875rem; font-weight: 600;
  margin-bottom: .5rem; color: var(--text-secondary);
}
.form-label .required { color: #e74c3c; margin-inline-start: .2rem; }

.form-control {
  width: 100%; padding: .75rem 1rem;
  background: var(--bg-input); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-family: var(--font); font-size: .95rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-control:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}
.form-control::placeholder { color: var(--text-muted); }

textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { appearance: none; cursor: pointer; }

.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: .35rem; }
.form-error { font-size: .78rem; color: #e74c3c; margin-top: .35rem; }

/* Input Group */
.input-group { position: relative; }
.input-group .form-control { padding-inline-end: 3rem; }
.input-group-icon {
  position: absolute; inset-inline-end: 1rem; top: 50%;
  transform: translateY(-50%); color: var(--text-muted); pointer-events: none;
}
.input-group-btn {
  position: absolute; inset-inline-end: .5rem; top: 50%;
  transform: translateY(-50%); background: none; color: var(--text-muted);
  padding: .25rem; font-size: .9rem;
}
.input-group-btn:hover { color: var(--green); }

/* Checkbox / Radio */
.form-check { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; }
.form-check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--green); }
.form-check-label { font-size: .9rem; color: var(--text-secondary); cursor: pointer; }

/* ════════════════════════════════════════════════════════════
   BADGES & TAGS
   ════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .7rem; border-radius: var(--radius-full);
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.badge-green   { background: var(--green-glow); color: var(--green); border: 1px solid var(--green-dark); }
.badge-gold    { background: var(--gold-glow);  color: var(--gold);  border: 1px solid var(--gold-dark); }
.badge-red     { background: rgba(231,76,60,.15); color: #e74c3c; border: 1px solid rgba(231,76,60,.4); }
.badge-gray    { background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border); }

/* ════════════════════════════════════════════════════════════
   TABS
   ════════════════════════════════════════════════════════════ */
.tabs-nav {
  display: flex; gap: .25rem; border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.tabs-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: .75rem 1.25rem; font-size: .9rem; font-weight: 600;
  color: var(--text-muted); background: none; border-bottom: 2px solid transparent;
  white-space: nowrap; transition: all var(--t-fast); margin-bottom: -1px;
}
.tab-btn:hover  { color: var(--text-primary); }
.tab-btn.active { color: var(--green); border-bottom-color: var(--green); }
.tab-pane       { display: none; }
.tab-pane.active { display: block; }

/* ════════════════════════════════════════════════════════════
   ACCORDION
   ════════════════════════════════════════════════════════════ */
.accordion-item {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  margin-bottom: .5rem; overflow: hidden;
}
.accordion-header {
  width: 100%; padding: 1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-card); color: var(--text-primary);
  font-size: .95rem; font-weight: 600; text-align: start;
  transition: background var(--t-fast);
}
.accordion-header:hover { background: var(--bg-card-hover); }
.accordion-header.open  { color: var(--green); }
.accordion-header i.toggle-icon { transition: transform var(--t-normal); flex-shrink: 0; }
.accordion-header.open i.toggle-icon { transform: rotate(180deg); }
.accordion-body {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  background: var(--bg-secondary);
}
.accordion-body.open { max-height: 1000px; }
.accordion-body-inner { padding: 1rem 1.25rem; font-size: .9rem; color: var(--text-secondary); }

/* ════════════════════════════════════════════════════════════
   MODAL
   ════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 5000;
  background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; visibility: hidden; transition: all var(--t-normal);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  transform: scale(.95) translateY(20px);
  transition: transform var(--t-normal);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close { background: none; color: var(--text-muted); font-size: 1.1rem; transition: color var(--t-fast); }
.modal-close:hover { color: #e74c3c; }
.modal-body   { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: .75rem; justify-content: flex-end; }

/* ════════════════════════════════════════════════════════════
   ALERT / NOTICE
   ════════════════════════════════════════════════════════════ */
.alert {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .875rem 1.25rem; border-radius: var(--radius-md);
  font-size: .9rem; margin-bottom: 1rem;
}
.alert-success { background: rgba(0,126,63,.12); border: 1px solid var(--green); color: var(--green); }
.alert-error   { background: rgba(231,76,60,.12); border: 1px solid #e74c3c; color: #e74c3c; }
.alert-warning { background: rgba(210,175,26,.12); border: 1px solid var(--gold); color: var(--gold); }
.alert-info    { background: rgba(52,152,219,.12); border: 1px solid #3498db; color: #3498db; }

/* ════════════════════════════════════════════════════════════
   TABLE
   ════════════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: .875rem 1rem; text-align: start;
  border-bottom: 1px solid var(--border); font-size: .875rem;
}
th { background: var(--bg-secondary); font-weight: 700; color: var(--text-secondary); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-card); }

/* ════════════════════════════════════════════════════════════
   PAGINATION
   ════════════════════════════════════════════════════════════ */
.pagination {
  display: flex; gap: .4rem; justify-content: center;
  align-items: center; flex-wrap: wrap; margin-top: 2rem;
}
.page-btn {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); background: var(--bg-card);
  border: 1px solid var(--border); color: var(--text-secondary);
  font-size: .875rem; font-weight: 600; transition: all var(--t-fast);
}
.page-btn:hover, .page-btn.active { background: var(--green); color: #fff; border-color: var(--green); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ════════════════════════════════════════════════════════════
   BREADCRUMB
   ════════════════════════════════════════════════════════════ */
.breadcrumb {
  display: flex; align-items: center; gap: .5rem;
  font-size: .85rem; color: var(--text-muted);
  padding: 1rem 0; flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); transition: color var(--t-fast); }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb-sep { color: var(--text-muted); font-size: .75rem; }
.breadcrumb-current { color: var(--text-primary); font-weight: 600; }

/* ════════════════════════════════════════════════════════════
   PAGE HERO (Inner pages)
   ════════════════════════════════════════════════════════════ */
.page-hero {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 2.5rem;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, var(--green-glow) 0%, transparent 60%);
}
.page-hero-content { position: relative; z-index: 1; }
.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900; margin-bottom: .5rem;
}
.page-hero p { color: var(--text-secondary); font-size: 1rem; }

/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.site-footer::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 100%, var(--green-glow), transparent 60%);
  pointer-events: none;
}
.footer-wave { line-height: 0; transform: rotate(180deg); margin-bottom: -2px; }
.footer-wave svg { width: 100%; height: 40px; }

.footer-inner { max-width: 1300px; margin: 0 auto; padding: 3rem 1.5rem 0; position: relative; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem; margin-bottom: 2rem;
}

.footer-logo {
  display: flex; align-items: center; gap: .6rem;
  font-size: 1.25rem; font-weight: 800; margin-bottom: 1rem;
}
.footer-logo img { height: 38px; width: auto; }
.footer-tagline { font-size: .875rem; color: var(--text-secondary); margin-bottom: 1.25rem; line-height: 1.6; }

.footer-social { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.social-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; color: var(--text-muted);
  transition: all var(--t-fast);
}
.social-icon:hover { color: #fff; border-color: transparent; }
.social-facebook:hover  { background: #1877f2; }
.social-instagram:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.social-linkedin:hover  { background: #0a66c2; }
.social-twitter:hover   { background: #000; }
.social-tiktok:hover    { background: #000; }
.social-youtube:hover   { background: #ff0000; }

.footer-contact-info { display: flex; flex-direction: column; gap: .5rem; }
.footer-contact-item {
  display: flex; align-items: center; gap: .6rem;
  font-size: .85rem; color: var(--text-secondary);
  transition: color var(--t-fast);
}
.footer-contact-item:hover { color: var(--green); }
.footer-contact-item i { color: var(--green); width: 16px; }

.footer-col-title {
  font-size: .9rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-primary);
  margin-bottom: 1rem; padding-bottom: .6rem;
  border-bottom: 2px solid var(--green);
  display: inline-block;
}

.footer-links { display: flex; flex-direction: column; gap: .4rem; }
.footer-links a {
  display: flex; align-items: center; gap: .5rem;
  font-size: .875rem; color: var(--text-secondary);
  transition: color var(--t-fast), padding var(--t-fast);
}
.footer-links a:hover { color: var(--green); padding-inline-start: .3rem; }
.footer-links a i { font-size: .6rem; color: var(--text-muted); }
.footer-see-all { color: var(--gold) !important; font-weight: 600; }

/* Newsletter */
.footer-newsletter { margin-top: 1.5rem; }
.footer-newsletter h5 { font-size: .9rem; font-weight: 700; margin-bottom: .3rem; }
.footer-newsletter p  { font-size: .8rem; color: var(--text-muted); margin-bottom: .75rem; }
.newsletter-input-wrap { display: flex; gap: 0; }
.newsletter-input-wrap input {
  flex: 1; padding: .65rem 1rem;
  background: var(--bg-input); border: 1.5px solid var(--border);
  border-radius: var(--radius-full) 0 0 var(--radius-full);
  color: var(--text-primary); font-size: .85rem; font-family: var(--font);
}
[dir="rtl"] .newsletter-input-wrap input {
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}
.newsletter-input-wrap input:focus { border-color: var(--green); outline: none; }
.newsletter-input-wrap button {
  padding: .65rem 1.1rem;
  background: var(--green); color: #fff;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  font-size: .85rem; transition: background var(--t-fast);
}
[dir="rtl"] .newsletter-input-wrap button {
  border-radius: var(--radius-full) 0 0 var(--radius-full);
}
.newsletter-input-wrap button:hover { background: var(--green-light); }
.newsletter-msg { font-size: .78rem; margin-top: .4rem; }
.newsletter-msg.success { color: var(--green); }
.newsletter-msg.error   { color: #e74c3c; }

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid var(--border); padding: 1.25rem 0;
}
.footer-bottom-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem; font-size: .8rem; color: var(--text-muted);
}
.footer-copy a { color: var(--green); }
.footer-bottom-links { display: flex; gap: .75rem; align-items: center; }
.footer-bottom-links a { color: var(--text-muted); transition: color var(--t-fast); }
.footer-bottom-links a:hover { color: var(--green); }
.footer-made { display: flex; align-items: center; gap: .3rem; }

/* ════════════════════════════════════════════════════════════
   AUTH PAGES
   ════════════════════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg-primary); padding: 2rem 1rem;
  position: relative; overflow: hidden;
}
.auth-page::before {
  content: ''; position: absolute;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, var(--green-glow), transparent 70%);
  top: -200px; inset-inline-start: -200px;
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 2.5rem;
  position: relative; z-index: 1;
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo img { height: 52px; margin: 0 auto .5rem; }
.auth-logo h1 { font-size: 1.5rem; font-weight: 900; }
.auth-logo p  { font-size: .875rem; color: var(--text-muted); }
.auth-divider {
  display: flex; align-items: center; gap: 1rem;
  margin: 1.25rem 0; color: var(--text-muted); font-size: .8rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: .875rem; color: var(--text-muted); }
.auth-footer a { color: var(--green); font-weight: 600; }

/* ════════════════════════════════════════════════════════════
   ADMIN LAYOUT  (RTL-first, mobile-ready)
   ════════════════════════════════════════════════════════════ */
.admin-layout { display: flex; min-height: 100vh; }

/* ── Sidebar — always fixed on RIGHT for RTL ── */
.admin-sidebar {
  width: 260px; flex-shrink: 0;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed;
  top: 0; right: 0; bottom: 0; left: auto;
  z-index: 1000;
  overflow-y: auto;
  transition: transform .3s ease;
  /* desktop: always visible */
  transform: translateX(0);
}

.admin-sidebar-logo {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .75rem;
}
.admin-sidebar-logo img { height: 36px; }
.admin-sidebar-logo span { font-size: 1rem; font-weight: 800; }

.admin-nav { flex: 1; padding: 1rem .75rem; }
.admin-nav-group { margin-bottom: 1.5rem; }
.admin-nav-group-title {
  font-size: .68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; color: var(--text-muted);
  padding: 0 .75rem; margin-bottom: .4rem;
}
.admin-nav-link {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .75rem; border-radius: var(--radius-md);
  font-size: .875rem; font-weight: 500; color: var(--text-secondary);
  transition: all var(--t-fast); margin-bottom: .15rem;
}
.admin-nav-link i { width: 18px; text-align: center; font-size: .9rem; }
.admin-nav-link:hover, .admin-nav-link.active {
  background: var(--green-glow); color: var(--green);
}
.admin-nav-link .badge-count {
  margin-inline-start: auto; background: var(--green); color: #fff;
  font-size: .65rem; font-weight: 700; padding: .15rem .45rem;
  border-radius: var(--radius-full);
}

/* ── Main content — margin-right to clear the sidebar ── */
.admin-main {
  flex: 1;
  margin-right: 260px;
  margin-left: 0;
  display: flex; flex-direction: column; min-width: 0;
  max-width: calc(100vw - 260px);
}

.admin-topbar {
  height: 64px; background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
}
.admin-page-title { font-size: 1.1rem; font-weight: 700; }
.admin-content { padding: 1.5rem; flex: 1; overflow-x: auto; }

/* Stat Cards */
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  display: flex; align-items: flex-start; gap: 1rem;
  transition: border-color var(--t-normal), box-shadow var(--t-normal);
}
.stat-card:hover { border-color: var(--green); box-shadow: var(--shadow-green); }
.stat-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
}
.stat-icon.green { background: var(--green-glow); color: var(--green); }
.stat-icon.gold  { background: var(--gold-glow);  color: var(--gold); }
.stat-icon.blue  { background: rgba(52,152,219,.15); color: #3498db; }
.stat-icon.red   { background: rgba(231,76,60,.15);  color: #e74c3c; }
.stat-info { flex: 1; }
.stat-value { font-size: 1.75rem; font-weight: 900; line-height: 1; margin-bottom: .25rem; }
.stat-label { font-size: .85rem; color: var(--text-muted); }
.stat-change { font-size: .78rem; display: flex; align-items: center; gap: .25rem; margin-top: .25rem; }
.stat-change.up   { color: var(--green); }
.stat-change.down { color: #e74c3c; }

/* ════════════════════════════════════════════════════════════
   CHATBOT
   ════════════════════════════════════════════════════════════ */
.chatbot-toggle {
  position: fixed; bottom: 2rem; inset-inline-start: 2rem; z-index: 900;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  color: #fff; font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-green); transition: all var(--t-normal);
  border: none;
}
.chatbot-toggle:hover { transform: scale(1.1); }
.chatbot-toggle .chat-badge {
  position: absolute; top: -4px; inset-inline-end: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold); color: #0d1117; font-size: .6rem;
  font-weight: 700; display: flex; align-items: center; justify-content: center;
}

.chatbot-window {
  position: fixed; bottom: 6rem; inset-inline-start: 2rem; z-index: 900;
  width: 360px; max-height: 520px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateY(20px) scale(.95);
  transition: all var(--t-normal);
}
.chatbot-window.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.chatbot-header {
  padding: 1rem 1.25rem; background: var(--green);
  display: flex; align-items: center; gap: .75rem;
}
.chatbot-header-info strong { display: block; color: #fff; font-size: .9rem; }
.chatbot-header-info small  { color: rgba(255,255,255,.75); font-size: .75rem; }
.chatbot-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff;
}
.chatbot-close { margin-inline-start: auto; background: none; color: rgba(255,255,255,.75); font-size: 1rem; }
.chatbot-close:hover { color: #fff; }

.chatbot-messages {
  flex: 1; overflow-y: auto; padding: 1rem;
  display: flex; flex-direction: column; gap: .75rem;
  scroll-behavior: smooth;
}
.chat-msg { display: flex; gap: .5rem; max-width: 85%; }
.chat-msg.user { margin-inline-start: auto; flex-direction: row-reverse; }
.chat-bubble {
  padding: .6rem .9rem; border-radius: var(--radius-md);
  font-size: .85rem; line-height: 1.5;
}
.chat-msg.bot  .chat-bubble { background: var(--bg-secondary); color: var(--text-primary); border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md); }
.chat-msg.user .chat-bubble { background: var(--green); color: #fff; border-radius: var(--radius-md) 0 var(--radius-md) var(--radius-md); }
.chat-typing { display: flex; gap: .3rem; padding: .6rem .9rem; }
.chat-typing span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted);
  animation: typing .8s ease infinite;
}
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }

.chatbot-input {
  padding: .75rem; border-top: 1px solid var(--border);
  display: flex; gap: .5rem;
}
.chatbot-input input {
  flex: 1; padding: .6rem .9rem;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-full); font-size: .85rem;
  color: var(--text-primary); font-family: var(--font);
}
.chatbot-input input:focus { border-color: var(--green); outline: none; }
.chatbot-send {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; transition: background var(--t-fast);
}
.chatbot-send:hover { background: var(--green-light); }

/* ════════════════════════════════════════════════════════════
   PROGRESS BAR
   ════════════════════════════════════════════════════════════ */
.progress-bar {
  height: 8px; background: var(--border); border-radius: 4px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--green), var(--green-light));
  transition: width .6s ease;
}
.progress-fill.gold { background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); }

/* ════════════════════════════════════════════════════════════
   TOOLTIP
   ════════════════════════════════════════════════════════════ */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .3rem .65rem; font-size: .75rem; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity var(--t-fast);
  box-shadow: var(--shadow-sm);
}
[data-tooltip]:hover::after { opacity: 1; }

/* ════════════════════════════════════════════════════════════
   SKELETON LOADER
   ════════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer { to { background-position: -200% 0; } }
.skeleton-text  { height: 16px; border-radius: 4px; margin-bottom: .6rem; }
.skeleton-title { height: 24px; border-radius: 4px; margin-bottom: 1rem; }
.skeleton-img   { aspect-ratio: 16/9; border-radius: var(--radius-md); }

/* ════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════ */
.fade-in        { animation: fadeIn .5s ease both; }
.slide-up       { animation: slideUp .5s ease both; }
.slide-in-start { animation: slideInFromStart .4s ease both; }

@keyframes fadeIn           { from { opacity: 0; }                         to { opacity: 1; } }
@keyframes slideUp          { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInFromStart { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }

/* Stagger children */
.stagger > * { opacity: 0; animation: slideUp .5s ease forwards; }
.stagger > *:nth-child(1)  { animation-delay: .05s; }
.stagger > *:nth-child(2)  { animation-delay: .1s;  }
.stagger > *:nth-child(3)  { animation-delay: .15s; }
.stagger > *:nth-child(4)  { animation-delay: .2s;  }
.stagger > *:nth-child(5)  { animation-delay: .25s; }
.stagger > *:nth-child(6)  { animation-delay: .3s;  }

/* Intersection observer reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .counters-grid { grid-template-columns: repeat(2, 1fr); }
  .counter-item:nth-child(2) { border-inline-end: none; }
  /* Admin: hide sidebar off-screen to the RIGHT (RTL layout) */
  .admin-sidebar {
    transform: translateX(100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-main {
    margin-right: 0;
    margin-left: 0;
    max-width: 100vw;
  }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }
  .section { padding: 3rem 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .counters-grid { grid-template-columns: repeat(2, 1fr); }
  .counter-item { border-inline-end: none; border-bottom: 1px solid var(--border); }
  .counter-item:last-child { border-bottom: none; }
  .chatbot-window { width: calc(100vw - 2rem); left: 1rem; right: 1rem; inset-inline-start: 1rem; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .hero-cta { flex-direction: column; align-items: center; }
  .modal { margin: .5rem; }
  .admin-content { padding: 1rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .auth-card { padding: 1.5rem; }
  .flash-container { right: .5rem; left: .5rem; max-width: none; }
  [dir="rtl"] .flash-container { right: .5rem; left: .5rem; }
}

/* ════════════════════════════════════════════════════════════
   PRINT
   ════════════════════════════════════════════════════════════ */
@media print {
  .navbar, .site-footer, .whatsapp-float, .back-to-top,
  .chatbot-toggle, .chatbot-window, #page-loader { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border: 1px solid #ccc; box-shadow: none; }
}
@media (max-width: 768px) {
  .nav-actions .btn-outline-sm,
  .nav-actions .btn-primary-sm {
    display: none !important;
  }
}
