/* Chabad Show · סגול — white and purple, on top of the parent's main.css. */

/* ---------- Tokens: the parent's names, purple values (inner pages follow along) ---------- */
:root {
	--purple: #5b2a86;
	--purple-ink: #4a1f73;
	--purple-deep: #2b1446;
	--purple-night: #1c0f33;
	--purple-soft: #f3eef9;
	--amber: #f2b632;

	--navy: #4a1f73;
	--navy-deep: #2b1446;
	--navy-soft: #5b2a86;
	--gold: #d4a92c;
	--gold-soft: #f5eefb;
	--gold-ink: #5b2a86;
	--gold-on-dark: #f2c75c;
	--red: #e3283a;

	--bg: #ffffff;
	--surface: #ffffff;
	--surface-2: #f4f2f8;
	--band: #f1eff5;
	--text: #1b1530;
	--muted: #6a6578;
	--line: #e8e5ee;
	--link: var(--text);
	--card-shadow: none;
	--radius: 12px;
}

[data-theme="dark"] {
	--bg: #120b1f;
	--surface: #1b1230;
	--surface-2: #221838;
	--band: #0c0716;
	--text: #ece8f4;
	--muted: #a9a2bb;
	--line: #2e2445;
	--link: #ece8f4;
	--navy: #2b1446;
	--navy-deep: #1c0f33;
	--gold-ink: #c7a6ec;
	--purple-soft: #2a1d42;
}

body.sagol { background: var(--bg); }
.sagol a:hover { color: var(--gold-ink); }
.sagol :focus-visible { outline-color: var(--purple); }

