/* SA Festivals — vrat/tyohar calendar + "आज क्या पढ़ें" occasion line.
   Light = theme ke warm terra tones; dark = html.theme-dark ke --dm-* tokens. */

.sa-fest [hidden] { display: none !important; }

/* Theme content me elements float karte hain; flex/grid box (BFC) float ke bagal me
   sikud jata hai — isliye clear + float:none. */
.sa-fest .sa-fest__bar,
.sa-fest .sa-fest__panel,
.sa-fest .sa-fest__list,
.sa-fest .sa-section-head,
.sa-fest .sa-fest__month,
.sa-fest .sa-fest__empty,
.sa-fest .sa-fest__note {
  float: none !important;
  clear: both;
  width: auto;
}

/* Theme resets: bootx `ol li::before` FontAwesome arrow (!important) + li indent,
   aur content `p` par padding/center alignment. */
.sa-fest .sa-fest__list > li.sa-fest__item { padding: 14px 16px !important; }
.sa-fest .sa-fest__list > li.sa-fest__item::before { content: none !important; display: none !important; }
.sa-fest .sa-fest__body,
.sa-fest .sa-fest__body p { text-align: left; }
.sa-fest .sa-fest__body p,
.sa-fest .sa-fest__empty,
.sa-fest .sa-fest__note,
.sa-hero__box .sa-today-read__occasion { padding: 0 !important; }

/* ── Calendar section ─────────────────────────────────────────────── */
.sa-fest .sa-section-head { margin-bottom: 22px; }

.sa-fest__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 18px;
}
.sa-fest:not(.is-enhanced) .sa-fest__bar { display: none; }

.sa-fest__tabs,
.sa-fest__filter {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sa-fest__tabs::-webkit-scrollbar { display: none; }

.sa-fest__tabs button,
.sa-fest__filter button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 7px 16px;
  border: 1px solid rgba(160, 71, 29, .22);
  border-radius: 999px;
  background: rgba(255, 248, 238, .9);
  color: #7a3518;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.sa-fest__filter button {
  min-height: 34px;
  padding: 5px 13px;
  font-size: 13px;
  background: transparent;
}
.sa-fest__tabs button:hover,
.sa-fest__filter button:hover { border-color: rgba(160, 71, 29, .45); }
.sa-fest__tabs button[aria-selected="true"] {
  border-color: #a0471d;
  background: #a0471d;
  color: #fff;
}
.sa-fest__filter button[aria-pressed="true"] {
  border-color: rgba(160, 71, 29, .45);
  background: #fff1e3;
  color: #7a3518;
}
.sa-fest__tabs button:focus-visible,
.sa-fest__filter button:focus-visible,
.sa-fest__panel:focus-visible {
  outline: 2px solid rgba(232, 80, 30, .6);
  outline-offset: 3px;
}

.sa-fest__month {
  margin: 26px 0 12px;
  font-size: 19px;
  font-weight: 800;
}
.sa-fest__panel:first-of-type .sa-fest__month { margin-top: 0; }
.sa-fest.is-enhanced .sa-fest__month { display: none; }

.sa-fest__list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 768px) {
  .sa-fest__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
}

.sa-fest__item {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  margin: 0;
  border: 1px solid rgba(160, 71, 29, .16);
  border-radius: 14px;
  background: #fffdf9;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 4px 14px rgba(87, 43, 20, .05);
}

