/* ==========================================================================
   MUSLIM-TH MODERN DESIGN SYSTEM
   Theme: Luxury Islamic Emerald & Royal Gold with Contemporary Minimalism
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Color Palette */
  --primary: #0A3D28;
  --primary-light: #115E3E;
  --primary-dark: #062618;
  --primary-glow: rgba(16, 94, 62, 0.2);

  --gold: #C69224;
  --gold-light: #E5B854;
  --gold-dark: #9A6F14;
  --gold-glow: rgba(198, 146, 36, 0.25);

  --accent-cyan: #0E8388;
  --accent-blue: #1A5F7A;

  --bg-main: #F7FAF8;
  --bg-card: #FFFFFF;
  --bg-card-glass: rgba(255, 255, 255, 0.88);
  --bg-subtle: #EDF3EF;

  --text-main: #1C2826;
  --text-muted: #5C6E67;
  --text-light: #94A39D;
  --text-white: #FFFFFF;

  --border: #E1EBE5;
  --border-light: rgba(255, 255, 255, 0.35);

  --shadow-sm: 0 2px 8px rgba(10, 61, 40, 0.04);
  --shadow-md: 0 6px 20px rgba(10, 61, 40, 0.08);
  --shadow-lg: 0 14px 35px rgba(10, 61, 40, 0.12);
  --shadow-gold: 0 8px 25px rgba(198, 146, 36, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: 'Prompt', 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Arabic Text Styling */
.arabic, [lang="ar"], .quran-verse, .hadith-arabic {
  font-family: 'Amiri', serif;
  direction: rtl;
  font-size: 1.45rem;
  line-height: 2.2;
  color: var(--primary-dark);
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--gold);
}

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

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #064e3b 0%, #047857 50%, #0f766e 100%);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--gold);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: all var(--transition-fast);
}

.top-bar {
  background: var(--primary-dark);
  border-bottom: 1px solid rgba(198, 146, 36, 0.25);
  padding: 0.4rem 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-links a {
  color: rgba(255, 255, 255, 0.85);
  margin-left: 1rem;
  transition: color var(--transition-fast);
}
.top-bar-links a:hover {
  color: var(--gold-light);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--text-white);
  font-weight: 700;
  font-size: 1.45rem;
}

.brand-logo:hover {
  color: var(--text-white);
}

.logo-badge {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold);
  color: #fff;
  font-size: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.brand-tagline {
  font-size: 0.75rem;
  color: var(--gold-light);
  font-weight: 400;
}

/* Modern Hadith Standard Master Navigation */
.modern-nav {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 60%, #047857 100%);
  color: #ffffff;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid rgba(217, 119, 6, 0.4);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modern-nav .logo-badge {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
  color: #ffffff;
  font-size: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

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

.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fbbf24;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: rotate(15deg);
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold-light);
}

.nav-link-special {
  background: linear-gradient(135deg, rgba(198, 146, 36, 0.25), rgba(198, 146, 36, 0.1));
  border: 1px solid var(--gold);
  color: var(--gold-light);
}
.nav-link-special:hover {
  background: var(--gold);
  color: #fff;
  box-shadow: var(--shadow-gold);
}

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

.btn-login {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-login:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* ==========================================================================
   HERO BANNER
   ========================================================================== */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #0E4B31 100%);
  color: var(--text-white);
  padding: 4.5rem 0 4rem;
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.05;
  background-image: radial-gradient(#C69224 2px, transparent 2px);
  background-size: 32px 32px;
  pointer-events: none;
}

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

.hero-bismillah {
  font-family: 'Amiri', serif;
  font-size: 2.2rem;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 300;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-search-box {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.45rem;
  border-radius: var(--radius-full);
  display: flex;
  max-width: 620px;
  margin: 0 auto 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.hero-search-box input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.75rem 1.25rem;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}
.hero-search-box input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.hero-search-btn {
  background: var(--gold);
  border: none;
  color: #fff;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.hero-search-btn:hover {
  background: var(--gold-light);
  color: var(--primary-dark);
}

/* Portal Quick Action Cards (Quran & Hadith) */
.portal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.portal-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: #fff;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.portal-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  color: #fff;
}

.portal-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow-gold);
}

.portal-info h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.portal-info p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ==========================================================================
   FEATURE / MISSION SECTION
   ========================================================================== */
.section-container {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
}

