/* ==========================================================================
   MagicKit common styles (loaded with every MagicKit widget)
   Design tokens are overridden by the Style Kit (inline :root block).
   ========================================================================== */

:root {
	--mk-primary: #7b2ff7;
	--mk-secondary: #f107a3;
	--mk-dark: #1e1b4b;
	--mk-text: #4b5563;
	--mk-surface: #ffffff;
	--mk-soft: #f5f3ff;
	--mk-border: #e5e7eb;
	--mk-radius: 16px;
	--mk-btn-radius: 50px;
	--mk-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
	--mk-shadow-hover: 0 20px 45px rgba(17, 24, 39, 0.12);
	--mk-speed: 0.3s;
	--mk-gradient: linear-gradient(120deg, var(--mk-primary), var(--mk-secondary));
}

/* Button ----------------------------------------------------------------- */
.mk-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 26px;
	border: 2px solid transparent;
	border-radius: var(--mk-btn-radius);
	background: var(--mk-primary);
	color: #fff;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: all var(--mk-speed) ease;
}

.mk-btn:hover,
.mk-btn:focus {
	color: #fff;
	filter: brightness(1.08);
	transform: translateY(-2px);
	box-shadow: 0 10px 24px color-mix(in srgb, var(--mk-primary) 35%, transparent);
}

.mk-btn__icon {
	display: inline-flex;
	line-height: 1;
}

.mk-btn__icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.mk-btn--outline {
	border-color: currentColor;
	background: transparent;
	color: var(--mk-primary);
}

.mk-btn--outline:hover {
	background: var(--mk-primary);
	border-color: var(--mk-primary);
}

/* Generic helpers --------------------------------------------------------- */
.mk-card {
	border-radius: var(--mk-radius);
	background: var(--mk-surface);
	box-shadow: var(--mk-shadow);
	transition: transform var(--mk-speed) ease, box-shadow var(--mk-speed) ease;
}

.mk-icon svg,
[class*="mk-"] .e-font-icon-svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.mk-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}

.mk-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.mk-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 20px;
	background: color-mix(in srgb, var(--mk-primary) 12%, transparent);
	color: var(--mk-primary);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
}

/* Post meta */
.mk-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	color: #6b7280;
	font-size: 13px;
}

.mk-meta__sep {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.5;
}

/* Wrapper link */
.mk-has-wrapper-link {
	cursor: pointer;
}

/* Carousel ---------------------------------------------------------------- */
.mk-carousel {
	--mk-arrow-size: 44px;
	--mk-arrow-color: var(--mk-dark);
	--mk-arrow-bg: #fff;
	--mk-dot-color: color-mix(in srgb, var(--mk-dark) 25%, transparent);
	--mk-dot-active: var(--mk-primary);
	position: relative;
}

.mk-carousel .swiper,
.mk-carousel .swiper-container {
	overflow: hidden;
}

.mk-carousel:not(.is-ready) .swiper-wrapper {
	display: flex;
	gap: 24px;
	overflow: hidden;
}

.mk-carousel:not(.is-ready) .swiper-slide {
	flex: 0 0 calc(33.333% - 16px);
}

.mk-carousel .swiper-slide {
	height: auto;
}

.mk-carousel__arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: grid;
	place-items: center;
	width: var(--mk-arrow-size);
	height: var(--mk-arrow-size);
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--mk-arrow-bg);
	color: var(--mk-arrow-color);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
	transform: translateY(-50%);
	cursor: pointer;
	transition: all var(--mk-speed) ease;
}

.mk-carousel__arrow svg {
	width: 55%;
	height: 55%;
	fill: currentColor;
}

.mk-carousel__arrow:hover {
	background: var(--mk-primary);
	color: #fff;
}

.mk-carousel__arrow.swiper-button-disabled {
	opacity: 0.35;
	pointer-events: none;
}

.mk-carousel__prev {
	left: 12px;
}

.mk-carousel__next {
	right: 12px;
}

