@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Nastaliq+Urdu:wght@400;500;600;700&display=swap');

/* Local & Web Mehr Nastaliq Support */
@font-face {
  font-family: 'Mehr Nastaliq';
  src: local('Mehr Nastaliq Web'), local('Mehr Nastaleeq Web'), local('Mehr Nastaliq'), local('Jameel Noori Nastaleeq'), url('https://cdn.jsdelivr.net/gh/urdutext/fonts@main/MehrNastaliqWeb.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary-color: #0b3c2e;
  --primary-dark: #07251c;
  --accent-gold: #c59b27;
  --accent-gold-light: #f7eed3;
  --bg-parchment: #f9f8f3;
  --card-bg: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e0d0;
  --border-gold: #d8c282;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
  --font-urdu: 'Mehr Nastaliq', 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Urdu Typesetting', serif;
  --font-arabic: 'Amiri', 'Traditional Arabic', 'Noto Naskh Arabic', serif;
  --font-english: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family: var(--font-urdu);
  --font-serif: var(--font-arabic);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  direction: rtl;
  text-align: right;
  font-family: var(--font-family);
  background-color: var(--bg-parchment);
  color: var(--text-main);
  line-height: 2.1;
  min-height: 100vh;
}

/* UI Vector Icons (Replacing Emojis) */
.ui-icon {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.18em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.ui-icon-gold {
  color: var(--accent-gold);
}

/* Header */
.header {
  position: relative;
  color: #ffffff;
  padding: 2.2rem 1.5rem 2.2rem;
  border-bottom: 4px solid var(--accent-gold);
  box-shadow: var(--shadow-md);
  min-height: 350px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--primary-dark);
  background-image: 
    linear-gradient(135deg, rgba(7, 37, 28, 0.90) 0%, rgba(11, 60, 46, 0.82) 55%, rgba(7, 37, 28, 0.92) 100%),
    url('hero_rawdah_sunset.jpg');
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 20% 40%, rgba(197, 155, 39, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.header-top,
.header-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.header-top-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.top-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(197, 155, 39, 0.45);
  border-radius: 20px;
  padding: 0.35rem 0.95rem;
  color: #fffef2;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.top-nav-link:hover {
  background: rgba(197, 155, 39, 0.25);
  border-color: var(--accent-gold);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(197, 155, 39, 0.35);
}

.top-nav-link.active {
  background: var(--accent-gold);
  color: var(--primary-dark);
  font-weight: 700;
  border-color: var(--accent-gold);
}

.lang-selector-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(7, 37, 28, 0.85);
  backdrop-filter: blur(10px);
  border: 1.5px solid var(--accent-gold);
  border-radius: 24px;
  padding: 0.35rem 0.85rem 0.35rem 1rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}

.lang-selector-wrap:hover,
.lang-selector-wrap:focus-within {
  background: rgba(11, 60, 46, 0.95);
  border-color: #ffd700;
  box-shadow: 0 0 14px rgba(197, 155, 39, 0.5);
}

.lang-icon {
  display: flex;
  align-items: center;
  color: var(--accent-gold);
}

.lang-dropdown {
  background: transparent;
  color: #fffef2;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  padding: 0.15rem 0.5rem;
}

.lang-dropdown option {
  background: #062219;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 1rem;
}

.header-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: center;
}

.header-hero-branding {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.header-hero-stats-search {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: rgba(0, 0, 0, 0.22);
  padding: 0.85rem 1.25rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(197, 155, 39, 0.35);
  backdrop-filter: blur(10px);
}

/* Fluid Unboxed Statistics Ribbon (No rectangular boxes or chips) */
.stats-ribbon,
.header-hero-stats-search .stats-badges {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding-bottom: 0.65rem !important;
  border-bottom: 1px solid rgba(255, 215, 0, 0.22) !important;
  background: transparent !important;
  border-radius: 0 !important;
  gap: 0.4rem !important;
}

.stat-item,
.header-hero-stats-search .stat-chip {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 0.45rem !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  padding: 0 !important;
  color: #f3f4f6 !important;
  white-space: nowrap !important;
}

.stat-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.stat-label .ui-icon {
  width: 15px;
  height: 15px;
  color: var(--accent-gold);
  flex-shrink: 0;
  opacity: 0.95;
}

.stat-num,
.header-hero-stats-search .stat-chip strong {
  color: #ffd700 !important;
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
  letter-spacing: -0.01em;
}

.stat-sep {
  color: rgba(255, 215, 0, 0.35);
  font-weight: 300;
  font-size: 1.15rem;
  user-select: none;
  padding: 0 0.15rem;
}

.header-hero-stats-search .controls-bar {
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 0.6rem !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
}

.header-hero-stats-search .search-input-wrap {
  flex: 1.4 !important;
  min-width: 0 !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}

.header-hero-stats-search .search-input {
  width: 100% !important;
  height: 42px !important;
  padding: 0.5rem 2.5rem 0.5rem 0.85rem !important;
  border: 1.5px solid rgba(197, 155, 39, 0.6) !important;
  border-radius: 8px !important;
  font-family: inherit !important;
  font-size: 0.88rem !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #111827 !important;
  outline: none !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
}

.header-hero-stats-search .filter-select {
  flex: 1 !important;
  min-width: 0 !important;
  height: 42px !important;
  padding: 0.5rem 0.85rem !important;
  border: 1.5px solid rgba(197, 155, 39, 0.6) !important;
  border-radius: 8px !important;
  font-family: inherit !important;
  font-size: 0.85rem !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #111827 !important;
  cursor: pointer !important;
  outline: none !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
}

.header-title-wrap {
  display: contents;
}

.header h1 {
  font-family: var(--font-urdu);
  font-size: 2.1rem;
  font-weight: 700;
  color: #fffef2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  line-height: 1.8;
}

.header p {
  color: #d1fae5;
  font-size: 1rem;
  margin-top: 0.25rem;
}

.stats-badges {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: none;
  border: none;
}

.stat-chip {
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  color: #fefefe;
  font-size: 0.88rem;
}

.stat-chip strong {
  color: var(--accent-gold);
  font-size: 1.3rem;
  font-weight: 800;
}

/* Navigation Tabs */
.nav-tabs-wrapper {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.nav-tabs {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
  padding: 0 1.5rem;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.9rem 1.3rem;
  font-family: var(--font-family);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  color: var(--primary-color);
  background-color: #fbfbf9;
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--accent-gold);
  background-color: #faf8f2;
}

/* Controls Bar (Search & Filter) */
.controls-bar {
  max-width: 1280px;
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Specific styling when Controls Bar is placed inside Header Hero */
.header .controls-bar,
.header-controls {
  max-width: 100%;
  margin: 1.25rem 0 0 0 !important;
  padding: 0 !important;
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  width: 100%;
}

.header-controls .search-input-wrap {
  flex: 1;
  min-width: 280px;
  position: relative;
  display: flex;
  align-items: center;
}

.header-controls .search-input {
  width: 100%;
  padding: 0.85rem 2.8rem 0.85rem 1.2rem;
  border: 1.5px solid rgba(197, 155, 39, 0.55);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.98rem;
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  outline: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.18);
  transition: all 0.2s ease;
}

.header-controls .search-input:focus {
  background: #ffffff;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 4px rgba(197, 155, 39, 0.35);
}

.header-controls .search-icon-inside {
  position: absolute;
  right: 1rem;
  color: #6b7280;
  pointer-events: none;
}

.header-controls .filter-select {
  padding: 0.85rem 1.4rem;
  border: 1.5px solid rgba(197, 155, 39, 0.55);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  cursor: pointer;
  outline: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.18);
  transition: all 0.2s ease;
}

.header-controls .filter-select:focus {
  background: #ffffff;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 4px rgba(197, 155, 39, 0.35);
}

html[lang="en"] .header-controls .search-icon-inside {
  right: auto;
  left: 1rem;
}