.section-tag {
  display: inline-block;
  background: var(--bg-subtle);
  color: var(--primary-light);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.mission-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  text-align: center;
}

.mission-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.mission-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.5rem;
}
.icon-success { background: #E8F5E9; color: #2E7D32; }
.icon-danger { background: #FFEBEE; color: #C62828; }
.icon-warning { background: #FFF8E1; color: #F57F17; }

.mission-card h4 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--primary-dark);
}
.mission-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==========================================================================
   ARTICLE CARDS & GRID
   ========================================================================== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.85rem;
}

.article-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold-light);
}

.article-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--primary-dark);
}

.article-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.article-card:hover .article-thumb {
  transform: scale(1.06);
}

.article-category-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(10, 61, 40, 0.85);
  backdrop-filter: blur(6px);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 0.65rem;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.counter-badge {
  color: var(--gold-dark);
  font-weight: 600;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
}

.read-more-link {
  font-weight: 600;
  color: var(--primary-light);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.read-more-link:hover {
  color: var(--gold);
}

/* ==========================================================================
   ARTICLE DETAIL PAGE
   ========================================================================== */
.article-header {
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg-main) 100%);
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.article-main-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.35;
  margin-bottom: 1.25rem;
}

.article-header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  padding-bottom: 1.5rem;
}

.view-counter-pill {
  background: linear-gradient(135deg, rgba(198, 146, 36, 0.15), rgba(198, 146, 36, 0.05));
  border: 1px solid var(--gold);
  color: var(--gold-dark);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.article-content-wrap {
  padding: 3rem 0;
}

.article-featured-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-md);
  max-height: 520px;
}
.article-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body-content {
  font-size: 1.12rem;
  line-height: 1.95;
  color: #24332D;
}

.article-body-content p {
  margin-bottom: 1.6rem;
}