.sa-fest__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-right: 12px;
  border-right: 1px solid rgba(160, 71, 29, .16);
  line-height: 1.1;
}
.sa-fest__date strong {
  color: #a0471d;
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.sa-fest__date span {
  margin-top: 4px;
  color: #8a6f60;
  font-size: 12px;
  font-weight: 700;
}

.sa-fest__name {
  margin: 1px 0 3px;
  color: #3a1c10;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}
.sa-fest__name a { color: inherit; text-decoration: none; }
.sa-fest__name a:hover { color: #a0471d; text-decoration: underline; text-underline-offset: 3px; }

.sa-fest__tithi {
  margin: 0;
  color: #7d6457;
  font-size: 13px;
  line-height: 1.5;
}

.sa-fest__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.4;
}
.sa-fest__links a {
  color: #a0471d;
  font-weight: 700;
  text-decoration: none;
}
.sa-fest__links a:hover { text-decoration: underline; text-underline-offset: 3px; }

.sa-fest__badge {
  align-self: start;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fff1e3;
  color: #a0471d;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

/* Vrat: halka, taaki bade tyohar alag dikhें */
.sa-fest__item.is-vrat { background: rgba(255, 253, 249, .6); box-shadow: none; }
.sa-fest__item.is-vrat .sa-fest__date strong { color: #b07a5e; }
.sa-fest__item.is-vrat .sa-fest__name { font-weight: 700; font-size: 16px; }

.sa-fest__item.is-soon { border-color: rgba(160, 71, 29, .38); }
.sa-fest__item.is-today {
  border-color: #cb5333;
  box-shadow: 0 0 0 3px rgba(203, 83, 51, .14), 0 6px 18px rgba(87, 43, 20, .08);
}
.sa-fest__item.is-today .sa-fest__badge { background: #a0471d; color: #fff; }
.sa-fest__item.is-past { opacity: .55; }
.sa-fest__item.is-past .sa-fest__badge { background: transparent; color: #8a6f60; }

.sa-fest__empty,
.sa-fest__note { color: #7d6457; font-size: 13px; }
.sa-fest__empty { margin: 8px 0 0; }
.sa-fest__note { margin: 18px 0 0; text-align: center; }

@media (max-width: 480px) {
  .sa-fest__item { position: relative; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .sa-fest .sa-fest__list > li.sa-fest__item { padding: 13px 14px !important; }
  .sa-fest__badge { position: absolute; top: 12px; right: 12px; }
  .sa-fest__item:has(.sa-fest__badge) .sa-fest__name { padding-right: 76px; }
  .sa-fest__date strong { font-size: 23px; }
}

/* ── Hero "आज क्या पढ़ें" — occasion chips ──────────────────────────── */
.sa-today-read__occasion {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -6px 0 10px !important;
  max-width: none !important;
}
.sa-today-read__occasion a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid rgba(255, 210, 160, .35);
  border-radius: 999px;
  background: rgba(255, 190, 120, .12);
  color: #ffe9d2 !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none !important;
}
.sa-today-read__occasion b { color: #ffc27f; font-weight: 800; }
.sa-today-read__occasion a:hover { border-color: rgba(255, 210, 160, .6); background: rgba(255, 190, 120, .2); }

/* ── Dark mode ───────────────────────────────────────────────────── */
html.theme-dark .sa-fest__tabs button,
html.theme-dark .sa-fest__filter button {
  border-color: var(--dm-sf-15);
  background: var(--dm-bg-surface);
  color: var(--dm-saffron-primary);
}
html.theme-dark .sa-fest__filter button { background: transparent; }
html.theme-dark .sa-fest__tabs button:hover,
html.theme-dark .sa-fest__filter button:hover { border-color: var(--dm-sf-40); }
html.theme-dark .sa-fest__tabs button[aria-selected="true"] {
  border-color: transparent;
  background: linear-gradient(135deg, var(--dm-saffron-light), var(--dm-saffron-primary), var(--dm-saffron-darker));
  color: var(--dm-text-bright);
}
html.theme-dark .sa-fest__filter button[aria-pressed="true"] {
  border-color: var(--dm-sf-40);
  background: var(--dm-sf-15);
  color: var(--dm-saffron-light);
}
html.theme-dark .sa-fest__item {
  border-color: var(--dm-sf-15);
  background: var(--dm-bg-secondary);
  box-shadow: 0 6px 20px var(--dm-black-04, rgba(0, 0, 0, .4));
}
html.theme-dark .sa-fest__item.is-vrat { background: var(--dm-nav-40); box-shadow: none; }
html.theme-dark .sa-fest__date { border-right-color: var(--dm-sf-15); }
html.theme-dark .sa-fest__date strong { color: var(--dm-saffron-primary); }
html.theme-dark .sa-fest__item.is-vrat .sa-fest__date strong { color: var(--dm-saffron-light); }
html.theme-dark .sa-fest__date span,
html.theme-dark .sa-fest__tithi,
html.theme-dark .sa-fest__empty,
html.theme-dark .sa-fest__note { color: var(--dm-tx-60); }
html.theme-dark .sa-fest__name { color: var(--dm-text-primary); }
html.theme-dark .sa-fest__name a:hover,
html.theme-dark .sa-fest__links a { color: var(--dm-saffron-primary); }
html.theme-dark .sa-fest__badge { background: var(--dm-sf-15); color: var(--dm-saffron-light); }
html.theme-dark .sa-fest__item.is-soon { border-color: var(--dm-sf-40); }
html.theme-dark .sa-fest__item.is-today {
  border-color: var(--dm-saffron-primary);
  box-shadow: 0 0 0 3px var(--dm-sf-20), 0 8px 24px rgba(0, 0, 0, .35);
}
html.theme-dark .sa-fest__item.is-today .sa-fest__badge { background: var(--dm-saffron-primary); color: var(--dm-saffron-contrast, #120e06); }
html.theme-dark .sa-fest__item.is-past .sa-fest__badge { background: transparent; color: var(--dm-tx-60); }

/* ── "आज का पर्व" — naamjap section ke side me theme card (.sa-path-box) ── */
.sa-jap-layout {
  display: grid;
  gap: 18px;
  clear: both;
}
@media (min-width: 900px) {
  .sa-jap-layout {
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
  }
  /* Card left me; DOM me baad me hai taaki mobile par naamjap content pehle rahe. */
  .sa-jap-layout > .sa-fest-slot { grid-column: 1; grid-row: 1; position: relative; min-height: 0; }
  .sa-jap-layout > .sa-chant-box { grid-column: 2; grid-row: 1; }
  /* Card slot me absolute — isse row ki height naamjap box tay karta hai aur
     lambi list card ke andar scroll hoti hai. */
  .sa-jap-layout > .sa-fest-slot > .sa-fest-today {
    /* Theme ka `html.theme-dark body.home .sa-card { position: relative }` zyada
       specific hai, isliye !important. */
    position: absolute !important;
    inset: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }
  .sa-jap-layout > .sa-fest-slot > .sa-fest-today ul {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 12px;
    overscroll-behavior: contain;
  }
}

.sa-fest-today { display: flow-root; text-align: left; }

/* Har parv apne box me (theme ki .sa-sankalp-list ka look). */
.sa-fest-today__list { margin: 16px 0 0; padding: 0; gap: 12px; }
.sa-fest-today__list > li {
  float: none !important;
  width: auto !important;
  padding: 13px 15px !important;
}
.sa-fest-today__list > li::before { content: none !important; display: none !important; }

.sa-fest-today__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.sa-fest-today__name { font-size: 17px; font-weight: 800; line-height: 1.4; }
.sa-fest-today__badge {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: #a0471d;
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}
.sa-fest-today__meta {
  display: block;
  margin-top: 6px;
  color: #7d6457;
  font-size: 13px;
  line-height: 1.55;
}
.sa-fest-today__links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}
.sa-fest-today__links a {
  padding: 3px 11px;
  border: 1px solid rgba(160, 71, 29, .22);
  border-radius: 999px;
  background: rgba(255, 248, 238, .8);
  font-size: 12.5px !important;
  font-weight: 700;
  line-height: 1.6 !important;
}
.sa-fest-today__links a:hover { border-color: rgba(160, 71, 29, .5); background: #fff1e3; }
.sa-fest-today__empty { margin-top: 12px; }

/* Scrollbar */
.sa-fest-today ul { scrollbar-width: thin; scrollbar-color: rgba(160, 71, 29, .35) transparent; }
.sa-fest-today ul::-webkit-scrollbar { width: 6px; }
.sa-fest-today ul::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(160, 71, 29, .3); }
.sa-fest-today ul::-webkit-scrollbar-track { background: transparent; }
/* Mobile par card stack hota hai — list bahut lambi na ho. */
@media (max-width: 899px) {
  .sa-fest-today ul { max-height: 430px; overflow-y: auto; padding-right: 10px; }
}

html.theme-dark .sa-fest-today__meta { color: var(--dm-tx-60); }
html.theme-dark .sa-fest-today__badge { background: var(--dm-saffron-primary); color: var(--dm-saffron-contrast, #120e06); }
html.theme-dark .sa-fest-today__links a {
  border-color: var(--dm-sf-15);
  background: var(--dm-nav-55);
  color: var(--dm-saffron-primary) !important;
}
html.theme-dark .sa-fest-today__links a:hover { border-color: var(--dm-sf-40); background: var(--dm-sf-15); }
html.theme-dark .sa-fest-today ul { scrollbar-color: var(--dm-sf-40) transparent; }
html.theme-dark .sa-fest-today ul::-webkit-scrollbar-thumb { background: var(--dm-sf-40); }

/* ── Mobile hero: heading → "नामजप करें" → "आज क्या पढ़ें" box → paragraph ──
   Box aur buttons .sa-hero__content ke bhai/bachche hain, isliye content aur
   buttons ko display:contents karke sabko grid item banaya, phir order diya.
   Sirf naamjap button dikhta hai; "आरती" aur "होरा" ke link neeche paragraph me
   waise hi maujood hain, isliye koi internal link kam nahi hui.
   Theme ka hero 991px se single-column hai. */
@media (max-width: 991px) {
  /* Compact hero: kam padding/gap, taaki "आज क्या पढ़ें" jaldi dikhe. */
  .sa-hero { padding: 26px 15px 44px !important; }
  .sa-hero .sa-hero__wrap { gap: 12px; }
  .sa-hero .sa-hero__eyebrow { padding: 7px 13px; font-size: 13px; }
  /* Theme ke minify.css me h1 par line-height !important hai — sirf hero ke
     liye thoda tight. */
  .sa-hero .sa-hero__content > h1 { line-height: 1.24 !important; margin-bottom: 0 !important; }
  .sa-hero .sa-hero__box { padding: 20px !important; }
  .sa-hero .sa-hero__content,
  .sa-hero .sa-hero__buttons { display: contents; }
  .sa-hero .sa-hero__eyebrow { order: 1; margin-bottom: 0; }
  .sa-hero .sa-hero__content > h1 { order: 2; margin-bottom: 0; }
  .sa-hero .sa-hero__buttons br { display: none; }
  .sa-hero .sa-hero__buttons .sa-btn:not([href*="naamjap"]) { display: none; }
  .sa-hero .sa-hero__buttons .sa-btn[href*="naamjap"] {
    order: 3;
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 10px 16px;
    font-size: 15px;
    text-align: center;
  }
  .sa-hero .sa-hero__box { order: 4; }
  .sa-hero .sa-hero__content > p { order: 5; margin-bottom: 0; }

  /* Akela CTA hai, isliye "आरती पढ़ें" wala highlight look. Theme ke apne
     primary tokens use kiye hain taaki theme badle to ye bhi saath badle. */
  .sa-hero .sa-hero__buttons .sa-btn[href*="naamjap"] {
    background: linear-gradient(180deg, #B62829, #8D2022) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    border: none !important;
    box-shadow: 0 10px 24px rgba(67, 10, 10, .18) !important;
  }
  html.theme-dark .sa-hero .sa-hero__buttons .sa-btn[href*="naamjap"] {
    background: var(--dm-btn-primary-bg) !important;
    color: #3d1806 !important;
    -webkit-text-fill-color: #3d1806 !important;
    border: 1px solid rgba(255, 224, 163, .55) !important;
    box-shadow: 0 4px 14px var(--dm-sf-40),
      inset 0 1px 0 rgba(255, 240, 205, .55),
      inset 0 -2px 3px var(--dm-black-025) !important;
  }
}
