/* ==========================================================================
   Dastkaari — Stylesheet
   Clean, fast, mobile-first. No frameworks.
   Color palette: Pakistani green + warm gold + neutral tones.
   ========================================================================== */

/* --- CSS Custom Properties --- */
:root {
  --green: #006B3F;
  --green-dark: #004D2C;
  --green-light: #E8F5EE;
  --gold: #C6A961;
  --gold-light: #F5F0E3;
  --text: #1a1a1a;
  --text-light: #555;
  --text-muted: #888;
  --bg: #fafafa;
  --bg-white: #fff;
  --border: #e0e0e0;
  --border-light: #f0f0f0;
  --radius: 6px;
  --max-width: 1100px;
  --content-width: 720px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-dark); }

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Header --- */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.site-logo { text-decoration: none; }
.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.02em;
}
.nav-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-list a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.nav-list a:hover,
.nav-list a.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  position: absolute;
  left: 0;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 9px; }
.nav-toggle span:nth-child(3) { top: 18px; }

@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .nav-list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    gap: 0.75rem;
  }
  .nav-list.open { display: flex; }
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.hero-subtitle {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0.92;
  line-height: 1.6;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

@media (max-width: 600px) {
  .hero { padding: 2.5rem 0; }
  .hero h1 { font-size: 1.8rem; }
  .hero-subtitle { font-size: 1rem; }
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-align: center;
}
.btn-primary {
  background: var(--gold);
  color: var(--text);
}
.btn-primary:hover {
  background: #b89a52;
  color: var(--text);
}
.btn-outline {
  border: 2px solid #fff;
  color: #fff;
  background: transparent;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
section:not(.hero) .btn-outline {
  border-color: var(--green);
  color: var(--green);
}
section:not(.hero) .btn-outline:hover {
  background: var(--green-light);
}

/* --- Pillar Grid --- */
.home-pillars { padding: 3.5rem 0; }
.home-pillars h2 { text-align: center; margin-bottom: 2rem; font-size: 1.75rem; }
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}
.pillar-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pillar-card:hover {
  border-color: var(--green);
  box-shadow: 0 2px 12px rgba(0,107,63,0.08);
}
.pillar-card h3 {
  color: var(--green);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.pillar-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* --- Article Lists --- */
.home-latest, .article-listing { padding: 3rem 0; }
.home-latest h2 { text-align: center; margin-bottom: 2rem; font-size: 1.75rem; }
.article-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.article-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.article-card:hover { border-color: var(--green); }
.article-card h2, .article-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; line-height: 1.35; }
.article-card h2 a, .article-card h3 a { color: var(--text); }
.article-card h2 a:hover, .article-card h3 a:hover { color: var(--green); }
.article-card p { color: var(--text-light); font-size: 0.92rem; margin-bottom: 0.75rem; }
.article-meta-compact {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.category-tag {
  background: var(--green-light);
  color: var(--green);
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 600;
}
.read-more {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--green);
}
.section-cta { text-align: center; margin-top: 2rem; }

/* --- Trust Section --- */
.home-trust {
  background: var(--gold-light);
  padding: 3rem 0;
  text-align: center;
}
.home-trust h2 { margin-bottom: 1rem; font-size: 1.5rem; }
.home-trust p { max-width: 650px; margin: 0 auto 0.75rem; color: var(--text-light); }

/* --- Page Header --- */
.page-header {
  background: var(--green-light);
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { font-size: 2rem; }
.page-description { color: var(--text-light); margin-top: 0.5rem; }

/* --- Single Article --- */
.article-header {
  background: var(--bg-white);
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border-light);
}
.article-header h1 {
  font-size: 2.2rem;
  line-height: 1.25;
  max-width: var(--content-width);
}
.article-meta {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.article-category {
  background: var(--green-light);
  color: var(--green);
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
}
.last-verified {
  color: var(--gold);
  font-weight: 500;
}
.meta-sep { color: var(--border); }

/* Article body */
.article-body-container {
  max-width: var(--content-width);
  padding-top: 2rem;
  padding-bottom: 3rem;
}
.article-body h2 { font-size: 1.5rem; margin: 2rem 0 0.75rem; }
.article-body h3 { font-size: 1.25rem; margin: 1.75rem 0 0.5rem; }
.article-body h4 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.article-body p { margin-bottom: 1.25rem; }
.article-body ul, .article-body ol { margin: 0 0 1.25rem 1.5rem; }
.article-body li { margin-bottom: 0.4rem; }
.article-body blockquote {
  border-left: 3px solid var(--green);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--green-light);
  color: var(--text-light);
}
.article-body code {
  background: var(--border-light);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  font-size: 0.9rem;
}
.article-body pre {
  background: #1a1a1a;
  color: #e0e0e0;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.25rem;
}
.article-body pre code { background: none; padding: 0; color: inherit; }
.article-body a { text-decoration: underline; text-underline-offset: 2px; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
}
.article-body th, .article-body td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-size: 0.92rem;
}
.article-body th { background: var(--green-light); font-weight: 600; }

/* Table of Contents */
.toc {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}
.toc summary { cursor: pointer; }
.toc nav#TableOfContents ul { list-style: none; margin: 0.5rem 0 0 0; padding-left: 1rem; }
.toc nav#TableOfContents > ul { padding-left: 0; }
.toc nav#TableOfContents li { margin-bottom: 0.3rem; }
.toc nav#TableOfContents a { font-size: 0.9rem; color: var(--text-light); text-decoration: none; }
.toc nav#TableOfContents a:hover { color: var(--green); }