.article-body-content h2, 
.article-body-content h3, 
.article-body-content h4 {
  color: var(--primary-dark);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.article-body-content blockquote {
  border-left: 4px solid var(--gold);
  padding: 1rem 1.5rem;
  background: var(--bg-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  margin: 1.8rem 0;
}

.article-body-content ul, 
.article-body-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1.6rem;
}

.article-body-content li {
  margin-bottom: 0.5rem;
}

.share-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.btn-share {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  cursor: pointer;
}
.btn-share-fb { background: #1877F2; }
.btn-share-line { background: #06C755; }
.btn-share-copy { background: var(--primary); }

/* ==========================================================================
   VISITOR STATS FOOTER BAR
   ========================================================================== */
.stats-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 2.5rem 0;
  border-top: 2px solid var(--gold);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.stat-item {
  padding: 1rem;
}
.stat-number {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.2;
}
.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.25rem;
}

/* Site Footer */
.site-footer {
  background: #04180F;
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--gold);
}

.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 0.6rem;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.7);
}
.footer-links a:hover {
  color: var(--gold-light);
  padding-left: 4px;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

/* ==========================================================================
   AUTH PAGES (LOGIN / REGISTER)
   ========================================================================== */
.auth-wrapper {
  min-height: calc(100vh - 280px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  max-width: 460px;
  width: 100%;
  padding: 2.5rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-header h2 {
  font-size: 1.75rem;
  color: var(--primary-dark);
  font-weight: 700;
}

.social-auth-btns {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  color: var(--text-main);
}
.btn-social:hover {
  background: #F8F9FA;
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
}
.btn-social-google {
  border-color: #DADCE0;
}
.btn-social-facebook {
  background: #1877F2;
  color: #fff;
  border-color: #1877F2;
}
.btn-social-facebook:hover {
  background: #166FE5;
  color: #fff;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-light);
  font-size: 0.85rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.auth-divider span {
  padding: 0 0.75rem;
}

.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}
.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .portal-cards {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .article-main-title {
    font-size: 1.75rem;
  }
}

/* ==========================================================================
   RICH ARTICLE CONTENT TYPOGRAPHY & INLINE IMAGES
   ========================================================================== */
.article-body-content {
  font-size: 1.12rem;
  line-height: 1.95;
  color: #24332D;
}

.article-body-content p {
  margin-bottom: 1.5rem;
}

.article-body-content strong,
.article-body-content b {
  font-weight: 700;
  color: #0E3725;
}

.article-body-content em,
.article-body-content i {
  font-style: italic;
  color: #344941;
}

.article-body-content u {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}

.article-body-content h2 {
  font-size: 1.75rem;
  color: var(--primary-dark);
  font-weight: 700;
  margin: 2.5rem 0 1.25rem;
  padding-left: 1rem;
  border-left: 4px solid var(--gold);
  line-height: 1.35;
}

.article-body-content h3 {
  font-size: 1.4rem;
  color: var(--primary);
  font-weight: 600;
  margin: 2rem 0 1rem;
}

.article-body-content blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.75rem;
  background: #F4F7F5;
  border-left: 5px solid var(--primary);
  border-radius: 0 10px 10px 0;
  font-size: 1.15rem;
  font-style: italic;
  color: #1F382B;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.article-body-content .arabic-block {
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-size: 1.6rem;
  line-height: 2.4;
  direction: rtl;
  text-align: right;
  background: #FAF8F2;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  border: 1px dashed #D4AC0D;
  margin: 2.2rem 0;
  color: #143022;
  box-shadow: 0 4px 12px rgba(212, 172, 13, 0.08);
}

.article-body-content .callout-box {
  background: #EBF5FB;
  border-left: 5px solid #2980B9;
  border-radius: 0 10px 10px 0;
  padding: 1.35rem 1.75rem;
  margin: 2rem 0;
  color: #154360;
  line-height: 1.8;
}

/* Inline Images (Figures & Captions) */
.article-body-content figure.article-figure {
  margin: 2.5rem 0;
  display: block;
}

.article-body-content figure.article-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(10, 61, 40, 0.1);
  display: block;
  margin: 0 auto;
  transition: transform 0.3s ease;
}

.article-body-content figure.article-figure img:hover {
  transform: scale(1.01);
}

.article-body-content figure.article-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

.article-body-content figure.figure-full {
  width: 100%;
}
.article-body-content figure.figure-center {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}
.article-body-content figure.figure-left {
  float: left;
  max-width: 48%;
  margin: 0.5rem 2rem 1.5rem 0;
}
.article-body-content figure.figure-right {
  float: right;
  max-width: 48%;
  margin: 0.5rem 0 1.5rem 2rem;
}

@media (max-width: 640px) {
  .article-body-content figure.figure-left,
  .article-body-content figure.figure-right {
    float: none;
    max-width: 100%;
    margin: 1.5rem 0;
  }
}

.article-body-content hr.section-break {
  border: none;
  height: 2px;
  background: radial-gradient(circle, var(--gold) 0%, rgba(255,255,255,0) 80%);
  margin: 3.5rem auto;
  width: 60%;
  position: relative;
  text-align: center;
}
.article-body-content hr.section-break:after {
  content: '☪';
  display: inline-block;
  position: relative;
  top: -14px;
  padding: 0 12px;
  background: var(--bg-card, #fff);
  color: var(--gold);
  font-size: 1.25rem;
}

/* ==========================================================================
   User Auth Widget & Reading Tracker
   ========================================================================== */
.user-auth-widget-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-auth-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-auth-link:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.btn-nav-history {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fef3c7;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-nav-history:hover {
  background: rgba(245, 158, 11, 0.28);
  color: #ffffff;
}

.user-menu-dropdown-wrap {
  position: relative;
}

.user-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.user-profile-circle-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.user-profile-circle-btn:hover {
  transform: scale(1.08);
}

.user-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  border: 2px solid #fde68a;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  user-select: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.user-profile-circle-btn:hover .user-avatar-circle {
  border-color: #ffffff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5);
}

.user-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar-initials {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.user-avatar-sublabel {
  font-size: 0.65rem;
  color: #fde68a;
  font-weight: 600;
  margin-top: 2px;
  line-height: 1;
  max-width: 54px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  display: block;
}

.user-avatar-img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #ffffff;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  z-index: 99999;
}

.user-dropdown-menu.active {
  display: flex;
}

.dropdown-header {
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.35rem 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: var(--bg-subtle);
}

.dropdown-item.text-danger {
  color: #ef4444;
}

.dropdown-item-muted {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Bookmarks Modal */
.bookmarks-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 1rem;
}

.bookmarks-modal-overlay.open {
  display: flex;
}

.bookmarks-modal-content {
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  overflow: hidden;
  border: 1px solid var(--border);
}

.bookmarks-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.bookmarks-modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.bookmarks-modal-body {
  padding: 1rem 1.5rem;
  overflow-y: auto;
}

.bookmarks-list-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.bookmark-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-main);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.bookmark-item-row:hover {
  border-color: var(--primary);
  background: #ffffff;
}

.bookmark-link {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-decoration: none;
  flex: 1;
}

.btn-delete-bm {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: background 0.15s;
}

.btn-delete-bm:hover {
  background: rgba(239, 68, 68, 0.12);
}

/* ==========================================================================
   Ad Slots & Sponsor Banner System
   ========================================================================== */
.ad-slot-container {
  width: 100%;
  margin: 2rem 0;
  display: flex;
  justify-content: center;
}

.ad-slot-box {
  width: 100%;
  max-width: 900px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px dashed var(--border);
  background: rgba(248, 250, 252, 0.6);
  position: relative;
  transition: all 0.3s ease;
}

.ad-placeholder-banner {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.ad-placeholder-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.ad-placeholder-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #047857);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  flex-shrink: 0;
}

.ad-placeholder-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.15rem;
}

