/**
 * WPYog News — Public Styles
 * @package WPYog_News
 */

/* =========================================================
   Reset / Base
   ========================================================= */
.wpyog-news-wrap *,
.wpyog-news-wrap *::before,
.wpyog-news-wrap *::after {
	box-sizing: border-box;
}

.wpyog-news-wrap {
	font-family: inherit;
	margin: 0 0 2.5rem;
	max-width: 100%;
	min-width: 0;
}

/* =========================================================
   LIST LAYOUT
   ========================================================= */
.wpyog-layout-list .wpyog-news-list-container {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.wpyog-list-item {
	display: flex;
	gap: 0;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	border: 1px solid #efefef;
	transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.wpyog-list-item:hover {
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.11);
	transform: translateY(-2px);
}

/* Thumb */
.wpyog-list-item .wpyog-item-thumb {
	flex: 0 0 210px;
	max-width: 220px;
	overflow: hidden;
}

.wpyog-list-item .wpyog-item-thumb a {
	display: block;
	height: 100%;
}

.wpyog-list-item .wpyog-item-thumb img {
	width: 100%;
	height: 100%;
	min-height: 180px;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.wpyog-list-item:hover .wpyog-item-thumb img {
	transform: scale(1.04);
}

/* Body */
.wpyog-list-item .wpyog-item-body {
	flex: 1;
	padding: 1.5rem 1.6rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.wpyog-list-item.no-thumb .wpyog-item-body {
	padding: 1.5rem 1.6rem;
}

/* Category pills — list */
.wpyog-item-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.wpyog-item-cats a {
	display: inline-block;
	padding: 0.15rem 0.65rem;
	background: #f0f4ff;
	color: #3F51B5;
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-radius: 20px;
	text-decoration: none;
	transition: background 0.2s;
}

.wpyog-item-cats a:hover {
	background: #3F51B5;
	color: #fff;
}

/* Post-type badge — shown when show_type="true" while mixing multiple post types */
.wpyog-item-type {
	display: inline-block;
	padding: 0.15rem 0.65rem;
	background: #eaeaea;
	color: #555;
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-radius: 20px;
}

/* =========================================================
   CARD LAYOUT
   ========================================================= */
.wpyog-layout-card .wpyog-news-card-container {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(3, 1fr);
}

.wpyog-layout-card.wpyog-cols-2 .wpyog-news-card-container {
	grid-template-columns: repeat(2, 1fr);
}

.wpyog-layout-card.wpyog-cols-4 .wpyog-news-card-container {
	grid-template-columns: repeat(4, 1fr);
}

.wpyog-card-item {
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
	border: 1px solid #efefef;
	transition: box-shadow 0.25s ease, transform 0.2s ease;
	display: flex;
	flex-direction: column;
	/* Grid items default to min-width:auto, which lets long unbroken text
	   (or a wide image) force the column past its 1fr share and overflow
	   the row's right edge — especially in a narrower theme layout that
	   has a sidebar. min-width:0 lets the column actually shrink to fit. */
	min-width: 0;
}

.wpyog-card-item:hover {
	box-shadow: 0 10px 32px rgba(0, 0, 0, 0.13);
	transform: translateY(-3px);
}

.wpyog-card-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* Card thumb */
.wpyog-card-thumb {
	position: relative;
	overflow: hidden;
}

.wpyog-card-thumb a {
	display: block;
	line-height: 0;
}

.wpyog-card-thumb img {
	width: 100%;
	height: 210px;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.wpyog-card-item:hover .wpyog-card-thumb img {
	transform: scale(1.06);
}

.wpyog-card-no-thumb {
	height: 210px; /* matches .wpyog-card-thumb img so all thumbs line up evenly */
	background: linear-gradient(135deg, #3F51B5 0%, #5C6BC0 60%, #7986CB 100%);
}

/* Category pills — cards (overlaid on image) */
.wpyog-card-cats {
	position: absolute;
	top: 0.65rem;
	left: 0.65rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	z-index: 2;
}

.wpyog-card-cats a {
	display: inline-block;
	padding: 1rem 0.9rem;
	background: rgba(63, 81, 181, 0.9);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border-radius: 20px;
	text-decoration: none;
	backdrop-filter: blur(4px);
	transition: background 0.2s;
}

.wpyog-card-cats a:hover {
	background: rgba(40, 53, 147, 0.95);
}

.wpyog-card-cats .wpyog-item-type {
	background: rgba(20, 20, 20, 0.75);
	color: #fff;
	padding: 1rem 0.9rem;
	font-size: 0.68rem;
	backdrop-filter: blur(4px);
}

/* Card body */
.wpyog-card-body {
	padding: 1.1rem 1.2rem 0.6rem;
	flex: 1;
}

/* Card footer */
.wpyog-card-footer {
	padding: 0.75rem 1.2rem 1.1rem;
	border-top: 1px solid #f2f2f2;
}

.wpyog-card-bottom-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 0.6rem;
	flex-wrap: wrap;
	gap: 0.4rem;
}

/* =========================================================
   Shared typography
   ========================================================= */

/* Title (h2) */
.wpyog-item-title {
	margin: 0 0 0.3rem;
	font-size: 1.4rem;
	line-height: 1.45;
	font-weight: bold;
	overflow-wrap: break-word;
	word-break: break-word;
}

.wpyog-item-title a {
	color: #1a1a2e;
	text-decoration: none;
	transition: color 0.2s;
}

.wpyog-item-title a:hover {
	color: #3F51B5;
}

/* Date */
.wpyog-item-date {
	font-size: 0.9rem;
	color: #888;
	display: inline-block;
}

/* Excerpt */
.wpyog-item-excerpt {
	font-size: 1.1rem;
	color: #4c4b4b;
	line-height: 1.6;
	margin: 0;
	overflow-wrap: break-word;
	word-break: break-word;
}

/* Card excerpt — slightly smaller */
.wpyog-card-body .wpyog-item-excerpt {
	font-size: 0.88rem;
	color: #555;
}

/* =========================================================
   Source credit
   ========================================================= */
.wpyog-source {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.82rem;
	color: #555;
}

.wpyog-source-favicon {
	width: 24px;
	height: 24px;
	vertical-align: middle;
	border-radius: 2px;
	object-fit: contain;
}

.wpyog-source-name {
	color: #444;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.82rem;
}

.wpyog-source-name:hover {
	color: #3F51B5;
}

/* =========================================================
   Item footer (list layout)
   ========================================================= */
.wpyog-item-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 0.85rem;
	flex-wrap: wrap;
	gap: 0.5rem;
}

/* =========================================================
   Read More button — indigo pill
   ========================================================= */
.wpyog-read-more {
	display: inline-block;
	padding: 0.4rem 1.1rem;
	background: #3F51B5;
	color: #fff !important;
	text-decoration: none !important;
	border-radius: 20px;
	font-size: 0.82rem;
	font-weight: 500;
	line-height: 1.5;
	white-space: nowrap;
	transition: background 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 6px rgba(63, 81, 181, 0.28);
}

.wpyog-read-more:hover {
	background: #303F9F;
	color: #fff !important;
	box-shadow: 0 4px 12px rgba(63, 81, 181, 0.38);
}

/* =========================================================
   Pagination
   ========================================================= */
.wpyog-pagination {
	margin-top: 2rem;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.3rem;
}

.wpyog-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.3rem;
	height: 2.3rem;
	padding: 0 0.65rem;
	border: 1.5px solid #ddd;
	border-radius: 6px;
	color: #444;
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 500;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	background: #fff;
}

.wpyog-pagination .page-numbers.current,
.wpyog-pagination .page-numbers:hover {
	background: #3F51B5;
	color: #fff;
	border-color: #3F51B5;
}

.wpyog-pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
	cursor: default;
}

/* =========================================================
   Load More button
   ========================================================= */
.wpyog-load-more-wrap {
	margin-top: 2.5rem;
	text-align: center;
}

.wpyog-load-more-btn {
	display: inline-block;
	padding: 0.7rem 2.8rem;
	background: transparent;
	color: #3F51B5;
	border: 2px solid #3F51B5;
	border-radius: 30px;
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
	letter-spacing: 0.03em;
	transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
	line-height: 1.5;
}

.wpyog-load-more-btn:hover {
	background: #3F51B5;
	color: #fff;
	box-shadow: 0 6px 18px rgba(63, 81, 181, 0.3);
}

.wpyog-load-more-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	box-shadow: none;
}

