/**
 * Magazine home page (front page layout).
 */

.mm-icon {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	display: block;
}

.mm-icon--xs { width: 16px; height: 16px; }
.mm-icon--sm { width: 18px; height: 18px; }
.mm-icon--lg { width: 40px; height: 40px; }

body.mm-front-magazine .site-main {
	padding-top: 0;
}

body.mm-front-magazine .content-area--below-magazine {
	padding-top: var(--mm-section-space);
}

/* Buttons (home extras) */
.mm-btn--outline {
	background: transparent;
	border: 1.5px solid var(--mm-accent);
	color: var(--mm-accent);
}

.mm-btn--outline:hover {
	background: color-mix(in srgb, var(--mm-accent) 12%, transparent);
	color: var(--mm-accent-hover);
}

.mm-btn--white {
	background: var(--mm-surface);
	color: var(--mm-accent);
}

.mm-btn--white:hover {
	background: color-mix(in srgb, var(--mm-accent) 8%, white);
}

/* Hero */
.mm-home-hero {
	background: linear-gradient(135deg, #e8f5ef 0%, #f0ebfa 100%);
	padding-block: clamp(40px, 8vw, 64px);
}

.mm-home-hero__inner {
	display: flex;
	flex-direction: column;
	gap: 28px;
	align-items: stretch;
}

.mm-home-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: color-mix(in srgb, var(--mm-accent) 12%, transparent);
	color: var(--mm-accent);
	font-size: 0.8125rem;
	font-weight: 600;
	padding: 6px 14px;
	border-radius: var(--mm-btn-radius);
	margin: 0 0 16px;
}

.mm-home-hero__title {
	font-family: var(--mm-font-heading);
	font-size: clamp(2rem, 5vw, 2.75rem);
	font-weight: 700;
	color: var(--mm-navy);
	line-height: 1.2;
	margin: 0 0 14px;
}

.mm-home-hero__title span {
	color: var(--mm-accent);
}

.mm-home-hero__sub {
	font-size: clamp(0.9375rem, 2vw, 1rem);
	color: var(--mm-text-muted);
	line-height: 1.65;
	margin: 0 0 24px;
	max-width: 36rem;
}

.mm-home-hero__btns {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.mm-home-checkin {
	background: var(--mm-surface);
	border-radius: var(--mm-card-radius);
	padding: 22px;
	box-shadow: var(--mm-card-shadow);
	width: 100%;
	max-width: 280px;
}

.mm-home-checkin__label {
	font-size: 0.6875rem;
	color: var(--mm-text-muted);
	margin: 0 0 8px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.mm-home-checkin__q {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--mm-navy);
	margin: 0 0 14px;
}

.mm-home-checkin__opts {
	display: flex;
	flex-direction: column;
	gap: 8px;
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.mm-home-checkin__opt {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 10px 14px;
	background: color-mix(in srgb, var(--mm-bg) 50%, white);
	border: 1px solid transparent;
	border-radius: var(--mm-card-image-radius);
	font-family: var(--mm-font-body);
	font-size: 0.875rem;
	color: var(--mm-text);
	cursor: pointer;
	text-align: left;
	transition: background 0.2s ease, color 0.2s ease;
}

.mm-home-checkin__opt:hover {
	background: color-mix(in srgb, var(--mm-border) 40%, white);
}

.mm-home-checkin__opt.is-active,
.mm-home-checkin__opt[aria-pressed="true"] {
	background: var(--mm-accent);
	color: var(--mm-btn-primary-text);
}

/* Stats */
.mm-home-stats {
	background: var(--mm-accent);
	padding-block: 20px;
}

.mm-home-stats__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mm-home-stats__item {
	text-align: center;
	padding: 8px 12px;
}

.mm-home-stats__num {
	display: block;
	font-size: clamp(1.25rem, 3vw, 1.5rem);
	font-weight: 700;
	color: var(--mm-btn-primary-text);
}

.mm-home-stats__lbl {
	display: block;
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.75);
	margin-top: 4px;
}

/* Sections */
.mm-home-main {
	padding-block: clamp(32px, 6vw, 48px);
}

.mm-home-section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
}

.mm-home-section__title {
	font-family: var(--mm-font-heading);
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--mm-navy);
	margin: 0;
}

.mm-home-section__link {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--mm-accent);
	text-decoration: none;
	white-space: nowrap;
}

.mm-home-section__link:hover {
	text-decoration: underline;
	color: var(--mm-accent-hover);
}

.mm-home-featured-wrap {
	margin-bottom: 32px;
}

/* Topics */
.mm-home-topics {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	list-style: none;
	margin: 0 0 32px;
	padding: 0;
}

