/* ============================================================
   Bhaktimarg — spiritual theme (self-contained)
   Palette taken from bhaktimarg.in: blue #4174a8, brick #b02b00.
   Fonts: Amita (headings) + Laila (body) with system fallback.
   ============================================================ */

:root {
    --c-blue: #4174a8;
    --c-blue-dark: #2f5a86;
    --c-brick: #b02b00;
    --c-brick-dark: #8a2200;
    --c-saffron: #e07a2c;
    --c-ink: #141414;
    --c-body: #111111;   /* body paragraphs — near-black for strong readability */
    --c-muted: #5a5a5a;
    --c-line: #e7e2d8;
    --c-bg: #ffffff;
    --c-soft: #fbf8f2;
    --c-soft2: #f5efe3;
    --c-gold: #d9a441;
    --c-head: #b02b00;   /* brick-red — all headings/titles (Astra heading-base-color) */

    --font-head: "Amita", "Laila", Georgia, "Noto Serif Devanagari", serif;
    --font-body: "Laila", "Noto Sans Devanagari", "Segoe UI", system-ui, sans-serif;

    --wrap: 1160px;
    --radius: 12px;
    --shadow: 0 8px 30px rgba(49, 49, 49, .08);
    --shadow-sm: 0 2px 10px rgba(49, 49, 49, .06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.85;
    color: var(--c-body);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-blue); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--c-brick); }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--c-head);
    line-height: 1.35;
    font-weight: 700;
    margin: 0 0 .6em;
    overflow-wrap: break-word;
}

/* Inline icons — always render at text size (never balloon to container width). */
.icon { width: 1em; height: 1em; flex: none; vertical-align: -0.14em; }

p { margin: 0 0 1.15em; font-weight: 500; }

.container {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: 20px;
}
/* Narrower reading column for long-form article bodies (blog posts, help articles) — without
   this, text stretches to the full 1160px site width, giving ~130+ char lines that are hard to
   read on tablet/desktop. 760px keeps Hindi prose to a comfortable measure. */
.container-narrow { max-width: 760px; }

