/*
Theme Name: PaisaSach
Theme URI: https://paisasach.com
Description: PaisaSach — honest Hindi personal-finance theme. GeneratePress child with Devanagari typography, hub-grid homepage, and a clean, fast, professional article layout. Upload, activate, done.
Author: PaisaSach
Template: generatepress
Version: 1.5.1
Text Domain: paisasach
*/

/* ═══════════════════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════════════════ */
:root {
  --ps-navy:   #0f1e3d;   /* headings / footer / trust */
  --ps-green:  #0e7a4e;   /* refined emerald accent — premium */
  --ps-green-d:#0a5f3c;
  --ps-ink:    #23272e;   /* body text */
  --ps-muted:  #6b7280;
  --ps-line:   #e7e9ee;
  --ps-soft:   #f6f7f9;   /* section bg */
  --ps-soft2:  #eef1f5;
  --ps-radius: 14px;
  --ps-serif:  'Lora', 'Noto Serif Devanagari', Georgia, 'Times New Roman', serif;
  --ps-shadow: 0 1px 2px rgba(15,30,61,.04), 0 8px 24px rgba(15,30,61,.06);
  --ps-shadow-h: 0 6px 14px rgba(15,30,61,.08), 0 18px 40px rgba(15,30,61,.10);
  --ps-read: 47rem;       /* single-post reading column */
}

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY — Mukta (Devanagari + Latin)
   ═══════════════════════════════════════════════════════════════ */
/* Body = Mukta (best Hindi/Devanagari readability) */
body, button, input, select, textarea {
  font-family: 'Mukta', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', sans-serif !important;
}
/* Headings / brand / nav = Roboto for Latin (modern bold); Hindi auto-falls back to Mukta */
h1, h2, h3, h4, h5, h6,
.entry-title, .site-title, .site-title a, .main-title, .main-title a,
.ps-hero-h, .ps-hero-title, .ps-card-title, .ps-sec-head h2, .ps-sec-title,
.ps-footer-logo, .ps-footer-col h4,
.main-navigation a {
  font-family: 'Roboto', 'Mukta', 'Noto Sans Devanagari', system-ui, sans-serif !important;
}
.site-title a, .main-title { font-weight: 800 !important; letter-spacing: -0.01em; }

body {
  color: var(--ps-ink);
  font-size: 18px;
  line-height: 1.8;             /* Devanagari readability */
  background: #fcfcfb;          /* warm off-white — editorial elegance */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { color: var(--ps-navy); line-height: 1.3; font-weight: 800; letter-spacing: -0.01em; }

a { color: var(--ps-green); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--ps-green-d); }

/* ═══════════════════════════════════════════════════════════════
   HEADER + NAV — navy header, nav blends in (NO white box)
   ═══════════════════════════════════════════════════════════════ */