html[lang="en"] .header-controls .search-input {
  padding: 0.85rem 1.2rem 0.85rem 2.8rem;
}

.search-input-wrap {
  flex: 1;
  min-width: 280px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-inside {
  position: absolute;
  right: 0.85rem;
  color: #9ca3af;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  font-family: var(--font-family);
  font-size: 0.98rem;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(11, 60, 46, 0.15);
}

.filter-select {
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

/* Main Container */
.main-container {
  max-width: 1280px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.5rem;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.section-intro {
  background: #ffffff;
  border-right: 4px solid var(--accent-gold);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 0 8px 8px 0;
  box-shadow: var(--shadow-sm);
}

.section-intro h2 {
  font-family: var(--font-urdu);
  color: var(--primary-color);
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-intro p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Card Grids */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-gold);
}

.card-media {
  position: relative;
  width: 100%;
  height: 220px;
  background-color: #f2ede0;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.card:hover .card-media img {
  transform: scale(1.03);
}

.badge-era {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(7, 37, 28, 0.92);
  color: #f7eed3;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-res {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: monospace;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-code {
  font-size: 0.8rem;
  color: var(--accent-gold);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.card-title {
  font-family: var(--font-urdu);
  font-size: 1.25rem;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.card-meta-list {
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.card-meta-list li {
  list-style: none;
  display: flex;
  gap: 0.5rem;
}

.card-meta-list strong {
  color: var(--text-main);
  min-width: 90px;
}

.card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
  flex: 1;
}

/* Provenance Alert Box */
.provenance-box {
  background: #faf6ea;
  border: 1px dashed var(--border-gold);
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  color: #5d4a1b;
  margin-bottom: 1rem;
}

.provenance-box strong {
  display: block;
  color: #8c6b12;
  margin-bottom: 0.2rem;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-family: inherit !important;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary-color);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  border-color: var(--border-gold);
  color: var(--primary-color);
  background: #ffffff;
}

.btn-outline:hover {
  background: #faf6ea;
  border-color: var(--accent-gold);
}

.btn-pdf {
  background: #b91c1c;
  color: #ffffff;
  font-weight: bold;
  text-align: center;
}

.btn-pdf:hover {
  background: #991b1b;
}

.btn-book-ref {
  background: #0f766e;
  color: #ffffff;
  font-weight: bold;
  text-align: center;
}

.btn-book-ref:hover {
  background: #115e59;
}

/* Badges */
.badge-pdf {
  background: #fee2e2;
  color: #991b1b;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  border: 1px solid #fca5a5;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-price {
  background: #fef3c7;
  color: #92400e;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  border: 1px solid #fde68a;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-volpage {
  background: #e0f2fe;
  color: #0369a1;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  border: 1px solid #bae6fd;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.book-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.badge-atlas {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-text-maps {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: 12px;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
}

.modal-header h3 {
  font-family: var(--font-urdu);
  color: var(--primary-color);
  font-size: 1.3rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.modal-close:hover {
  color: var(--primary-color);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-media {
  width: 100%;
  max-height: 550px;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
}

.modal-media img {
  max-width: 100%;
  max-height: 550px;
  object-fit: contain;
}

/* Dignified Scholarly Footer */
.footer {
  background: var(--primary-dark);
  color: #d1fae5;
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 3px solid var(--accent-gold);
  font-size: 0.95rem;
}

.footer strong {
  color: #ffffff;
}

/* ========================================================
   LANGUAGE-SPECIFIC STYLES & TYPOGRAPHY
   ======================================================== */

/* 1. URDU VIEW (مہر نستعلیق / نوری نستعلیق) */
body.lang-ur, html[lang="ur"] body, [lang="ur"] {
  font-family: var(--font-urdu);
  line-height: 2.1;
}

body.lang-ur .header h1, [lang="ur"] h1, [lang="ur"] h2, [lang="ur"] h3 {
  font-family: var(--font-urdu);
  line-height: 1.85;
}

body.lang-ur .tab-btn {
  font-family: var(--font-urdu);
  font-size: 1.1rem;
  padding: 0.8rem 1.3rem;
}

body.lang-ur .card-title {
  font-family: var(--font-urdu);
  font-size: 1.25rem;
  line-height: 1.85;
}

/* 2. ARABIC VIEW (الخط العربي الأصيل - أميري ونستسخ) */
body.lang-ar, html[lang="ar"] body, [lang="ar"] {
  font-family: var(--font-arabic);
  line-height: 1.8;
}

body.lang-ar .header h1, [lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3 {
  font-family: var(--font-arabic);
  font-weight: 700;
}

body.lang-ar .tab-btn {
  font-family: var(--font-arabic);
  font-size: 1.1rem;
  font-weight: 700;
}

body.lang-ar .card-title {
  font-family: var(--font-arabic);
  font-size: 1.3rem;
  font-weight: 700;
}

/* 3. ENGLISH VIEW - ULTRA-MODERN SANS-SERIF & COMPACT MENU */
body.lang-en, html[lang="en"] body, [lang="en"], .ltr-layout {
  direction: ltr !important;
  text-align: left !important;
  font-family: var(--font-english) !important;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.ltr-layout .card,
.ltr-layout .modal-content,
.ltr-layout .controls-bar,
.ltr-layout .section-intro {
  text-align: left;
}

.ltr-layout .section-intro {
  border-right: none;
  border-left: 4px solid var(--accent-gold);
  border-radius: 8px 0 0 8px;
}

.ltr-layout .header h1 {
  font-family: var(--font-english) !important;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.ltr-layout .header p {
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 820px;
}

/* Ultra-Modern & Compact Nav Menu for English (Eliminating Scrollbar) */
.ltr-layout .nav-tabs {
  gap: 0.35rem;
  padding: 0 1rem;
  overflow-x: hidden; /* No scrollbar */
  flex-wrap: nowrap;
}

.ltr-layout .tab-btn {
  font-family: var(--font-english) !important;
  font-size: 0.82rem !important; /* Compact modern font size */
  font-weight: 600;
  letter-spacing: -0.015em;
  padding: 0.7rem 0.85rem !important;
  gap: 0.35rem;
}

.ltr-layout .stat-chip {
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  flex-direction: row;
}

.ltr-layout .card-title {
  font-family: var(--font-english) !important;
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.ltr-layout .card-meta-list strong {
  margin-left: 0;
  margin-right: 0.4rem;
}

.ltr-layout .badge-era {
  left: 10px;
  right: auto;
}

.ltr-layout .badge-res {
  right: 10px;
  left: auto;
}

.ltr-layout .search-icon-inside {
  right: auto;
  left: 0.85rem;
}

.ltr-layout .search-input {
  padding: 0.75rem 1rem 0.75rem 2.5rem;
}

/* Generic Badge & Metadata Styles for Geography Sources */
.card-header {
  padding: 0.85rem 1.25rem 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-primary {
  background: rgba(11, 60, 46, 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(11, 60, 46, 0.25);
}

.badge-gold {
  background: rgba(197, 155, 39, 0.15);
  color: #8c6b12;
  border: 1px solid rgba(197, 155, 39, 0.4);
}

.badge-info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

.meta-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.meta-label {
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 600;
  min-width: 85px;
  flex-shrink: 0;
}

.meta-val {
  color: #1f2937;
  font-size: 0.88rem;
}

/* Sub-category filter pills for Books section */
.sub-filter-pills {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.sub-pill-btn {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.sub-pill-btn:hover {
  border-color: var(--accent-gold);
  color: var(--primary-color);
}

.sub-pill-btn.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

/* Contact Section Styling */
.contact-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.contact-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--primary-color);
}

.form-input, .form-textarea {
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-gold);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-info-panel {
  background: #faf8f2;
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

@media (max-width: 900px) {
  .header-hero-grid {
    grid-template-columns: 1fr;
  }
  .contact-container {
    grid-template-columns: 1fr;
  }
}

/* 3 Dedicated Language Switch Buttons inside Hero */
.header-lang-buttons {
  display: inline-flex;
  gap: 0.65rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
  align-items: center;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(7, 37, 28, 0.7);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(197, 155, 39, 0.6);
  border-radius: 20px;
  padding: 0.4rem 1.1rem;
  color: #fffef2;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lang-btn:hover {
  background: rgba(197, 155, 39, 0.28);
  border-color: #ffd700;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 0 14px rgba(197, 155, 39, 0.5);
}

.lang-btn.active {
  background: linear-gradient(135deg, #c59b27 0%, #eab308 100%);
  color: #07251c;
  border-color: #ffd700;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.6);
}

.lang-btn .ui-icon {
  width: 1.1em;
  height: 1.1em;
}

.lang-btn.active .ui-icon {
  color: #07251c;
}

/* Flag SVG styling inside Language Switcher Buttons */
.flag-icon {
  display: inline-block;
  vertical-align: middle;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  object-fit: cover;
}

/* Ensure Arabic font is strictly applied to buttons, tabs, headers in Arabic View */
.lang-ar,
.lang-ar body,
.lang-ar button,
.lang-ar select,
.lang-ar input,
.lang-ar textarea,
.lang-ar .tab-btn,
.lang-ar .lang-btn,
.lang-ar .sub-pill-btn,
.lang-ar .card-title,
.lang-ar h1,
.lang-ar h2,
.lang-ar h3 {
  font-family: 'Amiri', 'Traditional Arabic', 'Noto Naskh Arabic', serif !important;
}

/* Ensure Urdu font is strictly Mehr Nastaliq in Urdu View */
.lang-ur,
.lang-ur body,
.lang-ur .header h1,
.lang-ur .tab-btn,
.lang-ur .lang-btn,
.lang-ur .sub-pill-btn,
.lang-ur h1,
.lang-ur h2 {
  font-family: var(--font-urdu);
}

/* Ensure English font is Plus Jakarta Sans in English View */
.lang-en,
.lang-en body,
.lang-en button,
.lang-en .tab-btn,
.lang-en .lang-btn,
.lang-en .sub-pill-btn,
.lang-en h1,
.lang-en h2,
.lang-en h3 {
  font-family: var(--font-english) !important;
}

/* Responsive Button Grid inside Cards (Fixes line wraps and awkward heights) */
.card-actions-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
  width: 100% !important;
}

.btn-full-row {
  width: 100% !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

.actions-button-grid {
  display: grid !important;
  gap: 0.45rem !important;
  width: 100% !important;
}

.actions-button-grid.cols-3 {
  grid-template-columns: 1fr 1fr 1fr !important;
}

.actions-button-grid.cols-2 {
  grid-template-columns: 1fr 1fr !important;
}

.actions-button-grid .btn {
  padding: 0.55rem 0.4rem !important;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  justify-content: center !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  gap: 0.35rem !important;
  border-radius: 8px !important;
}

.actions-button-grid .btn span {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.actions-button-grid .btn .ui-icon {
  width: 1.05em !important;
  height: 1.05em !important;
  flex-shrink: 0 !important;
}

/* ========================================================
   STRICT UNIVERSAL TYPOGRAPHY PER LANGUAGE VIEW
   ======================================================== */

/* 1. URDU VIEW: Everything strictly uses Mehr Nastaliq */
body.lang-ur,
.lang-ur,
.lang-ur * {
  font-family: 'Mehr Nastaliq', 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Urdu Typesetting', serif;
}
.lang-ur code, .lang-ur pre {
  font-family: monospace !important;
}

/* 2. ARABIC VIEW: Everything strictly uses Classical Arabic Amiri & Naskh */
body.lang-ar,
.lang-ar,
.lang-ar * {
  font-family: 'Amiri', 'Traditional Arabic', 'Noto Naskh Arabic', serif !important;
}
.lang-ar code, .lang-ar pre {
  font-family: monospace !important;
}

/* 3. ENGLISH VIEW: Everything strictly uses Modern Plus Jakarta Sans */
body.lang-en,
.lang-en,
.lang-en *,
.ltr-layout,
.ltr-layout * {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
.lang-en code, .lang-en pre, .ltr-layout code {
  font-family: monospace !important;
}


/* ====================================================================
   ENGLISH VIEW (LTR) - HERO & SEARCH BOX STRICT 50% WIDTH LIMIT
   Search box section MUST NEVER exceed half of the hero width
   ==================================================================== */
.ltr-layout .header-hero-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) !important;
  gap: 1.5rem !important;
  align-items: center !important;
  width: 100% !important;
}

.ltr-layout .header-hero-branding {
  min-width: 0 !important;
  max-width: 100% !important;
  flex: 1 1 auto !important;
}

/* Removed broken rule */
.ltr-layout .header-hero-stats-search {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: auto !important;
  box-sizing: border-box !important;
}

.ltr-layout .header-hero-stats-search .controls-bar {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 0.5rem !important;
}

/* Removed broken rule */
.ltr-layout .controls-bar.header-controls {
  max-width: 100% !important;
  margin-left: auto !important;
}

@media (max-width: 900px) {
  .ltr-layout .header-hero-grid {
    grid-template-columns: 1fr !important;
  }
  .ltr-layout .header-hero-stats-search {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
}

/* Hero Back to Main Personal Website Button */
.btn-main-site {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 215, 0, 0.16);
  border: 1.5px solid var(--accent-gold);
  color: #fffef2 !important;
  padding: 0.42rem 1.15rem;
  border-radius: 24px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.22s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.btn-main-site:hover {
  background: var(--accent-gold);
  color: #062219 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(197, 155, 39, 0.45);
}
.btn-main-site .ui-icon-ext {
  width: 13px;
  height: 13px;
  opacity: 0.85;
}
.brand-action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* ====================================================================
   WELCOME TAB (مقدمہ و تعارف) STYLES
   ==================================================================== */
.welcome-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.welcome-hero-card {
  background: linear-gradient(135deg, rgba(6, 34, 25, 0.92) 0%, rgba(12, 59, 46, 0.88) 100%);
  border: 1.5px solid rgba(197, 155, 39, 0.45);
  border-radius: 16px;
  padding: 2.2rem 2.4rem;
  color: #fffef2;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.welcome-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #c59b27, #fef08a, #c59b27);
}

.welcome-hero-card h2 {
  font-size: 1.85rem;
  color: #fef08a;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.welcome-hero-card p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #e5e7eb;
  margin-bottom: 1rem;
}

.welcome-collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}

.welcome-col-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.6rem 1.5rem;
  border: 1px solid rgba(197, 155, 39, 0.28);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  position: relative;
}

.welcome-col-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(197, 155, 39, 0.22);
  border-color: var(--accent-gold);
}

.welcome-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.welcome-col-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(6, 34, 25, 0.08);
  color: #062219;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-col-count {
  font-size: 1.65rem;
  font-weight: 800;
  color: #b45309;
  letter-spacing: -0.02em;
}

.welcome-col-card h3 {
  font-size: 1.25rem;
  color: #062219;
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.welcome-col-card p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #4b5563;
  margin-bottom: 1.25rem;
  flex: 1;
}

.welcome-col-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: #062219;
  color: #fffef2;
  border: 1px solid var(--accent-gold);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.welcome-col-btn:hover {
  background: var(--accent-gold);
  color: #062219;
}

/* Consultation & Study Section */
.welcome-consult-box {
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
  border: 2px solid #facc15;
  border-radius: 16px;
  padding: 2.2rem 2.4rem;
  box-shadow: 0 8px 24px rgba(202, 138, 4, 0.12);
}

.welcome-consult-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.welcome-consult-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #ca8a04;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.welcome-consult-header h3 {
  font-size: 1.45rem;
  color: #78350f;
  margin-bottom: 0.45rem;
  font-weight: 800;
}

.welcome-consult-header p {
  font-size: 1.02rem;
  line-height: 1.75;
  color: #854d0e;
}

.welcome-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .welcome-form-grid {
    grid-template-columns: 1fr;
  }
}

.welcome-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.welcome-form-group.full-width {
  grid-column: 1 / -1;
}

.welcome-form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #78350f;
}

.welcome-form-group input,
.welcome-form-group textarea {
  border: 1.5px solid #d97706;
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: #ffffff;
  color: #1f2937;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.welcome-form-group input:focus,
.welcome-form-group textarea:focus {
  border-color: #92400e;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.25);
}

.welcome-submit-btn {
  background: linear-gradient(135deg, #062219 0%, #0d4634 100%);
  color: #fef08a;
  border: 1.5px solid #ca8a04;
  border-radius: 10px;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.22s ease;
  margin-top: 0.5rem;
}

.welcome-submit-btn:hover {
  background: #ca8a04;
  color: #062219;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(202, 138, 4, 0.35);
}


/* ====================================================================
   ESSAY, THESIS STRUCTURE & CONCISE CATALOG STYLES (WELCOME PAGE)
   ==================================================================== */
.thesis-essay-box {
  background: #ffffff;
  border-radius: 16px;
  border: 1.5px solid rgba(197, 155, 39, 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  padding: 2.4rem 2.8rem;
  color: #1f2937;
  line-height: 1.95;
  font-size: 1.05rem;
}

@media (max-width: 768px) {
  .thesis-essay-box {
    padding: 1.5rem 1.25rem;
    font-size: 0.98rem;
  }
}

.thesis-essay-header {
  border-bottom: 2px solid #fef08a;
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
}

.thesis-essay-header h2 {
  font-size: 1.85rem;
  color: #062219;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.thesis-author-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: #fefce8;
  border: 1px solid #facc15;
  color: #854d0e;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.92rem;
  font-weight: 700;
}

.thesis-essay-content p {
  margin-bottom: 1.25rem;
  text-align: justify;
}

.thesis-chapters-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.75rem 0 2.2rem;
}

.thesis-chapter-card {
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.4rem 1.35rem;
  transition: all 0.2s ease;
  position: relative;
  border-right: 4px solid var(--accent-gold);
}

.ltr-layout .thesis-chapter-card {
  border-right: 1.5px solid #e5e7eb;
  border-left: 4px solid var(--accent-gold);
}

.thesis-chapter-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-gold);
  box-shadow: 0 6px 18px rgba(197, 155, 39, 0.15);
}

.thesis-ch-badge {
  display: inline-block;
  background: #062219;
  color: #fef08a;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  margin-bottom: 0.65rem;
}

.thesis-chapter-card h4 {
  font-size: 1.12rem;
  color: #062219;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.45;
}

.thesis-chapter-card p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #4b5563;
  margin-bottom: 0;
  text-align: left;
}

.rtl-layout .thesis-chapter-card p {
  text-align: justify;
}

/* Concise Catalog Navigation on Welcome Page */
.catalog-section-wrap {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 2px dashed rgba(197, 155, 39, 0.4);
}

.catalog-section-wrap h3 {
  font-size: 1.5rem;
  color: #062219;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.catalog-subtabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 1.5rem;
}

.catalog-subtab-btn {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #374151;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.catalog-subtab-btn.active,
.catalog-subtab-btn:hover {
  background: #062219;
  color: #fef08a;
  border-color: #062219;
}

.catalog-count-pill {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
}

.catalog-subtab-btn.active .catalog-count-pill {
  background: #fef08a;
  color: #062219;
}

/* Concise Table Styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
}

.concise-catalog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  text-align: right;
}

.ltr-layout .concise-catalog-table {
  text-align: left;
}

.concise-catalog-table th {
  background: #062219;
  color: #fffef2;
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--accent-gold);
  white-space: nowrap;
}

.concise-catalog-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
}

.concise-catalog-table tr:nth-child(even) td {
  background: #f9fafb;
}

.concise-catalog-table tr:hover td {
  background: #fefce8;
}

.col-idx {
  width: 50px;
  text-align: center;
  font-weight: 700;
  color: #6b7280;
}

.col-title {
  font-weight: 700;
  color: #111827;
}

.col-author {
  color: #4b5563;
}

/* ====================================================================
   RESTRICTED PAGE / LOCKED SCREEN STYLES
   ==================================================================== */
.restricted-screen-card {
  background: #ffffff;
  border: 2px solid #eab308;
  border-radius: 16px;
  padding: 3.5rem 2.5rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(234, 179, 8, 0.12);
  max-width: 820px;
  margin: 2rem auto;
}

.restricted-lock-icon {
  width: 72px;
  height: 72px;
  background: #fef9c3;
  color: #a16207;
  border: 2px solid #facc15;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.restricted-lock-icon svg {
  width: 36px;
  height: 36px;
}

.restricted-screen-card h3 {
  font-size: 1.85rem;
  color: #854d0e;
  font-weight: 800;
  margin-bottom: 1rem;
}

.restricted-screen-card p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #4b5563;
  margin-bottom: 1.25rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.restricted-notice-badge {
  display: inline-block;
  background: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.restricted-btn-return {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #062219;
  color: #fef08a;
  border: 1.5px solid var(--accent-gold);
  border-radius: 10px;
  padding: 0.75rem 1.8rem;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.22s ease;
  text-decoration: none;
}

.restricted-btn-return:hover {
  background: var(--accent-gold);
  color: #062219;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(197, 155, 39, 0.35);
}


/* ==========================================================================
   ACADEMIC THESIS HERO CARD & MULTILINGUAL PRESENTATION
   ========================================================================== */
.thesis-hero-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #fdfbf7 100%);
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 14px;
  padding: 1.8rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 24px rgba(6, 34, 25, 0.06);
}

.thesis-hero-img-col {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.thesis-hero-img-col a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  group: true;
}

.thesis-title-cover-img {
  width: 100%;
  max-width: 190px;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(197, 160, 89, 0.4);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: #fff;
}

.thesis-hero-img-col a:hover .thesis-title-cover-img {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.thesis-img-zoom-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: rgba(197, 160, 89, 0.15);
  border: 1px solid rgba(197, 160, 89, 0.4);
  padding: 0.35rem 0.65rem;
  border-radius: 20px;
  margin-top: 0.75rem;
  transition: background 0.2s;
}

.thesis-hero-img-col a:hover .thesis-img-zoom-tag {
  background: var(--accent-gold);
  color: #062219;
}

.thesis-hero-info-col {
  flex: 1 1 auto;
}

.thesis-badge-pill {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: normal !important;
  font-style: normal !important;
  letter-spacing: normal !important;
  word-spacing: normal !important;
  text-transform: none !important;
  background: rgba(6, 34, 25, 0.06);
  color: var(--primary-dark);
  border: 1px solid rgba(6, 34, 25, 0.16);
  padding: 0.35rem 1.1rem;
  border-radius: 30px;
  margin-bottom: 0.6rem;
}

body.lang-ur .thesis-badge-pill,
.lang-ur .thesis-badge-pill {
  font-family: var(--font-urdu) !important;
  font-weight: normal !important;
  font-style: normal !important;
  letter-spacing: normal !important;
  word-spacing: normal !important;
  font-size: 1.15rem !important;
  line-height: 1.6 !important;
}

.thesis-main-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #062219;
  line-height: 1.45;
  margin: 0.2rem 0 0.5rem;
}

.thesis-subtitle-en {
  font-size: 1rem;
  color: #4b5563;
  margin-bottom: 1rem;
  font-style: italic;
  line-height: 1.4;
}

.thesis-author-strip {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: rgba(247, 238, 211, 0.4);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--accent-gold);
}

.rtl-layout .thesis-author-strip {
  border-left: none;
  border-right: 3px solid var(--accent-gold);
}

.thesis-meta-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: #374151;
}

.thesis-meta-item svg {
  width: 17px;
  height: 17px;
  color: var(--accent-gold);
  flex-shrink: 0;
}

/* Content Blocks */
.thesis-content-block {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  padding: 1.8rem;
  margin-bottom: 1.8rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.thesis-sec-heading {
  font-size: 1.35rem;
  font-weight: 800;
  color: #062219;
  margin: 0 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid rgba(197, 160, 89, 0.3);
}

/* 4-Row Summary Table */
.thesis-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.thesis-summary-table thead th {
  background: #062219;
  color: #f7eed3;
  padding: 0.85rem 1rem;
  font-weight: 700;
  border: 1px solid #0f3d2e;
}

.thesis-summary-table tbody td {
  padding: 0.85rem 1rem;
  border: 1px solid #e5e7eb;
  color: #1f2937;
}

.thesis-summary-table tbody tr:nth-child(even) {
  background-color: #faf8f5;
}

.thesis-summary-table tbody tr:hover {
  background-color: #f3ede2;
}

.summary-count-badge {
  display: inline-block;
  background: #0f3d2e;
  color: #f7eed3;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.25rem 0.85rem;
  border-radius: 20px;
  border: 1px solid var(--accent-gold);
}

/* Terms & Policy Box */
.thesis-policy-box {
  background: #fdfbf7;
  border: 1px solid rgba(197, 160, 89, 0.45);
  border-radius: 10px;
  padding: 1.4rem;
  margin-top: 1.5rem;
}

.policy-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #062219;
  margin: 0 0 0.8rem;
}

.policy-heading svg {
  color: var(--accent-gold);
  width: 22px;
  height: 22px;
}

.policy-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.policy-list li {
  position: relative;
  padding-right: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #374151;
}

.ltr-layout .policy-list li {
  padding-right: 0;
  padding-left: 1.5rem;
}

.policy-list li::before {
  content: "•";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.4rem;
  color: var(--accent-gold);
  line-height: 1;
}

.ltr-layout .policy-list li::before {
  right: auto;
  left: 0;
}

.policy-contact-action {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(197, 160, 89, 0.4);
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2937;
}

.btn-email-researcher {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #062219;
  color: #f7eed3;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid var(--accent-gold);
  transition: all 0.2s ease;
}

.btn-email-researcher:hover {
  background: #0f3d2e;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 34, 25, 0.2);
}

/* Catalog Search Bar */
.catalog-search-bar-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.2rem 0;
  background: #fdfbf7;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.catalog-search-input-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 300px;
  max-width: 500px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
}

.catalog-search-input-box svg {
  color: #9ca3af;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.catalog-search-input-box input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.95rem;
  color: #111827;
  background: transparent;
}

.btn-clear-catalog-search {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0 0.3rem;
}

.btn-clear-catalog-search:hover {
  color: #111827;
}

.catalog-result-count {
  font-size: 0.88rem;
  font-weight: 600;
  color: #4b5563;
}

/* Responsive Layout */
@media (max-width: 768px) {
  .thesis-hero-card {
    flex-direction: column;
    text-align: center;
    gap: 1.2rem;
  }
  .thesis-hero-img-col {
    flex: 0 0 auto;
  }
  .thesis-main-title {
    font-size: 1.3rem;
  }
  .thesis-author-strip {
    text-align: right;
  }
  .ltr-layout .thesis-author-strip {
    text-align: left;
  }
}


/* ==========================================================================
   MASTER 50% / 50% TWO-COLUMN HERO SECTION GUARANTEE (ALL LANGUAGES)
   Neither more nor less than 50% for each column
   ========================================================================== */
.header .header-container {
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding: 0 1.5rem !important;
}

.header-hero-grid,
.ltr-layout .header-hero-grid,
.rtl-layout .header-hero-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; /* Exactly 50% & 50% equal 2 columns */
  gap: 2rem !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Column 1: Title, Tagline, Main Site Button, Language Flags (50% of Hero) */
.header-hero-branding,
.ltr-layout .header-hero-branding,
.rtl-layout .header-hero-branding {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.header-hero-branding h1 {
  font-size: 1.75rem !important;
  line-height: 1.35 !important;
  margin-bottom: 0.5rem !important;
}

.ltr-layout .header-hero-branding h1 {
  font-family: var(--font-english) !important;
  font-size: 1.7rem !important;
  letter-spacing: -0.02em !important;
  line-height: 1.3 !important;
}

.header-hero-branding p {
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
  color: #f7eed3 !important;
  opacity: 0.92 !important;
  margin-bottom: 0.85rem !important;
}

/* Column 2: Stats + Search & Filter (Exactly the other 50% of Hero) */
.header-hero-stats-search,
.ltr-layout .header-hero-stats-search,
.rtl-layout .header-hero-stats-search {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.85rem !important;
  background: rgba(0, 0, 0, 0.28) !important;
  padding: 1rem 1.25rem !important;
  border-radius: 14px !important;
  border: 1px solid rgba(197, 160, 89, 0.45) !important;
  backdrop-filter: blur(12px) !important;
  width: 100% !important;
  max-width: 100% !important; /* Exactly fills its 50% grid column */
  min-width: 0 !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

/* Fluid Stats Ribbon inside Column 2 */
.header-hero-stats-search .stats-ribbon {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding-bottom: 0.65rem !important;
  border-bottom: 1px solid rgba(197, 160, 89, 0.3) !important;
  margin: 0 !important;
  gap: 0.3rem !important;
}

.header-hero-stats-search .stat-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  color: #f3f4f6 !important;
  white-space: nowrap !important;
  font-size: 0.88rem !important;
}

.header-hero-stats-search .stat-num {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: var(--accent-gold) !important;
}

/* Controls Bar (Search + Dropdown Filter) inside Column 2 */
.header-hero-stats-search .controls-bar,
.ltr-layout .header-hero-stats-search .controls-bar,
.rtl-layout .header-hero-stats-search .controls-bar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.6rem !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.header-hero-stats-search .search-input-wrap {
  flex: 1.6 !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}

.header-hero-stats-search .search-input {
  width: 100% !important;
  box-sizing: border-box !important;
  font-size: 0.92rem !important;
}

.header-hero-stats-search .filter-select {
  flex: 1 !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  font-size: 0.88rem !important;
}

/* Responsive adjustment for Mobile screens */
@media (max-width: 900px) {
  .header-hero-grid,
  .ltr-layout .header-hero-grid,
  .rtl-layout .header-hero-grid {
    grid-template-columns: 1fr !important; /* Stack into 1 column on mobile */
    gap: 1.5rem !important;
  }
  .header-hero-stats-search,
  .ltr-layout .header-hero-stats-search,
  .rtl-layout .header-hero-stats-search {
    width: 100% !important;
    max-width: 100% !important;
  }
}


/* ==========================================================================
   POINT 1: NAVBAR CONTAINER & TRAILING BUTTON ALIGNMENT
   ========================================================================== */
.nav-tabs-wrapper {
  background: #ffffff !important;
  border-bottom: 2px solid rgba(197, 160, 89, 0.45) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05) !important;
  padding: 0;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-container-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.25rem 1.5rem;
  box-sizing: border-box;
}

.nav-tabs-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-tabs-group::-webkit-scrollbar {
  display: none;
}

.nav-tabs-wrapper .tab-btn {
  background: transparent !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  color: #374151 !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

.nav-tabs-wrapper .tab-btn:hover {
  color: var(--primary-dark) !important;
  background-color: #fbfbf9 !important;
}

.nav-tabs-wrapper .tab-btn.active {
  color: var(--primary-dark) !important;
  border-bottom-color: var(--accent-gold) !important;
  background-color: #faf8f2 !important;
  font-weight: 700 !important;
}

.nav-tabs-wrapper .tab-btn svg {
  color: var(--accent-gold);
}

.nav-tabs-wrapper .tab-btn.active svg {
  color: var(--primary-dark);
}

.nav-trailing-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: auto; /* In RTL push to far left */
}
.ltr-layout .nav-trailing-actions {
  margin-right: 0;
  margin-left: auto; /* In LTR push to far right */
}

.nav-btn-site {
  padding: 0.45rem 1rem !important;
  font-size: 0.88rem !important;
  border-radius: 8px !important;
  background: #fdfbf7 !important;
  border: 1.5px solid var(--accent-gold) !important;
  color: var(--primary-dark) !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.2s ease !important;
}

.nav-btn-site:hover {
  background: var(--accent-gold) !important;
  color: #062219 !important;
}

/* Mobile Hamburger Toggle Button (Hidden on Desktop) */
.btn-mobile-nav-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  background: #fdfbf7 !important;
  border: 1.5px solid var(--accent-gold) !important;
  color: var(--primary-dark) !important;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.btn-mobile-nav-toggle:hover {
  background: var(--accent-gold) !important;
  color: #062219 !important;
}

/* ==========================================================================
   POINT 3: VISIBLE NUMBER PILLS ON CATALOG SUBTABS (ALWAYS PROMINENT)
   ========================================================================== */
.catalog-count-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #062219 !important;
  color: #fef08a !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  padding: 0.15rem 0.65rem !important;
  min-width: 26px !important;
  height: 22px !important;
  border-radius: 20px !important;
  border: 1.5px solid var(--accent-gold) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25) !important;
  margin: 0 0.45rem !important;
  vertical-align: middle !important;
}

.catalog-subtab-btn {
  background: #fdfbf7;
  color: #1f2937;
  border: 1.5px solid #d1d5db;
}

.catalog-subtab-btn.active .catalog-count-pill {
  background: var(--accent-gold) !important;
  color: #062219 !important;
  border-color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
}

/* ==========================================================================
   POINT 4: VERTICALLY STACKED 4 THESIS CHAPTER CARDS (EVEN & BALANCED)
   ========================================================================== */
.thesis-chapters-container {
  display: flex !important;
  flex-direction: column !important; /* Stacked vertically one above the other */
  gap: 1.25rem !important;
  margin: 1.5rem 0 2rem !important;
  width: 100% !important;
}

.thesis-chapter-card {
  width: 100% !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-right: 5px solid var(--accent-gold) !important;
  border-radius: 12px !important;
  padding: 1.4rem 1.6rem !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ltr-layout .thesis-chapter-card {
  border-right: 1px solid #e5e7eb !important;
  border-left: 5px solid var(--accent-gold) !important;
}

.thesis-chapter-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08) !important;
}