/* ---------- Header: white, logo, menu, live button ---------- */
.sg-header { background: var(--surface); color: var(--text); box-shadow: 0 1px 0 var(--line), 0 6px 18px rgb(43 20 70 / 4%); }
.sg-header__inner { display: flex; align-items: center; gap: 12px; min-height: 64px; position: relative; }
.sg-header .brand, .sg-header .brand:hover { color: var(--purple-deep); }
.sg-header .brand__mark { color: var(--gold); }
.sg-header .brand__tag { color: var(--muted); }
.sg-header .brand__tag::before, .sg-header .brand__tag::after { background: var(--gold); }
.sg-header .icon-btn:hover { background: var(--surface-2); }
.sg-header .main-nav__list > li > a { color: var(--text); font-weight: 500; font-size: 15.5px; padding: 21px 12px; }
.sg-header .main-nav__list > li > a::after { background: var(--purple); bottom: 14px; inset-inline: 12px; }
.sg-header .main-nav__list > .current-menu-item > a,
.sg-header .main-nav__list > li > a:hover { color: var(--purple); font-weight: 700; }
.sg-tools { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.sg-header .search-panel { background: var(--surface-2); }
[data-theme="dark"] .sg-header .brand, [data-theme="dark"] .sg-header .brand:hover { color: #fff; }

.sg-live-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px; background: var(--purple-night); color: #fff; font-weight: 700; font-size: 14px; margin-inline-end: 6px; white-space: nowrap; }
.sg-live-btn:hover { color: #fff; background: var(--purple-deep); }
.sg-live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgb(227 40 58 / 60%); animation: sg-pulse 1.6s ease-out infinite; flex: none; }
@keyframes sg-pulse { 70% { box-shadow: 0 0 0 8px rgb(227 40 58 / 0%); } 100% { box-shadow: 0 0 0 0 rgb(227 40 58 / 0%); } }
@media (prefers-reduced-motion: reduce) { .sg-live-dot { animation: none; } }

.sg-livebar-wrap { display: none; }
.sg-livebar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 16px; border-radius: 10px; background: var(--purple-night); color: #fff; font-weight: 700; font-size: 16px; text-align: center; }
.sg-livebar:hover { color: #fff; }
.sg-livebar strong { font-weight: 800; white-space: nowrap; }

@media (max-width: 1023px) {
	/* Phones: the header floats as a rounded white card, logo in the middle. */
	.sg-header { background: transparent; box-shadow: none; padding: 10px 12px 0; }
	.admin-bar .sg-header { top: 0; }
	.sg-header__inner { background: var(--surface); border-radius: 16px; box-shadow: 0 2px 14px rgb(43 20 70 / 10%); min-height: 60px; padding-inline: 8px; justify-content: space-between; }
	.sg-header .brand { position: absolute; inset-inline: 0; margin-inline: auto; width: max-content; }
	.sg-live-btn, .sg-header .theme-toggle { display: none; }
	.sg-livebar-wrap { display: block; padding-top: 12px; }
	.sg-header .search-panel { margin-top: 8px; border-radius: 12px; }
}

/* Ticker on inner pages */
.sagol .ticker { background: var(--surface); }
.sagol .ticker__list li::before { background: var(--purple); }

/* ---------- Section titles: purple bar, small › ---------- */
.sg-head { margin-bottom: 18px; }
.sg-head__title { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; color: var(--purple-deep); }
.sg-head__title::before { content: ""; width: 4px; height: 24px; border-radius: 2px; background: var(--purple); flex: none; }
.sg-head__title a { color: inherit; display: inline-flex; align-items: center; gap: 8px; }
.sg-head__more { color: var(--purple); font-size: 18px; font-weight: 700; }
[data-theme="dark"] .sg-head__title { color: #fff; }
[data-theme="dark"] .sg-head__title::before, [data-theme="dark"] .sg-head__more { background: #b48ae0; color: #b48ae0; }
[data-theme="dark"] .sg-head__more { background: none; }
.sg-head--light .sg-head__title { color: #fff; }
.sg-head--light .sg-head__title::before { background: var(--amber); }
.sg-head--light .sg-head__more { color: var(--amber); }

/* Media boxes share the parent's image rules (cover crop, blurred fill for tall pictures). */
.sg-lead__media, .sg-tile__media, .sg-item__media, .sg-vcard__media, .sg-short, .sg-video__big, .sg-ep__media {
	position: relative; display: block; overflow: hidden; background: var(--surface-2);
}
.sg-lead__media .card__img, .sg-tile__media .card__img, .sg-item__media .card__img, .sg-vcard__media .card__img, .sg-short .card__img, .sg-video__big .card__img, .sg-ep__media .card__img {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease;
}
.sg-lead__media .card__img--fit, .sg-tile__media .card__img--fit, .sg-item__media .card__img--fit, .sg-vcard__media .card__img--fit, .sg-video__big .card__img--fit, .sg-ep__media .card__img--fit { object-fit: contain; }
.sg-tile:hover .card__img:not(.card__img--fit), .sg-item:hover .card__img:not(.card__img--fit), .sg-vcard:hover .card__img:not(.card__img--fit), .sg-short:hover .card__img { transform: scale(1.04); }

/* ---------- Top: lead story + breaking news ---------- */
.sg-top { display: grid; gap: 28px; padding-top: 20px; }
.sg-lead__media { aspect-ratio: 16 / 9; border-radius: 16px; }
.sg-lead__body { margin-top: 22px; border-inline-start: 5px solid var(--red); padding-inline-start: 18px; }
.sg-lead__title { font-size: clamp(26px, 6.4vw, 40px); font-weight: 800; line-height: 1.2; letter-spacing: -.3px; }
.sg-lead__title a { color: var(--text); }
.sg-lead__title a:hover { color: var(--purple); }
.sg-lead__meta { margin: 12px 0 0; color: var(--muted); font-size: 16px; }

.sg-flashes__title { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; color: var(--purple-deep); margin-bottom: 8px; }
[data-theme="dark"] .sg-flashes__title { color: #fff; }
.sg-flashes__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--red); color: #fff; }
.sg-flashes__list { list-style: none; margin: 0; padding: 0; }
.sg-flashes__list li { display: flex; gap: 14px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line); }
.sg-flashes__list li:last-child { border-bottom: 0; }
.sg-flashes__list time { color: var(--red); font-weight: 800; font-size: 14px; flex: none; font-variant-numeric: tabular-nums; }
.sg-flashes__list a { color: var(--text); font-size: 16.5px; line-height: 1.45; }
.sg-flashes__list a:hover { color: var(--purple); }
.sg-flashes__more { display: inline-block; margin-top: 6px; color: var(--purple); font-weight: 700; font-size: 14px; }

/* ---------- Row of four ---------- */
.sg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 16px; padding-block: 30px 36px; }
.sg-tile__media { aspect-ratio: 16 / 9; border-radius: 14px; }
.sg-tile__title { margin-top: 12px; font-size: 17px; font-weight: 700; line-height: 1.35; }
.sg-tile__title a { color: var(--text); }
.sg-tile__title a:hover { color: var(--purple); }

/* ---------- Bands separated by a light grey strip ---------- */
.sg-band { border-top: 14px solid var(--band); padding-block: 30px 32px; }

/* Shorts */
.sg-shorts__track { display: grid; grid-auto-flow: column; grid-auto-columns: 64%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 2px; }
.sg-short { aspect-ratio: 9 / 13; border-radius: 16px; scroll-snap-align: start; color: #fff; }
.sg-short::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(to top, rgb(43 20 70 / 95%), rgb(43 20 70 / 0%)); }
.sg-short__title { position: absolute; inset: auto 0 0; z-index: 1; padding: 16px; font-family: var(--font-head); font-weight: 700; font-size: 18px; line-height: 1.3; }
.sg-short:hover { color: #fff; }
.sg-follow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; font-weight: 700; font-size: 15px; }
.sg-social { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.sg-social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--text); }
.sg-social a:hover { background: var(--purple-soft); color: var(--purple); }
.sg-social .icon { width: 20px; height: 20px; }

/* Video */
.sg-video__grid { display: grid; gap: 16px; }
.sg-video__big { aspect-ratio: 16 / 9; border-radius: 16px; color: #fff; }
.sg-video__big::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(to top, rgb(43 20 70 / 92%), rgb(43 20 70 / 0%)); }
.sg-video__caption { position: absolute; inset: auto 0 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; }
.sg-video__title { font-family: var(--font-head); font-weight: 700; font-size: clamp(18px, 3.2vw, 26px); line-height: 1.3; border-inline-start: 3px solid #fff; padding-inline-start: 14px; }
.sg-video__big:hover { color: #fff; }
.sg-play { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: #fff; color: var(--purple-night); flex: none; transition: transform .2s ease; }
.sg-play .icon { width: 20px; height: 20px; margin-inline-start: -2px; }
.sg-video__big:hover .sg-play { transform: scale(1.08); }
.sg-video__list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-content: start; align-items: start; }
.sg-vcard { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--surface-2); color: var(--text); }
.sg-vcard__media { aspect-ratio: 2 / 1; }
.sg-vcard__title { padding: 12px 14px 16px; font-weight: 700; font-size: 15px; line-height: 1.4; }
.sg-vcard:hover { color: var(--purple); }

/* ---------- Podcast band ---------- */
.sg-pod { background: linear-gradient(180deg, #5a2a88 0%, #3f1b66 60%, #2b1446 100%); color: #fff; padding-block: 36px 30px; }
.sg-pod .slider__track { border-radius: 16px; }
.sg-ep { height: 100%; display: grid; background: rgb(255 255 255 / 9%); border: 1px solid rgb(255 255 255 / 10%); border-radius: 16px; overflow: hidden; }
.sg-ep__media { aspect-ratio: 16 / 10; }
.sg-ep__body { padding: 24px 22px 26px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; }
.sg-ep:not(.sg-ep--img) .sg-ep__body { align-items: center; text-align: center; padding-block: 56px; }
.sg-ep__kicker { margin: 0; color: var(--amber); font-weight: 800; font-size: 15px; }
.sg-ep__title { font-size: clamp(22px, 4.6vw, 30px); font-weight: 800; line-height: 1.25; }
.sg-ep__title a { color: #fff; }
.sg-ep__title a:hover { color: var(--amber); }
.sg-ep__text { margin: 0; color: rgb(255 255 255 / 78%); font-size: 16px; max-width: 60ch; }
.sg-ep__btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 10px 20px; border-radius: 8px; background: #fff; color: var(--purple-night); font-weight: 800; font-size: 15px; }
.sg-ep__btn .icon { width: 14px; height: 14px; }
.sg-ep__btn:hover { background: var(--amber); color: var(--purple-night); }
.sg-pod .slider__arrow { top: 50%; transform: translateY(-50%); }
.sg-dots { position: static; justify-content: center; margin-top: 18px; gap: 8px; }
.sg-dots .slider__dot { width: 8px; height: 8px; border-radius: 50%; background: rgb(255 255 255 / 35%); }
.sg-dots .slider__dot.is-active { background: #fff; }

/* ---------- Community + most read ---------- */
.sg-bottom { display: grid; gap: 34px; padding-block: 36px 44px; }
.sg-item { display: grid; grid-template-columns: 1fr 34%; gap: 16px; align-items: center; padding-block: 14px; border-bottom: 1px solid var(--line); }
.sg-item:last-child { border-bottom: 0; }
.sg-item__title { font-size: 18px; font-weight: 700; line-height: 1.4; }
.sg-item__title a { color: var(--text); }
.sg-item__title a:hover { color: var(--purple); }
.sg-item__meta { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.sg-item__media { aspect-ratio: 16 / 10; border-radius: 12px; order: 2; }

.sg-popular__list { list-style: none; counter-reset: sg; margin: 0; padding: 0; }
.sg-popular__list li { counter-increment: sg; display: flex; gap: 18px; align-items: center; padding-block: 18px; border-bottom: 1px solid var(--line); }
.sg-popular__list li:last-child { border-bottom: 0; }
.sg-popular__list li::before { content: counter(sg); font-family: var(--font-head); font-weight: 800; font-size: 26px; color: var(--purple); min-width: 22px; line-height: 1; }
[data-theme="dark"] .sg-popular__list li::before { color: #b48ae0; }
.sg-popular__list a { color: var(--text); font-weight: 700; font-size: 17px; line-height: 1.4; }
.sg-popular__list a:hover { color: var(--purple); }

/* ---------- Footer ---------- */
.sg-footer { background: var(--surface-2); color: var(--muted); padding-top: 40px; margin-top: 0; border-top: 0; }
.sg-footer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; padding-bottom: 28px; }
.sg-footer__title { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 12px; font-family: var(--font-body); }
.sg-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sg-footer.site-footer a, .sg-footer.site-footer ul a { color: var(--muted); font-size: 15px; }
.sg-footer.site-footer a:hover { color: var(--purple); }
.sg-footer.site-footer .sg-social a { color: var(--text); }
.sg-footer .sg-social { display: flex; gap: 6px; }
.sg-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-block: 18px 22px; border-top: 1px solid var(--line); font-size: 14px; }
.sg-footer__bottom a { color: var(--muted); }
.sg-footer__bottom a:hover { color: var(--purple); }

/* ---------- Wider screens ---------- */
@media (min-width: 600px) {
	.sg-shorts__track { grid-auto-columns: 200px; }
	.sg-short { aspect-ratio: 9 / 16; }
	.sg-video__list { grid-template-columns: 1fr 1fr; }
	.sg-footer__grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 900px) {
	.sg-top { grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; padding-top: 28px; align-items: start; }
	.sg-row { grid-template-columns: repeat(4, 1fr); gap: 24px; }
	.sg-video__grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: stretch; }
	.sg-video__grid--solo { grid-template-columns: 1fr; }
	.sg-video__big { aspect-ratio: auto; min-height: 340px; }
	.sg-ep--img { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
	.sg-ep--img .sg-ep__media { aspect-ratio: auto; min-height: 300px; order: 2; }
	.sg-ep__body { padding: 36px 40px; }
	.sg-bottom { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 40px; align-items: start; }
	.sg-popular { background: var(--surface-2); border-radius: 16px; padding: 26px 24px 12px; }
	.sg-item { grid-template-columns: 1fr 200px; }
}

@media (min-width: 1024px) {
	.sg-header .main-nav { margin-inline-start: 28px; }
	.sg-header .brand--tag { align-items: flex-start; }
}
