/* ==========================================================================
   المبرمج — Almobarmij Design System
   Modern Landing Page & Control Panel Stylesheet
   ========================================================================== */

/* Local Webfonts (Cairo & Tajawal) */
@import url('fonts.css');

/* Fallback local font */
@font-face {
  font-family: 'Droid Arabic Naskh';
  font-style: normal;
  font-weight: normal;
  src: url('../../assets/fonts/DroidNaskh-Regular.woff2') format('woff2'),
       url('../../assets/fonts/DroidNaskh-Regular.woff') format('woff'),
       url('../../assets/fonts/DroidNaskh-Regular.ttf') format('truetype');
}

:root {
  --font-main: 'Tajawal', 'Cairo', 'Droid Arabic Naskh', system-ui, -apple-system, sans-serif;
  --font-heading: 'Cairo', 'Tajawal', 'Droid Arabic Naskh', system-ui, sans-serif;
  
  /* Color Palette */
  --bg: #f8fafc;
  --bg-subtle: #f1f5f9;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  
  --accent: #0d9488;
  --accent-light: #f0fdf4;
  --gold: #d97706;
  --gold-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --success: #16a34a;
  --success-light: #f0fdf4;
  
  /* Elevation & Geometry */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px -1px rgba(15, 23, 42, 0.08), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 30px -4px rgba(15, 23, 42, 0.1), 0 4px 10px -3px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.18);
  
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--primary-hover);
}

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

button, input, select, textarea {
  font-family: inherit;
}

.container {
  width: min(1200px, calc(100% - 36px));
  margin-inline: auto;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.96);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: var(--radius-md);
  border: 1px solid var(--primary-border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.brand-logo-wrap img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.brand-tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  cursor: pointer;
  font-size: 1.2rem;
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  line-height: 1.4;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-main);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
  color: var(--primary);
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 13px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border-color: #fecaca;
}

.btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
}

.btn-success {
  background: var(--success-light);
  color: var(--success);
  border-color: #bbf7d0;
}

.btn-success:hover {
  background: var(--success);
  color: #ffffff;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  line-height: 1.2;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.badge-gold {
  background: var(--gold-light);
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-teal {
  background: #ccfbf1;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.badge-purple {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.badge-platform {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 64px 0 54px;
  background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.05) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(13, 148, 136, 0.05) 0%, transparent 40%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff;
  border: 1px solid var(--primary-border);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-eyebrow .pulse {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  animation: pulse-ring 1.8s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
  100% { transform: scale(0.9); opacity: 1; }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.hero-title .text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, #0d9488 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 30px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Hero Showcase Card */
.hero-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(13, 148, 136, 0.2));
  border-radius: calc(var(--radius-lg) + 2px);
  z-index: -1;
  opacity: 0.45;
  filter: blur(8px);
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-card-img-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0f172a;
  border: 1px solid var(--border);
}

.hero-card-img-wrap img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-card:hover .hero-card-img-wrap img {
  transform: scale(1.03);
}

.hero-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
}

/* ==========================================================================
   Section: Latest Programs (آخر البرامج)
   ========================================================================== */
