/* ============================================================================
   BHAKTI SAROVAR — SHARED DESIGN SYSTEM
   Deploy to: /assets/css/bs-design-system.css  (shared across ALL sub-sites)
   Sub-site-specific CSS lives in /[subsite]/assets/css/[subsite].css and may
   ONLY add; it must never redefine tokens or core components here.

   Source of truth: BHAKTISAROVAR-DESIGN-SYSTEM.md (tokens + 15 components).
   Canonical values are locked here — do not fork per sub-site.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. TOKENS
   ---------------------------------------------------------------------------- */
:root {
  /* Brand palette */
  --brand-indigo:  #1E0291;
  --brand-purple:  #560694;
  --brand-magenta: #9A0595;
  --brand-pink:    #CF57D7;
  --brand-cyan:    #77ADEC;

  /* Dark surfaces (heroes, featured, footers) */
  --deep:   #110d2b;
  --deep-2: #1a1340;
  --deep-3: #251858;

  /* Light surfaces */
  --cream:  #fff8ee;
  --paper:  #ffffff;
  --lav:    #f7ecff;
  --lav-2:  #efe3ff;

  /* Accent / highlight */
  --gold:    #f6b83f;
  --saffron: #ff9f1a;

  /* Text */
  --text:  #21152f;
  --muted: #776a88;

  /* Borders & effects */
  --line:        #eadcf5;
  --shadow:      0 18px 48px rgba(75,30,120,.12);
  --shadow-soft: 0 10px 30px rgba(69,30,120,.08);

  /* Layout */
  --radius:    22px;
  --container: 1120px;
  --header-h:  66px;

  /* Footer */
  --footer-bg:   #171033;
  --footer-text: #efe9ff;
  --footer-link: #c7bddf;

  /* Z-index scale (single source of truth for stacking) */
  --z-back-to-top: 80;
  --z-share:       90;
  --z-header:      100;
  --z-mobile-menu: 200;
}

/* ----------------------------------------------------------------------------
   2. RESET & BASE
   ---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", "Noto Sans Devanagari", "Mukta",
               Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background:
    linear-gradient(180deg, var(--cream) 0%, var(--paper) 28%,
                    #f3f0ff 64%, var(--cream) 100%);
  background-attachment: fixed;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
img { max-width: 100%; display: block; }
a { color: var(--brand-magenta); text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; }

/* Skip link (SEO rule 8) — first focusable element on every page */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--brand-purple); color: #fff;
  padding: 10px 18px; border-radius: 0 0 12px 0; font-weight: 800;
}
.skip:focus { left: 0; }

/* ----------------------------------------------------------------------------
   3. LAYOUT — container & grids
   ---------------------------------------------------------------------------- */
.container { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; }

.grid-3   { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4   { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.app-grid { display: grid; grid-template-columns: 1.05fr .95fr;   gap: 28px; }
.two-col  { display: grid; grid-template-columns: 1fr 1fr;        gap: 24px; }

/* ----------------------------------------------------------------------------
   4. TYPOGRAPHY HELPERS
   ---------------------------------------------------------------------------- */
.kicker {
  font-size: 12px; font-weight: 850; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand-magenta);
}
.h2 {
  font-size: clamp(30px, 4.4vw, 46px); font-weight: 900;
  letter-spacing: -.02em; color: var(--text);
}
.h2 .accent { color: var(--brand-magenta); }
.lead  { font-size: 16px; color: var(--text); }
.muted { font-size: 14px; color: var(--muted); }

/* Section pattern: 82px top padding, 0 bottom (DESIGN-SYSTEM §4) */
.section { padding: 82px 0 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 26px;
}
.section-head .see-all { font-weight: 850; color: var(--brand-magenta); white-space: nowrap; }

/* ----------------------------------------------------------------------------
   5. SITE HEADER (sticky, glass-blur)  — Component 1
   ---------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  height: var(--header-h);
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(86,6,148,.08);
}
.site-header .bar {
  height: 100%; display: flex; align-items: center; gap: 22px;
}
/* Logo: IMAGE ONLY — no brand-name text span beside it (DEV-SYSTEM brand rule) */
.brand-logo { display: inline-flex; align-items: center; }
.brand-logo img { width: 42px; height: 42px; object-fit: contain; }

.nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav-links > a, .nav-links > .nav-item > a {
  position: relative; color: var(--brand-purple); font-weight: 650; font-size: 14px;
  padding: 4px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: linear-gradient(90deg, var(--brand-purple), var(--brand-pink));
  transform: scaleX(0); transform-origin: left; transition: .22s;
}
.nav-links a:hover::after { transform: scaleX(1); }

/* Dropdown nav item (e.g. "मासिक त्योहार 2026") */
.nav-item { position: relative; }
.nav-item > a::after { display: none; }
.nav-menu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 230px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 8px; display: none; flex-direction: column;
}
.nav-item.open .nav-menu, .nav-item:focus-within .nav-menu { display: flex; }
.nav-menu a {
  padding: 9px 12px; border-radius: 10px; color: var(--text); font-size: 14px;
}
.nav-menu a:hover { background: var(--lav); }