.mk-arrows-outside .mk-carousel__prev {
	left: calc(var(--mk-arrow-size) * -1 - 12px);
}

.mk-arrows-outside .mk-carousel__next {
	right: calc(var(--mk-arrow-size) * -1 - 12px);
}

.mk-arrows-bottom .mk-carousel {
	padding-bottom: calc(var(--mk-arrow-size) + 24px);
}

.mk-arrows-bottom .mk-carousel__arrow {
	top: auto;
	bottom: 0;
	transform: none;
}

.mk-arrows-bottom .mk-carousel__prev {
	left: calc(50% - var(--mk-arrow-size) - 6px);
}

.mk-arrows-bottom .mk-carousel__next {
	right: calc(50% - var(--mk-arrow-size) - 6px);
}

.mk-carousel__pagination {
	position: relative;
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 24px;
}

.mk-carousel__pagination .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	margin: 0 !important;
	border-radius: 8px;
	background: var(--mk-dot-color);
	opacity: 1;
	transition: width var(--mk-speed) ease, background var(--mk-speed) ease;
}

.mk-carousel__pagination .swiper-pagination-bullet-active {
	width: 26px;
	background: var(--mk-dot-active);
}

.mk-carousel__pagination.swiper-pagination-progressbar {
	position: relative;
	height: 4px;
	border-radius: 4px;
	background: var(--mk-dot-color);
	overflow: hidden;
}

.mk-carousel__pagination .swiper-pagination-progressbar-fill {
	position: absolute;
	inset: 0;
	background: var(--mk-dot-active);
	transform-origin: left;
}

.mk-carousel__pagination.swiper-pagination-fraction {
	color: var(--mk-dark);
	font-weight: 600;
}

/* Loading spinner ---------------------------------------------------------- */
.mk-spinner {
	display: inline-block;
	width: 22px;
	height: 22px;
	border: 3px solid color-mix(in srgb, var(--mk-primary) 20%, transparent);
	border-top-color: var(--mk-primary);
	border-radius: 50%;
	animation: mk-spin 0.7s linear infinite;
}

@keyframes mk-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Shared form styles (Magic Form, Mailchimp, login...) -------------------- */
.mk-form-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 16px;
}

.mk-form-field label {
	color: var(--mk-dark);
	font-weight: 600;
	font-size: 14px;
}

.mk-input,
.mk-form-field input:not([type="checkbox"]):not([type="radio"]),
.mk-form-field select,
.mk-form-field textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--mk-border);
	border-radius: 10px;
	background: #fff;
	color: var(--mk-dark);
	font-size: 15px;
	transition: border-color var(--mk-speed) ease, box-shadow var(--mk-speed) ease;
}

.mk-input:focus,
.mk-form-field input:focus,
.mk-form-field select:focus,
.mk-form-field textarea:focus {
	outline: none;
	border-color: var(--mk-primary);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--mk-primary) 15%, transparent);
}

.mk-form-message {
	margin-top: 12px;
	padding: 12px 16px;
	border-radius: 10px;
	font-weight: 500;
}

.mk-form-message[hidden] {
	display: none;
}

.mk-form-message.is-success {
	background: #dcfce7;
	color: #166534;
}

.mk-form-message.is-error {
	background: #fee2e2;
	color: #991b1b;
}

/* Style Kit → "Turn all animations off". "Soften" (default) only drops large
   movement, handled by each script; "Always show" changes nothing. */
@media (prefers-reduced-motion: reduce) {
	body.mk-motion-respect [class*="mk-"],
	body.mk-motion-respect [class*="mk-"]::before,
	body.mk-motion-respect [class*="mk-"]::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* Used by off-canvas, menus and popups. */
body.mk-scroll-locked {
	overflow: hidden;
}


/* Post card (Post Grid, Post Carousel, Related Posts, Smart Post Grid) ----- */
.mk-pcard {
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: var(--mk-radius);
	background: var(--mk-surface);
	box-shadow: var(--mk-shadow);
	overflow: hidden;
	transition: transform var(--mk-speed) ease, box-shadow var(--mk-speed) ease;
}

.mk-pcard:hover {
	box-shadow: var(--mk-shadow-hover);
}

.mk-pcard__thumb {
	display: block;
	overflow: hidden;
}

.mk-pcard__thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), filter var(--mk-speed) ease;
}

