/* ==========================================================================
   MyNaksh blog theme — synced to Figma (desktop 841-5212, mobile 841-4571)
   Fully server-rendered (Ghost/Handlebars). Mobile-first + responsive.
   Design tokens taken directly from the Figma Dev Mode export.
   ========================================================================== */

:root {
  --bg:        #ede5da;              /* page background */
  --ink:       #161a24;             /* primary text */
  --ink-80:    rgba(22,26,36,0.8);  /* muted text */
  --ink-60:    rgba(22,26,36,0.6);
  --paper:     #fbfaf8;             /* light / inverse text + surfaces */
  --brown:     #803003;             /* accent */
  --brown-10:  rgba(128,48,3,0.1);
  --border:    rgba(22,26,36,0.1);

  --maxw: 1128px;                   /* 1440 - 156*2 content padding */
  --r-sm: 12px;
  --r-md: 16px;
  --r-pill: 100px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================ PAGE TITLE ================================= */
.blog-head {
  padding: 32px 0 40px;
}
.blog-head__title { font-size: 40px; font-weight: 700; margin: 0 0 8px; color: var(--ink); }
.blog-head__subtitle { font-size: 24px; font-weight: 400; line-height: 40px; margin: 0; color: var(--ink); }

/* ============================ SECTION ==================================== */
.section { margin-bottom: 72px; }
.section__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.section__title { display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 600; color: var(--ink); }
.section__title .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brown); }
.section__viewall { display: inline-flex; align-items: center; gap: 4px; font-size: 16px; color: var(--ink); }
.section__viewall::after { content: "→"; }