/* =========================================================
   Single post: Prev / Next navigation
   ========================================================= */
.wpyog-post-navigation {
	margin-top: 3rem;
	border-top: 2px solid #f0f0f0;
	padding-top: 1.5rem;
}

.wpyog-nav-links {
	display: flex;
	gap: 1.5rem;
}

.wpyog-nav-prev,
.wpyog-nav-next {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding: 1.1rem 1.3rem;
	background: #f8f9ff;
	border: 1.5px solid #e5e8f5;
	border-radius: 10px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.wpyog-nav-prev:hover,
.wpyog-nav-next:hover {
	border-color: #3F51B5;
	box-shadow: 0 4px 14px rgba(63, 81, 181, 0.1);
}

.wpyog-nav-next {
	text-align: right;
}

.wpyog-nav-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	color: #3F51B5;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.wpyog-nav-title {
	display: block;
	font-size: 0.92rem;
	font-weight: 600;
	color: #1a1a2e;
	text-decoration: none;
	line-height: 1.4;
	transition: color 0.2s;
}

.wpyog-nav-title:hover {
	color: #3F51B5;
}

.wpyog-nav-empty {
	background: transparent;
	border-color: transparent;
	box-shadow: none;
	pointer-events: none;
}

/* =========================================================
   No news
   ========================================================= */
