/* ============================================================
 * Modern CTA Card — Frontend Styles
 * ----------------------------------------------------------
 * All visual properties below are sensible defaults that
 * Elementor's selector-based controls will override at the
 * widget level. Keep this file focused on layout + behavior.
 * ============================================================ */

.mcc-wrapper,
.mcc-wrapper *,
.mcc-wrapper *::before,
.mcc-wrapper *::after {
	box-sizing: border-box;
}

.mcc-wrapper {
	display: flex;
	width: 100%;
}

.mcc-grid {
	display: grid;
	width: 100%;
	gap: 24px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mcc-layout-single .mcc-grid {
	grid-template-columns: 1fr;
	max-width: 480px;
}

/* ---------- Card ---------- */
.mcc-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 16px 16px 20px;
	background: #ffffff;
	border: 0;
	border-radius: 16px;
	cursor: pointer;
	overflow: hidden;
	text-align: left;
	font: inherit;
	color: inherit;
	width: 100%;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	transition:
		transform 400ms cubic-bezier(0.4, 0, 0.2, 1),
		box-shadow 400ms cubic-bezier(0.4, 0, 0.2, 1),
		background-color 400ms cubic-bezier(0.4, 0, 0.2, 1),
		border-color 400ms cubic-bezier(0.4, 0, 0.2, 1);
	-webkit-tap-highlight-color: transparent;
}

.mcc-card:focus {
	outline: 0;
}

.mcc-card:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.mcc-card__image {
	position: relative;
	overflow: hidden;
	height: 280px;
	margin-bottom: 16px;
	border-radius: 12px;
	background: #f3f4f6;
}

.mcc-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

.mcc-card__content {
	flex: 1;
	min-width: 0;
}

.mcc-card__title {
	margin: 0 0 4px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	color: #0f0f0f;
	transition: color 300ms ease;
}

.mcc-card__subtitle {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: #6b7280;
}

/* ---------- Modal ---------- */
.mcc-modals {
	position: relative;
}

.mcc-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 300ms ease,
		visibility 300ms ease;
}

.mcc-modal.is-active {
	opacity: 1;
	visibility: visible;
}

.mcc-modal__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(15, 15, 15, 0.65);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	cursor: pointer;
}

.mcc-modal__container {
	position: relative;
	width: 100%;
	max-width: 760px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	overflow-x: hidden;
	background-color: #ffffff;
	border-radius: 20px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
	transform: scale(0.96) translateY(16px);
	transition: transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1);
	-webkit-overflow-scrolling: touch;
}

.mcc-modal.is-active .mcc-modal__container {
	transform: scale(1) translateY(0);
}

/* Custom scrollbar in modal */
.mcc-modal__container::-webkit-scrollbar {
	width: 8px;
}
.mcc-modal__container::-webkit-scrollbar-track {
	background: transparent;
}
.mcc-modal__container::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.15);
	border-radius: 999px;
}
.mcc-modal__container::-webkit-scrollbar-thumb:hover {
	background: rgba(0, 0, 0, 0.25);
}

.mcc-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 40px;
	height: 40px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background-color: rgba(15, 15, 15, 0.06);
	color: #0f0f0f;
	cursor: pointer;
	z-index: 2;
	transition:
		background-color 200ms ease,
		transform 200ms ease;
}

.mcc-modal__close:hover,
.mcc-modal__close:focus-visible {
	background-color: rgba(15, 15, 15, 0.12);
	transform: rotate(90deg);
	outline: 0;
}

.mcc-modal__inner {
	padding: 40px;
}

.mcc-modal__title {
	margin: 0 0 12px;
	padding-right: 48px;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
	color: #0f0f0f;
}

.mcc-modal__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.5;
	color: #6b7280;
}

.mcc-modal__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.mcc-modal__meta svg {
	flex-shrink: 0;
	stroke: #0f0f0f;
}

.mcc-modal__description {
	margin: 0 0 24px;
	font-size: 15px;
	line-height: 1.65;
	color: #4b5563;
}