/* Two-column: featured (left) + list (right) */
.section__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* ---- Featured hero card ---- */
.feature-card { display: flex; flex-direction: column; gap: 16px; }
.feature-card__img {
  width: 100%; aspect-ratio: 2 / 1; object-fit: cover;
  border-radius: var(--r-md); background: var(--brown-10);
}
.feature-card__title {
  font-size: 24px; font-weight: 600; line-height: 32px; margin: 0;
  color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.feature-card__excerpt {
  font-size: 16px; font-weight: 500; line-height: 24px; margin: 0;
  color: var(--ink-80);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 500; color: var(--ink-80); margin-top: 4px;
}
.card-meta__more { display: inline-flex; align-items: center; gap: 4px; }
.card-meta__more::after { content: "→"; }

/* ---- Compact list cards ---- */
.list-col { display: flex; flex-direction: column; gap: 24px; }
.mini-card { display: flex; gap: 16px; align-items: stretch; }
.mini-card__img {
  width: 132px; height: 100px; flex-shrink: 0; object-fit: cover;
  border-radius: var(--r-sm); background: var(--brown-10);
}
.mini-card__body { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; gap: 6px; }
.mini-card__title {
  font-size: 16px; font-weight: 600; line-height: 20px; margin: 0; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mini-card__excerpt {
  font-size: 14px; font-weight: 500; line-height: 20px; margin: 0; color: var(--ink-80);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mini-card__meta { font-size: 13px; color: var(--ink-80); margin: 0; }

/* ============================ DOWNLOAD APP BLOCK ======================== */
.download {
  background: var(--ink);
  border-radius: 32px;
  padding: 56px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  margin: 48px 0 72px;
}
.download__title { color: var(--paper); font-size: 20px; letter-spacing: 1px; text-transform: uppercase; margin: 0; }
.download__buttons { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* ============================ POST DETAIL =============================== */
.post-full { padding: 64px 0; }
.post-full__header { max-width: 760px; margin: 0 auto 32px; }
.post-full__tag { color: var(--brown); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; font-size: 14px; }
.post-full__title { font-size: clamp(28px, 4.5vw, 40px); font-weight: 700; margin: 12px 0; color: var(--ink); }
.post-full__meta { color: var(--ink-80); font-size: 14px; }
.post-full__feature { max-width: var(--maxw); margin: 0 auto 40px; border-radius: var(--r-md); overflow: hidden; }
.post-full__content { max-width: 720px; margin: 0 auto; font-size: 17px; color: var(--ink); }
.post-full__content h2, .post-full__content h3 { color: var(--ink); }
.post-full__content .kg-width-wide { max-width: 1040px; margin-left: auto; margin-right: auto; }
.post-full__content .kg-width-full { max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

/* Tables inside posts (dates, muhurat timings, rashi-wise effects) */
.post-full__content table, .gh-content table {
  width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 16px; line-height: 1.45;
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid #e4d9cb; border-radius: 10px; background: #fbfaf8;
}
.post-full__content thead, .gh-content thead { background: #7c5a3f; }
.post-full__content th, .gh-content th {
  color: #fff; font-weight: 600; text-align: left; padding: 10px 12px; white-space: nowrap;
}
.post-full__content td, .gh-content td {
  padding: 10px 12px; border-top: 1px solid #e4d9cb; vertical-align: top; text-align: left;
}
.post-full__content tbody tr:nth-child(even), .gh-content tbody tr:nth-child(even) { background: #f3ece1; }
.post-full__content td:first-child, .gh-content td:first-child { font-weight: 600; }
@media (max-width: 600px) {
  .post-full__content table, .gh-content table { font-size: 14px; }
  .post-full__content th, .post-full__content td, .gh-content th, .gh-content td { padding: 8px 9px; }
}
/* On wider screens use a real table so a short table still fills the full
   width (a display:block table shrinks to its content and leaves a gap). */
@media (min-width: 601px) {
  .post-full__content table, .gh-content table { display: table; border-collapse: separate; border-spacing: 0; overflow: hidden; }
  .post-full__content thead th:first-child, .gh-content thead th:first-child { border-top-left-radius: 9px; }
  .post-full__content thead th:last-child, .gh-content thead th:last-child { border-top-right-radius: 9px; }
  .post-full__content tbody tr:last-child td:first-child, .gh-content tbody tr:last-child td:first-child { border-bottom-left-radius: 9px; }
  .post-full__content tbody tr:last-child td:last-child, .gh-content tbody tr:last-child td:last-child { border-bottom-right-radius: 9px; }
}

.kg-image, .kg-image-card img { margin: 0 auto; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 10px; margin: 24px auto; max-width: 1040px; }
.kg-gallery-row { display: flex; gap: 10px; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }
.kg-bookmark-card { width: 100%; margin: 24px 0; }
.kg-bookmark-container { display: flex; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.kg-bookmark-content { padding: 20px; flex: 1; }
.kg-bookmark-thumbnail img { height: 100%; object-fit: cover; }

.pagination { display: flex; justify-content: center; gap: 16px; padding: 24px 0 64px; font-size: 15px; }
.pagination a { color: var(--brown); font-weight: 600; }

/* ============================ RESPONSIVE ================================ */
/* Tablet: stack the featured + list into one column */
@media (max-width: 900px) {
  .section__body { grid-template-columns: 1fr; }
  .blog-head { padding: 28px 0 32px; }
  .blog-head__title { font-size: 32px; }
  .blog-head__subtitle { font-size: 18px; line-height: 28px; }
}

/* Mobile (Figma 841-4571 ≈ 375px): smaller type, tighter, single column */
@media (max-width: 600px) {
  .container { padding: 0 16px; }

  .blog-head { padding: 20px 0 24px; }
  .blog-head__title { font-size: 24px; }
  .blog-head__subtitle { font-size: 14px; line-height: 22px; }

  .section { margin-bottom: 40px; }
  .section__title { font-size: 20px; }
  .section__viewall { font-size: 14px; }

  .feature-card__title { font-size: 18px; line-height: 24px; }
  .feature-card__excerpt { font-size: 14px; line-height: 20px; -webkit-line-clamp: 3; }

  .mini-card { gap: 12px; }
  .mini-card__img { width: 96px; height: 72px; border-radius: 8px; }
  .mini-card__title { font-size: 14px; line-height: 18px; }
  .mini-card__excerpt { display: none; }
  .mini-card__meta { font-size: 12px; }

  .download { padding: 40px 16px; border-radius: 20px; }
  .download__buttons { flex-direction: column; width: 100%; }

}

/* ==========================================================================
   Layout additions: header download btn, breadcrumb, pills, featured wide,
   card-grid (latest), related-row, footer store buttons.
   ========================================================================== */


/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 8px; padding: 24px 0 0; font-size: 14px; color: var(--ink-80); }
.breadcrumb a { color: var(--brown); }
.breadcrumb__sep { color: var(--ink-60); }
.breadcrumb__current { color: var(--ink); font-weight: 500; }

/* Tag pills */
.pill { align-self: flex-start; display: inline-block; font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--brown);
  background: var(--brown-10); padding: 4px 10px; border-radius: var(--r-pill); }
.pill--sm { font-size: 0.66rem; padding: 3px 8px; }

/* Featured — wide (image left, body right on desktop) */
.feature-card--wide { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center;
  background: var(--paper); border-radius: var(--r-md); overflow: hidden; padding: 0; }
.feature-card--wide .feature-card__img { aspect-ratio: 16/10; border-radius: 0; height: 100%; }
.feature-card--wide .feature-card__body { display: flex; flex-direction: column; gap: 14px; padding: 32px 32px 32px 0; }

/* Latest posts — responsive card grid (3-up) */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card { background: var(--paper); border-radius: var(--r-md); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(22,26,36,.10); }
.post-card__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--brown-10); }
.post-card__body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card__title { font-size: 18px; font-weight: 600; line-height: 24px; margin: 0; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card__excerpt { font-size: 14px; line-height: 20px; margin: 0; color: var(--ink-80); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card__meta { font-size: 13px; color: var(--ink-80); margin: 0; }

/* Related reads — horizontal mini-card row */
.related-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }


/* Responsive */
@media (max-width: 900px) {
  .feature-card--wide { grid-template-columns: 1fr; }
  .feature-card--wide .feature-card__img { aspect-ratio: 16/9; }
  .feature-card--wide .feature-card__body { padding: 20px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .related-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* ==========================================================================
   HEADER + FOOTER — synced with mynaksh.com (promo bar, navbar, mobile menu,
   starry footer with Download App card).
   ========================================================================== */
html { scroll-padding-top: 140px; }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 1000; }
.promo-bar {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--brown); color: var(--paper); padding: 10px 20px;
}
.promo-bar[hidden] { display: none; }
.promo-bar__text { font-size: 13px; text-align: center; line-height: 1.4; }
.promo-bar__text:hover { text-decoration: underline; }
.promo-bar__close {
  flex-shrink: 0; padding: 0 2px; border: 0; background: none; cursor: pointer;
  font-size: 18px; line-height: 1; color: rgba(251,250,248,0.6); transition: color .18s;
}
.promo-bar__close:hover { color: var(--paper); }

.site-nav {
  background: rgba(251,250,248,0.92);
  border-bottom: 1px solid rgba(22,26,36,0.08);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.site-nav__inner {
  max-width: 1220px; height: 74px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.site-nav__brand { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.site-nav__logo { width: 40px; height: 40px; object-fit: contain; }
.site-nav__name {
  font-family: Recoleta, 'Cormorant Garamond', Garamond, 'Times New Roman', serif;
  font-size: 24px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; color: var(--brown);
}
.site-nav__links { display: none; flex: 1; align-items: center; justify-content: center; gap: 4px; }
.site-nav__links a {
  padding: 8px 14px; border-radius: 20px; font-size: 16px; font-weight: 500;
  color: #4a3e2c; transition: color .18s;
}
.site-nav__links a:hover { color: var(--ink); }
.site-nav__links a { white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1199px) {
  .site-nav__links { gap: 2px; }
  .site-nav__links a { padding: 8px 9px; font-size: 15px; }
}
.site-nav__cta { display: none; flex-shrink: 0; align-items: center; gap: 8px; }
.site-nav__mobile { display: flex; flex-shrink: 0; align-items: center; gap: 8px; }
.site-nav__user {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(22,26,36,0.14); color: #4a3e2c;
}
.site-nav__user svg { width: 18px; height: 18px; }
.site-nav__toggle {
  display: flex; align-items: center; padding: 4px; border: 0; background: none;
  cursor: pointer; color: var(--ink);
}
.site-nav__toggle .icon-close { display: none; }
.site-nav__toggle.is-open .icon-open { display: none; }
.site-nav__toggle.is-open .icon-close { display: block; }

.site-nav__menu { display: flex; flex-direction: column; padding: 4px 20px 16px; }
.site-nav__menu[hidden] { display: none; }
.site-nav__menu > a:not(.pill-btn) { padding: 12px 0; font-size: 16px; font-weight: 500; color: var(--ink); }

.pill-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 36px;
  border-radius: var(--r-pill); font-size: 14px; white-space: nowrap; transition: background .18s;
}
.pill-btn--outline { padding: 0 18px; font-weight: 500; color: var(--ink); border: 1px solid rgba(22,26,36,0.14); }
.pill-btn--outline:hover { background: rgba(22,26,36,0.04); }
.pill-btn--solid { padding: 0 20px; font-weight: 600; background: var(--brown); color: var(--paper); }
.pill-btn--solid:hover { background: #6a2802; }
.pill-btn--block { width: 100%; height: 44px; margin-top: 8px; }

@media (min-width: 1024px) {
  .site-nav__brand { gap: 12px; }
  .site-nav__logo { width: 48px; height: 48px; }
  .site-nav__name { font-size: 30px; }
  .site-nav__links, .site-nav__cta { display: flex; }
  .site-nav__mobile, .site-nav__menu { display: none !important; }
}

/* ---- Footer ---- */
.site-footer {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  background: #16191f; color: #eae2d6; margin-top: 64px;
}
.site-footer::before {            /* navy wash */
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: rgba(25,41,76,0.92);
}
.site-footer::after {             /* star field */
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .75;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 90px 80px, #fff, transparent),
    radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,.9), transparent),
    radial-gradient(1px 1px at 60px 150px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 130px 20px, #e9d8ff, transparent),
    radial-gradient(2px 2px at 40px 90px, rgba(190,160,255,.8), transparent);
  background-size: 200px 200px, 260px 260px, 340px 340px, 180px 180px, 300px 300px, 420px 420px;
}
.site-footer__content {
  position: relative; z-index: 10; width: 100%; padding: 0 20px;
  display: flex; flex-direction: column; align-items: center;
}
.site-footer__logo-wrap { display: flex; justify-content: center; margin-bottom: 24px; padding-top: 40px; }
.site-footer__logo { width: 300px; max-width: 100%; max-height: 96px; object-fit: contain; }
.site-footer__middle { display: flex; flex-direction: column; align-items: center; gap: 32px; width: 100%; }

.download-card {
  width: 100%; max-width: 672px; margin: 16px auto 0; padding: 32px 24px;
  border: 1px solid rgba(255,255,255,0.25); border-radius: 28px;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.download-card__title {
  margin: 0; text-align: center; text-transform: uppercase; letter-spacing: .025em;
  font-size: 24px; color: #f3ece1;
}
.download-card__buttons { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.download-card__btn {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 16px 20px; border: 1px solid rgba(255,255,255,0.2); border-radius: 16px;
  background: rgba(255,255,255,0.06); color: #fff; transition: background .18s;
}
.download-card__btn:hover { background: rgba(255,255,255,0.1); }
.download-card__icon { flex-shrink: 0; display: inline-flex; }
.download-card__label { text-align: center; font-size: 15px; font-weight: 500; line-height: 1.35; }

.site-footer__links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 10px;
  text-transform: uppercase; letter-spacing: 2px; font-size: .85rem;
}
.site-footer__links a { transition: color .18s; }
.site-footer__links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.site-footer__links-break { width: 100%; height: 0; }

.site-footer__social-col { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 10px; }
.site-footer__legal { display: flex; gap: 10px; margin-bottom: 10px; font-size: .85rem; letter-spacing: 1px; }
.site-footer__legal a:hover { color: #f87171; }
.site-footer__social-text { margin: 0; padding-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; font-size: .85rem; }
.site-footer__social { display: flex; gap: 18px; }
.site-footer__social a {
  display: flex; align-items: center; justify-content: center; width: 50px; height: 50px;
  border-radius: 8px; background: #2d3a5a; font-size: 1rem; transition: background .18s, color .18s;
}
.site-footer__social a:hover { background: #eae2d6; color: #0d1833; }
.site-footer__copyright {
  text-align: center; letter-spacing: 2px; opacity: .7; font-size: .7rem; padding: 12px 0;
}

@media (min-width: 601px) {
  .download-card { padding: 32px 40px; }
  .download-card__title { font-size: 28px; }
  .download-card__buttons { flex-direction: row; }
  .download-card__label { font-size: 16px; }
  .site-footer__links { gap: 12px 18px; font-size: .8rem; }
  .site-footer__social { gap: 18px; }
  .site-footer__social a { border-radius: 15px; }
  .site-footer__social-text { font-size: .75rem; }
  .site-footer__copyright { font-size: .85rem; padding: 18px 0; }
}
@media (max-width: 600px) {
  .site-footer__content { padding: 0 20px 12px; }
  .site-footer__logo { max-width: 70vw; }
}