.ad-placeholder-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.ad-badge-sponsor {
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.3);
  white-space: nowrap;
}

.ad-slot-custom-img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 240px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
}

/* ==========================================================================
   Responsive Breakpoints System (All Viewports)
   ========================================================================== */

/* 1. Large Desktop (>= 1440px) */
@media (min-width: 1440px) {
  .container {
    max-width: 1380px;
  }
  .hero-title {
    font-size: 2.85rem;
  }
  .portal-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* 2. Medium Desktop / Laptop (1024px - 1439px) */
@media (max-width: 1439px) and (min-width: 1024px) {
  .container {
    max-width: 1140px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .portal-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

/* 3. Tablets (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
  .container {
    max-width: 100%;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .portal-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 4. Mobile Devices (<= 767px) */
@media (max-width: 767px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .portal-cards {
    grid-template-columns: 1fr;
  }
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .nav-menu {
    overflow-x: auto;
    white-space: nowrap;
    justify-content: flex-start;
    padding-bottom: 0.5rem;
  }
  .ad-placeholder-banner {
    flex-direction: column;
    text-align: center;
  }
  .ad-placeholder-left {
    flex-direction: column;
  }
}

/* 5. Extra Small Mobile (< 380px) */
@media (max-width: 380px) {
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .hero-title {
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   HADITH & ARTICLE COMMENTS SYSTEM ENHANCEMENTS
   ========================================================================== */
.badge-index-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(5, 150, 105, 0.1);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 2px 9px;
  border-radius: 6px;
  border: 1px solid rgba(5, 150, 105, 0.25);
  letter-spacing: 0.01em;
}

.comments-section {
  background: #ffffff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.comment-card-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comment-card-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

.comment-admin-card {
  background: linear-gradient(135deg, #fffdf5 0%, #fef3c7 100%) !important;
  border: 1px solid #fcd34d !important;
  border-left: 4px solid #d97706 !important;
}

.comment-member-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-left: 4px solid #10b981 !important;
}

.btn-reply-toggle:hover {
  background: #f1f5f9 !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.btn-delete-comment:hover {
  background: #fee2e2 !important;
}

@media (max-width: 640px) {
  .comments-section {
    padding: 1.25rem 1rem;
  }
  .comment-replies-list {
    padding-left: 0.75rem !important;
  }
}

/* ==========================================================================
   UNIFIED NAVBAR BUTTONS & MOBILE APP DRAWER
   Matches Quran & Hadith Glassmorphism Buttons; Collapses to App Drawer on Mobile
   ========================================================================== */

/* 1. Desktop Nav Link Buttons */
.nav-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.2;
}

.nav-link-btn i {
  font-size: 0.95rem;
  opacity: 0.9;
}

.nav-link-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.nav-link-btn.active {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #fde68a !important;
  font-weight: 600;
  border-color: #fde68a !important;
  box-shadow: 0 2px 8px rgba(253, 230, 138, 0.15);
}

.nav-link-btn.active i {
  color: #fde68a !important;
}

/* 2. Mobile App Hamburger Button */
.mobile-app-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.mobile-app-hamburger:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.04);
}

/* 3. Mobile Backdrop Overlay */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 30, 20, 0.68);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* 4. Mobile App Drawer (Offcanvas Panel) */
.mobile-app-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 86vw;
  background: #064e3b;
  color: #ffffff;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-app-drawer.is-open {
  transform: translateX(0);
}

/* Drawer Header */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.15);
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #ffffff;
}

.drawer-logo-badge {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #d97706, #b45309);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.drawer-brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  display: block;
}

