/**
 * Maarula Content Manager - Frontend Stylesheet
 */

:root {
	--mcm-saffron: #EA6316;
	--mcm-saffron-hover: #D95305;
	--mcm-charcoal: #1F2023;
	--mcm-slate: #4B5563;
	--mcm-border: #E5E7EB;
	--mcm-bg-card: #FFFFFF;
}

/* --- Toppers Grid & Slides --- */
.mcm-toppers-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
	margin: 24px 0;
}

.mcm-grid-card {
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	background: #FFF;
}

.mcm-grid-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

.mcm-card-image {
	width: 100%;
	height: auto;
	display: block;
	aspect-ratio: 1122 / 1402;
	object-fit: contain;
	border-radius: 12px;
}

.mcm-topper-slide {
	display: flex;
	justify-content: center;
	align-items: center;
}

.mcm-topper-slide img {
	width: 100%;
	max-width: 280px;
	height: auto;
	aspect-ratio: 1122 / 1402;
	object-fit: contain;
	border-radius: 12px;
	transition: transform 0.25s ease;
}

.mcm-topper-slide:hover img {
	transform: scale(1.02);
}

/* --- Feedback & Testimonials Grid --- */
.mcm-feedback-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 24px;
	margin: 28px 0;
}

.mcm-feedback-card {
	background: var(--mcm-bg-card);
	border: 1px solid var(--mcm-border);
	border-radius: 14px;
	padding: 24px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.04);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.mcm-feedback-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 12px;
}

.mcm-fb-avatar {
	width: 54px;
	height: 54px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #F3F4F6;
	flex-shrink: 0;
}

.mcm-fb-avatar-fallback {
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: #FEF3C7;
	color: #D97706;
	font-weight: 700;
	font-size: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.mcm-fb-author {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--mcm-charcoal);
}

.mcm-fb-meta {
	margin: 2px 0 0 0;
	font-size: 13px;
	color: var(--mcm-slate);
}

.mcm-fb-institute {
	margin: 2px 0 0 0;
	font-size: 12px;
	color: var(--mcm-saffron);
	font-weight: 600;
}

.mcm-fb-stars {
	color: #F59E0B;
	font-size: 16px;
	margin-bottom: 12px;
	letter-spacing: 2px;
}

.mcm-fb-quote {
	font-size: 14px;
	line-height: 1.6;
	color: #374151;
	flex-grow: 1;
}

.mcm-fb-quote p {
	margin: 0 0 10px 0;
}

.mcm-fb-video-link {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px dashed var(--mcm-border);
}

.mcm-btn-video {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--mcm-saffron);
	text-decoration: none;
}

.mcm-btn-video:hover {
	text-decoration: underline;
}

/* --- Accessible Notice Popup Modal --- */
.mcm-popup-backdrop,
.mcm-popup-backdrop *,
.mcm-popup-dialog,
.mcm-popup-dialog * {
	box-sizing: border-box;
}

.mcm-popup-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.68);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	animation: mcmFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mcm-popup-dialog {
	background: #FFFFFF;
	border-radius: 20px;
	max-width: 520px;
	width: 100%;
	min-width: 0;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	position: relative;
	box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.04);
	animation: mcmSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	display: flex;
	flex-direction: column;
	margin: auto;
}

/* Close Button: High-contrast frosted circular button with crisp SVG icon */
.mcm-popup-close-btn {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #1F2937;
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 30;
	padding: 0;
	margin: 0;
	transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.mcm-popup-close-btn:hover {
	background: #FFFFFF;
	color: #0F172A;
	transform: scale(1.08) rotate(90deg);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.mcm-popup-close-btn:focus {
	outline: none;
}

.mcm-popup-close-btn:focus-visible {
	outline: 2px solid var(--mcm-saffron, #EA580C);
	outline-offset: 2px;
}

/* Image Wrap: Fully responsive, preserving entire artwork without cropping */
.mcm-popup-image-wrap {
	position: relative;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	background: #FDFBF7;
	line-height: 0;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.mcm-popup-img-link {
	display: block;
	width: 100%;
	max-width: 100%;
	line-height: 0;
	text-decoration: none;
	cursor: pointer;
}

.mcm-popup-image-wrap img,
.mcm-popup-img {
	width: 100%;
	max-width: 100%;
	height: auto;
	max-height: min(60vh, 500px);
	object-fit: contain;
	display: block;
	margin: 0 auto;
}

/* Modal Content */
.mcm-popup-content {
	padding: 24px 28px 28px 28px;
	text-align: center;
	flex-grow: 1;
}

.mcm-popup-title {
	font-size: 21px;
	line-height: 1.35;
	font-weight: 800;
	color: var(--mcm-charcoal, #1E293B);
	margin: 0 0 10px 0;
	overflow-wrap: break-word;
	word-break: break-word;
}

.mcm-popup-body {
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--mcm-slate, #64748B);
	margin: 0 0 20px 0;
	overflow-wrap: break-word;
	word-break: break-word;
}

.mcm-popup-body p {
	margin: 0 0 8px 0;
}

.mcm-popup-body p:last-child {
	margin-bottom: 0;
}

.mcm-popup-cta-wrap {
	margin-top: 4px;
}

.mcm-popup-cta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--mcm-saffron, #EA580C);
	color: #FFFFFF !important;
	font-weight: 700;
	font-size: 15px;
	padding: 12px 28px;
	border-radius: 9999px;
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
	transition: all 0.18s ease;
}

.mcm-popup-cta-btn:hover {
	background: var(--mcm-saffron-hover, #C2410C);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
	color: #FFFFFF !important;
}

.mcm-popup-cta-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3);
}

@media (max-width: 480px) {
	.mcm-popup-backdrop {
		padding: 12px;
	}
	.mcm-popup-dialog {
		border-radius: 16px;
		width: 100%;
		max-width: calc(100vw - 24px);
		max-height: calc(100vh - 24px);
	}
	.mcm-popup-close-btn {
		top: 10px;
		right: 10px;
		width: 32px;
		height: 32px;
	}
	.mcm-popup-content {
		padding: 20px 18px 22px 18px;
	}
	.mcm-popup-title {
		font-size: 19px;
	}
	.mcm-popup-body {
		font-size: 14px;
	}
	.mcm-popup-cta-btn {
		width: 100%;
		box-sizing: border-box;
		padding: 12px 20px;
	}
}

@keyframes mcmFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes mcmSlideUp {
	from { opacity: 0; transform: translateY(20px) scale(0.97); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}