.section {
  padding: 60px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section-title-wrap h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title-wrap p {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-top: 4px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  flex-wrap: wrap;
  background: var(--surface);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-btn {
  background: var(--bg-subtle);
  border: 1px solid transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.search-box {
  position: relative;
  min-width: 240px;
  flex-grow: 1;
  max-width: 320px;
}

.search-input {
  width: 100%;
  padding: 8px 36px 8px 14px;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

/* Program Cards Grid */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 24px;
}

.program-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.program-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0f172a;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

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

.program-card:hover .card-media img {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.card-content {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
}

.card-title a {
  color: var(--text-main);
}

.card-title a:hover {
  color: var(--primary);
}

.card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.card-footer {
  padding: 14px 20px 18px;
  background: var(--surface);
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-footer .btn {
  flex: 1;
}

.btn-icon-only {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon-only:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

/* ==========================================================================
   Features & Platform Grid
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.feature-box:hover {
  border-color: var(--primary-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.feature-box h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.feature-box p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ==========================================================================
   About Developer & Banner Box
   ========================================================================== */
.about-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 38px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-banner::after {
  content: '';
  position: absolute;
  top: -60px;
  left: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.4), transparent 70%);
  pointer-events: none;
}

.about-content h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: #ffffff;
}

.about-content p {
  color: #cbd5e1;
  font-size: 1.02rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-side {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.about-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
}

/* ==========================================================================
   Contact Form & Social
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.contact-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.contact-card p.subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

.social-links-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.social-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition);
}

.social-link-item:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

.social-link-item img {
  width: 22px;
  height: 22px;
}

.social-link-item svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  transition: var(--transition);
}

.footer-social-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-social-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #0b1329;
  color: #94a3b8;
  padding: 50px 0 26px;
  border-top: 1px solid #1e293b;
  margin-top: 60px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand h4 {
  font-family: var(--font-heading);
  color: #ffffff;
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 360px;
}

.footer-col h5 {
  font-family: var(--font-heading);
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: #ffffff;
  padding-right: 4px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  font-size: 0.86rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   Admin Panel Styles
   ========================================================================== */
.admin-body {
  background-color: #f1f5f9;
}

.admin-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.admin-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-topbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 26px 0;
}

.admin-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.admin-stat-info strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.1;
}

.admin-stat-info span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.admin-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 26px;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.admin-card-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Admin Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.92rem;
}

.admin-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table td {
  padding: 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background-color: #f8fafc;
}

.admin-thumb {
  width: 58px;
  height: 38px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #f1f5f9;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-md);
  width: min(520px, 100%);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-eyebrow,
  .hero-desc {
    margin-inline: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .about-banner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .about-side {
    max-width: 320px;
    margin-inline: auto;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav-menu.open {
    display: flex;
  }
  .nav-link {
    width: 100%;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box {
    max-width: 100%;
  }
  .programs-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Enhanced Error Pages Styles (404, 403, 500)
   ========================================================================== */
.error-section {
  padding: 60px 0 80px;
  min-height: calc(100vh - 400px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.error-showcase-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 48px 36px 42px;
  box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(15, 23, 42, 0.04);
  text-align: center;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.error-showcase-card::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 440px;
  height: 220px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12), transparent 70%);
  pointer-events: none;
  animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.9; transform: translateX(-50%) scale(1.12); }
}

@keyframes errorFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.error-art-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.error-illustration {
  width: 120px;
  height: 120px;
  animation: errorFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 10px 20px rgba(37, 99, 235, 0.15));
}

.error-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}

.error-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse-ring 1.8s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

.error-badge.badge-404 {
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid var(--primary-border);
}
.error-badge.badge-404 .status-dot {
  background: var(--primary);
}

.error-badge.badge-403 {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.error-badge.badge-403 .status-dot {
  background: #d97706;
}

.error-badge.badge-500 {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}
.error-badge.badge-500 .status-dot {
  background: var(--danger);
}

.error-code {
  font-family: var(--font-heading);
  font-size: clamp(4.8rem, 11vw, 7.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: 8px;
  user-select: none;
}

.error-code.code-404 {
  background: linear-gradient(135deg, var(--primary) 0%, #0d9488 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.error-code.code-403 {
  background: linear-gradient(135deg, #d97706 0%, #dc2626 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.error-code.code-500 {
  background: linear-gradient(135deg, #dc2626 0%, #7e22ce 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.error-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3.2vw, 2.05rem);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.35;
}

.error-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 20px;
  line-height: 1.8;
}

.error-url-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.84rem;
  color: #475569;
  direction: ltr;
  max-width: 90%;
  margin-bottom: 24px;
  word-break: break-all;
}

/* In-Page Quick Search inside error card */
.error-search-box {
  max-width: 460px;
  margin: 0 auto 28px;
  position: relative;
}

.error-search-form {
  display: flex;
  gap: 8px;
}

.error-search-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  color: var(--text-main);
  font-size: 0.92rem;
  transition: var(--transition);
}

.error-search-input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.error-suggestions-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-top: 10px;
}

.error-suggestions-title {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.error-suggestions-list {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.suggestion-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.88rem;
  transition: var(--transition);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.suggestion-pill:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Legal Documents Styling (Privacy Policy & Terms of Use)
   ========================================================================== */

.legal-hero {
  background: linear-gradient(180deg, #eff6ff 0%, var(--bg) 100%);
  padding: 48px 0 28px;
  border-bottom: 1px solid var(--border);
}

.legal-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  align-items: center;
}

.legal-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px 12px;
}

.legal-switch-tabs {
  display: inline-flex;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  gap: 4px;
  margin-bottom: 24px;
}

.legal-switch-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.legal-switch-tab.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.legal-switch-tab:hover:not(.active) {
  color: var(--text-main);
}

.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  color: #334155;
  font-size: 1.02rem;
  line-height: 1.85;
}

@media (max-width: 768px) {
  .legal-card {
    padding: 24px 18px;
    border-radius: var(--radius-md);
  }
}

.legal-toc-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 36px;
}

.legal-toc-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 16px;
}

.legal-toc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text-muted);
  padding: 4px 0;
  transition: var(--transition);
}

.legal-toc-link:hover {
  color: var(--primary);
  transform: translateX(-3px);
}

.legal-toc-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.legal-section {
  padding-top: 32px;
  margin-top: 32px;
  border-top: 1px dashed var(--border);
}

.legal-section:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.legal-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.legal-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.15);
}

.legal-section h2 {
  font-family: var(--font-heading);
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.legal-section h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 18px 0 8px;
}

.legal-section p {
  margin-bottom: 14px;
  text-align: justify;
}

.legal-callout {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-right: 4px solid var(--success);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 18px 0;
  color: #166534;
}

.legal-callout.info {
  background: #eff6ff;
  border-color: var(--primary-border);
  border-right-color: var(--primary);
  color: #1e40af;
}

.legal-callout.warning {
  background: #fefce8;
  border-color: #fde047;
  border-right-color: var(--gold);
  color: #854d0e;
}

.legal-callout-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 20px;
}

.legal-list li {
  position: relative;
  padding-right: 24px;
  margin-bottom: 10px;
  font-size: 0.98rem;
}

.legal-list li::before {
  content: "";
  position: absolute;
  right: 6px;
  top: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.legal-footer-box {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media print {
  .site-header, .site-footer, .legal-switch-tabs, .legal-toc-box, .legal-footer-box, .btn {
    display: none !important;
  }
  .legal-hero {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
  }
  .legal-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
}


