/* YIOT Widgets — shared frontend styles.
   Colors fall back to the yiot-torah theme CSS variables. */

.yiot-btn {
	display: inline-block;
	background: var(--yiot-primary, #0069a6);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 10px 26px;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s ease;
}

.yiot-btn:hover {
	background: var(--yiot-primary-dark, #005485);
	color: #fff;
}

.yiot-btn--light {
	background: #fff;
	color: var(--yiot-primary, #0069a6);
}

.yiot-btn--light:hover {
	background: var(--yiot-sky, #d4ecff);
	color: var(--yiot-primary-dark, #005485);
}

/* ---------------- Date line ---------------- */

.yiot-date-line {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: baseline;
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--yiot-primary, #0069a6);
}

.yiot-date-hebrew {
	text-transform: none;
	letter-spacing: 0;
}

.yiot-date-sep {
	opacity: 0.5;
}

/* ---------------- Hero slider ---------------- */

.yiot-hero {
	position: relative;
	overflow: hidden;
	border-radius: 0;
}

.yiot-hero-slide {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0;
	transition: opacity 0.7s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.yiot-hero-slide.is-active {
	opacity: 1;
	z-index: 1;
}

.yiot-hero-slide::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 63, 100, 0.45);
}

.yiot-hero-content {
	position: relative;
	z-index: 1;
	max-width: 760px;
	padding: 24px;
	color: #fff;
}

.yiot-hero-kicker {
	font-size: 14px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	margin: 0 0 12px;
}

.yiot-hero-title {
	font-size: clamp(30px, 5vw, 54px);
	margin: 0 0 14px;
	color: inherit;
}

.yiot-hero-text {
	font-size: 18px;
	margin: 0 0 22px;
}

.yiot-hero-prev,
.yiot-hero-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
	border: 0;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease;
}

.yiot-hero-prev:hover,
.yiot-hero-next:hover {
	background: rgba(255, 255, 255, 0.45);
}

.yiot-hero-prev { left: 18px; }
.yiot-hero-next { right: 18px; }

.yiot-hero-dots {
	position: absolute;
	bottom: 16px;
	left: 0;
	right: 0;
	z-index: 2;
	display: flex;
	justify-content: center;
	gap: 8px;
}

.yiot-hero-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 0;
	background: rgba(255, 255, 255, 0.45);
	cursor: pointer;
	padding: 0;
}

.yiot-hero-dot.is-active {
	background: #fff;
}

/* ---------------- Sponsor bar ---------------- */

.yiot-sponsor-bar {
	background: var(--yiot-sky-2, #9fd7fc);
	color: var(--yiot-primary-darker, #003f64);
	text-align: center;
	padding: 10px 16px;
	font-size: 15px;
}

.yiot-sponsor-bar a {
	color: inherit;
}

/* ---------------- Dedication banner ---------------- */

.yiot-dedication {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	max-width: 720px;
}

.yiot-dedication-title {
	font-style: italic;
	font-size: 20px;
	color: var(--yiot-primary, #0069a6);
	border-bottom: 1px dashed currentColor;
	padding-bottom: 6px;
	margin: 0 0 10px;
	text-align: center;
}

.yiot-dedication-name {
	margin: 2px 0;
	font-size: 14px;
	text-align: center;
}

@media (max-width: 640px) {
	.yiot-dedication {
		grid-template-columns: 1fr;
	}
}

/* ---------------- Carousel ---------------- */

.yiot-carousel {
	position: relative;
	padding: 40px 56px;
	border-radius: 12px;
}

.yiot-carousel-heading {
	text-align: center;
	margin: 0 0 28px;
}

.yiot-carousel-viewport {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.yiot-carousel-viewport::-webkit-scrollbar {
	display: none;
}

.yiot-carousel-track {
	display: flex;
	gap: 20px;
}

.yiot-carousel .yiot-card {
	flex: 0 0 280px;
	scroll-snap-align: start;
}

.yiot-carousel-prev,
.yiot-carousel-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: var(--yiot-primary, #0069a6);
	color: #fff;
	border: 0;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	z-index: 1;
}

.yiot-carousel-prev { left: 8px; }
.yiot-carousel-next { right: 8px; }

/* ---------------- Cards ---------------- */

.yiot-card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 63, 100, 0.1);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.yiot-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(0, 63, 100, 0.16);
}

.yiot-card-media img {
	width: 100%;
	height: 150px;
	object-fit: cover;
	display: block;
}

.yiot-card-body {
	padding: 16px 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.yiot-card-kicker {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--yiot-primary, #0069a6);
}

.yiot-card-title {
	font-size: 17px;
	line-height: 1.35;
	margin: 0;
}

.yiot-card-title a {
	text-decoration: none;
	color: inherit;
}

.yiot-card-title a:hover {
	color: var(--yiot-primary, #0069a6);
}

/* ---------------- Series header ---------------- */

.yiot-series-header {
	display: flex;
	gap: 28px;
	align-items: center;
}

.yiot-series-cover img {
	width: 180px;
	height: 180px;
	object-fit: cover;
	border-radius: 12px;
	box-shadow: 0 4px 16px rgba(0, 63, 100, 0.2);
}

.yiot-series-title {
	margin: 0 0 4px;
}

.yiot-series-subtitle {
	margin: 0;
	font-size: 14px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--yiot-primary, #0069a6);
	font-weight: 600;
}

.yiot-series-description {
	margin-top: 10px;
	color: var(--yiot-text, #333);
}

@media (max-width: 640px) {
	.yiot-series-header {
		flex-direction: column;
		text-align: center;
	}
}

/* ---------------- Audio player ---------------- */

.yiot-player {
	background: var(--yiot-primary-darker, #003f64);
	color: #fff;
	border-radius: 12px;
	padding: 16px 20px;
}

.yiot-player-meta {
	display: flex;
	flex-direction: column;
	margin-bottom: 10px;
}

.yiot-player-series {
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.75;
}

.yiot-player-title {
	font-weight: 600;
	font-size: 16px;
}

.yiot-player-controls {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.yiot-player-controls button {
	background: transparent;
	color: #fff;
	border: 0;
	cursor: pointer;
	font-size: 13px;
	padding: 4px 6px;
}

.yiot-player-toggle {
	background: #fff !important;
	color: var(--yiot-primary-darker, #003f64) !important;
	border-radius: 50%;
	width: 42px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.yiot-player-track {
	flex: 1;
	min-width: 120px;
}

.yiot-player-seek {
	width: 100%;
	accent-color: var(--yiot-sky-2, #9fd7fc);
}

.yiot-player-time {
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.yiot-player-download {
	color: #fff;
	text-decoration: none;
	font-size: 18px;
}

/* Play glyph (pure CSS triangle; flips to pause bars while playing) */

.yiot-icon-play {
	display: inline-block;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 7px 0 7px 12px;
	border-color: transparent transparent transparent currentColor;
}

.is-playing .yiot-player-toggle .yiot-icon-play {
	border: 0;
	width: 12px;
	height: 14px;
	border-left: 4px solid currentColor;
	border-right: 4px solid currentColor;
}

.yiot-sticky-player {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
	padding: 10px 16px;
	transform: translateY(110%);
	transition: transform 0.3s ease;
}

.yiot-sticky-player.is-visible {
	transform: translateY(0);
}

.yiot-sticky-player .yiot-player {
	max-width: 980px;
	margin: 0 auto;
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
}

/* ---------------- Episode list ---------------- */

.yiot-episode-item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 4px;
	border-bottom: 1px solid rgba(0, 105, 166, 0.15);
}

.yiot-episode-play {
	flex: 0 0 auto;
	background: var(--yiot-primary, #0069a6);
	color: #fff;
	border: 0;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s ease;
}

.yiot-episode-play:hover {
	background: var(--yiot-primary-dark, #005485);
}

.yiot-episode-body {
	flex: 1;
	min-width: 0;
}

.yiot-episode-title {
	margin: 2px 0 0;
	font-size: 17px;
}

.yiot-episode-download {
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
}

/* Card play button variant */

.yiot-card-play {
	align-self: flex-start;
	width: auto;
	border-radius: 999px;
	padding: 6px 14px;
	gap: 8px;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.yiot-card-play .yiot-icon-play {
	border-width: 5px 0 5px 8px;
}

/* ---------------- Article list ---------------- */

.yiot-article-item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 4px;
	border-bottom: 1px solid rgba(0, 105, 166, 0.15);
}

.yiot-article-thumb img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 50%;
	display: block;
}

.yiot-article-body {
	flex: 1;
	min-width: 0;
}

.yiot-article-title {
	margin: 2px 0 0;
	font-size: 17px;
}

.yiot-article-title a {
	text-decoration: none;
	color: inherit;
}

.yiot-article-title a:hover {
	color: var(--yiot-primary, #0069a6);
}

.yiot-article-read {
	flex: 0 0 auto;
	background: var(--yiot-primary-darker, #003f64);
	color: #fff;
	text-decoration: none;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 10px 18px;
	border-radius: 6px;
	transition: background 0.2s ease;
}

.yiot-article-read:hover {
	background: var(--yiot-primary, #0069a6);
	color: #fff;
}

@media (max-width: 560px) {
	.yiot-article-read {
		display: none;
	}
}

/* ---------------- Load more ---------------- */

.yiot-load-more-wrap {
	text-align: center;
	padding: 24px 0 8px;
}

/* ---------------- Newsletter ---------------- */

.yiot-newsletter {
	background: var(--yiot-band, #bdd7e6);
	border-radius: 12px;
	padding: 40px 32px;
	text-align: center;
}

.yiot-newsletter-heading {
	margin: 0 0 8px;
}

.yiot-newsletter-text {
	margin: 0 auto 20px;
	max-width: 520px;
}

.yiot-newsletter-form {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

.yiot-newsletter-form input[type="email"] {
	padding: 10px 18px;
	border: 1px solid rgba(0, 63, 100, 0.3);
	border-radius: 999px;
	min-width: 260px;
	font-size: 15px;
}

/* ---------------- WhatsApp CTA ---------------- */

.yiot-whatsapp {
	background: var(--yiot-primary, #0069a6);
	color: #fff;
	border-radius: 12px;
	padding: 40px 32px;
	text-align: center;
}

.yiot-whatsapp-heading {
	margin: 0 0 8px;
	color: inherit;
}

.yiot-whatsapp-text {
	margin: 0 auto 20px;
	max-width: 520px;
}

/* ---------------- Social links ---------------- */

.yiot-social {
	display: flex;
	gap: 14px;
	align-items: center;
}

.yiot-social a {
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(0, 105, 166, 0.85);
	text-decoration: none;
	transition: background 0.2s ease;
}

.yiot-social a:hover {
	background: var(--yiot-primary-dark, #005485);
}

.yiot-social svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}