.thesis-chapter-card h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #062219;
  margin: 0.4rem 0 0.6rem;
}

.thesis-chapter-card p {
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
}

/* ==========================================================================
   POINT 2: ACADEMIC CONTACT FORM (WELCOME PAGE)
   ========================================================================== */
.welcome-contact-form-box {
  background: linear-gradient(135deg, #ffffff 0%, #fdfbf7 100%);
  border: 1px solid rgba(197, 160, 89, 0.45);
  border-radius: 14px;
  padding: 1.8rem;
  box-shadow: 0 4px 16px rgba(6, 34, 25, 0.05);
}

.contact-box-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 800;
  background: rgba(6, 34, 25, 0.08);
  color: var(--primary-dark);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(6, 34, 25, 0.15);
  margin-bottom: 0.5rem;
}

.contact-form-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #062219;
  margin: 0 0 0.5rem;
}

.contact-form-desc {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.academic-contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1f2937;
}

.form-field input,
.form-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #111827;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.25);
  outline: none;
}

.form-action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.btn-submit-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #062219;
  color: #f7eed3;
  padding: 0.7rem 1.6rem;
  border: 1px solid var(--accent-gold);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-submit-contact:hover {
  background: #0f3d2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 34, 25, 0.25);
}

.direct-email-note {
  font-size: 0.9rem;
  color: #4b5563;
}

