/* ══════════════════════════════════════════════════════════════════════════
   SRA-JHALAK.CSS — homepage preview cards ("एक झलक में")
   Small snippets of real results, swiped sideways; tapping one opens a sheet
   with the larger screenshots. Markup comes from sra-jhalak.js.
   ══════════════════════════════════════════════════════════════════════════ */
.jh { --jh-paper2: var(--sra-paper-2, #F3ECDF); --jh-vellum: var(--sra-vellum, #FFFDF8);
  --jh-ink: var(--sra-ink, #1F1A17); --jh-soft: var(--sra-ink-soft, #4A4038); --jh-muted: var(--sra-muted, #6E6257);
  --jh-kumkum: var(--sra-kumkum, #3A0D16); --jh-gold: var(--sra-gold-deep, #7A5A1C);
  --jh-hair: var(--sra-hair, rgba(122, 90, 28, .20)); --jh-hair2: var(--sra-hair-strong, rgba(122, 90, 28, .38));
  --jh-ease: cubic-bezier(.22, 1, .36, 1); --jh-gut: 16px;
  display: block; margin: 0 0 18px; color: var(--jh-ink); text-align: left; }
.jh *, .jh-sheet-root * { box-sizing: border-box; }

/* headings */
.jh .jh-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 8px; }
.jh .jh-label h2 { font-family: var(--sra-display, Georgia, serif) !important; font-size: 22px !important; font-weight: 700 !important;
  color: var(--jh-kumkum) !important; margin: 0 !important; line-height: 1.2 !important; }
.jh .jh-label small { font-size: 13px !important; color: var(--jh-muted) !important; white-space: nowrap; }
.jh .jh-sec { margin-top: 22px; }

/* sideways rows; a swipe inside never moves the page's own tab pager */
.jh .jh-rail { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  margin: 0 calc(-1 * var(--jh-gut)); padding: 2px var(--jh-gut) 6px; scroll-padding-left: var(--jh-gut); }
.jh .jh-rail::-webkit-scrollbar { display: none; }

/* one snippet tile */
.jh .jh-snip { flex: 0 0 auto; width: var(--tw, 164px); scroll-snap-align: start; padding: 0; margin: 0; min-height: 0;
  border: 1px solid var(--jh-hair) !important; border-radius: 12px !important; background: var(--jh-vellum) !important;
  text-align: left; cursor: pointer; overflow: hidden; font: inherit; color: inherit; box-shadow: none !important;
  transition: transform .2s var(--jh-ease); }
.jh .jh-snip:active { transform: scale(.97); }
.jh .jh-img { position: relative; height: var(--th, 120px); background: var(--jh-paper2); overflow: hidden; border-bottom: 1px solid var(--jh-hair); }
.jh .jh-img img { display: block; width: 100%; height: 100%; object-fit: var(--fit, cover); object-position: var(--pos, center top); }
.jh .jh-img.jh-contain { background: #FFFDF8; padding: 26px 8px 6px; }
.jh .jh-tag { position: absolute; left: 6px; top: 6px; font-size: 12px !important; font-weight: 600; color: var(--jh-kumkum) !important;
  background: rgba(255, 253, 248, .94); border: 1px solid var(--jh-hair); border-radius: 999px; padding: 2px 8px; line-height: 1.4;
  /* one line only: a longer translated label must not cover the snippet */
  max-width: calc(100% - 12px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jh .jh-cap { display: block; padding: 8px 10px 10px; font-size: 14px !important; line-height: 1.35 !important; color: var(--jh-ink) !important; }

/* tool cards */
.jh .jh-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.jh .jh-cards > * { min-width: 0; }
.jh .jh-card { background: var(--jh-vellum); border: 1px solid var(--jh-hair); border-radius: 16px; padding: 14px 0; overflow: hidden;
  box-shadow: 0 1px 2px rgba(58, 13, 22, .04), 0 10px 30px -14px rgba(58, 13, 22, .14);
  opacity: 0; transform: translateY(12px); transition: opacity .55s var(--jh-ease), transform .55s var(--jh-ease); }
.jh .jh-card.in { opacity: 1; transform: none; }
.jh .jh-head { padding: 0 14px; }
.jh .jh-head h3 { font-family: var(--sra-display, Georgia, serif) !important; font-size: 22px !important; font-weight: 700 !important;
  color: var(--jh-kumkum) !important; margin: 0 0 2px !important; line-height: 1.2 !important; }
.jh .jh-head p { margin: 0 0 10px !important; color: var(--jh-soft) !important; font-size: 15px !important; line-height: 1.45 !important; }
.jh .jh-card .jh-rail { margin: 0; padding: 2px 14px 4px; scroll-padding-left: 14px; --tw: 140px; --th: 102px; }
.jh .jh-card .jh-cap { padding: 6px 8px 8px; }
.jh .jh-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; padding: 10px 14px 0; }
.jh .jh-btn, .jh-sheet-root .jh-btn { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 14px;
  border-radius: 10px !important; font: 600 15px/1.2 var(--sra-body, system-ui, sans-serif) !important; text-decoration: none !important;
  cursor: pointer; text-align: center; box-shadow: none !important; }
.jh .jh-btn-main, .jh-sheet-root .jh-btn-main { background: var(--jh-kumkum, #3A0D16) !important; color: #FFFDF8 !important; border: 0 !important; }
.jh .jh-btn-quiet { background: transparent !important; color: var(--jh-kumkum) !important; border: 1px solid var(--jh-hair2) !important; }
[data-theme="night"] .jh .jh-btn-main, [data-theme="night"] .jh-sheet-root .jh-btn-main { color: #120E09 !important; }

/* desktop: wider tiles, the top row as a grid, cards side by side */
@media (min-width: 640px) { .jh .jh-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) {
  .jh { --jh-gut: 0px; }
  .jh .jh-top .jh-rail { flex-wrap: wrap; overflow: visible; margin: 0; padding: 2px 0 6px; --tw: calc((100% - 30px) / 4); --th: 132px; }
  .jh .jh-top .jh-snip:nth-child(n+9) { display: none; }
  .jh .jh-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .jh .jh-card .jh-rail { --tw: 150px; }
}

/* ── sheet ── */
.jh-sheet-root .jh-scrim { position: fixed; inset: 0; z-index: 10050; background: rgba(31, 26, 23, .45); opacity: 0; pointer-events: none; transition: opacity .25s; }
.jh-sheet-root .jh-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10051; max-width: 520px; margin: 0 auto; max-height: 92vh;
  display: flex; flex-direction: column; background: var(--sra-vellum, #FFFDF8); color: var(--sra-ink, #1F1A17);
  border-radius: 18px 18px 0 0; transform: translateY(102%); transition: transform .36s cubic-bezier(.22, 1, .36, 1);
  box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, .3); text-align: left; }
.jh-open .jh-sheet-root .jh-scrim { opacity: 1; pointer-events: auto; }
.jh-open .jh-sheet-root .jh-sheet { transform: none; }
@media (min-width: 980px) {
  .jh-sheet-root .jh-sheet { top: 50%; bottom: auto; border-radius: 18px; transform: translateY(-40%) scale(.98); opacity: 0; pointer-events: none;
    transition: transform .3s cubic-bezier(.22, 1, .36, 1), opacity .2s; }
  .jh-open .jh-sheet-root .jh-sheet { transform: translateY(-50%); opacity: 1; pointer-events: auto; }
}
.jh-sheet-root .jh-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--sra-hair-strong, rgba(122, 90, 28, .38)); margin: 10px auto 2px; }
.jh-sheet-root .jh-sh-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 0 18px; }
.jh-sheet-root .jh-sh-head h4 { margin: 0 !important; font-family: var(--sra-display, Georgia, serif) !important; font-size: 22px !important;
  font-weight: 700 !important; color: var(--sra-kumkum, #3A0D16) !important; }
.jh-sheet-root .jh-x { width: 44px; height: 44px; border: 0 !important; background: none !important; font-size: 26px !important; line-height: 1;
  color: var(--sra-muted, #6E6257) !important; cursor: pointer; box-shadow: none !important; }
.jh-sheet-root .jh-note { margin: 0 18px 6px; font-size: 13px !important; color: var(--sra-muted, #6E6257) !important; }
.jh-sheet-root .jh-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; flex: 1 1 auto; min-height: 0; }
.jh-sheet-root .jh-track::-webkit-scrollbar { display: none; }
.jh-sheet-root .jh-slide { flex: 0 0 100%; scroll-snap-align: center; padding: 4px 18px 0; display: flex; flex-direction: column; min-height: 0; margin: 0; }
.jh-sheet-root .jh-frame { flex: 1 1 auto; min-height: 0; max-height: 58vh; overflow: auto; border: 1px solid var(--sra-hair, rgba(122, 90, 28, .2));
  border-radius: 12px; background: var(--sra-paper-2, #F3ECDF); padding: 10px; }
.jh-sheet-root .jh-frame img { display: block; width: 100%; border-radius: 8px; }
.jh-sheet-root .jh-slide figcaption { margin: 10px 2px 0; font-size: 15px !important; line-height: 1.45; color: var(--sra-ink, #1F1A17) !important; min-height: 44px; }
.jh-sheet-root .jh-thumbs { display: flex; gap: 8px; padding: 10px 18px 0; overflow-x: auto; scrollbar-width: none; }
.jh-sheet-root .jh-thumbs::-webkit-scrollbar { display: none; }
.jh-sheet-root .jh-thumbs button { flex: 0 0 64px; height: 48px; min-height: 48px; padding: 0; border: 2px solid transparent; border-radius: 8px;
  overflow: hidden; background: var(--sra-paper-2, #F3ECDF); cursor: pointer; opacity: .6; box-shadow: none !important; }
.jh-sheet-root .jh-thumbs button.on { border-color: var(--sra-kumkum, #3A0D16); opacity: 1; }
.jh-sheet-root .jh-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.jh-sheet-root .jh-foot { padding: 10px 18px calc(16px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 44px 1fr 44px; gap: 10px; align-items: center; }
.jh-sheet-root .jh-foot > button { width: 44px; height: 46px; border: 1px solid var(--sra-hair-strong, rgba(122, 90, 28, .38)) !important; border-radius: 10px;
  background: none !important; font-size: 18px !important; color: var(--sra-kumkum, #3A0D16) !important; cursor: pointer; box-shadow: none !important; }
.jh-sheet-root .jh-foot > button:disabled { opacity: .3; cursor: default; }

/* the floating WhatsApp button would cover the sheet's buttons */
.jh-open #sra-wa-float-container, .jh-open #sra-wa-float-btn { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .jh .jh-card, .jh .jh-snip, .jh-sheet-root .jh-sheet, .jh-sheet-root .jh-scrim { transition: none !important; }
  .jh .jh-card { opacity: 1; transform: none; }
}
