:root {
  --primary: #1b4d3a;
  --primary-light: #2d6b52;
  --primary-dark: #0f2e22;
  --accent: #c9a84c;
  --accent-light: #e0c66a;
  --bg: #f7f5f0;
  --bg-card: #ffffff;
  --text: #2c2c2c;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: rgba(0,0,0,.06);
  --shadow: 0 1px 6px rgba(0,0,0,.04);
  --shadow-lg: 0 4px 24px rgba(0,0,0,.08);
  --radius: 16px;
  --radius-lg: 24px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-urdu: 'Noto Nastaliq Urdu', 'Noto Naskh Arabic', serif;
}

[dir="rtl"] {
  --font-body: var(--font-urdu);
}

[dir="ltr"] {
  --font-body: var(--font-sans);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.urdu {
  font-family: var(--font-urdu);
}

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

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

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

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.92);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
  white-space: nowrap;
}

.navbar .logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

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

.nav-links a {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all .2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--primary);
  color: #fff;
}

.lang-switch {
  display: flex;
  gap: 4px;
}

.lang-switch a {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.lang-switch a.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Hero */
.hero {
  text-align: center;
  padding: 60px 0 40px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.hero p {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 32px;
  line-height: 1.8;
}

body.urdu .hero p {
  font-size: clamp(18px, 2.5vw, 22px);
}

/* Action Cards */
.action-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.action-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all .3s;
}

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

.action-card .icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 26px;
}

.action-card .icon.green { background: #e8f5e9; color: var(--primary); }
.action-card .icon.gold { background: #fef3c7; color: #b8860b; }
.action-card .icon.blue { background: #dbeafe; color: #1d4ed8; }

.action-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.action-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.action-card .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
}

.action-card .btn:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.action-card .btn.outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.action-card .btn.outline:hover {
  background: var(--primary);
  color: #fff;
}

/* Content Sections */
.content-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin: 28px 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.content-section h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.content-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 24px 0 12px;
}

.content-section p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 16px;
}

body.urdu .content-section p {
  font-size: 17px;
}

.content-section ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.content-section ul li {
  font-size: 15px;
  color: var(--text);
  padding: 6px 0 6px 24px;
  position: relative;
  line-height: 1.8;
}

body.urdu .content-section ul li {
  font-size: 17px;
  padding: 6px 24px 6px 0;
}

.content-section ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

body.urdu .content-section ul li::before {
  left: auto;
  right: 0;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid #eee;
  padding: 20px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 8px;
  cursor: pointer;
}

.faq-item p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0;
}

body.urdu .faq-item p {
  font-size: 16px;
}

/* Reader */
.reader-container {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.reader-container img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 16px;
}

.reader-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.reader-nav .nav-btn {
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}

.reader-nav .nav-btn:hover {
  background: var(--primary-light);
}

.reader-nav .nav-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.reader-nav .page-info {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.blog-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all .3s;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.blog-card .card-body {
  padding: 24px;
}

.blog-card .tag {
  display: inline-block;
  padding: 3px 10px;
  background: #e8f5e9;
  color: var(--primary);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.blog-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.blog-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Table */
.keyword-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0;
}

.keyword-table th {
  background: var(--primary);
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
}

.keyword-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
}

.keyword-table tr:hover td {
  background: #f9f9f4;
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.7);
  padding: 40px 0 24px;
  margin-top: 48px;
}

.footer a {
  color: rgba(255,255,255,.8);
}

.footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 24px;
}

.footer h4 {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 6px;
}

.footer ul li a {
  font-size: 14px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 13px;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--text-muted);
}

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

.breadcrumbs .sep {
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
  .navbar .container {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 20px;
    gap: 8px;
  }
  
  .nav-links {
    flex-wrap: wrap;
    gap: 4px;
  }
  
  .nav-links a {
    padding: 4px 10px;
    font-size: 13px;
  }
  
  .action-cards {
    grid-template-columns: 1fr;
  }
  
  .content-section {
    padding: 24px 18px;
  }
  
  .hero {
    padding: 40px 0 24px;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .reader-nav {
    gap: 10px;
  }
}
