
:root {
  --navy-950: #060b19;
  --navy-900: #0a1128;
  --navy-800: #111d42;
  --navy-700: #1a2c5b;
  --ivory-50: #fcfbf7;
  --ivory-100: #f5f3eb;
  --white: #ffffff;
  --gold-500: #d4af37;
  --gold-400: #e6c65a;
  --gold-600: #b38f1d;
  --cyan-400: #00d2ff;
  --cyan-500: #0284c7;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --border-light: #e2e8f0;
  --shadow-soft: 0 10px 30px -10px rgba(10, 17, 40, 0.08);
  --shadow-hover: 0 20px 40px -12px rgba(10, 17, 40, 0.16);
  --font-urdu: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Urdu Typesetting', Tahoma, sans-serif;
  --font-en: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  direction: rtl;
}

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

body {
  font-family: var(--font-urdu);
  background-color: var(--ivory-50);
  color: var(--slate-800);
  line-height: 2.25;
  font-size: 17px;
  overflow-x: hidden;
  direction: rtl;
  text-align: right;
}

.en-text, code, pre, .slug-badge {
  font-family: var(--font-en);
  direction: ltr;
  display: inline-block;
  line-height: 1.5;
}

a {
  color: var(--cyan-500);
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Reading Progress Bar */
#reading-progress-container {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: rgba(10, 17, 40, 0.12);
  z-index: 9999;
}

#reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan-400), var(--gold-500));
  transition: width 0.12s ease;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 17, 40, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.28);
  color: var(--white);
  padding: 0.65rem 1.25rem;
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  color: var(--white);
}

.brand-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--gold-500);
  object-fit: cover;
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.35);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.4;
}

.brand-subtitle {
  font-family: var(--font-en);
  font-size: 0.72rem;
  color: var(--gold-400);
  letter-spacing: 0.05em;
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-btn {
  background: transparent;
  color: #e2e8f0;
  border: 1px solid transparent;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-family: var(--font-urdu);
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.8;
}

.nav-btn:hover, .nav-btn.active {
  color: var(--gold-400);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(212, 175, 55, 0.35);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-500), #f3d266);
  color: var(--navy-950);
  font-weight: 700;
  padding: 0.42rem 1rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: var(--font-urdu);
  font-size: 0.9rem;
  line-height: 1.7;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(212, 175, 55, 0.5);
  color: var(--navy-950);
}

.btn-outline-cyan {
  background: rgba(0, 210, 255, 0.1);
  color: var(--cyan-400);
  border: 1px solid rgba(0, 210, 255, 0.45);
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-urdu);
  font-size: 0.88rem;
  line-height: 1.7;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-outline-cyan:hover {
  background: var(--cyan-400);
  color: var(--navy-950);
}


/* Animated Mobile-Friendly Navigation & Drawer */
.mobile-menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.55);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle .bar {
  width: 22px;
  height: 2.5px;
  background-color: var(--gold-400);
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

.mobile-menu-toggle.open .bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.mobile-menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.open .bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

.mobile-nav-drawer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.42s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.3s ease;
  background: linear-gradient(180deg, rgba(10, 17, 40, 0.99), rgba(6, 11, 25, 0.99));
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  margin-top: 0;
}

.mobile-nav-drawer.open {
  max-height: 760px;
  opacity: 1;
  padding: 1rem 0.75rem 1.25rem;
  margin-top: 0.65rem;
}

.mobile-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

@media (max-width: 520px) {
  .mobile-nav-grid {
    grid-template-columns: 1fr;
  }
}

.mobile-nav-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  font-family: var(--font-urdu);
  font-size: 0.92rem;
  text-align: right;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.22s ease;
}

.mobile-nav-item:hover, .mobile-nav-item.active {
  background: rgba(212, 175, 55, 0.16);
  border-color: var(--gold-500);
  color: var(--gold-400);
  transform: translateX(-3px);
}

@media (max-width: 1040px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
}

/* Hero Section */
.hero-section {
  background: radial-gradient(circle at 20% 20%, rgba(0, 210, 255, 0.16), transparent 45%),
              radial-gradient(circle at 80% 75%, rgba(212, 175, 55, 0.18), transparent 50%),
              linear-gradient(145deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
  color: var(--white);
  padding: 3.5rem 1.25rem 3rem;
  border-bottom: 3px solid var(--gold-500);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: var(--gold-400);
  padding: 0.25rem 0.95rem;
  border-radius: 999px;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.hero-headline {
  font-size: clamp(1.65rem, 3.2vw, 2.45rem);
  color: var(--white);
  line-height: 2.1;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero-subtext {
  font-size: 1.08rem;
  color: #cbd5e1;
  line-height: 2.15;
  margin-bottom: 1.6rem;
}

.hero-search-box {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  padding: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  border: 2px solid rgba(0, 210, 255, 0.45);
  margin-bottom: 1.4rem;
}

.hero-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 0.55rem 0.9rem;
  font-family: var(--font-urdu);
  font-size: 1rem;
  color: var(--navy-950);
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.hero-author-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 20px;
  padding: 1.75rem;
  text-align: center;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
}

.hero-author-img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 3px solid var(--gold-500);
  object-fit: cover;
  margin: 0 auto 0.85rem;
  display: block;
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.4);
}

/* Main Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.25rem 1.25rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-light);
  flex-wrap: wrap;
}

.section-title {
  font-size: 1.45rem;
  color: var(--navy-900);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Category Pills */
.category-pills {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
}

