/* ============================================================
   Kriya Learn — shared styles for hub + per-trope deep pages
   ============================================================ */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif; color: #1f2937; margin: 0; background: #f7f8fb; }
a { color: #1C47A5; }

/* ── BACK BAR (sits between site header and hero on detail pages) ── */
.back-bar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 14px 24px;
}
.back-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: linear-gradient(135deg, #5E90E3, #1C47A5);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .6px;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(28,71,165,.18);
  transition: transform .12s ease, box-shadow .12s ease;
}
.back-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(28,71,165,.28); }
.back-btn .arrow { font-size: 18px; line-height: 1; }
@media (max-width: 720px) {
  .back-bar { padding: 12px 16px; }
  .back-btn { padding: 10px 18px; font-size: 13px; }
}

/* ── HUB HERO ──────────────────────────────────────────────── */
.learn-hero {
  background: linear-gradient(135deg, #1C47A5 0%, #5E90E3 60%, #6ec1e4 100%);
  color: #fff;
  padding: 64px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.learn-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,.10), transparent 40%),
                    radial-gradient(circle at 80% 70%, rgba(255,255,255,.08), transparent 45%);
  pointer-events: none;
}
.learn-hero-inner { max-width: 880px; margin: 0 auto; position: relative; }
.learn-hero h1 {
  font-size: 38px;
  font-weight: 300;
  letter-spacing: 2px;
  margin: 0 0 14px;
}
.learn-hero p {
  font-size: 16px;
  line-height: 1.7;
  font-weight: 300;
  max-width: 640px;
  margin: 0 auto;
  opacity: .94;
}

/* ── "START HERE" ──────────────────────────────────────────── */
.start-here {
  max-width: 1100px;
  margin: -40px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}
.start-here-inner {
  background: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 10px 32px rgba(28,71,165,.12);
}
.start-here h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #1C47A5;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.start-here-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.start-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f0f6ff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #1C47A5;
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.start-chip:hover { background: #dbeafe; transform: translateY(-1px); }
.start-chip .chip-glyph {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 18px;
  direction: rtl;
}

/* ── GRID ──────────────────────────────────────────────────── */
.learn-grid-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 50px 24px 70px;
}
.learn-grid-section h2 {
  font-size: 22px;
  font-weight: 600;
  color: #1C47A5;
  margin: 0 0 22px;
  letter-spacing: .5px;
}
.learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.learn-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(28,71,165,.06);
  border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.learn-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(28,71,165,.12); border-color: #5E90E3; }
.learn-card-link { text-decoration: none; color: inherit; }
.learn-card-link:hover { text-decoration: none; }
.learn-card .card-glyph {
  font-family: 'Frank Ruhl Libre', 'Times New Roman', serif;
  font-size: 44px;
  line-height: 1;
  direction: rtl;
  text-align: center;
  padding: 8px 0;
  background: linear-gradient(180deg, #fafbff 0%, #f1f5fb 100%);
  border-radius: 10px;
}
.learn-card .card-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}
.learn-card .card-name-he {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 24px;
  font-weight: 600;
  color: #1C47A5;
  direction: rtl;
  line-height: 1.15;
}
.learn-card .card-name-en {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #6b7280;
}
.learn-card .card-type {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
  width: fit-content;
}
.card-type.disjunctive { background: #fee2e2; color: #b91c1c; }
.card-type.conjunctive { background: #dbeafe; color: #1e40af; }
.learn-card .card-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #4b5563;
  margin: 0;
}
.learn-card .card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
  font-size: 11px;
  color: #6b7280;
  letter-spacing: .3px;
}
.learn-card .card-rarity {
  font-style: italic;
  text-transform: capitalize;
}
.learn-card .card-link {
  color: #5E90E3;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .3px;
}
.learn-card .card-link:hover { text-decoration: underline; }
.learn-card .card-link.disabled {
  color: #9ca3af;
  font-weight: 500;
  font-style: italic;
  pointer-events: none;
}

.learn-grid-followup {
  text-align: center;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}
.grid-followup-link {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, #f0f6ff 0%, #dbeafe 100%);
  color: #1C47A5;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .3px;
  border: 1px solid #bfdbfe;
  transition: transform .12s ease;
}
.grid-followup-link:hover { transform: translateY(-1px); }