.mk-pcard:hover .mk-pcard__thumb img {
	transform: scale(1.06);
}

.mk-pcard__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 22px 24px 24px;
}

.mk-pcard__badge {
	padding: 4px 10px;
	border-radius: 20px;
	background: color-mix(in srgb, var(--mk-primary) 12%, transparent);
	color: var(--mk-primary);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-decoration: none;
	text-transform: uppercase;
}

.mk-pcard__title {
	margin: 0;
	font-size: 20px;
	line-height: 1.35;
}

.mk-pcard__title a {
	color: var(--mk-dark);
	text-decoration: none;
	transition: color var(--mk-speed) ease;
}

.mk-pcard__title a:hover {
	color: var(--mk-primary);
}

.mk-pcard__excerpt {
	margin: 0;
	color: var(--mk-text);
}

.mk-pcard__more {
	margin-top: auto;
	color: var(--mk-primary);
	font-weight: 700;
	text-decoration: none;
}

.mk-pcard-skin-overlay .mk-pcard {
	position: relative;
	min-height: 380px;
}

.mk-pcard-skin-overlay .mk-pcard__thumb {
	position: absolute;
	inset: 0;
}

.mk-pcard-skin-overlay .mk-pcard__thumb img {
	height: 100%;
	aspect-ratio: auto !important;
}

.mk-pcard-skin-overlay .mk-pcard__thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 25%, rgba(17, 24, 39, 0.9));
}

.mk-pcard-skin-overlay .mk-pcard__body {
	position: relative;
	justify-content: flex-end;
	pointer-events: none;
}

.mk-pcard-skin-overlay .mk-pcard__body a {
	pointer-events: auto;
}

.mk-pcard-skin-overlay .mk-pcard__title a,
.mk-pcard-skin-overlay .mk-pcard__excerpt,
.mk-pcard-skin-overlay .mk-pcard__more,
.mk-pcard-skin-overlay .mk-meta {
	color: #fff;
}

.mk-pcard-skin-overlay .mk-pcard__badge {
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	backdrop-filter: blur(6px);
}

.mk-pcard-skin-minimal .mk-pcard {
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.mk-pcard-skin-minimal .mk-pcard__thumb {
	border-radius: var(--mk-radius);
}

.mk-pcard-skin-minimal .mk-pcard__body {
	padding: 18px 0 0;
}

.mk-pcard-skin-horizontal .mk-pcard {
	flex-direction: row;
}

.mk-pcard-skin-horizontal .mk-pcard__thumb {
	flex: 0 0 40%;
}

.mk-pcard-skin-horizontal .mk-pcard__thumb img {
	height: 100%;
}

@media (max-width: 767px) {
	.mk-pcard-skin-horizontal .mk-pcard {
		flex-direction: column;
	}
}

/* Shared pagination ------------------------------------------------------- */
.mk-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin-top: 36px;
}

.mk-pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--mk-border);
	border-radius: 12px;
	background: var(--mk-surface);
	color: var(--mk-dark);
	font-weight: 600;
	text-decoration: none;
	transition: all var(--mk-speed) ease;
}

.mk-pagination .page-numbers.current,
.mk-pagination a.page-numbers:hover {
	border-color: var(--mk-primary);
	background: var(--mk-primary);
	color: #fff;
}

/* Feed / API errors (shown to editors only) */
.mk-feed-error {
	padding: 14px 18px;
	border: 1px dashed #f59e0b;
	border-radius: 10px;
	background: #fffbeb;
	color: #92400e;
	font-size: 14px;
}

