/* ============================================================
   MonecoleTech — Main Stylesheet
   Design: Refined Educational Tech
   Fonts: Syne (display) + DM Sans (body)
   ============================================================ */

/* ============================================================
   CSS VARIABLES & THEMING
   ============================================================ */
:root {
  /* Colors */
  --blue-50:  #EFF6FF;
  --blue-100: #DBEAFE;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --indigo-500:#6366F1;
  --indigo-600:#4F46E5;
  --indigo-700:#4338CA;
  --purple-400:#A78BFA;
  --purple-500:#8B5CF6;
  --purple-600:#7C3AED;
  --violet-600:#7C3AED;

  /* Semantic */
  --primary:    #4F46E5;
  --primary-dk: #4338CA;
  --primary-lt: #EEF2FF;
  --secondary:  #2563EB;
  --accent:     #8B5CF6;
  --success:    #10B981;
  --warning:    #F59E0B;
  --danger:     #EF4444;
  --info:       #0891B2;

  /* Text */
  --text-primary:   #0F172A;
  --text-secondary: #475569;
  --text-muted:     #94A3B8;
  --text-inverse:   #F8FAFC;

  /* Backgrounds */
  --bg-primary:    #FFFFFF;
  --bg-secondary:  #F8FAFC;
  --bg-tertiary:   #F1F5F9;
  --bg-card:       #FFFFFF;
  --bg-input:      #F8FAFC;

  /* Borders */
  --border-color:  #E2E8F0;
  --border-focus:  #4F46E5;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15,23,42,.04);
  --shadow-sm: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md: 0 4px 6px -1px rgba(15,23,42,.08), 0 2px 4px -1px rgba(15,23,42,.04);
  --shadow-lg: 0 10px 15px -3px rgba(15,23,42,.08), 0 4px 6px -2px rgba(15,23,42,.04);
  --shadow-xl: 0 20px 25px -5px rgba(15,23,42,.1), 0 10px 10px -5px rgba(15,23,42,.04);
  --shadow-2xl:0 25px 50px -12px rgba(15,23,42,.18);
  --shadow-glow:0 0 0 4px rgba(79,70,229,.15);

  /* Radius */
  --r-sm:  0.375rem;
  --r-md:  0.625rem;
  --r-lg:  0.875rem;
  --r-xl:  1.25rem;
  --r-2xl: 1.75rem;
  --r-full:9999px;

  /* Transitions */
  --t-fast:   150ms ease;
  --t-base:   250ms ease;
  --t-slow:   400ms cubic-bezier(.4,0,.2,1);

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  /* Layout */
  --nav-h: 68px;
  --sidebar-w: 260px;
}

/* Dark Mode */
[data-theme="dark"] {
  --text-primary:   #F1F5F9;
  --text-secondary: #CBD5E1;
  --text-muted:     #64748B;
  --bg-primary:     #0F172A;
  --bg-secondary:   #1E293B;
  --bg-tertiary:    #334155;
  --bg-card:        #1E293B;
  --bg-input:       #1E293B;
  --border-color:   #334155;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.4);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.4);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--t-slow), color var(--t-slow);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dk); }

::selection { background: var(--primary); color: white; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); letter-spacing: -0.025em; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); letter-spacing: -0.02em; }
h4 { font-size: 1.25rem; letter-spacing: -0.01em; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { color: var(--text-secondary); line-height: 1.7; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 5rem 0; }
.section--sm { padding: 3rem 0; }
.section--lg { padding: 7rem 0; }

.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6875rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--r-lg);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--t-base);
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity var(--t-fast);
}

.btn:hover::after { opacity: 0.08; }
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dk) 100%);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(79,70,229,.35);
}

.btn--primary:hover {
  box-shadow: 0 6px 20px 0 rgba(79,70,229,.45);
  transform: translateY(-1px);
  color: white;
}

.btn--secondary {
  background: var(--secondary);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(37,99,235,.3);
}

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

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

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