.wpyog-no-news {
	text-align: center;
	padding: 2.5rem;
	color: #999;
	background: #fafafa;
	border: 1.5px dashed #e0e0e0;
	border-radius: 10px;
	font-size: 0.95rem;
}

/* =========================================================
   Responsive
   ========================================================= */
@media ( max-width: 900px ) {
	.wpyog-layout-card.wpyog-cols-4 .wpyog-news-card-container {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media ( max-width: 768px ) {
	.wpyog-list-item {
		flex-direction: column;
	}

	.wpyog-list-item .wpyog-item-thumb {
		flex: 0 0 auto;
		max-width: 100%;
	}

	.wpyog-list-item .wpyog-item-thumb img {
		min-height: unset;
		height: 220px;
	}

	.wpyog-list-item .wpyog-item-body {
		padding: 1.1rem 1.2rem;
	}

	.wpyog-layout-card .wpyog-news-card-container,
	.wpyog-layout-card.wpyog-cols-2 .wpyog-news-card-container,
	.wpyog-layout-card.wpyog-cols-3 .wpyog-news-card-container,
	.wpyog-layout-card.wpyog-cols-4 .wpyog-news-card-container {
		grid-template-columns: 1fr;
	}

	.wpyog-nav-links {
		flex-direction: column;
	}

	.wpyog-nav-next {
		text-align: left;
	}
}

@media ( max-width: 480px ) {
	.wpyog-layout-card .wpyog-news-card-container,
	.wpyog-layout-card.wpyog-cols-2 .wpyog-news-card-container,
	.wpyog-layout-card.wpyog-cols-3 .wpyog-news-card-container,
	.wpyog-layout-card.wpyog-cols-4 .wpyog-news-card-container {
		grid-template-columns: 1fr;
	}

	.wpyog-item-title {
		font-size: 0.97rem;
	}

	.wpyog-item-excerpt {
		font-size: 0.9rem;
	}
}

/* =========================================================
   SINGLE NEWS POST — plugin template styles
   ========================================================= */

.wpyog-single-wrap {
	margin: 0 auto;
	padding: 2rem 2rem 3rem;
	max-width: 900px;
}

.wpyog-single-container {
	max-width: 860px;
	margin: 0 auto;
}

/* Header */
.wpyog-single-header {
	margin-bottom: 1.5rem;
}

/* Category pills */
.wpyog-single-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-bottom: 0.75rem;
}

.wpyog-single-cats a {
	display: inline-block;
	padding: 0.2rem 0.75rem;
	background: #f0f4ff;
	color: #3F51B5;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border-radius: 20px;
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
}

.wpyog-single-cats a:hover {
	background: #3F51B5;
	color: #fff;
}

/* Title */
.wpyog-single-title {
	font-size: 2rem;
	font-weight: bold;
	line-height: 1.3;
	margin: 0 0 0.75rem;
	color: #1a1a2e;
}

/* Meta row */
.wpyog-single-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	font-size: 0.875rem;
	color: #777;
	border-bottom: 1px solid #f0f0f0;
	padding-bottom: 0.85rem;
	margin-bottom: 0;
}