.contact-feedback-msg {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

/* ==========================================================================
   POINT 5: MOBILE DRAWER (SLIDE FROM LEFT) & SMALL SCREEN ADJUSTMENTS
   ========================================================================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: -320px; /* Hidden offscreen on the left */
  width: 290px;
  height: 100%;
  background: #ffffff !important;
  color: #1f2937 !important;
  z-index: 9999;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15) !important;
  display: flex;
  flex-direction: column;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.mobile-nav-drawer .drawer-header {
  background: #fbfbf9 !important;
  border-bottom: 1px solid rgba(197, 160, 89, 0.3) !important;
}

.mobile-nav-drawer .drawer-title {
  color: #062219 !important;
  font-weight: 800 !important;
}

.mobile-nav-drawer .btn-close-drawer {
  background: #f3f4f6 !important;
  border: 1px solid #d1d5db !important;
  color: #374151 !important;
}

.mobile-nav-drawer .btn-close-drawer:hover {
  background: var(--accent-gold) !important;
  color: #062219 !important;
}

.mobile-nav-drawer .drawer-tab-btn {
  color: #374151 !important;
  background: transparent !important;
}

.mobile-nav-drawer .drawer-tab-btn:hover {
  background: #f3f4f6 !important;
  color: #062219 !important;
}