/* Header search (pill) */
.header-search { position: relative; }
.header-search input {
  height: 40px; width: 230px; max-width: 38vw; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper);
  padding: 0 16px; font: inherit; color: var(--text);
}
.header-search input:focus { outline: 2px solid var(--brand-pink); outline-offset: 1px; }

/* Search results dropdown */
#search-results, #search-resultan {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  width: min(380px, 90vw); max-height: 70vh; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 8px; z-index: calc(var(--z-header) + 5);
}
#search-results.show, #search-resultan.show { display: block; }
.bs-search-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--text); }
.bs-search-item:hover { background: var(--lav); }
.bs-search-item img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; }
.bs-search-item strong { display: block; font-size: 14px; }
.bs-search-item span { font-size: 12px; color: var(--muted); }
.bs-search-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 14px; }
#search-resultan { left: 0; right: 0; width: 100%; }

/* Hamburger trigger (hidden on desktop) */
.nav-toggle {
  display: none; margin-left: auto; width: 40px; height: 40px;
  border: 0; background: transparent; cursor: pointer; color: var(--brand-purple);
}

/* ----------------------------------------------------------------------------
   6. MOBILE MENU (slide-in)  — Component 13
   ---------------------------------------------------------------------------- */
.menu-overlay {
  position: fixed; inset: 0; background: rgba(17,13,43,.5);
  opacity: 0; visibility: hidden; transition: .3s; z-index: var(--z-mobile-menu);
}
.menu-overlay.open { opacity: 1; visibility: visible; }
.mobile-menu {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(320px, 85vw);
  background: var(--paper); box-shadow: var(--shadow);
  transform: translateX(100%); transition: transform .3s ease;
  z-index: calc(var(--z-mobile-menu) + 1);
  display: flex; flex-direction: column; padding: 18px; overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu .mm-top { display: flex; align-items: center; justify-content: space-between; }
.mobile-menu .mm-top img { width: 32px; height: 32px; }
.mobile-menu .mm-close { border: 0; background: transparent; font-size: 26px; cursor: pointer; color: var(--text); line-height: 1; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.mobile-menu nav a { padding: 11px 8px; border-radius: 10px; color: var(--brand-purple); font-weight: 650; }
.mobile-menu nav a:hover { background: var(--lav); }
.mobile-menu .mm-sep { height: 1px; background: var(--line); margin: 14px 0; }
.mobile-menu .mm-social { display: flex; gap: 12px; }
.mobile-menu .mm-social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--lav); color: var(--brand-purple); }
body.menu-open { overflow: hidden; }

/* ----------------------------------------------------------------------------
   7. BUTTONS  — Component 8
   ---------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 13px 24px; font: inherit;
  font-weight: 800; cursor: pointer; transition: .22s ease; text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary  { background: linear-gradient(180deg, var(--gold), var(--saffron)); color: #3a2400; box-shadow: 0 12px 26px rgba(246,184,63,.32); }
.btn-gradient { background: linear-gradient(90deg, var(--brand-purple), var(--brand-magenta), var(--brand-cyan)); color: #fff; }
.btn-light    { background: var(--paper); color: var(--brand-purple); border: 1px solid var(--line); }
.btn-ghost-dark { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.55); }

/* ----------------------------------------------------------------------------
   8. CARDS  — Components 5 / 6
   ---------------------------------------------------------------------------- */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 28px;
}
.cat-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 24px;
  transition: .22s ease;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #e0c3f5; }
.cat-card .ico { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--lav-2), var(--lav)); font-size: 26px; }
.cat-card h3 { color: var(--brand-purple); font-size: 20px; font-weight: 900; margin-top: 14px; }
.cat-card .desc { color: var(--muted); font-size: 14px; min-height: 44px; }
.cat-card .mini-link { color: var(--brand-magenta); font-weight: 850; }

/* ----------------------------------------------------------------------------
   9. HERO base (dark, atmospheric)  — Component 2
   Sub-sites elaborate (rotating images, etc.) in their own CSS.
   ---------------------------------------------------------------------------- */
.hero {
  position: relative; min-height: 640px; color: #fff; overflow: hidden;
  background:
    radial-gradient(900px 520px at 18% 12%, rgba(154,5,149,.42), transparent 60%),
    radial-gradient(820px 520px at 84% 8%,  rgba(119,173,236,.30), transparent 60%),
    linear-gradient(160deg, var(--deep), var(--deep-2) 55%, var(--deep-3));
}
.hero::before { /* dot-grid overlay, faded at bottom */
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 35%, transparent 92%);
          mask-image: linear-gradient(180deg, #000 35%, transparent 92%);
  pointer-events: none;
}
.hero::after { /* bottom readability gradient */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%;
  background: linear-gradient(180deg, transparent, rgba(17,13,43,.65));
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(58px, 10vw, 126px); font-weight: 900; letter-spacing: -.04em;
  text-shadow: 0 0 56px rgba(207,87,215,.26);
}