.wpyog-single-date {
	color: #888;
}

.wpyog-single-author {
	color: #666;
	font-weight: 500;
}

.wpyog-single-source {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 600;
	color: #444;
}

.wpyog-single-source a {
	color: #3F51B5;
	text-decoration: none;
}

.wpyog-single-source a:hover {
	text-decoration: underline;
}

/* Featured image */
.wpyog-single-thumb {
	margin: 1.5rem auto;
	border-radius: 12px;
	overflow: hidden;
	line-height: 0;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	text-align: center;
}

.wpyog-single-thumb-img,
.wpyog-single-thumb img {
	max-width: 100%;
	height: auto;
	max-height: 480px;
	object-fit: contain;
	display: block;
	margin: 0 auto;
	border-radius: 12px;
}

/* External link notice */
.wpyog-single-ext-notice {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	background: #f0f4ff;
	border-left: 4px solid #3F51B5;
	border-radius: 0 8px 8px 0;
	padding: 0.75rem 1rem;
	margin: 1.25rem 0;
	font-size: 0.9rem;
	color: #444;
}

.wpyog-single-ext-notice a {
	color: #3F51B5;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.wpyog-single-ext-notice a:hover {
	text-decoration: underline;
}

/* Content area */
.wpyog-single-content {
	font-size: 1.05rem;
	line-height: 1.75;
	color: #333;
	margin-top: 1.5rem;
}

.wpyog-single-content p {
	margin-bottom: 1.25rem;
}

.wpyog-single-content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

/* Paged post links */
.wpyog-page-links {
	margin-top: 1.5rem;
	display: flex;
	gap: 0.4rem;
	align-items: center;
	flex-wrap: wrap;
}

.wpyog-page-links span a,
.wpyog-page-links span {
	display: inline-block;
	padding: 0.3rem 0.7rem;
	border: 1.5px solid #ddd;
	border-radius: 4px;
	font-size: 0.85rem;
	text-decoration: none;
	color: #444;
	background: #fff;
}

.wpyog-page-links span a:hover {
	background: #3F51B5;
	color: #fff;
	border-color: #3F51B5;
}

/* Single page responsive */
@media ( max-width: 640px ) {
	.wpyog-single-title {
		font-size: 1.45rem;
	}

	.wpyog-single-thumb-img,
	.wpyog-single-thumb img {
		max-height: 260px;
	}

	.wpyog-single-content {
		font-size: 0.97rem;
	}
}

/* =========================================================
   NEWS TICKER
   ========================================================= */

/* ── Wrapper ──────────────────────────────────────────── */
.wpyog-ticker-wrap {
	display: flex;
	align-items: stretch;
	width: 100%;
	background: #ffffff;
	border: 1px solid #e4e4e4;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
	min-height: 46px;
	margin-bottom: 1.5rem;
	font-size: 0.9rem;
	line-height: 1.4;
}

/* ── Label chip ───────────────────────────────────────── */
.wpyog-ticker-label {
	display: flex;
	align-items: center;
	padding: 0 16px;
	white-space: nowrap;
	font-weight: 700;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	flex-shrink: 0;
	position: relative;
	z-index: 2;
	min-width: 80px;
	justify-content: center;
}