.btn--outline:hover {
  background: var(--primary);
  color: white;
}

.btn--danger { background: var(--danger); color: white; }
.btn--success { background: var(--success); color: white; }
.btn--sm { padding: 0.5rem 1rem; font-size: 0.875rem; border-radius: var(--r-md); }
.btn--lg { padding: 0.875rem 2rem; font-size: 1rem; border-radius: var(--r-xl); }
.btn--icon { padding: 0.6875rem; aspect-ratio: 1; }
.btn--full { width: 100%; justify-content: center; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--nav-h);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--t-base);
}

[data-theme="dark"] .nav {
  background: rgba(15,23,42,0.9);
}

.nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(79,70,229,.35);
}

.nav__logo-icon {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
  color: white;
  letter-spacing: -0.05em;
}

.nav__brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin-left: auto;
}

.nav__link {
  padding: 0.5rem 0.875rem;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  border-radius: var(--r-md);
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.nav__link:hover, .nav__link.active {
  color: var(--primary);
  background: var(--primary-lt);
}

.nav__dropdown { position: relative; }

.nav__dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem;
  min-width: 200px;
  opacity: 0;
  pointer-events: none;
  transition: all var(--t-base);
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.nav__dropdown:hover .nav__dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.nav__dropdown-item {
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: block;
  transition: all var(--t-fast);
}

.nav__dropdown-item:hover {
  background: var(--primary-lt);
  color: var(--primary);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav__user-menu { position: relative; display: flex; align-items: center; gap: 0.75rem; }

.nav__notif {
  position: relative;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--t-fast);
}

.nav__notif:hover { background: var(--primary-lt); color: var(--primary); }

.nav__badge {
  position: absolute;
  top: -2px; right: -2px;
  background: var(--danger);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-primary);
}

.nav__avatar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0.75rem 0.375rem 0.375rem;
  border-radius: var(--r-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--t-fast);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

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

.nav__avatar img {
  width: 28px; height: 28px;
  border-radius: 99px;
  object-fit: cover;
}

.nav__user-dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem;
  min-width: 180px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all var(--t-base);
  z-index: 1000;
}

.nav__user-dropdown.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.nav__user-dropdown a {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all var(--t-fast);
}

.nav__user-dropdown a:hover { background: var(--bg-secondary); color: var(--text-primary); }
.nav__user-dropdown a.danger:hover { background: #FEF2F2; color: var(--danger); }
.nav__user-dropdown hr { margin: 0.375rem 0; border: none; border-top: 1px solid var(--border-color); }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-primary); border-radius: 99px;
  transition: all var(--t-base);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 0 4rem;
  background: linear-gradient(135deg, #EEF2FF 0%, #F5F3FF 50%, #EFF6FF 100%);
}

[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #1E1B4B 0%, #2E1065 50%, #1E3A5F 100%);
}

.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(79,70,229,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(79,70,229,.06) 1px, transparent 1px);
  background-size: 56px 56px;
}

.hero__bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.hero__bg-blob--1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(79,70,229,.5), transparent 60%);
  top: -150px; left: -100px;
}

.hero__bg-blob--2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,.4), transparent 60%);
  bottom: -100px; right: -50px;
}

.hero__bg-blob--3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(59,130,246,.3), transparent 60%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: rgba(79,70,229,.1);
  border: 1px solid rgba(79,70,229,.2);
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.6s ease both;
}

.hero__badge-dot {
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 99px;
  animation: pulse 2s infinite;
}

.hero__title {
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.hero__title span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  animation: fadeInUp 0.7s ease 0.2s both;
}

.hero__search {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  animation: fadeInUp 0.7s ease 0.3s both;
  transition: box-shadow var(--t-base);
}

.hero__search:focus-within {
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.hero__search-icon { color: var(--text-muted); font-size: 1.125rem; flex-shrink: 0; }

.hero__search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  padding: 0.5rem 0;
}

.hero__search input::placeholder { color: var(--text-muted); }

.hero__search .btn { flex-shrink: 0; }