.mobile-nav-drawer .drawer-tab-btn.active {
  background: #faf8f2 !important;
  color: #062219 !important;
  font-weight: 700 !important;
  border-right: 3px solid var(--accent-gold) !important;
}
.ltr-layout .mobile-nav-drawer .drawer-tab-btn.active {
  border-right: none !important;
  border-left: 3px solid var(--accent-gold) !important;
}

.mobile-nav-drawer .drawer-tab-btn svg {
  color: var(--accent-gold) !important;
}

.mobile-nav-drawer .drawer-tab-btn.active svg {
  color: #062219 !important;
}

.mobile-nav-drawer .drawer-footer-action {
  border-top: 1px solid #e5e7eb !important;
  background: #fbfbf9 !important;
}

.mobile-nav-drawer.active {
  left: 0; /* Slide out from left */
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(197, 160, 89, 0.3);
}

.drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.drawer-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f7eed3;
}

.btn-close-drawer {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f7eed3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-close-drawer:hover {
  background: var(--accent-gold);
  color: #062219;
}

.drawer-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.drawer-tabs-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0 1rem;
}

.drawer-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: transparent;
  color: #e5e7eb;
  border: 1px solid transparent;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.96rem;
  font-weight: 700;
  text-align: right;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.ltr-layout .drawer-tab-btn {
  text-align: left;
}