/* Arrow pointing right out of the label */
.wpyog-ticker-label-arrow {
	position: absolute;
	right: -11px;
	top: 50%;
	transform: translateY(-50%);
	width: 0;
	height: 0;
	border-top: 23px solid transparent;
	border-bottom: 23px solid transparent;
	/* border-left-color set inline to match label_bg */
	border-left-width: 11px;
	border-left-style: solid;
	z-index: 3;
}

/* ── Viewport — clips the scrolling content ───────────── */
.wpyog-ticker-viewport {
	flex: 1;
	overflow: hidden;
	position: relative;
	display: flex;
	align-items: center;
	padding: 0 16px 0 22px;
	min-width: 0; /* prevent flex overflow on narrow screens */
}

/* ── Counter badge ────────────────────────────────────── */
.wpyog-ticker-count {
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 0 12px;
	font-size: 0.7rem;
	font-weight: 600;
	color: #999;
	white-space: nowrap;
	flex-shrink: 0;
	letter-spacing: 0.03em;
	border-left: 1px solid #eee;
}

.wpyog-ticker-count-sep {
	margin: 0 1px;
	opacity: 0.6;
}

/* ── SCROLL animation ─────────────────────────────────── */
.wpyog-ticker-track {
	display: flex;
	white-space: nowrap;
	will-change: transform;
	/* Duration and animation-name applied by JS */
}