.mcc-modal__description p:first-child { margin-top: 0; }
.mcc-modal__description p:last-child  { margin-bottom: 0; }

.mcc-modal__description a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Modal Gallery (Swiper) ---------- */
.mcc-modal__gallery {
	position: relative;
	margin: 0 0 24px;
}

.mcc-swiper {
	overflow: hidden;
	border-radius: 12px;
	background: #f3f4f6;
}

.mcc-swiper .swiper-slide {
	background: #f3f4f6;
}

.mcc-swiper .swiper-slide img {
	display: block;
	width: 100%;
	height: 420px;
	object-fit: cover;
}

.mcc-swiper-nav {
	position: absolute;
	top: 50%;
	width: 44px;
	height: 44px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.95);
	color: #0f0f0f;
	cursor: pointer;
	z-index: 2;
	transform: translateY(-50%);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transition:
		background-color 200ms ease,
		transform 200ms ease,
		opacity 200ms ease;
}

.mcc-swiper-prev { left: 12px; }
.mcc-swiper-next { right: 12px; }

.mcc-swiper-nav:hover,
.mcc-swiper-nav:focus-visible {
	background-color: #ffffff;
	transform: translateY(-50%) scale(1.06);
	outline: 0;
}

.mcc-swiper-nav.swiper-button-disabled {
	opacity: 0.4;
	pointer-events: none;
}

/* Pagination */
.mcc-modal__gallery .swiper-pagination {
	position: relative;
	bottom: auto;
	margin-top: 14px;
	display: flex;
	justify-content: center;
	gap: 8px;
	line-height: 0;
}

.mcc-modal__gallery .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	background-color: #d1d5db;
	opacity: 1;
	transition:
		background-color 200ms ease,
		transform 200ms ease;
}

.mcc-modal__gallery .swiper-pagination-bullet-active {
	background-color: #0f0f0f;
	transform: scale(1.25);
}

/* ---------- Modal Button ---------- */
.mcc-modal__footer {
	display: flex;
	justify-content: flex-start;
	margin-top: 4px;
}

.mcc-modal__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 28px;
	background-color: #0f0f0f;
	color: #ffffff;
	border: 0;
	border-radius: 999px;
	text-decoration: none;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition:
		background-color 250ms ease,
		color 250ms ease,
		transform 250ms ease,
		box-shadow 250ms ease,
		border-color 250ms ease;
}

.mcc-modal__button:hover,
.mcc-modal__button:focus-visible {
	background-color: #000000;
	color: #ffffff;
	transform: translateY(-2px);
	outline: 0;
}

.mcc-modal__button svg {
	transition: transform 250ms ease;
}

.mcc-modal__button:hover svg,
.mcc-modal__button:focus-visible svg {
	transform: translateX(3px);
}

/* ---------- Body scroll lock ---------- */
body.mcc-modal-open {
	overflow: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.mcc-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.mcc-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.mcc-card__image  { height: 220px; }
	.mcc-modal        { padding: 12px; }
	.mcc-modal__inner { padding: 24px; }
	.mcc-modal__title { font-size: 22px; padding-right: 40px; }
	.mcc-swiper .swiper-slide img { height: 260px; }
	.mcc-swiper-nav { width: 36px; height: 36px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.mcc-card,
	.mcc-card__image img,
	.mcc-modal,
	.mcc-modal__container,
	.mcc-modal__close,
	.mcc-modal__button,
	.mcc-modal__button svg,
	.mcc-swiper-nav,
	.mcc-modal__gallery .swiper-pagination-bullet {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
	.mcc-card:hover,
	.mcc-card:focus-visible {
		transform: none !important;
	}
}

/* ---------- Elementor editor adjustments ---------- */
.elementor-editor-active .mcc-modal {
	/* allow editing without modals locking the editor */
	pointer-events: none;
}
.elementor-editor-active .mcc-modal.is-active {
	pointer-events: auto;
}