.drawer-tab-btn svg {
  width: 18px;
  height: 18px;
  color: var(--accent-gold);
}

.drawer-tab-btn:hover {
  background: rgba(197, 160, 89, 0.15);
  color: #ffffff;
}

.drawer-tab-btn.active {
  background: var(--accent-gold);
  color: #062219;
}
.drawer-tab-btn.active svg {
  color: #062219;
}

.drawer-footer-action {
  padding: 1.25rem 1rem;
  border-top: 1px solid rgba(197, 160, 89, 0.25);
}

.drawer-btn-site {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS (SMALL SCREENS <= 860px)
   ========================================================================== */
@media (max-width: 860px) {
  /* Navbar */
  .btn-mobile-nav-toggle {
    display: inline-flex !important;
  }
  .nav-tabs-group {
    display: none !important; /* Hide wide tabs on mobile */
  }
  .nav-trailing-actions {
    margin: 0 !important;
  }
  .nav-btn-site {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.75rem !important;
  }

  /* Hero Section: Stack 2 Columns into 1 */
  .header-hero-grid,
  .ltr-layout .header-hero-grid,
  .rtl-layout .header-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .header-hero-branding {
    text-align: center;
    align-items: center;
  }

  .header-hero-branding h1 {
    font-size: 1.35rem !important;
  }

  .header-lang-buttons {
    justify-content: center !important;
  }

  /* Search & Filter: Stack vertically (search on top, filter below) */
  .header-hero-stats-search {
    width: 100% !important;
    padding: 1rem 0.85rem !important;
  }

  .header-hero-stats-search .stats-ribbon {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.5rem 0.8rem !important;
  }

  .header-hero-stats-search .controls-bar,
  .ltr-layout .header-hero-stats-search .controls-bar,
  .rtl-layout .header-hero-stats-search .controls-bar {
    flex-direction: column !important; /* Stack vertically */
    width: 100% !important;
    gap: 0.65rem !important;
  }

  .header-hero-stats-search .search-input-wrap,
  .header-hero-stats-search .filter-select {
    width: 100% !important;
    flex: none !important;
  }

  /* Form 2-col to 1-col on mobile */
  .form-grid-2col {
    grid-template-columns: 1fr !important;
  }

  /* Footer on mobile */
  .footer {
    padding: 1.5rem 1rem !important;
    text-align: center !important;
    font-size: 0.86rem !important;
    line-height: 1.6 !important;
  }
}

/* Ensure Zero Horizontal Scroll on Entire Page */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}