.hero__tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: fadeInUp 0.7s ease 0.4s both;
}

.hero__tag-label { font-size: 0.875rem; color: var(--text-muted); }

.hero__tag {
  padding: 0.375rem 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-full);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
}

.hero__tag:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-lt);
}

.hero__cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.5s both;
}

.hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(79,70,229,.1);
  animation: fadeInUp 0.7s ease 0.6s both;
}

.hero__stat-value {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.hero__stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: var(--primary-lt);
  border-radius: var(--r-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.section-header__title { margin-bottom: 1rem; }

.section-header__title span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header__desc { color: var(--text-secondary); max-width: 580px; margin: 0 auto; font-size: 1.0625rem; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--t-slow);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-xl);
  border-color: rgba(79,70,229,.15);
  transform: translateY(-4px);
}

/* Resource Card */
.resource-card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--t-slow);
  display: flex;
  flex-direction: column;
  position: relative;
}

.resource-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
  border-color: transparent;
}

.resource-card__thumbnail {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--primary-lt), #F5F3FF);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resource-card__thumbnail img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}

.resource-card:hover .resource-card__thumbnail img { transform: scale(1.05); }

.resource-card__type-badge {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

.resource-card__icon {
  width: 64px; height: 64px;
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
  box-shadow: var(--shadow-md);
}

.resource-card__bookmark {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: none;
  color: var(--text-muted);
  transition: all var(--t-fast);
  backdrop-filter: blur(8px);
}

.resource-card__bookmark:hover, .resource-card__bookmark.active {
  color: var(--primary);
  background: var(--primary-lt);
}

.resource-card__body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.resource-card__subject {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.resource-card__title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.resource-card__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.resource-card__meta-item { display: flex; align-items: center; gap: 0.3rem; }

.resource-card__footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.resource-card__teacher {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.resource-card__teacher img {
  width: 24px; height: 24px; border-radius: 99px; object-fit: cover;
}

/* Subject Cards */
.subject-card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-color);
  padding: 1.75rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-slow);
  text-decoration: none;
}

.subject-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.subject-card__icon {
  width: 56px; height: 56px;
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: white;
}

.subject-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.subject-card__count { font-size: 0.8125rem; color: var(--text-muted); }

/* Category Cards */
.category-card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-color);
  padding: 2rem;
  transition: all var(--t-slow);
  text-decoration: none;
  display: block;
  overflow: hidden;
  position: relative;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--t-slow);
}

.category-card:hover::before { opacity: 1; }
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }

.category-card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.category-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.category-card__desc { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1rem; }

.category-card__stats {
  display: flex; gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ============================================================
   STATISTICS SECTION
   ============================================================ */
.stats-section { background: linear-gradient(135deg, var(--primary), var(--accent)); padding: 5rem 0; }

.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem; }

.stat-item { text-align: center; }

.stat-item__value {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: white;
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-item__label {
  color: rgba(255,255,255,.75);
  font-size: 1rem;
  font-weight: 500;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonial-card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-color);
  padding: 2rem;
  position: relative;
}

.testimonial-card__quote {
  font-size: 3rem;
  color: var(--primary);
  opacity: 0.2;
  line-height: 1;
  font-family: serif;
  position: absolute;
  top: 1rem;
  left: 1.5rem;
}

.testimonial-card__content {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
}

.testimonial-card__author {
  display: flex; align-items: center; gap: 0.875rem;
}

.testimonial-card__avatar {
  width: 48px; height: 48px; border-radius: 99px; object-fit: cover;
}

.testimonial-card__name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.testimonial-card__role { font-size: 0.8125rem; color: var(--text-muted); }