/* ----------------------------------------------------------------------------
   10. FAQ ACCORDION  — Component 9
   ---------------------------------------------------------------------------- */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; background: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 850; color: var(--text); text-align: start;
}
.faq-mark { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--lav); color: var(--brand-purple); transition: transform .22s; }
.faq-item[open] .faq-mark, .faq-item.open .faq-mark { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; color: var(--muted); }
.faq-a > div { padding: 0 22px 18px; }
.faq-item.open .faq-a { max-height: 600px; }

/* ----------------------------------------------------------------------------
   11. SHARE BUTTONS  — Component 14
   Platforms (order): WhatsApp, Facebook, X, Pinterest, Copy.
   INCLUDE on content pages; EXCLUDE on landing/tool/listing pages.
   ---------------------------------------------------------------------------- */
.share-bar { position: fixed; left: 20px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: var(--z-share); }
.share-bar a, .share-bar button {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--line); cursor: pointer;
  transition: .22s ease; color: var(--brand-purple);
}
.share-bar a:hover, .share-bar button:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.share-bar .s-wa   { color: #25D366; }
.share-bar .s-fb   { color: #1877F2; }
.share-bar .s-x    { color: #000000; }
.share-bar .s-pin  { color: #E60023; }
.share-bar .s-copy { color: var(--brand-purple); }

.copy-toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(12px);
  background: var(--brand-purple); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-weight: 700; opacity: 0; pointer-events: none; transition: .25s; z-index: 999;
}
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ----------------------------------------------------------------------------
   12. BACK TO TOP  — Component 15
   ---------------------------------------------------------------------------- */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; width: 44px; height: 44px;
  border-radius: 50%; border: 0; cursor: pointer;
  background: var(--brand-purple); color: #fff; box-shadow: var(--shadow-soft);
  display: grid; place-items: center; z-index: var(--z-back-to-top);
  opacity: 0; visibility: hidden; transform: scale(.8); transition: .25s ease;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: scale(1); }
.back-to-top:hover { background: var(--brand-magenta); transform: translateY(-2px); }

/* ----------------------------------------------------------------------------
   13. FOOTER  — Component 12  (4-column Hindi)
   ---------------------------------------------------------------------------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); margin-top: 90px; }
.site-footer .footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; padding: 56px 0 30px;
}
.site-footer .f-logo img { width: 48px; height: 48px; }
.site-footer p { color: #b9add8; font-size: 14px; }
.site-footer h4 { color: var(--footer-text); font-size: 15px; font-weight: 850; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.site-footer a { color: var(--footer-link); font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-social { display: flex; gap: 14px; margin-top: 8px; }
.footer-social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255,255,255,.06); color: var(--footer-link); }
.footer-social a:hover { background: rgba(255,255,255,.14); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.09); text-align: center; padding: 18px 0;
  font-size: 13px; color: #a99ec9; }

/* ----------------------------------------------------------------------------
   14. AD SLOTS  — reserve height to protect CLS (AD-COMPLIANCE §5/§13)
   Render server-side as empty reserved boxes; network fills them later.
   Never place an ad before the first content; first in-content slot after ¶3.
   ---------------------------------------------------------------------------- */
.ad-slot { display: block; width: 100%; margin: 26px auto; text-align: center;
  overflow: hidden; min-height: 100px; /* reserved — prevents layout shift */ }
.ad-slot--inline { min-height: 280px; }   /* in-content rectangle */
.ad-slot--leaderboard { min-height: 90px; }
.ad-slot[data-empty="1"] { background: transparent; min-height: 0; margin: 0; }  /* collapse when unfilled */

/* ----------------------------------------------------------------------------
   15. ANIMATIONS
   ---------------------------------------------------------------------------- */
@keyframes flicker { from { opacity: .65; transform: translateY(0); } to { opacity: 1; transform: translateY(-7px); } }
.diya { animation: flicker 2.4s ease-in-out infinite alternate; }

/* ----------------------------------------------------------------------------
   16. RESPONSIVE BREAKPOINTS  — 960 / 640 (identical on every sub-site)
   ---------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .nav-links, .header-search { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .app-grid, .two-col { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
  .share-bar { /* becomes fixed bottom bar */
    left: 0; right: 0; top: auto; bottom: 0; transform: none; flex-direction: row;
    justify-content: center; gap: 14px; height: 52px; align-items: center;
    background: var(--paper); border-top: 1px solid var(--line);
  }
  .back-to-top { width: 40px; height: 40px; bottom: 70px; } /* clears mobile share bar */
}
@media (max-width: 640px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .site-footer .footer-grid { grid-template-columns: 1fr; }
  .hero { min-height: 620px; }
  .hero h1 { font-size: 56px; }
  .card, .cat-card { padding: 22px; }
}