/* WHITE header — colourful navy+green logo poora dikhe, clean/premium look */
.site-header { background: #ffffff; border-bottom: 1px solid var(--ps-line); box-shadow: 0 1px 3px rgba(15,30,61,.04); }
.site-header .site-title a { color: var(--ps-navy); font-weight: 800; }
.site-header .site-description { color: var(--ps-muted); }
/* Logo size cap (chhota header → green line bhi text ke paas) */
.site-logo img, .header-image, .navigation-branding img, .site-header img { max-height: 46px !important; width: auto !important; }
/* Mobile hamburger toggle — visible navy icon (white box fix) */
.main-navigation .menu-toggle,
.main-navigation .menu-toggle .gp-icon,
.main-navigation .menu-toggle svg { color: var(--ps-navy) !important; fill: currentColor !important; }

/* Nav transparent + dark navy links on white (green on hover) */
.main-navigation,
.main-navigation .inside-navigation,
.main-navigation .main-nav > ul { background: transparent !important; }
.main-navigation .main-nav ul li a {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .015em;
  color: var(--ps-navy) !important;
  padding: 16px 16px 6px !important;   /* tight bottom → green line text ke bilkul paas */
}
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li.current-menu-item > a { color: var(--ps-green) !important; }
/* underline tight under the text (small gap) */
.main-navigation .main-nav > ul > li > a { position: relative; }
.main-navigation .main-nav > ul > li > a::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 2px; height: 2.5px;
  border-radius: 2px; background: var(--ps-green);
  transform: scaleX(0); transform-origin: center; transition: transform .22s ease;
}
.main-navigation .main-nav > ul > li > a:hover::after,
.main-navigation .main-nav > ul > li.current-menu-item > a::after { transform: scaleX(1); }
/* dropdown submenu — white, dark links */
.main-navigation .main-nav ul ul { background: #fff; border: 1px solid var(--ps-line); box-shadow: var(--ps-shadow); }
.main-navigation .main-nav ul ul li a { color: var(--ps-navy) !important; }
.main-navigation .main-nav ul ul li a:hover { color: var(--ps-green) !important; }
/* mobile menu toggle */
.main-navigation .menu-toggle { color: var(--ps-navy); }

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.ps-btn,
button, input[type="submit"], .wp-block-button__link, .button {
  background: var(--ps-green);
  color: #fff !important;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-weight: 700;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(21,146,79,.25);
  transition: background .15s ease, transform .1s ease;
}
.ps-btn:hover,
button:hover, input[type="submit"]:hover, .wp-block-button__link:hover, .button:hover {
  background: var(--ps-green-d); color: #fff !important; transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   HOMEPAGE — hero + sections
   ═══════════════════════════════════════════════════════════════ */
.ps-hero-title {
  font-size: clamp(30px, 4.5vw, 50px);
  font-weight: 800;
  line-height: 1.18;
  margin: .2em 0 .45em;
  text-align: center;
  letter-spacing: -0.02em;
}
.ps-hero-sub {
  font-size: clamp(16px, 2vw, 21px);
  color: var(--ps-muted);
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.4em;
  line-height: 1.6;
}
.ps-sec-title {
  font-size: clamp(23px, 3vw, 32px);
  text-align: center;
  margin: 2em 0 1em;
}
.ps-sec-title::after {
  content: ""; display: block; width: 56px; height: 4px;
  background: var(--ps-green); border-radius: 4px; margin: .55em auto 0;
}

/* Hub cards */
.ps-hubs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin: 0 0 1em;
}
.ps-hub {
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 20px;
  border: 1px solid var(--ps-line);
  border-radius: var(--ps-radius);
  background: #fff;
  box-shadow: var(--ps-shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ps-hub:hover {
  transform: translateY(-4px);
  box-shadow: var(--ps-shadow-h);
  border-color: rgba(21,146,79,.4);
}
.ps-hub-name  { font-weight: 700; color: var(--ps-navy); font-size: 18px; }
.ps-hub-count { font-size: 13px; color: var(--ps-muted); }

/* ═══════════════════════════════════════════════════════════════
   POST CARDS GRID  [paisasach_latest]
   ═══════════════════════════════════════════════════════════════ */
.ps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 26px;
}
.ps-card {
  border: 1px solid var(--ps-line);
  border-radius: var(--ps-radius);
  overflow: hidden;
  background: #fff;
  display: flex; flex-direction: column;
  box-shadow: var(--ps-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ps-card:hover { transform: translateY(-4px); box-shadow: var(--ps-shadow-h); }
.ps-card-imgwrap { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--ps-soft2); }
.ps-card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.ps-card:hover .ps-card-img { transform: scale(1.04); }
.ps-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 9px; }
.ps-card-cat {
  align-self: flex-start;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ps-green); background: rgba(21,146,79,.10);
  padding: 4px 10px; border-radius: 999px;
}
.ps-card-title { font-size: 20px; margin: 0; line-height: 1.34; font-weight: 700; }
.ps-card-title a { color: var(--ps-navy); }
.ps-card-title a:hover { color: var(--ps-green); }
.ps-card-ex { font-size: 15px; color: var(--ps-muted); margin: 0; line-height: 1.6; }
.ps-card-date { font-size: 13px; color: var(--ps-muted); margin-top: auto; padding-top: 4px; }

/* ═══════════════════════════════════════════════════════════════
   MAGAZINE HOMEPAGE — hero + category sections + image-forward cards
   ═══════════════════════════════════════════════════════════════ */
.ps-tagline { text-align: center; color: var(--ps-navy); font-size: clamp(23px, 3vw, 32px); font-weight: 800; line-height: 1.3; margin: .2em 0 1.3em; }
.ps-tagline::after { content: ""; display: block; width: 56px; height: 4px; background: var(--ps-green); border-radius: 4px; margin: .5em auto 0; }
.ps-mag { display: flex; flex-direction: column; gap: 2.4rem; }

/* category tag overlaid on image (newspaper style) */
.ps-card-imgwrap { position: relative; }
.ps-tag {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--ps-green); color: #fff;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 6px;
}
.ps-tag-hero { position: static; display: inline-block; margin-bottom: 12px; font-size: 12px; }
.ps-card-meta { font-size: 13px; color: var(--ps-muted); margin: 0; }
.ps-card-noimg { display: block; aspect-ratio: 16/9; background: linear-gradient(135deg, var(--ps-soft2), #dde4ee); }

/* HERO — big featured story */
.ps-hero {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: center;
  background: #fff; border: 1px solid var(--ps-line); border-radius: var(--ps-radius);
  overflow: hidden; box-shadow: var(--ps-shadow); transition: box-shadow .18s ease;
}
.ps-hero:hover { box-shadow: var(--ps-shadow-h); }
.ps-hero-imgwrap { aspect-ratio: 16/10; overflow: hidden; height: 100%; }
.ps-hero-img { width: 100%; height: 100%; object-fit: cover; }
.ps-hero-body { padding: 8px 28px 8px 0; }
.ps-hero-h { font-size: clamp(24px, 3vw, 34px); line-height: 1.22; margin: 0 0 .4em; color: var(--ps-navy); font-weight: 800; }
.ps-hero:hover .ps-hero-h { color: var(--ps-green); }
.ps-hero-ex { color: var(--ps-muted); font-size: 16px; line-height: 1.6; margin: 0 0 .8em; }

/* SECTION heading — "Investing & Wealth   सभी देखें →" */
.ps-mag-sec { }
.ps-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 1rem; border-bottom: 3px solid var(--ps-navy); padding-bottom: 8px; }
.ps-sec-head h2 { font-size: clamp(20px, 2.4vw, 26px); margin: 0; color: var(--ps-navy); font-weight: 800; }
.ps-sec-head a { font-size: 14px; font-weight: 700; color: var(--ps-green); white-space: nowrap; }
.ps-mag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

@media (max-width: 880px) {
  .ps-hero { grid-template-columns: 1fr; }
  .ps-hero-imgwrap { aspect-ratio: 16/9; }
  .ps-hero-body { padding: 0 20px 22px; }
  .ps-mag-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (max-width: 560px) {
  .ps-mag-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   BLOG ARCHIVE / CATEGORY (GeneratePress default markup → cards)
   ═══════════════════════════════════════════════════════════════ */
.archive .site-main, .blog .site-main { display: grid; gap: 26px; align-content: start; }
@media (min-width: 769px) {
  .archive .site-main, .blog .site-main { grid-template-columns: 1fr 1fr; align-items: start; }
}
/* category title + pagination = FULL WIDTH (na ki ek grid cell → no gap, no misalign) */
.archive .site-main > .page-header,
.blog .site-main > .page-header,
.archive .site-main > nav,
.blog .site-main > nav,
.archive .site-main > .paging-navigation,
.blog .site-main > .paging-navigation,
.archive .site-main > .generate-archive-title { grid-column: 1 / -1; }
/* clean category title (no box) */
.page-header { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 0 6px !important; }
.page-header .page-title, .page-header h1 { text-align: left; font-size: clamp(24px, 3vw, 32px); margin: 0; padding-bottom: 8px; border-bottom: 3px solid var(--ps-navy); }
.archive .site-main > .post,
.blog .site-main > .post {
  border: 1px solid var(--ps-line);
  border-radius: var(--ps-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--ps-shadow);
  margin-bottom: 0;
  transition: transform .18s ease, box-shadow .18s ease;
}
.archive .site-main > .post:hover,
.blog .site-main > .post:hover { transform: translateY(-4px); box-shadow: var(--ps-shadow-h); }
.archive .post-image, .blog .post-image { margin: 0; }
.archive .post-image img, .blog .post-image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.archive .inside-article, .blog .inside-article { padding: 20px 22px 22px; }
.archive .entry-title, .blog .entry-title { font-size: 21px; line-height: 1.32; }
.archive .entry-summary, .blog .entry-summary { color: var(--ps-muted); font-size: 15px; }

/* ═══════════════════════════════════════════════════════════════
   SINGLE POST — readable column + polished content
   ═══════════════════════════════════════════════════════════════ */
.single .entry-header,
.single .entry-content,
.single .entry-meta,
.single .post-navigation,
.single .comments-area { max-width: var(--ps-read); margin-inline: auto; }

.single .featured-image, .single .post-image { max-width: 920px; margin: 0 auto 2rem; }
.single .featured-image img, .single .post-image img { width: 100%; border-radius: var(--ps-radius); }

.single .entry-title { font-size: clamp(28px, 4vw, 42px); line-height: 1.22; margin: .2em 0 .35em; }
.single .entry-meta { color: var(--ps-muted); font-size: 14px; margin-bottom: 1.5rem; }
.single .entry-meta a { color: var(--ps-muted); }

.single .entry-content { font-size: 18.5px; }
.single .entry-content > * + * { margin-top: 1.15em; }
.single .entry-content h2 { margin-top: 1.9em; font-size: 28px; padding-bottom: .25em; border-bottom: 2px solid var(--ps-soft2); }
.single .entry-content h3 { margin-top: 1.5em; font-size: 22px; }
.single .entry-content p, .single .entry-content li { line-height: 1.9; }
.single .entry-content ul, .single .entry-content ol { padding-left: 1.3em; }
.single .entry-content li { margin: .4em 0; }
.single .entry-content li::marker { color: var(--ps-green); }
.single .entry-content img { border-radius: var(--ps-radius); }
.single .entry-content a { text-decoration: underline; text-underline-offset: 2px; }
.single .entry-content blockquote {
  border-left: 4px solid var(--ps-green); background: var(--ps-soft);
  margin: 1.6em 0; padding: 1em 1.3em; border-radius: 0 10px 10px 0; font-style: normal;
}
.single .entry-content table { width: 100%; border-collapse: collapse; font-size: 16px; }
.single .entry-content th, .single .entry-content td { border: 1px solid var(--ps-line); padding: 10px 12px; text-align: left; }
.single .entry-content th { background: var(--ps-soft); font-weight: 700; color: var(--ps-navy); }

/* Automation output blocks: related links + disclaimer */
.entry-content .related,
.entry-content .disclaimer { margin: 2.2em 0; padding: 22px 24px; border-radius: var(--ps-radius); }
.entry-content .related { background: var(--ps-soft); border: 1px solid var(--ps-line); }
.entry-content .related h2 { margin: 0 0 .6em; font-size: 21px; border: 0; padding: 0; }
.entry-content .related ul { margin: 0; padding-left: 1.2em; }
.entry-content .related li { margin: .35em 0; }
.entry-content .related a { color: var(--ps-green); font-weight: 600; }
.entry-content .disclaimer { background: #fff7ed; border: 1px solid #fed7aa; font-size: 15px; color: #7c4a13; }
.entry-content .disclaimer h2 { font-size: 16px; margin: 0 0 .4em; color: #9a3412; border: 0; padding: 0; }

/* After-content ad slot */
.ps-ad { margin: 2.2em auto; max-width: var(--ps-read); text-align: center; min-height: 90px; }

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR — Recent posts with thumbnails  [paisasach_recent]
   ═══════════════════════════════════════════════════════════════ */
.ps-recent { list-style: none; margin: 0; padding: 0; }
.ps-recent-item { margin: 0 0 14px; }
.ps-recent-item a { display: flex; gap: 12px; align-items: flex-start; }
.ps-recent-thumb { width: 64px; height: 64px; min-width: 64px; border-radius: 8px; object-fit: cover; }
.ps-recent-noimg { display: block; background: var(--ps-soft2); }
.ps-recent-body { display: flex; flex-direction: column; gap: 3px; }
.ps-recent-title { font-size: 14px; font-weight: 600; color: var(--ps-navy); line-height: 1.35; }
.ps-recent-item a:hover .ps-recent-title { color: var(--ps-green); }
.ps-recent-date { font-size: 12px; color: var(--ps-muted); }

/* ═══════════════════════════════════════════════════════════════
   FOOTER — full 4-column footer (rendered via generate_copyright)
   ═══════════════════════════════════════════════════════════════ */
.site-info { background: var(--ps-navy); color: #d3dae6; padding-block: 46px 22px; font-size: 15px; }
.site-info .inside-site-info { display: block; }     /* override GP flex */
.site-info .copyright { display: block; width: 100%; margin: 0; }

.ps-footer {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 40px;
  text-align: left;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.ps-footer-logo { font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 12px; letter-spacing: -.01em; }
.ps-footer-brand p { color: #c4cdda; font-size: 15px; line-height: 1.7; margin: 0 0 8px; max-width: 320px; }
.ps-footer-en { color: #9aa6bd !important; font-size: 13.5px !important; font-style: italic; margin-bottom: 12px !important; }
.ps-footer-mail a { color: #fff !important; font-weight: 600; }
.ps-social { display: flex; gap: 10px; margin-top: 14px; }
.ps-social a { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: rgba(255,255,255,.09); color: #c4cdda !important; transition: background .15s ease, color .15s ease, transform .1s ease; }
.ps-social a:hover { background: var(--ps-green); color: #fff !important; transform: translateY(-2px); }
.ps-social svg { width: 18px; height: 18px; display: block; }
.ps-footer-col h4 { color: #fff; font-size: 15px; margin: 0 0 14px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.ps-footer-col ul { list-style: none; margin: 0; padding: 0; }
.ps-footer-col li { margin: 9px 0; }
.ps-footer-col a { color: #c4cdda !important; font-size: 15px; line-height: 1.5; }
.ps-footer-col a:hover { color: #fff !important; }
.ps-footer-bottom { text-align: center; padding-top: 22px; font-size: 13.5px; color: #aab4c6; }

@media (max-width: 768px) {
  .ps-footer { grid-template-columns: 1fr 1fr; gap: 26px; }
  .ps-footer-brand { grid-column: 1 / -1; }
}

/* ═══════════════════════════════════════════════════════════════
   HOMEPAGE full-width (hubs/cards properly spread — no sidebar)
   ═══════════════════════════════════════════════════════════════ */
.home #right-sidebar { display: none; }
.home #primary,
.home .content-area { width: 100%; max-width: 100%; }
/* hide the redundant "Home" page title on the front page */
.home .entry-header,
.home .page-hero,
.home .entry-title { display: none; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  body { font-size: 17px; }
  .single .entry-content { font-size: 17px; }
  .single .entry-content h2 { font-size: 24px; }
  .ps-hubs { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ps-hub { padding: 16px 14px; }
  .main-navigation .main-nav ul li a { padding: 14px 16px !important; }
  /* mobile expanded menu — white bg so navy links stay readable over content */
  .main-navigation .main-nav > ul { background: #fff !important; border-top: 1px solid var(--ps-line); }
  /* smaller logo on phones */
  .site-logo img, .header-image, .navigation-branding img, .site-header img { max-height: 36px !important; }
  /* homepage heading — fit in ONE line on phones */
  .ps-tagline { font-size: 18px; }
}
@media (max-width: 400px) {
  .ps-tagline { font-size: 15.5px; }
}