.testimonial-card__stars { color: #F59E0B; font-size: 0.875rem; margin-top: 0.25rem; }

/* ============================================================
   PRICING
   ============================================================ */
.pricing-card {
  background: var(--bg-card);
  border-radius: var(--r-2xl);
  border: 1px solid var(--border-color);
  padding: 2.5rem 2rem;
  position: relative;
  transition: all var(--t-slow);
}

.pricing-card:hover { box-shadow: var(--shadow-xl); transform: translateY(-4px); }

.pricing-card--featured {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: white;
}

.pricing-card--featured * { color: white !important; }
.pricing-card--featured .pricing-feature { color: rgba(255,255,255,.85) !important; }

.pricing-badge {
  position: absolute; top: -0.75rem; left: 50%; transform: translateX(-50%);
  background: var(--warning);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: var(--r-full);
  font-size: 0.8125rem;
  font-weight: 700;
}

.pricing-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.pricing-price {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin: 1.5rem 0 0.25rem;
}

.pricing-price sup { font-size: 1.25rem; vertical-align: super; }
.pricing-period { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 2rem; }

.pricing-features { list-style: none; margin-bottom: 2rem; }

.pricing-feature {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.pricing-card--featured .pricing-feature { border-color: rgba(255,255,255,.15); }

.pricing-feature i { color: var(--success); font-size: 0.875rem; }
.pricing-card--featured .pricing-feature i { color: rgba(255,255,255,.9); }

/* ============================================================
   FAQ
   ============================================================ */
.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 0.75rem;
  transition: all var(--t-base);
}

.faq-item.open { border-color: var(--primary); }

.faq-question {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  text-align: left;
  transition: background var(--t-fast);
}

.faq-question:hover { background: var(--bg-secondary); }
.faq-item.open .faq-question { background: var(--primary-lt); color: var(--primary); }

.faq-question i { transition: transform var(--t-base); flex-shrink: 0; }
.faq-item.open .faq-question i { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-slow), padding var(--t-slow);
}

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

.faq-answer p { padding: 1rem 1.5rem 1.5rem; color: var(--text-secondary); }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-label span { color: var(--danger); margin-left: 0.25rem; }

.form-control {
  width: 100%;
  padding: 0.6875rem 1rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--r-lg);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-primary);
  transition: all var(--t-fast);
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: var(--shadow-glow);
}

.form-control::placeholder { color: var(--text-muted); }
.form-control:invalid:not(:placeholder-shown) { border-color: var(--danger); }

.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394A3B8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; cursor: pointer; }

textarea.form-control { resize: vertical; min-height: 100px; }

.form-hint { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.375rem; }
.form-error { font-size: 0.8125rem; color: var(--danger); margin-top: 0.375rem; display: none; }
.form-group.error .form-error { display: block; }
.form-group.error .form-control { border-color: var(--danger); }

/* Input with icon */
.input-group { position: relative; }
.input-group .form-control { padding-left: 2.75rem; }
.input-group__icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}