.text-center { text-align: center; }
.text-muted { color: var(--c-muted); }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--c-brick); color: #fff; padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; border-radius: 6px; }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-body); font-weight: 600; font-size: .98rem;
    padding: 11px 22px; border-radius: 999px; border: 1.5px solid transparent;
    cursor: pointer; transition: all .18s ease; line-height: 1;
}
.btn--primary { background: var(--c-brick); color: #fff; }
.btn--primary:hover { background: var(--c-brick-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--c-blue); border-color: var(--c-blue); }
.btn--ghost:hover { background: var(--c-blue); color: #fff; }
.btn--lg { padding: 14px 30px; font-size: 1.05rem; }
.btn--block { width: 100%; justify-content: center; }
.btn svg { width: 18px; height: 18px; }

/* ---------------- Header ---------------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(150%) blur(6px);
    border-bottom: 1px solid var(--c-line);
    box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.topbar {
    background: var(--c-brick);
    color: #ffe9dd;
    font-size: .82rem;
    letter-spacing: .3px;
}
.topbar .container { display: flex; justify-content: center; align-items: center; gap: 10px; padding-block: 6px; }

.nav { display: flex; align-items: center; gap: 24px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; }
.brand__logo { height: 46px; width: auto; }

.nav-menu {
    list-style: none; display: flex; align-items: center; gap: 4px;
    margin: 0; padding: 0; margin-inline-start: auto;
}
.nav-link {
    display: inline-flex; align-items: center; gap: 5px;
    font-family: var(--font-body); font-weight: 600; font-size: .98rem;
    color: var(--c-ink); padding: 9px 14px; border-radius: 8px;
    position: relative;
}
.nav-link:hover, .nav-link.is-active { color: var(--c-blue); }

.nav-toggle {
    display: none; margin-inline-start: auto;
    width: 44px; height: 44px; border: 1px solid var(--c-line); border-radius: 10px;
    background: #fff; cursor: pointer; padding: 0; flex-direction: column;
    align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--c-ink); border-radius: 2px; transition: .2s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- Mobile nav ---------------- */
.mobile-nav {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 86vw);
    background: #fff; z-index: 130; transform: translateX(100%);
    transition: transform .28s ease; box-shadow: -12px 0 40px rgba(0,0,0,.14);
    padding: 78px 22px 30px; overflow-y: auto;
}
.mobile-nav.is-open { transform: translateX(0); }
.mobile-nav a { display: block; padding: 12px 8px; color: var(--c-ink); font-weight: 600; border-bottom: 1px solid var(--c-line); }
.mobile-nav a:hover { color: var(--c-brick); }
.mobile-nav .btn { margin-top: 18px; }
.nav-backdrop {
    position: fixed; inset: 0; background: rgba(30,20,10,.42); z-index: 120;
    opacity: 0; visibility: hidden; transition: opacity .25s ease;
}
.nav-backdrop.is-open { opacity: 1; visibility: visible; }

/* ---------------- Hero / banner ---------------- */
.hero {
    position: relative;
    background:
        linear-gradient(180deg, rgba(251,248,242,.4), rgba(245,239,227,.85)),
        radial-gradient(1200px 380px at 50% -60px, rgba(65,116,168,.10), transparent 70%);
    border-bottom: 1px solid var(--c-line);
    text-align: center;
    padding: 56px 0 46px;
    overflow: hidden;
}
.hero__om {
    font-family: var(--font-head);
    font-size: 2.4rem; color: var(--c-brick); margin-bottom: 6px;
    opacity: .9;
}
.hero h1 {
    font-size: clamp(1.9rem, 4.6vw, 3rem);
    color: var(--c-brick);
    margin: 0 auto .5rem;
    max-width: 900px;
}
.hero__lead { max-width: 760px; margin: 0 auto; color: var(--c-body); font-size: 1.08rem; }
.hero__rule {
    width: 120px; height: 3px; margin: 22px auto 0; border-radius: 3px;
    background: linear-gradient(90deg, transparent, var(--c-gold), transparent);
}
.hero__banner { max-width: 720px; margin: 30px auto 0; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Full-width homepage banner — edge to edge, like bhaktimarg.in */
.hero-banner { display: block; background: var(--c-soft); }
.hero-banner img { width: 100%; height: auto; display: block; }

/* Breadcrumbs */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: var(--c-muted); }
.crumbs a { color: var(--c-blue); }
.crumbs a:hover { color: var(--c-brick); }
.crumbs .icon { width: .7em; height: .7em; opacity: .5; }

/* Alternating image + text sections */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: center; }
.split__media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.split--rev .split__media { order: 2; }
.split__body h2 { text-align: center; margin-bottom: .5em; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.split__body p { text-align: justify; color: var(--c-body); }
@media (max-width: 820px) {
    .split { grid-template-columns: 1fr; gap: 24px; }
    .split--rev .split__media { order: 0; }
    .split__body p { text-align: left; }
}

/* Page title (category / post) — centered brick heading */
.page-title { text-align: center; padding: 46px 0 6px; }
.page-title h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0; }

/* Pagination */
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 46px; flex-wrap: wrap; }
.pager a, .pager span {
    min-width: 40px; height: 40px; padding: 0 12px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--c-line); font-weight: 600; color: var(--c-ink); background: #fff;
}
.pager a:hover { border-color: var(--c-blue); color: var(--c-blue); }
.pager .is-active { background: var(--c-blue); color: #fff; border-color: var(--c-blue); }
.pager .dots { border: 0; background: none; }

/* Prev / next post navigation */
.post-nav { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--c-line); margin-top: 34px; padding-top: 22px; }
.post-nav a { max-width: 46%; color: var(--c-blue); font-weight: 600; }
.post-nav a small { display: block; color: var(--c-muted); font-weight: 700; font-size: .7rem; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.post-nav .next { text-align: right; margin-inline-start: auto; }

/* Related posts — compact 4-up grid (landscape 16:9 image + title, like bhaktimarg.in) */
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.related-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.related-card__media { display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--c-soft2); }
.related-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-card h3 { font-size: .92rem; line-height: 1.5; margin: 0; padding: 12px 14px 16px; color: var(--c-brick); }
.related-card h3 a { color: var(--c-brick); }
.related-card h3 a:hover { color: var(--c-blue); }
@media (max-width: 900px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .related-grid { grid-template-columns: 1fr; } }

