/* ==========================================================================
   רבנו ספרים — front page (hub layout)
   ========================================================================== */

/* ---- shared section heading ---- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.section-eyebrow { display: block; color: var(--gold-700); font-weight: 700; font-size: var(--fs-sm); letter-spacing: .02em; margin-bottom: .2rem; }
.section-title { font-family: var(--font-head); font-size: var(--fs-xl); color: var(--brand-900); line-height: var(--lh-snug); }
.section-more { color: var(--brand-700); font-weight: 700; font-size: var(--fs-sm); white-space: nowrap; }
.section-more:hover { color: var(--brand-900); text-decoration: none; }
.section { padding-block: var(--sp-7); }
.section-alt { background: var(--surface-2); }
.rabenu-row { margin-top: 0 !important; }

/* ghost button for the dark hero */
.btn-ghost-light { border: 1.5px solid rgba(255,255,255,.55); color: #fff; background: transparent; }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* ---- hero ---- */
.hero { background: linear-gradient(140deg, var(--brand-900) 0%, var(--brand-800) 55%, var(--brand-700) 130%); color: #fff; overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; inset-block: -30% auto; inset-inline-start: -10%; width: 60%; height: 160%; background: radial-gradient(closest-side, rgba(200,137,42,.16), transparent 70%); pointer-events: none; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--sp-7); align-items: center; padding-block: clamp(var(--sp-6), 6vw, var(--sp-9)); position: relative; z-index: 1; }
.hero-copy { max-width: 34rem; }
.hero-eyebrow { display: inline-block; color: var(--gold-500); font-weight: 700; font-size: var(--fs-sm); letter-spacing: .03em; margin-bottom: var(--sp-3); }
.hero-title { font-family: var(--font-head); font-size: clamp(var(--fs-2xl), 5vw, var(--fs-4xl)); line-height: 1.08; color: #fff; }
.hero-title-sub { display: block; font-size: var(--fs-md); font-weight: 500; color: var(--brand-100); margin-top: var(--sp-3); line-height: var(--lh-snug); }
.hero-lede { color: rgba(255,255,255,.86); font-size: var(--fs-base); line-height: var(--lh-base); margin-top: var(--sp-4); }
.hero-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); flex-wrap: wrap; }
.hero-assurances { display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-top: var(--sp-5); list-style: none; padding: 0; }
.hero-assurances li { position: relative; padding-inline-start: 1.3em; color: rgba(255,255,255,.82); font-size: var(--fs-sm); }
.hero-assurances li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--gold-500); font-weight: 700; }

.hero-art { display: flex; justify-content: center; align-items: center; min-height: 420px; }
.hero-shelf { position: relative; width: min(420px, 80%); aspect-ratio: 4 / 3; }
.hero-book { position: absolute; top: 50%; left: 50%; display: block; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-3); background: var(--surface-2); transition: transform .25s ease; }
.hero-book img { display: block; width: 100%; height: auto; }
.hero-book--center { width: 46%; transform: translate(-50%, -50%) rotate(0deg); z-index: 3; }
.hero-book--left { width: 40%; transform: translate(-90%, -46%) rotate(-8deg); z-index: 2; opacity: .96; }
.hero-book--right { width: 40%; transform: translate(-10%, -46%) rotate(8deg); z-index: 1; opacity: .96; }
.hero-book--center:hover { transform: translate(-50%, -52%) rotate(0deg); }
.hero-medallion { width: min(440px, 70%); height: auto; border-radius: 50%; box-shadow: var(--shadow-3); }

/* ---- trust bar ---- */
.trust-bar { margin-top: calc(var(--sp-6) * -1); position: relative; z-index: 4; }
.trust-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); list-style: none; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.trust-item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); }
.trust-item + .trust-item { border-inline-start: 1px solid var(--line); }
.trust-icon { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--brand-50); color: var(--brand-700); }
.trust-icon svg { width: 24px; height: 24px; }
.trust-body { display: flex; flex-direction: column; }
.trust-title { font-family: var(--font-head); font-size: var(--fs-sm); color: var(--brand-900); }
.trust-text { color: var(--ink-3); font-size: var(--fs-xs); }

/* ---- browse by topic ---- */
.browse-topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--sp-5); }
.topic-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-4); }
.topic-group__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-3); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--line); }
.topic-group__title { font-family: var(--font-head); font-size: var(--fs-md); color: var(--brand-900); }
.topic-group__all { color: var(--brand-700); font-weight: 700; font-size: var(--fs-xs); white-space: nowrap; }
.topic-tiles { list-style: none; padding: 0; display: grid; gap: 2px; }
.topic-tiles a { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: .5rem .6rem; border-radius: var(--r-md); color: var(--ink); font-size: var(--fs-sm); }
.topic-tiles a:hover { background: var(--brand-50); color: var(--brand-900); text-decoration: none; }
.topic-count { color: var(--ink-3); font-size: var(--fs-xs); background: var(--surface-2); border-radius: var(--r-pill); padding: .05rem .5rem; }

/* work-guide tiles (.guide-grid/.guide-tile) live in base.css — shared with /mechaber */

/* ---- article cards ---- */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-5); }
.article-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.article-card:hover { box-shadow: var(--shadow-2); }
.article-card__link { display: block; color: inherit; }
.article-card__link:hover { text-decoration: none; }
.article-card__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.article-card__body { display: block; padding: var(--sp-4); }
.article-card__title { font-family: var(--font-head); font-size: var(--fs-md); color: var(--brand-900); line-height: var(--lh-snug); }
.article-card__excerpt { display: block; color: var(--ink-2); font-size: var(--fs-sm); margin-top: var(--sp-2); }

/* ---- newsletter ---- */
.newsletter { background: var(--brand-900); color: #fff; }
.newsletter-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--sp-5) var(--sp-6); padding-block: var(--sp-7); }
.newsletter-title { font-family: var(--font-head); font-size: var(--fs-xl); color: #fff; }
.newsletter-sub { color: rgba(255,255,255,.8); font-size: var(--fs-sm); margin-top: var(--sp-2); }
.newsletter-form { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.newsletter-input { min-height: 52px; min-width: 240px; border: 1px solid transparent; border-radius: var(--r-md); padding: 0 var(--sp-4); font-size: var(--fs-sm); background: #fff; color: var(--ink); }
.newsletter-input:focus { outline: none; box-shadow: 0 0 0 3px var(--gold-500); }
.newsletter-button { min-height: 52px; }
.newsletter-status { grid-column: 1 / -1; margin: 0; font-size: var(--fs-sm); min-height: 1.2em; color: rgba(255,255,255,.9); }
.newsletter-status.is-ok { color: #bff0c2; }
.newsletter-status.is-error { color: #ffc9c2; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--sp-5); text-align: start; }
  .hero-art { min-height: 300px; order: -1; }
  .hero-shelf { width: min(320px, 70%); }
  .trust-list { grid-template-columns: repeat(2, 1fr); }
  .trust-item:nth-child(2n) { border-inline-start: 0; }
  .trust-item:nth-child(n+3) { border-block-start: 1px solid var(--line); }
  .newsletter-inner { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .trust-list { grid-template-columns: 1fr; }
  .trust-item { border-inline-start: 0 !important; }
  .trust-item + .trust-item { border-block-start: 1px solid var(--line); }
  .newsletter-form { flex-direction: column; }
  .newsletter-input, .newsletter-button { width: 100%; }
}