.input-group--right .form-control { padding-right: 2.75rem; padding-left: 1rem; }
.input-group__icon--right { left: auto; right: 1rem; pointer-events: auto; cursor: pointer; }

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.625rem;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge--primary { background: var(--primary-lt); color: var(--primary); }
.badge--success { background: #D1FAE5; color: #065F46; }
.badge--warning { background: #FEF3C7; color: #92400E; }
.badge--danger  { background: #FEE2E2; color: #991B1B; }
.badge--info    { background: #E0F2FE; color: #0C4A6E; }
.badge--muted   { background: var(--bg-tertiary); color: var(--text-muted); }

/* ============================================================
   ALERTS / TOASTS
   ============================================================ */
.alert {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--r-lg);
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.alert--success { background: #D1FAE5; color: #065F46; border-left: 4px solid #10B981; }
.alert--error   { background: #FEE2E2; color: #991B1B; border-left: 4px solid #EF4444; }
.alert--warning { background: #FEF3C7; color: #92400E; border-left: 4px solid #F59E0B; }
.alert--info    { background: #E0F2FE; color: #0C4A6E; border-left: 4px solid #0891B2; }

.toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  z-index: 9999;
}

.toast {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  max-width: 380px;
  animation: slideInRight 0.3s ease;
  font-size: 0.9375rem;
}

.toast--success { border-left: 4px solid var(--success); }
.toast--error   { border-left: 4px solid var(--danger); }
.toast--info    { border-left: 4px solid var(--primary); }

/* ============================================================
   NOTIFICATION PANEL
   ============================================================ */
.notif-panel {
  position: fixed; top: var(--nav-h); right: 1rem;
  width: 360px; max-height: 500px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2xl);
  z-index: 1000;
  overflow: hidden;
  transform: translateY(-10px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: all var(--t-base);
}

.notif-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.notif-panel__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.notif-panel__header h3 { font-size: 1rem; font-weight: 700; }
.notif-panel__header button { font-size: 0.8125rem; color: var(--primary); background: none; border: none; cursor: pointer; }

.notif-panel__list { overflow-y: auto; max-height: 400px; }

.notif-item {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--t-fast);
  cursor: pointer;
}

.notif-item:hover { background: var(--bg-secondary); }
.notif-item.unread { background: rgba(79,70,229,.04); }

.notif-item__icon {
  width: 38px; height: 38px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1rem;
}

.notif-item__title { font-weight: 600; font-size: 0.875rem; margin-bottom: 0.2rem; }
.notif-item__msg { font-size: 0.8125rem; color: var(--text-muted); }
.notif-item__time { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ============================================================
   DROPZONE
   ============================================================ */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--r-xl);
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-base);
  background: var(--bg-secondary);
}

.dropzone:hover, .dropzone.drag-over {
  border-color: var(--primary);
  background: var(--primary-lt);
}

.dropzone__icon { font-size: 3rem; color: var(--text-muted); margin-bottom: 1rem; }
.dropzone__title { font-weight: 700; margin-bottom: 0.5rem; }
.dropzone__hint { font-size: 0.875rem; color: var(--text-muted); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; pointer-events: none;
  transition: all var(--t-base);
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-card);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-2xl);
  max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  transform: scale(0.96) translateY(20px);
  transition: transform var(--t-slow);
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 2rem 0;
}

.modal__title { font-size: 1.25rem; font-weight: 700; }

.modal__close {
  width: 36px; height: 36px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-secondary); border: none; cursor: pointer;
  color: var(--text-muted); transition: all var(--t-fast);
}

.modal__close:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.modal__body { padding: 1.5rem 2rem 2rem; }

/* ============================================================
   OVERLAY
   ============================================================ */
.overlay {
  position: fixed; inset: 0; z-index: 800;
  background: transparent;
  pointer-events: none;
}

.overlay.active { pointer-events: all; }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress {
  width: 100%; height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--r-full);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--r-full);
  transition: width 0.5s ease;
}

/* ============================================================
   SEARCH FILTERS
   ============================================================ */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-xl);
  padding: 1.25rem;
  display: flex; flex-wrap: wrap; gap: 0.875rem; align-items: center;
}

.filter-group { display: flex; align-items: center; gap: 0.625rem; }
.filter-group label { font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 70% 30%, rgba(255,255,255,.1) 0%, transparent 50%);
}

.cta-section * { position: relative; z-index: 1; }

.cta-section h2 { color: white; margin-bottom: 1rem; }
.cta-section p  { color: rgba(255,255,255,.8); margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }

.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn--white {
  background: white; color: var(--primary);
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}

.btn--white:hover { background: var(--bg-secondary); color: var(--primary-dk); }

.btn--white-outline {
  background: transparent; border-color: rgba(255,255,255,.4); color: white;
}

.btn--white-outline:hover { background: rgba(255,255,255,.1); border-color: white; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: #0F172A; color: #94A3B8; }

.footer__top { padding: 5rem 0 3rem; }

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 2fr;
  gap: 3rem;
}

.footer__logo {
  display: flex; align-items: center; gap: 0.625rem;
  color: white; font-family: var(--font-display);
  font-weight: 800; font-size: 1.25rem;
  text-decoration: none; margin-bottom: 1rem;
}