/* ── DETAIL PAGE ───────────────────────────────────────────── */
.detail-hero {
  background: linear-gradient(135deg, #1C47A5 0%, #5E90E3 100%);
  color: #fff;
  padding: 50px 24px 60px;
  text-align: center;
}
.detail-hero-inner { max-width: 720px; margin: 0 auto; }
.detail-glyph {
  font-family: 'Frank Ruhl Libre', 'Times New Roman', serif;
  font-size: 110px;
  direction: rtl;
  line-height: 1;
  margin-bottom: 10px;
  text-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.detail-hero h1 {
  margin: 0 0 4px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.detail-hero h1 .he-name {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 58px;
  font-weight: 500;
  direction: rtl;
  line-height: 1.05;
}
.detail-hero h1 .en-name {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: .85;
}
.detail-hero .type-chip {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  font-weight: 700;
}

.detail-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 30px;
}
.detail-body h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1C47A5;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 28px 0 10px;
}
.detail-body h2:first-of-type { margin-top: 0; }
.detail-body p, .detail-body li {
  font-size: 16px;
  line-height: 1.75;
  color: #374151;
}
.detail-body ul { margin: 8px 0 0; padding-left: 22px; }
.detail-pasuk {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 30px;
  line-height: 2;
  text-align: center;
  direction: rtl;
  padding: 20px;
  background: linear-gradient(180deg, #fafbff 0%, #f1f5fb 100%);
  border-radius: 12px;
  margin: 12px 0;
}
.detail-pasuk .hl {
  background: #fef3c7;
  border-radius: 6px;
  padding: 0 4px;
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}
.detail-pasuk-ref {
  text-align: center;
  font-size: 12px;
  letter-spacing: 1px;
  color: #6b7280;
  text-transform: uppercase;
  font-weight: 700;
}
.detail-callout {
  background: #f0f6ff;
  border-left: 4px solid #5E90E3;
  padding: 14px 18px;
  border-radius: 8px;
  margin: 14px 0;
}
.detail-callout p { margin: 0; font-size: 15px; }
.detail-callout strong { color: #1C47A5; }

/* AUDIO placeholder block on detail pages */
.detail-audio {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 8px;
}
.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #6b7280;
  cursor: not-allowed;
  letter-spacing: .3px;
}
.audio-btn .audio-icon { color: #9ca3af; font-size: 13px; }
.audio-btn-active {
  background: linear-gradient(135deg, #5E90E3, #1C47A5);
  color: #fff;
  border-color: transparent;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(28,71,165,.18);
  transition: transform .12s ease, box-shadow .12s ease;
}
.audio-btn-active:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(28,71,165,.28); }
.audio-btn-active:active { transform: translateY(0); }
.audio-btn-active .audio-icon { color: #fff; font-size: 14px; }
.audio-btn-active.playing { background: linear-gradient(135deg, #047857, #064e3b); }
.audio-note { font-size: 13px; color: #6b7280; margin: 10px 0 0; line-height: 1.55; }
.audio-note a { color: #5E90E3; text-decoration: none; }
.audio-note a:hover { text-decoration: underline; }

/* SIMANIM cross-link block */
.detail-simanim {
  margin-top: 6px;
}
.simanim-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 18px;
  background: linear-gradient(135deg, #f0f6ff 0%, #dbeafe 100%);
  color: #1C47A5;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .3px;
  text-decoration: none;
  border: 1px solid #bfdbfe;
  transition: transform .12s ease, box-shadow .12s ease;
}
.simanim-link:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(28,71,165,.1); }

.confused-with {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.confused-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  text-decoration: none;
  color: #1C47A5;
  font-weight: 600;
  font-size: 14px;
  transition: all .15s ease;
}
.confused-chip:hover { border-color: #5E90E3; background: #f0f6ff; }
.confused-chip .chip-glyph {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 20px;
  direction: rtl;
}

/* ── PREV/NEXT NAV ─────────────────────────────────────────── */
.prevnext {
  max-width: 760px;
  margin: 30px auto 60px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.prevnext a {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: #1C47A5;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(28,71,165,.06);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.prevnext a:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(28,71,165,.12); }
.prevnext a.next { text-align: right; }
.prevnext .pn-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 700;
}
.prevnext .pn-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .3px;
}

/* ── CONTINUE PRACTICING BAR (sticky bottom) ───────────────── */
.continue-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 16px rgba(0,0,0,.06);
  padding: 10px 20px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  z-index: 800;
  font-size: 14px;
}
.continue-bar.show { display: flex; animation: cb-slide-up .25s ease; }
@keyframes cb-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.continue-bar .cb-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.continue-bar .cb-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #5E90E3, #1C47A5);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 700;
  flex-shrink: 0;
}
.continue-bar .cb-text {
  display: flex; flex-direction: column; gap: 1px;
  min-width: 0;
}
.continue-bar .cb-title {
  font-weight: 700;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.continue-bar .cb-sub {
  font-size: 12px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.continue-bar .cb-cta {
  background: linear-gradient(135deg, #5E90E3, #1C47A5);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .5px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  transition: transform .12s ease;
}
.continue-bar .cb-cta:hover { transform: translateY(-1px); }
.continue-bar .cb-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.continue-bar .cb-close:hover { color: #6b7280; }

/* Push content above the sticky bar */
body.has-continue-bar { padding-bottom: 70px; }

/* ── MOBILE ────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .learn-hero { padding: 40px 16px 60px; }
  .learn-hero h1 { font-size: 26px; }
  .start-here { padding: 0 16px; }
  .learn-grid-section { padding: 32px 16px 50px; }
  .learn-grid { grid-template-columns: 1fr; }
  .detail-glyph { font-size: 80px; }
  .detail-hero h1 { font-size: 26px; }
  .detail-body { padding: 28px 18px; }
  .detail-pasuk { font-size: 22px; line-height: 1.8; padding: 14px; }
  .prevnext { flex-direction: column; padding: 0 16px; }
  .continue-bar { padding: 8px 14px; gap: 8px; }
  .continue-bar .cb-icon { display: none; }
  .continue-bar .cb-cta { padding: 8px 14px; font-size: 12px; }
  .continue-bar .cb-sub { display: none; }
  body.has-continue-bar { padding-bottom: 60px; }
}