.drawer-brand-tag {
  font-size: 0.75rem;
  color: #a7f3d0;
  display: block;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.drawer-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #fca5a5;
  transform: rotate(90deg);
}

/* Drawer User Card */
.drawer-user-card {
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-user-card .user-logged-in {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.drawer-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #d97706;
}

.drawer-user-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #ffffff;
  display: block;
}

.drawer-user-role {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 600;
  display: inline-block;
  margin-top: 2px;
}

.drawer-guest-actions {
  display: flex;
  gap: 0.5rem;
}

.drawer-btn-login,
.drawer-btn-register {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.drawer-btn-login {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.drawer-btn-register {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Drawer Menu Section */
.drawer-nav-section {
  padding: 1rem 1.25rem 0.5rem;
}

.drawer-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #a7f3d0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.65rem;
}

.drawer-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.drawer-menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  color: #e2e8f0;
  text-decoration: none;
  transition: all 0.2s ease;
  background: transparent;
}

.drawer-menu-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateX(3px);
}

.drawer-menu-link.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fde68a;
  font-weight: 600;
  border-left: 3px solid #fde68a;
}

.drawer-menu-link .menu-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #ffffff;
  flex-shrink: 0;
}

.drawer-menu-link.active .menu-icon-box {
  background: rgba(253, 230, 138, 0.2);
  color: #fde68a;
}

.drawer-menu-link .menu-text-group {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.drawer-menu-link .menu-label {
  font-size: 0.92rem;
  font-weight: 500;
}

.drawer-menu-link .menu-sublabel {
  font-size: 0.72rem;
  color: #94a3b8;
}

.drawer-menu-link .menu-arrow {
  margin-left: auto;
  font-size: 0.75rem;
  opacity: 0.4;
  transition: transform 0.2s;
}

.drawer-menu-link:hover .menu-arrow {
  opacity: 0.9;
  transform: translateX(2px);
}

/* Drawer Footer */
.drawer-footer {
  margin-top: auto;
  padding: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.drawer-theme-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fde68a;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.drawer-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.drawer-copyright {
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 0.75rem;
}

/* 5. Responsive Media Queries: Collapse on Mobile (< 992px) */
@media (max-width: 991px) {
  /* Hide desktop horizontal links */
  .desktop-nav-links,
  .site-header .main-nav,
  .site-header .desktop-nav-links,
  .header-nav,
  .modern-nav .nav-actions a.nav-link-btn {
    display: none !important;
  }

  /* Show mobile hamburger icon */
  .mobile-app-hamburger {
    display: inline-flex !important;
  }

  .nav-actions,
  .header-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: nowrap !important;
  }

  /* Tuck reading bookmark into the app drawer on mobile to keep top bar clean */
  .btn-nav-history {
    display: none !important;
  }

  .mobile-menu-btn {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .btn-auth-link span {
    display: none;
  }
  .btn-auth-link {
    padding: 0.45rem 0.65rem;
  }
}

/* ==========================================================================
   UNIVERSAL MOBILE RESPONSIVE & ANTI-OVERFLOW GUARD (100% FIT FOR MOBILE)
   ========================================================================== */
html, body {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

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

img, video, iframe, embed, object {
  max-width: 100% !important;
  height: auto;
}

pre, code {
  max-width: 100% !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  overflow-x: auto;
}

input, select, textarea, button {
  max-width: 100% !important;
  box-sizing: border-box;
}

@media (max-width: 991px) {
  .container {
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Table Mobile Scroll Safety */
  table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Universal Grid & Flex Wrapping Safety */
  .grid-2col, .grid-3col, .grid-4col,
  .articles-grid, .hadith-grid, .stats-grid,
  .quran-grid, .donation-grid, .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Top Bar & Header Mobile Wraps */
  .top-bar-inner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.35rem !important;
  }

  .top-bar-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-left: 0 !important;
  }

  .top-bar-links a {
    margin-left: 0 !important;
  }
}

@media (max-width: 576px) {
  html {
    font-size: 15px;
  }
  
  .container {
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
  }

  /* Cards Padding Fix */
  .card, .article-card, .hadith-card, .quran-card, .stats-banner, .site-footer {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* Buttons Full Width on Small Screens when stacked */
  .btn-group-mobile-stack {
    flex-direction: column !important;
    width: 100% !important;
  }

  .btn-group-mobile-stack .btn {
    width: 100% !important;
  }
}