/* Featured image on a post */
.post-hero-img { max-width: 820px; margin: 8px auto 30px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.post-hero-img img { width: 100%; display: block; }

/* Article body typography */
.article { font-size: 1.06rem; }
.article > h1:first-child, .article > h2:first-child { margin-top: 0; }
.article h2 { font-size: 1.5rem; margin: 1.5em 0 .5em; }
.article h3 { font-size: 1.25rem; margin: 1.3em 0 .4em; }
.article p { margin: 0 0 1.1em; }
.article img { border-radius: 10px; margin: 20px auto; box-shadow: var(--shadow-sm); }
.article figure { margin: 20px 0; }
.article figcaption { text-align: center; color: var(--c-muted); font-size: .88rem; margin-top: 6px; }
.article ul, .article ol { padding-inline-start: 1.4em; margin: 0 0 1.15em; }
.article li { margin-bottom: .45em; }
.article a { color: var(--c-brick); font-weight: 600; }
.article a:hover { color: var(--c-blue); text-decoration: underline; }
.article blockquote { border-inline-start: 3px solid var(--c-gold); margin: 1.2em 0; padding: 6px 0 6px 18px; color: var(--c-ink); font-style: italic; background: var(--c-soft); border-radius: 0 8px 8px 0; }
.article table { width: 100%; border-collapse: collapse; margin: 1.2em 0; }
.article th, .article td { border: 1px solid var(--c-line); padding: 10px 12px; text-align: start; }
.article th { background: var(--c-soft2); }

/* ---------------- Sections ---------------- */
.section { padding: 60px 0; }
.section-head { max-width: 780px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { font-size: clamp(1.5rem, 3.4vw, 2.15rem); }
.eyebrow {
    display: inline-block; font-family: var(--font-body); font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase; font-size: .72rem;
    color: var(--c-brick); margin-bottom: 10px;
}

/* Devotional prose block */
.prose { margin-inline: auto; }
.prose h2 {
    text-align: center; margin-bottom: .7em; color: var(--c-head);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
}
.prose p { text-align: justify; color: var(--c-body); }
.prose .lead { font-size: 1.06rem; }

.divider-om {
    text-align: center; color: var(--c-brick); font-family: var(--font-head);
    font-size: 1.4rem; margin: 42px 0; opacity: .55;
    display: flex; align-items: center; gap: 16px; justify-content: center;
}
.divider-om::before, .divider-om::after {
    content: ""; height: 1px; width: min(120px, 22vw); background: var(--c-line);
}

/* ---------------- Blog cards ---------------- */
.blog-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
}
.post-card {
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card__media { display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--c-soft2); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-card__media img { transform: scale(1.05); }
.post-card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.post-card__cat {
    font-family: var(--font-body); font-weight: 700; font-size: .72rem; letter-spacing: 1px;
    text-transform: uppercase; color: var(--c-blue); margin-bottom: 8px;
}
.post-card__title { font-size: 1.12rem; line-height: 1.5; margin: 0 0 14px; }
.post-card__title a { color: var(--c-brick); }
.post-card__title a:hover { color: var(--c-blue); }
.post-card__more {
    margin-top: auto; font-weight: 600; color: var(--c-blue);
    display: inline-flex; align-items: center; gap: 6px;
}
.post-card__more svg { width: 16px; height: 16px; }

/* Hindi/English switcher on bilingual article & category pages — see _LanguageToggle.cshtml. */
.lang-toggle {
    display: inline-flex; align-items: center; gap: 2px; font-size: .82rem; font-weight: 700;
    border: 1px solid var(--c-line); border-radius: 999px; padding: 3px; background: var(--c-bg);
}
.lang-toggle__current, .lang-toggle__other {
    padding: 5px 14px; border-radius: 999px; line-height: 1.2;
}
.lang-toggle__current { background: var(--c-blue); color: #fff; }
.lang-toggle__other { color: var(--c-muted); text-decoration: none; }
.lang-toggle__other:hover { color: var(--c-blue); background: var(--c-soft2); }

/* ---------------- FAQ ---------------- */
.faq { max-width: 820px; margin-inline: auto; }
.faq__item { border: 1px solid var(--c-line); border-radius: 10px; margin-bottom: 12px; background: #fff; overflow: hidden; }
.faq__q {
    width: 100%; text-align: start; background: none; border: 0; cursor: pointer;
    font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; color: var(--c-blue);
    padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq__q .ic { flex: none; color: var(--c-brick); transition: transform .25s ease; font-size: 1.3rem; line-height: 1; }
.faq__item.is-open .faq__q .ic { transform: rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq__a-inner { padding: 0 20px 18px; color: var(--c-body); }

/* ---------------- Footer ---------------- */
.site-footer { background: #711a06; color: #e9ddcb; margin-top: 10px; }
.footer-top { padding: 46px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 36px; }
.footer-brand img { height: 52px; width: auto; margin-bottom: 14px; }
.site-footer p { color: #ffff; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; font-family: var(--font-head); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { color: #ffff; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1); text-align: center;
    padding: 18px 0; font-size: .9rem; color: #bcaf9a;
}
.footer-bottom a { color: var(--c-gold); }

/* ---------------- Reveal + spiritual motion ---------------- */
/* Only hide for animation when JS is active — never leave content permanently invisible. */
html.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,.61,.36,1); }
html.js [data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }

/* ॐ gently breathes */
@keyframes om-breathe { 0%,100% { transform: scale(1); opacity: .82; } 50% { transform: scale(1.08); opacity: 1; } }
.hero__om, .divider-om { animation: om-breathe 3.6s ease-in-out infinite; will-change: transform, opacity; }

/* Banner eases in on load */
@keyframes banner-in { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
.hero-banner img { animation: banner-in 1.1s ease both; }

/* Animated underline under nav links */
.nav-link::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px;
    background: var(--c-blue); border-radius: 2px; transform: scaleX(0); transform-origin: center;
    transition: transform .26s ease;
}
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }

/* Homepage split images lift softly on hover */
.split__media img { transition: transform .5s ease, box-shadow .5s ease; }
.split:hover .split__media img { transform: translateY(-6px); box-shadow: var(--shadow); }
.post-card__title a, .related-card h3 a { transition: color .2s ease; }

@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    .hero__om, .divider-om, .hero-banner img { animation: none; }
    .split:hover .split__media img { transform: none; }
    html { scroll-behavior: auto; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px) {
    .nav-menu { display: none; }
    .nav-toggle { display: flex; }
    .section { padding: 46px 0; }
}
@media (max-width: 560px) {
    body { font-size: 16px; }
    .blog-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 26px; }
    .prose p { text-align: left; }
    .prose h2, .split__body h2 { font-size: 1.3rem; }
    .section-head h2 { font-size: 1.45rem; }
    .hero h1 { font-size: 1.7rem; }
    .container { padding-inline: 16px; }
}

/* ---------------- Legacy marketing pages: graceful defaults ----------------
   The other (non-home) pages still use marketing markup; give them sane,
   readable defaults under the new theme so nothing looks broken. */
.section--ink { background: var(--c-blue-dark); color: #fff; }
.section--tight { padding: 34px 0; }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow-sm);
}
.card__link { color: var(--c-blue); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.h2 { font-family: var(--font-head); font-size: clamp(1.5rem, 3.4vw, 2.1rem); color: var(--c-head); }
.lead { font-size: 1.08rem; color: var(--c-body); }
.display { font-family: var(--font-head); font-size: clamp(2rem, 5vw, 3rem); color: var(--c-brick); }
@media (max-width: 780px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