@keyframes wpyog-ticker-scroll-ltr {
	0%   { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

@keyframes wpyog-ticker-scroll-rtl {
	0%   { transform: translateX(-50%); }
	100% { transform: translateX(0); }
}

.wpyog-ticker-content {
	display: inline-flex;
	align-items: center;
}

/* ── Items (scroll mode: inline) ─────────────────────── */
.wpyog-ticker-item {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}

.wpyog-ticker-item a {
	color: #1a1a2e;
	text-decoration: none;
	font-weight: 500;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.wpyog-ticker-item a:hover {
	color: #3F51B5;
	text-decoration: underline;
}

.wpyog-ticker-date {
	font-size: 0.7rem;
	color: #aaa;
	white-space: nowrap;
	font-style: italic;
}

.wpyog-ticker-sep {
	color: #d0d0d0;
	margin: 0 0.7rem;
	font-size: 1rem;
	line-height: 1;
	flex-shrink: 0;
}

/* ── Cycle wrapper (fade / flap) ─────────────────────── */
.wpyog-ticker-cycle {
	position: relative;
	width: 100%;
	/* Height set dynamically by JS */
}

/* Fade mode: items are display:flex set by JS */
.wpyog-ticker-anim-fade .wpyog-ticker-item {
	padding: 8px 0;
}

/* ── FLAP (push-up slide) ─────────────────────────────── */
/*
 * Items are absolutely stacked; JS handles translateY transitions.
 * overflow:hidden on .wpyog-ticker-cycle clips the motion so only
 * one item is visible at a time — no extra CSS needed here.
 */
.wpyog-ticker-anim-flap .wpyog-ticker-item {
	padding: 8px 0;
}

/* ── Reduced-motion ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.wpyog-ticker-track {
		animation-play-state: paused !important;
	}
}

/* =========================================================
   NEWS CAROUSEL
   ========================================================= */

.wpyog-carousel-wrap {
	position: relative;
	margin: 0 auto;
}

/* ── Viewport — clips the sliding track ───────────────── */
.wpyog-carousel-viewport {
	overflow: hidden;
	position: relative;
	width: 100%;
}

/* ── Track — holds all slides side by side ────────────── */
.wpyog-carousel-track {
	display: flex;
	align-items: stretch;
	will-change: transform;
}

.wpyog-carousel-wrap[data-transition="slide"] .wpyog-carousel-track {
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.wpyog-carousel-wrap[data-transition="fade"] .wpyog-carousel-track {
	transition: opacity 0.4s ease;
}

/* ── Slide sizing — number of visible slides ──────────── */
.wpyog-carousel-item {
	flex: 0 0 33.3333%;
	max-width: 33.3333%;
	min-width: 0;
}

/* flex-shrink is 0 (see .wpyog-carousel-item above), so these items are
   rigid — they will NOT shrink to make room for the track's `gap`. A plain
   percentage (e.g. 3 items at 33.3333% = ~100% already) plus 2 gaps on top
   is guaranteed to overflow the viewport by (gaps × gap-width), and that
   overflow is exactly what gets clipped off the last card. Subtracting the
   gap total inside calc() before dividing is what actually fixes it —
   --wpyog-carousel-gap is set inline per-shortcode from the `gap` attribute
   (see class-wpyog-shortcode.php), with a 20px fallback if it's ever unset. */
.wpyog-layout-carousel.wpyog-slides-1 .wpyog-carousel-item {
	flex: 0 0 100%;
	max-width: 100%;
}
.wpyog-layout-carousel.wpyog-slides-2 .wpyog-carousel-item {
	flex: 0 0 calc((100% - (1 * var(--wpyog-carousel-gap, 20px))) / 2);
	max-width: calc((100% - (1 * var(--wpyog-carousel-gap, 20px))) / 2);
}
.wpyog-layout-carousel.wpyog-slides-3 .wpyog-carousel-item {
	flex: 0 0 calc((100% - (2 * var(--wpyog-carousel-gap, 20px))) / 3);
	max-width: calc((100% - (2 * var(--wpyog-carousel-gap, 20px))) / 3);
}
.wpyog-layout-carousel.wpyog-slides-4 .wpyog-carousel-item {
	flex: 0 0 calc((100% - (3 * var(--wpyog-carousel-gap, 20px))) / 4);
	max-width: calc((100% - (3 * var(--wpyog-carousel-gap, 20px))) / 4);
}
.wpyog-layout-carousel.wpyog-slides-5 .wpyog-carousel-item {
	flex: 0 0 calc((100% - (4 * var(--wpyog-carousel-gap, 20px))) / 5);
	max-width: calc((100% - (4 * var(--wpyog-carousel-gap, 20px))) / 5);
}

/* Carousel cards reuse .wpyog-card-item visuals but stretch full height,
   get their own breathing-room margin, and skip the grid's hover-lift
   (lifting a card inside a sliding track looks glitchy next to its neighbours). */
.wpyog-carousel-item.wpyog-card-item {
	height: auto;
	/* Vertical-only margin: gives the shadow/hover state breathing room above
	   and below each card. Horizontal spacing between slides is handled by
	   the track's flex `gap` (the shortcode's `gap` attribute) instead of
	   margin — flex-basis percentages (33.3333% etc.) already add up to
	   exactly 100% of the row, so any *horizontal* margin on top of that
	   pushes the row wider than its viewport and gets clipped by
	   .wpyog-carousel-viewport's overflow:hidden, which is what was cutting
	   the last card off on the right. `gap` doesn't have this problem —
	   browsers subtract it from the row's available width before applying
	   flex-basis, so it can never cause overflow. */
	margin: 20px 0;
}

.wpyog-carousel-item.wpyog-card-item:hover {
	transform: none;
}

/* ── Arrows ────────────────────────────────────────────────────────────
   Colours are pinned with !important — WordPress themes frequently ship
   global `button` resets (background, border-radius, box-shadow) that
   would otherwise bleed into these controls and override the plugin's
   own styling. */
.wpyog-carousel-wrap .wpyog-carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	border-radius: 50% !important;
	background-color: #ffffff !important;
	border: 1px solid #e6e6e6 !important;
	color: #1a1a2e !important;
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14) !important;
	z-index: 3;
	padding: 0;
	margin: 0;
	transition: opacity 0.25s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.wpyog-carousel-wrap .wpyog-carousel-arrow:hover {
	background-color: #3F51B5 !important;
	color: #ffffff !important;
	box-shadow: 0 6px 18px rgba(63, 81, 181, 0.3) !important;
}

.wpyog-carousel-wrap .wpyog-carousel-arrow:disabled {
	opacity: 0.35;
	cursor: not-allowed;
	box-shadow: none !important;
}

.wpyog-carousel-prev { left: -21px; }
.wpyog-carousel-next { right: -21px; }

/* Arrows-on-hover mode: hidden until the carousel is hovered (desktop /
   fine-pointer devices only — touch devices have no hover state, so
   arrows always stay visible there for usability). */
.wpyog-carousel-wrap[data-arrows-on-hover="true"] .wpyog-carousel-arrow {
	opacity: 0;
	pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
	.wpyog-carousel-wrap[data-arrows-on-hover="true"]:hover .wpyog-carousel-arrow,
	.wpyog-carousel-wrap[data-arrows-on-hover="true"] .wpyog-carousel-arrow:focus-visible {
		opacity: 1;
		pointer-events: auto;
	}
}

@media (hover: none) {
	.wpyog-carousel-wrap[data-arrows-on-hover="true"] .wpyog-carousel-arrow {
		opacity: 1 !important;
		pointer-events: auto !important;
	}
}

/* ── Dots ─────────────────────────────────────────────────────────────
   Same theme-override protection as the arrows above. */
.wpyog-carousel-dots {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1.5rem;
}

.wpyog-carousel-wrap .wpyog-carousel-dot {
	width: 9px !important;
	height: 9px !important;
	min-width: 0;
	border-radius: 50% !important;
	background-color: #d8d8e2 !important;
	border: none !important;
	-webkit-appearance: none;
	appearance: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	box-shadow: none !important;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.wpyog-carousel-wrap .wpyog-carousel-dot:hover {
	background-color: #9fa8da !important;
}

.wpyog-carousel-wrap .wpyog-carousel-dot.wpyog-carousel-dot-active {
	background-color: #3F51B5 !important;
	transform: scale(1.25);
}

/* ── Reduced motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.wpyog-carousel-track {
		transition: none !important;
	}
}

/* ── Responsive ───────────────────────────────────────────────────────
   Tablet and below: show exactly one slide at a time, regardless of the
   configured slides_to_show — matches the Card grid layout's mobile
   behaviour so both layouts feel consistent on small screens. */
@media ( max-width: 900px ) {
	.wpyog-layout-carousel.wpyog-slides-1 .wpyog-carousel-item,
	.wpyog-layout-carousel.wpyog-slides-2 .wpyog-carousel-item,
	.wpyog-layout-carousel.wpyog-slides-3 .wpyog-carousel-item,
	.wpyog-layout-carousel.wpyog-slides-4 .wpyog-carousel-item,
	.wpyog-layout-carousel.wpyog-slides-5 .wpyog-carousel-item {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.wpyog-carousel-item.wpyog-card-item {
		margin: 12px 0;
	}

	/* Arrows-on-hover has no effect on touch anyway (see hover:none rule
	   above), but keep them inset so they don't overlap page edges. */
	.wpyog-carousel-prev { left: 6px; }
	.wpyog-carousel-next { right: 6px; }
}

@media ( max-width: 600px ) {
	.wpyog-carousel-wrap .wpyog-carousel-arrow {
		width: 34px;
		height: 34px;
	}
}

/* ── Responsive ───────────────────────────────────────── */
@media ( max-width: 600px ) {
	.wpyog-ticker-label {
		min-width: 56px;
		padding: 0 10px;
		font-size: 0.63rem;
		letter-spacing: 0.04em;
	}

	.wpyog-ticker-label-arrow {
		right: -9px;
		border-top-width: 23px;
		border-bottom-width: 23px;
		border-left-width: 9px;
	}

	.wpyog-ticker-viewport {
		padding: 0 10px 0 16px;
	}

	.wpyog-ticker-item a,
	.wpyog-flap-text a {
		font-size: 0.83rem;
	}

	.wpyog-ticker-date {
		display: none; /* hide date on very small screens to save space */
	}

	.wpyog-ticker-count {
		padding: 0 8px;
		font-size: 0.65rem;
	}

	.wpyog-ticker-wrap {
		border-radius: 4px;
	}
}