.cat-pill {
  background: var(--white);
  color: var(--slate-700);
  border: 1px solid var(--border-light);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-family: var(--font-urdu);
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.cat-pill:hover, .cat-pill.active {
  background: var(--navy-900);
  color: var(--gold-400);
  border-color: var(--gold-500);
  transform: translateY(-1px);
}

/* Blog Cards Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(335px, 1fr));
  gap: 1.6rem;
  margin-bottom: 2.5rem;
}

.blog-card {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--cyan-500);
}

.card-thumb-wrap {
  position: relative;
  height: 195px;
  background: var(--navy-900);
  overflow: hidden;
}

.card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-cat-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(10, 17, 40, 0.88);
  color: var(--gold-400);
  border: 1px solid rgba(212, 175, 55, 0.5);
  padding: 0.15rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  line-height: 1.6;
}

.card-body {
  padding: 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.18rem;
  color: var(--navy-900);
  margin-bottom: 0.65rem;
  line-height: 1.95;
  cursor: pointer;
}

.card-title:hover {
  color: var(--cyan-500);
}

.card-excerpt {
  font-size: 0.94rem;
  color: var(--slate-600);
  line-height: 2.0;
  margin-bottom: 1.1rem;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.82rem;
  color: var(--slate-500);
}

.card-author {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--slate-700);
}

.card-author img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--gold-500);
}

/* Single Article Reader Styling */
.article-reader-shell {
  max-width: 960px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-soft);
  padding: 2.25rem;
}

@media (max-width: 640px) {
  .article-reader-shell {
    padding: 1.25rem;
  }
}

.breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: var(--ivory-100);
  padding: 0.65rem 1.1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
}

.article-h1 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  color: var(--navy-900);
  line-height: 2.05;
  margin: 0.75rem 0 1rem;
}

.article-byline-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
}

.article-content h2 {
  font-size: 1.42rem;
  color: var(--navy-900);
  margin: 2rem 0 0.85rem;
  padding-right: 0.85rem;
  border-right: 4px solid var(--gold-500);
  line-height: 1.95;
}

.article-content h3 {
  font-size: 1.18rem;
  color: var(--navy-700);
  margin: 1.4rem 0 0.6rem;
  line-height: 1.95;
}

.article-content p {
  margin-bottom: 1.15rem;
  color: var(--slate-800);
  line-height: 2.3;
}

.article-content ul, .article-content ol {
  margin: 0.85rem 1.6rem 1.35rem 0;
}

.article-content li {
  margin-bottom: 0.55rem;
  line-height: 2.2;
}

.article-lead-box {
  background: linear-gradient(135deg, #f0f9ff 0%, #fefce8 100%);
  border-right: 5px solid var(--cyan-500);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.6rem;
}

.toc-box {
  background: var(--ivory-100);
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 1.25rem 1.6rem;
  margin-bottom: 1.8rem;
}

.toc-title {
  font-weight: 700;
  color: var(--navy-900);
  font-size: 1.1rem;
  margin-bottom: 0.65rem;
}

.toc-list {
  margin-right: 1.35rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.35rem 1.5rem;
}

.table-responsive {
  overflow-x: auto;
  margin: 1.4rem 0;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.comparison-table caption {
  background: var(--navy-900);
  color: var(--gold-400);
  padding: 0.75rem 1rem;
  font-weight: 700;
  text-align: right;
}

.comparison-table th {
  background: var(--navy-800);
  color: var(--white);
  padding: 0.8rem 1rem;
  text-align: right;
  font-size: 0.95rem;
}

.comparison-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.92rem;
  line-height: 1.95;
}

.comparison-table tr:nth-child(even) {
  background: #f8fafc;
}

.prompt-card {
  background: var(--navy-950);
  color: #f8fafc;
  border-radius: 14px;
  border: 1px solid var(--gold-500);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.prompt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gold-400);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.prompt-blockquote {
  background: rgba(255,255,255,0.06);
  padding: 1rem 1.2rem;
  border-right: 4px solid var(--cyan-400);
  border-radius: 8px;
  color: #e2e8f0;
  line-height: 2.15;
}

.dual-callout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.callout-box {
  padding: 1.25rem;
  border-radius: 14px;
}

.callout-tips {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
}

.callout-mistakes {
  background: #fff1f2;
  border: 1px solid #fda4af;
}

.verification-badge {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

/* Course CTA Banner */
.course-cta-banner {
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 100%);
  color: var(--white);
  border: 2px solid var(--gold-500);
  border-radius: 20px;
  padding: 2.2rem;
  margin: 2.2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  flex-wrap: wrap;
  box-shadow: 0 18px 40px rgba(10, 17, 40, 0.22);
}

/* Admin Dashboard Styling */
.admin-panel-grid {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 1.6rem;
}

@media (max-width: 960px) {
  .admin-panel-grid {
    grid-template-columns: 1fr;
  }
}

.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-right: 4px solid var(--gold-500);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-soft);
}

.stat-value {
  font-family: var(--font-en);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--navy-900);
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--navy-900);
  font-size: 0.94rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-family: var(--font-urdu);
  font-size: 0.96rem;
  background: var(--white);
  color: var(--slate-800);
}

.form-control:focus {
  outline: none;
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.18);
}

/* Footer */
.site-footer {
  background: var(--navy-950);
  color: #cbd5e1;
  border-top: 3px solid var(--gold-500);
  padding: 3rem 1.25rem 2rem;
  margin-top: 3.5rem;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

/* Toast Notification */
#app-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: var(--navy-900);
  color: var(--white);
  border: 1px solid var(--gold-500);
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
  z-index: 9999;
  display: none;
}

/* Back to Top */
#back-to-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold-500);
  color: var(--navy-950);
  border: none;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  z-index: 999;
}