.footer__tagline { font-size: 0.9rem; line-height: 1.6; margin-bottom: 1.5rem; color: #64748B; }

.footer__socials { display: flex; gap: 0.625rem; }

.footer__socials a {
  width: 36px; height: 36px;
  background: #1E293B;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  color: #64748B; font-size: 0.875rem;
  transition: all var(--t-fast);
}

.footer__socials a:hover { background: var(--primary); color: white; }

.footer__links h4 {
  font-family: var(--font-display);
  color: white; font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.footer__links ul { list-style: none; }

.footer__links li { margin-bottom: 0.5rem; }

.footer__links a {
  color: #64748B; font-size: 0.875rem;
  transition: color var(--t-fast);
}

.footer__links a:hover { color: white; }

.footer__newsletter h4 { font-family: var(--font-display); color: white; margin-bottom: 0.5rem; }
.footer__newsletter p { font-size: 0.875rem; margin-bottom: 1rem; }

.footer__newsletter-form { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }

.footer__newsletter-form input {
  flex: 1; padding: 0.625rem 1rem;
  background: #1E293B; border: 1px solid #334155;
  border-radius: var(--r-md); color: white; font-size: 0.875rem;
  outline: none;
}

.footer__newsletter-form input:focus { border-color: var(--primary); }
.footer__newsletter-form input::placeholder { color: #64748B; }

.footer__contact p { display: flex; align-items: center; gap: 0.625rem; font-size: 0.8125rem; margin-bottom: 0.5rem; }
.footer__contact i { color: var(--primary); }

.footer__bottom {
  border-top: 1px solid #1E293B;
  padding: 1.5rem 0;
  display: flex;
}

.footer__bottom .container {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}

.footer__bottom p { font-size: 0.8125rem; color: #475569; }
.footer__bottom a { color: #64748B; }
.footer__bottom a:hover { color: white; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .4; }
}

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

@keyframes countUp { from { opacity: 0; } to { opacity: 1; } }

.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-primary-color { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.font-display { font-family: var(--font-display); }
.font-bold   { font-weight: 700; }
.font-semibold { font-weight: 600; }
.d-flex      { display: flex; }
.d-none      { display: none; }
.gap-1       { gap: 0.25rem; }
.gap-2       { gap: 0.5rem; }
.gap-3       { gap: 0.75rem; }
.gap-4       { gap: 1rem; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap   { flex-wrap: wrap; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.p-relative { position: relative; }
.w-full { width: 100%; }
.overflow-hidden { overflow: hidden; }

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* Glass effect */
.glass {
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.2);
}

[data-theme="dark"] .glass { background: rgba(30,41,59,.7); border-color: rgba(255,255,255,.05); }

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--r-md);
}

@keyframes skeleton-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .stats-grid   { grid-template-columns: repeat(2,1fr); }
  .grid--4      { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 768px) {
  .nav__links  { display: none; }
  .nav__hamburger { display: flex; }

  .nav__links.open {
    display: flex; flex-direction: column;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0; bottom: 0;
    background: var(--bg-card);
    padding: 1.5rem;
    z-index: 850;
    overflow-y: auto;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .nav__dropdown-menu {
    position: static; transform: none;
    opacity: 1; pointer-events: all;
    box-shadow: none; border: none;
    background: var(--bg-secondary);
    display: none;
  }

  .nav__links.open .nav__dropdown.open .nav__dropdown-menu { display: flex; }

  .hero { padding: 4rem 0 3rem; }
  .hero__stats { gap: 1.5rem; flex-wrap: wrap; }

  .grid--3 { grid-template-columns: repeat(2,1fr); }
  .grid--2 { grid-template-columns: 1fr; }

  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer__newsletter-form { flex-direction: column; }

  .notif-panel { width: calc(100vw - 2rem); right: 1rem; }
}

@media (max-width: 480px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; }
  .stats-grid { grid-template-columns: repeat(2,1fr); gap: 1rem; }
  .stat-item__value { font-size: 2rem; }
}