.mm-home-topic {
	position: relative;
	background: var(--mm-surface);
	border: 1px solid var(--mm-border);
	border-radius: var(--mm-card-radius);
	padding: 18px 14px;
	text-align: center;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mm-home-topic:hover {
	border-color: var(--mm-accent);
	box-shadow: var(--mm-card-shadow);
	transform: translateY(-2px);
}

.mm-home-topic a {
	display: block;
	text-decoration: none;
	color: inherit;
}

.mm-home-topic a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.mm-home-topic__icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--mm-accent) 14%, var(--mm-surface));
	border: 1px solid color-mix(in srgb, var(--mm-accent) 22%, var(--mm-border));
	border-radius: 14px;
	color: var(--mm-accent);
}

.mm-home-topic__icon .mm-icon--topic {
	width: 28px;
	height: 28px;
	stroke-width: 1.75;
}

.mm-home-topic__icon--anxiety {
	color: #3d7a6a;
	background: #e8f5ef;
	border-color: #c5e6d8;
}

.mm-home-topic__icon--depression {
	color: #5a6b8a;
	background: #eef1f7;
	border-color: #d4dbe8;
}

.mm-home-topic__icon--sleep {
	color: #5b4f8c;
	background: #f0ebfa;
	border-color: #ddd4f0;
}

.mm-home-topic__icon--relationships {
	color: #9a4d5e;
	background: #fef0f3;
	border-color: #f5d0d8;
}

.mm-home-topic__name {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--mm-text);
}

/* Articles */
.mm-home-articles {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mm-home-article {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--mm-surface);
	border: 1px solid var(--mm-border);
	border-radius: var(--mm-card-radius);
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mm-home-article:hover {
	border-color: color-mix(in srgb, var(--mm-accent) 40%, var(--mm-border));
	box-shadow: var(--mm-card-shadow);
	transform: translateY(-2px);
}

.mm-home-article__media {
	min-height: 140px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
}

.mm-home-article__thumb {
	width: 100%;
	height: 100%;
	min-height: 140px;
	object-fit: cover;
}

.mm-home-article__body {
	padding: 16px 16px 12px;
	flex: 1;
}

.mm-home-article__tag {
	font-size: 0.6875rem;
	color: var(--mm-accent);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin: 0 0 6px;
}

.mm-home-article__title {
	font-size: 1rem;
	font-weight: 600;
	color: var(--mm-navy);
	line-height: 1.4;
	margin: 0 0 8px;
}

.mm-home-article__meta {
	font-size: 0.8125rem;
	color: var(--mm-text-muted);
	margin: 0;
}

.mm-home-article__read {
	position: relative;
	z-index: 2;
	display: block;
	margin: 0 16px 16px;
	background: color-mix(in srgb, var(--mm-accent) 10%, white);
	color: var(--mm-accent);
	text-align: center;
	padding: 10px;
	border-radius: var(--mm-card-image-radius);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s ease;
}

.mm-home-article__read:hover {
	background: color-mix(in srgb, var(--mm-accent) 18%, white);
	color: var(--mm-accent-hover);
}

/* Wellness paths (replaces consult banner) */
.mm-home-paths {
	margin-bottom: clamp(24px, 5vw, 40px);
}

.mm-home-paths__intro {
	text-align: center;
	max-width: 36rem;
	margin: 0 auto 24px;
}

.mm-home-paths__title {
	font-family: var(--mm-font-heading);
	font-size: clamp(1.25rem, 3vw, 1.5rem);
	font-weight: 700;
	color: var(--mm-navy);
	margin: 0 0 8px;
}

.mm-home-paths__subtitle {
	font-size: 0.9375rem;
	color: var(--mm-text-muted);
	margin: 0;
	line-height: 1.6;
}

.mm-home-paths__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mm-home-path {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 18px 16px;
	background: var(--mm-surface);
	border: 1px solid var(--mm-border);
	border-radius: var(--mm-card-radius);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mm-home-path:hover {
	border-color: var(--mm-accent);
	box-shadow: var(--mm-card-shadow);
	transform: translateY(-2px);
	color: inherit;
}

.mm-home-path__icon {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--mm-accent) 12%, var(--mm-surface));
	border-radius: 12px;
	color: var(--mm-accent);
}

.mm-home-path__icon .mm-icon--path {
	width: 24px;
	height: 24px;
	stroke-width: 1.75;
}

.mm-home-path__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.mm-home-path__name {
	font-size: 1rem;
	font-weight: 700;
	color: var(--mm-navy);
}

.mm-home-path__desc {
	font-size: 0.8125rem;
	color: var(--mm-text-muted);
	line-height: 1.5;
}

.mm-home-path__arrow {
	flex-shrink: 0;
	align-self: center;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--mm-accent);
	line-height: 1;
}