/* ==========================================================================
   ENGLISH HERO STATS: 2-LINE 2x2 GRID (PREVENT OVERFLOW)
   ========================================================================== */
.ltr-layout .header-hero-stats-search .stats-ribbon {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important; /* 2 clean equal columns / 2 lines */
  gap: 0.5rem 0.85rem !important;
  width: 100% !important;
  padding-bottom: 0.75rem !important;
  border-bottom: 1px solid rgba(197, 160, 89, 0.3) !important;
  box-sizing: border-box !important;
}

.ltr-layout .header-hero-stats-search .stat-sep {
  display: none !important; /* hide single-line vertical pipe separators */
}

.ltr-layout .header-hero-stats-search .stat-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: rgba(255, 255, 255, 0.07) !important;
  padding: 0.35rem 0.65rem !important;
  border-radius: 6px !important;
  border: 1px solid rgba(197, 160, 89, 0.35) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

.ltr-layout .header-hero-stats-search .stat-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: #f7eed3 !important;
  letter-spacing: -0.01em !important;
}

.ltr-layout .header-hero-stats-search .stat-label svg {
  width: 16px !important;
  height: 16px !important;
  color: var(--accent-gold) !important;
  flex-shrink: 0 !important;
}

.ltr-layout .header-hero-stats-search .stat-num {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: var(--accent-gold) !important;
}

/* Guard right hero column against any overflow */
.header-hero-stats-search {
  overflow: hidden !important;
  box-sizing: border-box !important;
  width: 100% !important;
}


/* ==========================================================================
   ENHANCED 2-LINE STATS ACROSS ALL LANGUAGES (URDU, ARABIC, ENGLISH)
   BIGGER ICONS (32px), BIGGER NUMBERS (2.35rem), UNBOXED & SEPARATED
   ========================================================================== */
.header-hero-stats-search,
.ltr-layout .header-hero-stats-search,
.rtl-layout .header-hero-stats-search {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
  background: transparent !important;   /* COMPLETELY UNBOXED */
  border: none !important;              /* NO BOX BORDER */
  box-shadow: none !important;          /* NO BOX SHADOW */
  backdrop-filter: none !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* 2 Equal Lines / 2x2 Grid Ribbon for Stats in ALL languages */
.stats-ribbon,
.ltr-layout .header-hero-stats-search .stats-ribbon,
.rtl-layout .header-hero-stats-search .stats-ribbon {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important; /* Exactly 2 lines */
  gap: 1rem 1.6rem !important;
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1.5px dashed rgba(197, 160, 89, 0.45) !important; /* Clean separation from search box */
  padding: 0 0 1.1rem 0 !important;
  margin: 0 0 0.5rem 0 !important;
  box-sizing: border-box !important;
}

/* Individual Stat Item: Fully Open, No Box */
.stat-item,
.ltr-layout .header-hero-stats-search .stat-item,
.rtl-layout .header-hero-stats-search .stat-item {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0.2rem 0.4rem !important;
  cursor: default !important;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}

.stat-item:hover,
.ltr-layout .header-hero-stats-search .stat-item:hover,
.rtl-layout .header-hero-stats-search .stat-item:hover {
  transform: translateY(-4px) scale(1.04) !important;
}

/* Extra Large Glowing Circular Halo for Icon */
.stat-icon-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 54px !important;
  height: 54px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(197, 160, 89, 0.35) 0%, rgba(6, 34, 25, 0) 75%) !important;
  flex-shrink: 0 !important;
  transition: all 0.3s ease !important;
}

.stat-item:hover .stat-icon-wrap {
  background: radial-gradient(circle, rgba(254, 240, 138, 0.5) 0%, rgba(6, 34, 25, 0) 80%) !important;
  transform: scale(1.12) !important;
}

/* Bigger Glowing SVG Icons */
.stat-icon-glow {
  width: 32px !important;
  height: 32px !important;
  color: var(--accent-gold) !important;
  filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.6)) !important;
  stroke-width: 2.2 !important;
  transition: all 0.3s ease !important;
}

.stat-item:hover .stat-icon-glow {
  color: #fef08a !important;
  filter: drop-shadow(0 4px 16px rgba(254, 240, 138, 0.95)) !important;
}

/* Info Wrap: Number & Label */
.stat-info-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  min-width: 0 !important;
}
.rtl-layout .stat-info-wrap {
  align-items: flex-start !important;
}

/* Much Bigger, Glorious Bold Metallic Counter Numbers */
.stat-num,
.ltr-layout .header-hero-stats-search .stat-num,
.rtl-layout .header-hero-stats-search .stat-num {
  font-size: 2.35rem !important; /* Huge & prominent */
  font-weight: 800 !important;
  line-height: 1 !important;
  color: #fef08a !important;
  background: linear-gradient(135deg, #ffffff 10%, #fef08a 60%, #c5a059 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  letter-spacing: -0.02em !important;
  margin-bottom: 0.15rem !important;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.5) !important;
}

/* Crisp & Clear Stat Label */
.stat-label,
.ltr-layout .header-hero-stats-search .stat-label,
.rtl-layout .header-hero-stats-search .stat-label {
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  color: #f7eed3 !important;
  opacity: 0.95 !important;
  white-space: nowrap !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6) !important;
}

/* Floating Clean Controls Bar (Search + Filter): Distinct from Stats */
.header-hero-stats-search .controls-bar,
.ltr-layout .header-hero-stats-search .controls-bar,
.rtl-layout .header-hero-stats-search .controls-bar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.65rem !important;
  width: 100% !important;
  background: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(197, 160, 89, 0.45) !important;
  border-radius: 12px !important;
  padding: 0.5rem 0.65rem !important;
  box-sizing: border-box !important;
  backdrop-filter: blur(10px) !important;
  margin-top: 0.25rem !important;
}

/* ==========================================================================
   URDU HERO VIEW: BIGGER TYPOGRAPHY BEFORE, ON, AND AFTER TITLE
   ========================================================================== */
.header-top-banner-text {
  font-size: 1.15rem !important; /* Line before title made larger */
  font-weight: 700 !important;
  color: #f7eed3 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.6rem !important;
  margin-bottom: 0.4rem !important;
  opacity: 0.96 !important;
}
.header-top-banner-text svg {
  width: 20px !important;
  height: 20px !important;
}

/* Urdu Title: Noticeably larger */
.lang-ur .header-hero-branding h1,
.rtl-layout .header-hero-branding h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem) !important; /* Title slightly larger */
  line-height: 1.45 !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin: 0.35rem 0 0.85rem 0 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

/* Urdu Tagline after Title: Noticeably larger */
.lang-ur .header-hero-branding p,
.rtl-layout .header-hero-branding p {
  font-size: clamp(1.05rem, 2vw, 1.2rem) !important; /* Line after title made larger */
  line-height: 1.7 !important;
  font-weight: 500 !important;
  color: #f7eed3 !important;
  opacity: 0.95 !important;
  margin-bottom: 1.25rem !important;
}

/* ==========================================================================
   FOOTER STYLES & LINK
   ========================================================================== */
.footer {
  background: #041711 !important;
  border-top: 1px solid rgba(197, 160, 89, 0.4) !important;
  padding: 1.6rem 1.5rem !important;
  text-align: center !important;
  color: #e5e7eb !important;
  font-size: 0.95rem !important;
  line-height: 1.65 !important;
}