/* Disclaimer box */
.disclaimer-box {
  background: #FFF8E7;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 2rem;
  font-size: 0.9rem;
}
.disclaimer-verified { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.5rem; }

/* Tags */
.article-tags {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.88rem;
}
.tag {
  background: var(--border-light);
  color: var(--text-light);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 0.82rem;
}
.tag:hover { background: var(--green-light); color: var(--green); }

/* Article nav */
.article-nav {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  max-width: var(--content-width);
}
.nav-prev, .nav-next { color: var(--green); font-weight: 500; }

/* --- Taxonomy Listing --- */
.taxonomy-listing { padding: 2rem 0; }
.taxonomy-list { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.taxonomy-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  text-decoration: none;
  transition: border-color 0.2s;
}
.taxonomy-item:hover { border-color: var(--green); }
.taxonomy-name { color: var(--text); font-weight: 500; }
.taxonomy-count {
  background: var(--green-light);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  list-style: none;
}
.pagination .page-item a,
.pagination .page-item span {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text-light);
}
.pagination .page-item.active span {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.pagination .page-item a:hover {
  border-color: var(--green);
  color: var(--green);
}

/* --- Footer --- */
.site-footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #333;
}
.footer-brand {
  color: var(--gold);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.footer-about p { font-size: 0.9rem; line-height: 1.6; }
.footer-heading {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-pillars ul, .footer-links ul { list-style: none; }
.footer-pillars li, .footer-links li { margin-bottom: 0.4rem; }
.footer-pillars a, .footer-links a { color: #aaa; font-size: 0.88rem; }
.footer-pillars a:hover, .footer-links a:hover { color: var(--gold); }
.footer-bottom {
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  color: #888;
}
.footer-disclaimer { margin-top: 0.4rem; font-style: italic; }

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* --- Affiliate & Ads --- */
.affiliate-inline {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.affiliate-inline:hover { color: var(--green-dark); }

.affiliate-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--green-light);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.affiliate-box-content p { margin: 0.25rem 0 0; font-size: 0.9rem; color: var(--text-light); }
.affiliate-btn { white-space: nowrap; font-size: 0.88rem; padding: 0.5rem 1.2rem; }

@media (max-width: 500px) {
  .affiliate-box { flex-direction: column; text-align: center; }
}

.recommended-tools {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.recommended-tools h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.tools-subtitle { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }

.tool-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
}
.tool-card:last-of-type { border-bottom: none; }
.tool-info { display: flex; flex-direction: column; gap: 0.15rem; }
.tool-info strong { font-size: 0.95rem; }
.tool-tagline { font-size: 0.82rem; color: var(--text-muted); }
.tool-cta {
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bg-white);
  background: var(--green);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.tool-cta:hover { background: var(--green-dark); color: var(--bg-white); }

.affiliate-disclosure {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.75rem;
}

.ad-slot { margin: 2rem 0; text-align: center; }
.ad-slot-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-light); }

@media (max-width: 500px) {
  .tool-card { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

/* --- Newsletter --- */
.newsletter-section {
  background: var(--green);
  padding: 3rem 0;
  text-align: center;
}
.newsletter-box {
  color: #fff;
}
.newsletter-box h3 { margin-bottom: 1rem; font-size: 1.5rem; }
.newsletter-box p { max-width: 650px; margin: 0 auto 0.75rem; opacity: 0.92; }
.newsletter-form { max-width: 480px; margin: 1.5rem auto 0; }
.newsletter-input-group {
  display: flex;
  gap: 0.5rem;
}
.newsletter-input-group input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-sans);
  background: #fff;
  color: var(--text);
  min-width: 0;
}
.newsletter-input-group input[type="email"]::placeholder { color: var(--text-muted); }
.newsletter-input-group input[type="email"]:focus { outline: none; border-color: var(--gold); }
.newsletter-input-group .btn { white-space: nowrap; padding: 0.75rem 1.5rem; font-size: 1rem; }
.newsletter-privacy {
  font-size: 0.78rem;
  opacity: 0.7;
  margin-top: 0.75rem;
}
.newsletter-privacy a { color: var(--gold-light); }

/* Newsletter inside articles */
.article-body-container .newsletter-section {
  border-radius: var(--radius);
  margin: 2.5rem -1.25rem;
  padding: 2rem 1.25rem;
}

@media (max-width: 500px) {
  .newsletter-input-group { flex-direction: column; }
  .article-body-container .newsletter-section { margin: 2.5rem 0; }
}

/* --- Consultancy CTA --- */
.consultancy-cta {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--gold-light);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
}
.consultancy-cta p { margin-bottom: 0.8rem; font-size: 0.95rem; }
.consultancy-cta .btn { font-size: 0.85rem; padding: 0.5rem 1.2rem; }

/* --- Social Share --- */
.social-share {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}
.share-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-light);
}
.share-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  transition: opacity 0.2s;
}
.share-btn:hover { opacity: 0.85; color: #fff; }
.share-fb { background: #1877F2; }
.share-tw { background: #1a1a1a; }
.share-wa { background: #25D366; }
.share-li { background: #0A66C2; }

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
