/* Shared styles for the shiurim-series/ pages (one page per video series,
   linked from shiurim.html's Series tab). Colours come from
   /styles/site-tokens.css; the episode list follows pesach-shiurim.html. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--cream); color: var(--text-dark); line-height: 1.6; overflow-x: hidden; }
[lang="he"] { direction: rtl; }
[lang="he"] body { font-family: 'Heebo', 'Frank Ruhl Libre', sans-serif; }
.en-only-inline { display: inline; }
[lang="he"] .en-only-inline { display: none; }
.he-only-inline { display: none; }
[lang="he"] .he-only-inline { display: inline; }

/* --- Site nav (shared header partial) --- */
header { background: var(--maroon); border-bottom: 3px solid var(--gold); position: relative; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo-img { height: 42px; width: auto; display: block; }
.header-right { display: flex; align-items: center; gap: 1.2rem; }
.header-utils { display: flex; align-items: center; gap: 0.8rem; margin-left: 1.2rem; padding-left: 1.2rem; border-left: 1px solid rgba(200,164,86,0.25); }
[lang="he"] .header-utils { margin-left: 0; margin-right: 1.2rem; padding-left: 0; padding-right: 1.2rem; border-left: none; border-right: 1px solid rgba(200,164,86,0.25); }
.header-email { color: var(--cream-dark); text-decoration: none; font-size: 0.78rem; transition: color 0.2s; }
.header-email:hover { color: var(--gold); }
.lang-toggle { background: transparent; border: 1px solid var(--gold); color: var(--gold); padding: 0.2rem 0.65rem; border-radius: 3px; cursor: pointer; font-size: 0.75rem; font-weight: 500; transition: all 0.2s; font-family: 'Frank Ruhl Libre', serif; }
.lang-toggle:hover { background: var(--gold); color: var(--maroon); }
.nav-links { display: flex; list-style: none; gap: 1.2rem; align-items: center; }
.nav-links a { color: var(--cream); text-decoration: none; font-size: 0.85rem; font-weight: 400; transition: color 0.2s; position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--gold); transition: width 0.2s; }
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { background: var(--gold) !important; color: var(--maroon) !important; padding: 0.4rem 1.1rem; border-radius: 5px; font-weight: 600 !important; font-size: 0.85rem !important; transition: background 0.2s !important; }
.nav-cta:hover { background: var(--gold-light) !important; }
.nav-cta::after { display: none !important; }
.nav-login { color: var(--cream-dark) !important; font-size: 0.8rem !important; opacity: 0.8; }
.nav-login:hover { opacity: 1; color: var(--gold) !important; }
.nav-login::after { display: none !important; }
.hamburger { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { width: 22px; height: 2px; background: var(--gold); border-radius: 2px; transition: all 0.3s; }

/* --- Hero --- */
.hero { background: linear-gradient(135deg, var(--maroon) 0%, #3a1020 100%); padding: 3.5rem 2rem 3rem; text-align: center; color: var(--white); border-bottom: 3px solid var(--gold); }
.hero-content { max-width: 760px; margin: 0 auto; }
.hero-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.8rem; }
.hero-hebrew { font-family: 'Frank Ruhl Libre', serif; font-size: 2.4rem; color: var(--gold); margin-bottom: 0.4rem; line-height: 1.25; }
.hero h1 { font-size: 1.4rem; font-weight: 700; color: var(--cream); margin-bottom: 0.8rem; }
[lang="he"] .hero h1 { display: none; } /* the Hebrew title is already the gold line above */
.hero-speaker { color: var(--gold-light); font-weight: 600; font-size: 0.95rem; margin-bottom: 0.6rem; }
.hero-sub { color: rgba(245,240,232,0.78); font-size: 0.98rem; max-width: 620px; margin: 0 auto 0.8rem; }
.hero-meta { color: rgba(245,240,232,0.6); font-size: 0.82rem; margin-bottom: 1.6rem; }
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-outline { border: 2px solid rgba(200,164,86,0.5); color: var(--cream); padding: 0.7rem 1.8rem; border-radius: 7px; text-decoration: none; font-weight: 600; font-size: 0.92rem; transition: border-color 0.2s, background 0.2s; }
.btn-outline:hover { border-color: var(--gold); background: rgba(200,164,86,0.1); }

/* --- Episode list --- */
.series-section { max-width: 900px; margin: 0 auto; padding: 3rem 2rem; }
.series-block { background: var(--white); border-radius: 12px; box-shadow: 0 4px 18px rgba(0,0,0,0.07); margin-bottom: 2rem; overflow: hidden; }
.section-head { background: var(--maroon); padding: 1.1rem 2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { color: var(--white); font-size: 1.1rem; font-weight: 700; }
.mm-link { color: var(--maroon); background: var(--gold); font-size: 0.8rem; font-weight: 700; border-radius: 5px; padding: 0.3rem 0.85rem; text-decoration: none; white-space: nowrap; transition: background 0.2s; }
.mm-link:hover { background: var(--gold-light); }
.episode { display: flex; align-items: center; padding: 0.9rem 2rem; border-bottom: 1px solid var(--cream-dark); gap: 1rem; cursor: pointer; transition: background 0.15s; }
.episode:hover, .episode:focus-visible { background: var(--cream); outline: none; }
.episode-info { flex: 1; min-width: 0; }
.episode-info h4 { font-size: 0.95rem; font-weight: 600; color: var(--text-dark); }
.episode-info .sub { font-size: 0.84rem; color: var(--text-medium); margin-top: 0.15rem; }
.episode-info .by { font-size: 0.78rem; color: var(--maroon); font-weight: 600; margin-top: 0.2rem; }
.episode-play { width: 32px; height: 32px; border-radius: 50%; background: var(--maroon); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; flex-shrink: 0; transition: background 0.2s; }
.episode:hover .episode-play { background: var(--gold); color: var(--maroon); }
.video-embed { display: none; padding: 1rem 2rem 1.5rem; border-bottom: 1px solid var(--cream-dark); }
.video-embed.active { display: block; }
.video-embed iframe { width: 100%; aspect-ratio: 16/9; border: none; border-radius: 8px; display: block; }

/* --- Hub (a series made of sub-series) --- */
.hub-card { display: flex; align-items: center; gap: 1rem; background: var(--white); border-radius: 12px; box-shadow: 0 4px 18px rgba(0,0,0,0.07); margin-bottom: 1.2rem; padding: 1.3rem 2rem; text-decoration: none; color: inherit; border: 2px solid transparent; transition: border-color 0.2s, box-shadow 0.2s; }
.hub-card:hover { border-color: var(--gold); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.hub-card-text { flex: 1; }
.hub-card h3 { font-size: 1.1rem; color: var(--maroon); }
.hub-card .desc { font-size: 0.88rem; color: var(--text-medium); }
[lang="he"] .hub-card .desc { display: none; }
.series-count { color: var(--text-medium); font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.hub-arrow { color: var(--gold); font-size: 1.4rem; }
[lang="he"] .hub-arrow { transform: scaleX(-1); }

/* Titles keep dir="auto"/"rtl" so Hebrew punctuation renders right, but line up
   with the page's own edge in English mode rather than flipping to the right. */
html[lang="en"] .series-section [dir] { text-align: left; }

.footnote { text-align: center; color: var(--text-medium); font-size: 0.9rem; }
.footnote a { color: var(--maroon); }

/* --- Footer (shared footer-mini partial) --- */
footer { background: var(--maroon); border-top: 3px solid var(--gold); text-align: center; padding: 2rem; color: var(--cream-dark); font-size: 0.85rem; }
footer a { color: var(--gold); text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 900px) {
    .hamburger { display: flex; }
    .header-right { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--maroon); flex-direction: column; padding: 1rem 2rem 1.5rem; gap: 0.2rem; border-top: 1px solid rgba(200,164,86,0.2); box-shadow: 0 8px 20px rgba(0,0,0,0.2); z-index: 99; }
    .header-right.open { display: flex; }
    .header-utils { margin-left: 0; padding-left: 0; border-left: none; border-top: 1px solid rgba(200,164,86,0.2); padding-top: 0.8rem; margin-top: 0.5rem; gap: 1rem; }
    .nav-links { flex-direction: column; gap: 0.2rem; width: 100%; }
}
@media (max-width: 620px) {
    .hero { padding: 2.6rem 1rem 2.4rem; }
    .hero-hebrew { font-size: 1.8rem; }
    .hero h1 { font-size: 1.15rem; }
    .series-section { padding: 2rem 1rem; }
    .episode, .section-head, .hub-card { padding-left: 1.1rem; padding-right: 1.1rem; }
    .video-embed { padding: 0.8rem 1.1rem 1.2rem; }
}