/* Quizzes page (page-quizzes.php) */
.site-main--quizzes {
	padding-top: 0;
}

.mm-quiz-hub-hero {
	background: linear-gradient(135deg, #e8f5ef 0%, #f0ebfa 100%);
	padding-block: clamp(36px, 7vw, 56px);
	text-align: center;
}

.mm-quiz-hub-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: color-mix(in srgb, var(--mm-accent) 12%, transparent);
	color: var(--mm-accent);
	font-size: 0.8125rem;
	font-weight: 600;
	padding: 6px 14px;
	border-radius: var(--mm-btn-radius);
	margin: 0 0 14px;
}

.mm-quiz-hub-hero__title {
	font-family: var(--mm-font-heading);
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	color: var(--mm-navy);
	margin: 0 0 10px;
}

.mm-quiz-hub-hero__sub {
	font-size: 1rem;
	color: var(--mm-text-muted);
	max-width: 32rem;
	margin: 0 auto;
	line-height: 1.6;
}

.mm-quiz-hub {
	padding-bottom: var(--mm-section-space);
}

.mm-quiz-hub__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
	list-style: none;
	margin: 0 0 32px;
	padding: 0;
}

.mm-quiz-hub__card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 20px 18px;
	background: var(--mm-surface);
	border: 1px solid var(--mm-border);
	border-radius: var(--mm-card-radius);
	text-decoration: none;
	color: inherit;
	position: relative;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mm-quiz-hub__card:hover {
	border-color: var(--mm-accent);
	box-shadow: var(--mm-card-shadow);
	transform: translateY(-2px);
	color: inherit;
}

.mm-quiz-hub__badge {
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--mm-accent);
	background: color-mix(in srgb, var(--mm-accent) 10%, white);
	padding: 4px 10px;
	border-radius: var(--mm-btn-radius);
}

.mm-quiz-hub__icon {
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--mm-accent) 12%, var(--mm-surface));
	border-radius: 14px;
	color: var(--mm-accent);
}

.mm-quiz-hub__name {
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--mm-navy);
}

.mm-quiz-hub__desc {
	font-size: 0.875rem;
	color: var(--mm-text-muted);
	line-height: 1.55;
}

.mm-quiz-hub__cta {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--mm-accent);
	margin-top: 4px;
}

.mm-quiz-hub__content {
	max-width: 40rem;
	margin: 0 auto;
}

@media (min-width: 640px) {
	.mm-quiz-hub__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 900px) {
	.mm-quiz-hub__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Newsletter */
.mm-home-newsletter-wrap {
	background: #f9f7ff;
	border-top: 1px solid var(--mm-border);
	padding-block: clamp(24px, 5vw, 32px);
}

.mm-home-newsletter {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 20px;
}

.mm-home-newsletter__title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1rem;
	font-weight: 700;
	color: var(--mm-navy);
	margin: 0;
}

.mm-home-newsletter__icon {
	color: var(--mm-accent);
}

.mm-home-newsletter__sub {
	font-size: 0.875rem;
	color: var(--mm-text-muted);
	margin: 4px 0 0;
}

.mm-home-newsletter__form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mm-home-newsletter__input {
	flex: 1;
	min-height: 44px;
	border: 1px solid var(--mm-border);
	border-radius: var(--mm-btn-radius);
	padding: 10px 18px;
	font: inherit;
	background: var(--mm-surface);
	color: var(--mm-text);
}

.mm-home-newsletter__input:focus {
	border-color: var(--mm-accent);
	outline: 2px solid var(--mm-accent);
	outline-offset: 2px;
}

.mm-home-newsletter__submit {
	width: 100%;
}

@media (min-width: 640px) {
	.mm-home-hero__inner {
		flex-direction: row;
		align-items: center;
	}

	.mm-home-checkin {
		flex-shrink: 0;
		margin-inline-start: auto;
	}

	.mm-home-stats__grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.mm-home-stats__item {
		border-right: 1px solid rgba(255, 255, 255, 0.2);
	}

	.mm-home-stats__item:last-child {
		border-right: none;
	}

	.mm-home-paths__grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.mm-home-newsletter__form {
		flex-direction: row;
		align-items: stretch;
	}

	.mm-home-newsletter__submit {
		width: auto;
	}
}

@media (min-width: 900px) {
	.mm-home-topics {
		grid-template-columns: repeat(4, 1fr);
	}

	.mm-home-articles {
		grid-template-columns: repeat(3, 1fr);
	}

	.mm-home-newsletter {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.mm-home-newsletter__form {
		flex: 0 1 auto;
		min-width: 320px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mm-home-topic:hover,
	.mm-home-article:hover,
	.mm-home-path:hover {
		transform: none;
	}
}