.footer-main-site-link {
  color: var(--accent-gold) !important;
  text-decoration: underline !important;
  font-weight: 700 !important;
  margin-right: 0.35rem !important;
  margin-left: 0.35rem !important;
  transition: color 0.2s ease !important;
}

.footer-main-site-link:hover {
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(197, 160, 89, 0.6) !important;
}


/* ==========================================================================
   FOOTER SPACED LAYOUT & CLEAN LINK
   ========================================================================== */
.footer {
  background: #041711 !important;
  border-top: 1px solid rgba(197, 160, 89, 0.4) !important;
  padding: 2rem 1.5rem !important;
  text-align: center !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.footer-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1rem !important; /* Generous spacing between project title and author */
  max-width: 1200px !important;
  margin: 0 auto !important;
}

.footer-project-title {
  font-size: 1.08rem !important;
  font-weight: 700 !important;
  color: #f7eed3 !important;
  line-height: 1.55 !important;
  letter-spacing: normal !important;
}

.footer-meta-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 1.4rem !important; /* Proper spacing between scholar and link */
  font-size: 0.98rem !important;
  color: #d1d5db !important;
}

.footer-author strong {
  color: #ffffff !important;
}

.footer-sep {
  color: var(--accent-gold) !important;
  font-size: 1.1rem !important;
  opacity: 0.7 !important;
}

.footer-main-site-link {
  color: var(--accent-gold) !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
  transition: all 0.2s ease !important;
}

.footer-main-site-link:hover {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(254, 240, 138, 0.8) !important;
}


/* ==========================================================================
   HERO 60% / 40% SPLIT & INLINE 2-LINE STATS
   ========================================================================== */
.header-hero-grid,
.ltr-layout .header-hero-grid,
.rtl-layout .header-hero-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) !important; /* Exactly 60% / 40% */
  gap: 2rem !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* 60% Branding Column */
.header-hero-branding,
.ltr-layout .header-hero-branding,
.rtl-layout .header-hero-branding {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* 40% Search & Stats Column */
.header-hero-stats-search,
.ltr-layout .header-hero-stats-search,
.rtl-layout .header-hero-stats-search {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.85rem !important;
  width: 100% !important;
  min-width: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* Stats Ribbon: 2 Lines Total, 2 Items Per Line (50% / 50%) */
.stats-ribbon,
.ltr-layout .header-hero-stats-search .stats-ribbon,
.rtl-layout .header-hero-stats-search .stats-ribbon {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important; /* 2 equal columns / 2 lines */
  gap: 0.65rem 1rem !important;
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Individual Stat Item: Single Horizontal Line [Icon] [Number] [Label] */
.stat-item,
.ltr-layout .header-hero-stats-search .stat-item,
.rtl-layout .header-hero-stats-search .stat-item {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.55rem !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0.15rem 0 !important;
  white-space: nowrap !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.stat-icon {
  width: 26px !important;
  height: 26px !important;
  color: var(--accent-gold) !important;
  filter: drop-shadow(0 2px 5px rgba(212, 175, 55, 0.45)) !important;
  flex-shrink: 0 !important;
}

.stat-num,
.ltr-layout .header-hero-stats-search .stat-num,
.rtl-layout .header-hero-stats-search .stat-num {
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  color: #fef08a !important;
  letter-spacing: -0.01em !important;
  margin: 0 !important;
}

.stat-label,
.ltr-layout .header-hero-stats-search .stat-label,
.rtl-layout .header-hero-stats-search .stat-label {
  font-size: 0.96rem !important;
  font-weight: 700 !important;
  color: #f7eed3 !important;
  line-height: 1 !important;
  margin: 0 !important;
}

/* Floating Controls Bar under the 2-Line Stats */
.header-hero-stats-search .controls-bar,
.ltr-layout .header-hero-stats-search .controls-bar,
.rtl-layout .header-hero-stats-search .controls-bar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.55rem !important;
  width: 100% !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(197, 160, 89, 0.4) !important;
  border-radius: 10px !important;
  padding: 0.45rem 0.6rem !important;
  box-sizing: border-box !important;
  backdrop-filter: blur(8px) !important;
}

.header-hero-stats-search .search-input-wrap {
  flex: 1.4 !important;
  min-width: 0 !important;
  width: 100% !important;
}

.header-hero-stats-search .filter-select {
  flex: 1.1 !important;
  min-width: 0 !important;
  width: 100% !important;
}

/* Mobile Stack */
@media (max-width: 860px) {
  .header-hero-grid,
  .ltr-layout .header-hero-grid,
  .rtl-layout .header-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  .header-hero-stats-search .controls-bar {
    flex-direction: column !important;
  }
}

/* ==========================================================================
   SCHOLAR AUTHENTICATION & LOGIN SCREEN STYLES
   ========================================================================== */
.scholar-login-card {
  max-width: 580px;
  margin: 2.5rem auto;
  padding: 2.5rem 2.2rem;
  background: #ffffff;
  border: 1.5px solid rgba(197, 160, 89, 0.45);
  border-radius: 16px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.scholar-login-card .restricted-lock-icon {
  width: 58px;
  height: 58px;
  background: #faf8f2;
  border: 1.5px solid var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--primary-dark);
}

.scholar-login-card .restricted-lock-icon svg {
  width: 26px;
  height: 26px;
}

.scholar-login-form {
  margin-top: 1.75rem;
  text-align: right;
}

.ltr-layout .scholar-login-form {
  text-align: left;
}

.login-field-wrap {
  margin-bottom: 1.25rem;
}

.login-field-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.45rem;
}

.login-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  background: #fbfbf9;
  color: #111827;
  box-sizing: border-box;
  transition: all 0.2s ease;
  font-family: inherit;
}

.login-input:focus {
  border-color: var(--accent-gold);
  background: #ffffff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2);
}

.login-error-msg {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
  text-align: center;
}

.login-actions-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn-scholar-login {
  background: #062219;
  color: #f7eed3;
  border: 1.5px solid var(--accent-gold);
  padding: 0.7rem 1.8rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-scholar-login:hover {
  background: var(--accent-gold);
  color: #062219;
}

/* Nav Auth Controls */
.nav-auth-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-inline-start: 0.5rem;
}

.btn-nav-login {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 6px;
  background: #fef3c7;
  border: 1.2px solid #f59e0b;
  color: #92400e;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-nav-login:hover {
  background: #f59e0b;
  color: #ffffff;
}

.scholar-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ecfdf5;
  color: #065f46;
  border: 1.2px solid #a7f3d0;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.scholar-auth-badge .pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.btn-auth-logout {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-auth-logout:hover {
  background: #ef4444;
  color: #ffffff;
}

/* ==========================================================================
   MEDIUM & SMALL SCREEN ADJUSTMENTS (<= 1024px)
   Hide Main Website & Login from Top Navbar, House them in Sidebar Drawer
   ========================================================================== */
.btn-drawer-login {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  width: 100% !important;
  padding: 0.6rem 1rem !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  background: #fef3c7 !important;
  border: 1.5px solid #f59e0b !important;
  color: #92400e !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.btn-drawer-login:hover {
  background: #f59e0b !important;
  color: #ffffff !important;
}

.drawer-auth-badge {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 0.55rem 0.85rem !important;
  font-size: 0.86rem !important;
}

@media (max-width: 1024px) {
  /* Hide Desktop navigation tabs on medium and small screens */
  .nav-tabs-group {
    display: none !important;
  }
  
  /* Hide Main Website button and Login button from Top Navbar on <= 1024px */
  .nav-trailing-actions {
    display: none !important;
  }
  #navAuthContainer {
    display: none !important;
  }
  
  /* Always show the Mobile Hamburger / Menu toggle button on <= 1024px */
  .btn-mobile-nav-toggle {
    display: inline-flex !important;
  }
}
