/* 3pattiblu.pk — English UI shell + Urdu article block (Noto Nastaliq) */

:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --text: #1a2332;
  --muted: #5c6b7f;
  --brand: #0d6efd;
  --brand-dark: #084298;
  --accent: #ff6b35;
  --accent-soft: #fff0e8;
  --border: #e2e8f0;
  --shadow: 0 8px 30px rgba(13, 110, 253, 0.08);
  --radius: 14px;
  --max: 1100px;
  --font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Alvi Nastaleeq", "Urdu Typesetting", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-ui);
  direction: ltr;
  text-align: left;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  direction: ltr;
  text-align: left;
}

/* Urdu: hero + article — fixed RTL + Nastaliq; mobile-friendly sizing */
.main-urdu {
  font-family: var(--font-urdu);
  direction: rtl;
  text-align: right;
  unicode-bidi: isolate;
  font-synthesis: none;
  font-size: 1.08rem;
  line-height: 2.05;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.main-urdu .btn,
.main-urdu .btn-primary,
.main-urdu .btn-outline {
  font-family: var(--font-urdu);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .main-urdu {
    /* موبائل: چھوٹا فونٹ اردو میں کٹ جاتا ہے — تھوڑا بڑا + وسیع لائن */
    font-size: max(1.0625rem, 3.9vw);
    line-height: 2.2;
    word-break: normal;
    overflow-wrap: anywhere;
    hyphens: manual;
  }

  .main-urdu .hero,
  .main-urdu .layout {
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  .main-urdu .prose {
    padding: 1.25rem 1rem 1.75rem;
  }

  .main-urdu .hero h1 {
    line-height: 1.55;
    font-size: clamp(1.35rem, 5.2vw, 1.85rem);
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

code,
kbd,
pre {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9em;
  direction: ltr;
  unicode-bidi: embed;
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
  font-family: var(--font-ui);
}
.skip-link:focus {
  left: max(0px, env(safe-area-inset-left, 0px));
}

.site-header {
  background: linear-gradient(135deg, #0d6efd 0%, #084298 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  font-family: var(--font-ui);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-direction: row;
  flex-wrap: wrap;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  font-family: var(--font-ui);
}
.logo-link:hover {
  text-decoration: none;
  opacity: 0.92;
}
.logo-link img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 4px;
}

.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: var(--font-ui);
}

.nav-main ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav-main a {
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.35rem 0;
  opacity: 0.95;
  font-family: var(--font-ui);
}
.nav-main a:hover,
.nav-main a[aria-current="page"] {
  text-decoration: underline;
  opacity: 1;
}

.site-header .btn {
  font-family: var(--font-ui);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.35rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.35);
}
.btn-primary:hover {
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.45);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
}
.btn-outline:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 1.5rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 880px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    padding-top: 2.5rem;
  }
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  line-height: 1.4;
  color: var(--text);
}

.hero-lead {
  color: var(--muted);
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
}

.hero-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.hero-card img {
  border-radius: 10px;
  margin-bottom: 1rem;
}

.hero-caption {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.prose {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.prose h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
  color: var(--brand-dark);
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--accent-soft);
  line-height: 1.45;
}
.prose h2:first-child {
  margin-top: 0;
}
.prose h3 {
  margin-top: 1.35rem;
  margin-bottom: 0.5rem;
  font-size: 1.12rem;
  color: var(--text);
  line-height: 1.45;
}

.prose p {
  margin: 0 0 1rem;
  color: var(--text);
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-inline-start: 1.5rem;
  padding-inline-end: 0;
}
.prose li {
  margin-bottom: 0.45rem;
}

.toc {
  background: var(--accent-soft);
  border: 1px solid #ffd4c0;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
}
.toc strong {
  display: block;
  margin-bottom: 0.65rem;
}
.toc ul {
  margin: 0;
  padding-inline-start: 1.25rem;
  padding-inline-end: 0;
}
.toc a {
  font-weight: 600;
}

.figure {
  margin: 1.5rem 0;
  text-align: center;
}
.figure img {
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.cta-box {
  background: linear-gradient(135deg, #e8f1ff 0%, #fff5f0 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin: 1.75rem 0;
  text-align: center;
}
.cta-box p {
  margin: 0 0 1rem;
}

.info-grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (min-width: 640px) {
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.info-card {
  background: #fafcff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.info-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.main-urdu table.simple th,
.main-urdu table.simple td {
  text-align: start;
}

table.simple {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}
table.simple th,
table.simple td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.75rem;
  text-align: left;
}
table.simple th {
  background: #eef4ff;
}

.site-footer {
  background: #1a2332;
  color: #cbd5e1;
  padding: 2rem 1.25rem;
  margin-top: 2rem;
  font-family: var(--font-ui);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.footer-inner h2 {
  color: #fff;
  font-size: 1.1rem;
  margin: 0 0 1rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
}
.footer-links a {
  color: #93c5fd;
}
.footer-note {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  .nav-main {
    display: none;
    width: 100%;
    padding: 1rem 0 0;
  }
  .nav-main.is-open {
    display: block;
  }
  .nav-main ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .header-inner {
    flex-wrap: wrap;
  }
  .nav-main {
    order: 3;
    flex-basis: 100%;
  }
}

.breadcrumb {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem 0;
  font-size: 0.88rem;
  color: var(--muted);
  font-family: var(--font-ui);
  direction: ltr;
  text-align: left;
}
.breadcrumb a {
  color: var(--muted);
}

.keywords-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}
