/* Rubrika Horoskop: kartice na kategoriji Horoskop i najnoviji tekst na podkategoriji. */

.mm-h {
	--mm-ink: #16161d;
	--mm-muted: #5b5b6b;
	--mm-radius: 18px;
	--mm-shadow: 0 10px 30px -12px rgba(30, 27, 75, 0.25);
	--mm-card: #f6f5fb;
	container-type: inline-size;
	color: var(--mm-ink);
}

.s-dark .mm-h {
	--mm-ink: #f2f2f6;
	--mm-muted: #b9b9c6;
	--mm-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
	--mm-card: #1e1e26;
}

.mm-h *,
.mm-h *::before,
.mm-h *::after {
	box-sizing: border-box;
}

.mm-h a,
.mm-h a:hover {
	text-decoration: none;
	box-shadow: none;
	border-bottom: 0;
	background-image: none;
}

/* Intro under the heading (category description) --------------------------- */

.mm-h-intro {
	margin: -4px 0 22px;
	font-size: 17px;
	line-height: 1.55;
}

.mm-h-intro p {
	margin: 0;
}

.mm-h-intro p + p {
	margin-top: 10px;
}

/* Hub: one section per type ------------------------------------------------ */

.mm-h-hub {
	display: grid;
	gap: 28px;
	margin-bottom: 32px;
}

.mm-h-sec {
	--mm-grad: linear-gradient(135deg, #2d2ba8 0%, #5b4cf0 100%);
	--mm-accent: #4a3fd6;
	overflow: hidden;
	border-radius: var(--mm-radius);
	background: var(--mm-card);
}

.mm-h-sec--sedmicni { --mm-grad: linear-gradient(135deg, #6b3fd8 0%, #c2489b 100%); --mm-accent: #9a3fb8; }
.mm-h-sec--mjesecni { --mm-grad: linear-gradient(135deg, #d9475a 0%, #f08a4b 100%); --mm-accent: #c8463f; }
.mm-h-sec--ljubavni { --mm-grad: linear-gradient(135deg, #b0174f 0%, #ec4f86 100%); --mm-accent: #b0174f; }
.mm-h-sec--novcani  { --mm-grad: linear-gradient(135deg, #0d6e55 0%, #2aa874 100%); --mm-accent: #0f7a5c; }

.s-dark .mm-h-sec { --mm-accent: #c9c2ff; }

.mm-h a.mm-h-sec__head {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 16px 68px 16px 18px;
	background: var(--mm-grad);
	color: #fff;
}

/* Arrow in a white circle, so the header reads as a link. */
.mm-h a.mm-h-sec__head::after {
	content: "→";
	position: absolute;
	top: 50%;
	right: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #fff;
	color: var(--mm-accent);
	font-size: 20px;
	font-weight: 800;
	line-height: 1;
	box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.35);
	transform: translateY(-50%);
	transition: transform 0.2s;
}

.s-dark .mm-h a.mm-h-sec__head::after {
	color: #2d2ba8;
}

.mm-h a.mm-h-sec__head:hover::after,
.mm-h a.mm-h-sec__head:focus-visible::after {
	transform: translate(4px, -50%);
}

.mm-h .mm-h-sec__title {
	margin: 0;
	font-size: 20px;
	line-height: 1.2;
	font-weight: 800;
	color: #fff;
}

.mm-h-sec__period {
	font-size: 14px;
	font-weight: 500;
	opacity: 0.9;
}

.mm-h-signs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	margin: 0;
	padding: 14px;
	list-style: none;
}

.mm-h-signs li {
	margin: 0;
	padding: 0;
}

.mm-h-signs li::before {
	display: none;
}

.mm-h a.mm-h-sign {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-height: 64px;
	padding: 8px 4px;
	border-radius: 12px;
	background: #fff;
	color: var(--mm-ink);
	text-align: center;
	transition: transform 0.15s, box-shadow 0.15s;
}

.s-dark .mm-h a.mm-h-sign {
	background: #2a2a34;
}

.mm-h a.mm-h-sign:hover,
.mm-h a.mm-h-sign:focus-visible {
	transform: translateY(-2px);
	box-shadow: var(--mm-shadow);
	color: var(--mm-ink);
}

.mm-h a.mm-h-sign:focus-visible,
.mm-h a.mm-h-sec__head:focus-visible {
	outline: 3px solid var(--mm-accent);
	outline-offset: 2px;
}

.mm-h-sign__glyph {
	font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols", sans-serif;
	font-size: 22px;
	line-height: 1;
	color: var(--mm-accent);
}

.mm-h-sign__name {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.mm-h-ad {
	display: flex;
	justify-content: center;
	min-width: 0;
}

/* Subcategory: under the newest article, or under the heading on later pages.
   The gap only appears once GAM has filled the slot. */
.mm-h-ad--latest:has(iframe, img),
.mm-h-ad--top:has(iframe, img) {
	margin: 0 0 28px;
}

@container (min-width: 560px) {
	.mm-h-signs {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}

/* Newest article on a subcategory --------------------------------------- */

.mm-h-latest {
	margin-bottom: 32px;
}

.mm-h a.mm-h-latest__link {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	overflow: hidden;
	border-radius: var(--mm-radius);
	background: var(--mm-card);
	color: var(--mm-ink);
	transition: box-shadow 0.2s, transform 0.2s;
}

.mm-h a.mm-h-latest__link:hover,
.mm-h a.mm-h-latest__link:focus-visible {
	box-shadow: var(--mm-shadow);
	transform: translateY(-2px);
	color: var(--mm-ink);
}

.mm-h-latest__media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.mm-h-latest__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mm-h-latest__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 20px;
}

.mm-h-latest__kicker {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #5b4cf0;
}

.s-dark .mm-h-latest__kicker {
	color: #a99cff;
}

.mm-h .mm-h-latest__title {
	margin: 0;
	font-size: 24px;
	line-height: 1.25;
	color: inherit;
}

.mm-h-latest__excerpt {
	font-size: 16px;
	line-height: 1.55;
	color: var(--mm-muted);
}

.mm-h-latest__cta {
	align-self: flex-start;
	margin-top: 4px;
	padding: 10px 18px;
	border-radius: 999px;
	background: linear-gradient(135deg, #2d2ba8 0%, #5b4cf0 100%);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
}

.mm-h-latest--sedmicni .mm-h-latest__cta { background: linear-gradient(135deg, #6b3fd8 0%, #c2489b 100%); }
.mm-h-latest--mjesecni .mm-h-latest__cta { background: linear-gradient(135deg, #d9475a 0%, #f08a4b 100%); }
.mm-h-latest--ljubavni .mm-h-latest__cta { background: linear-gradient(135deg, #b0174f 0%, #ec4f86 100%); }
.mm-h-latest--novcani  .mm-h-latest__cta { background: linear-gradient(135deg, #0d6e55 0%, #2aa874 100%); }

@container (min-width: 640px) {
	.mm-h a.mm-h-latest__link {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
		align-items: stretch;
	}

	.mm-h-latest__media {
		aspect-ratio: auto;
		min-height: 260px;
	}

	.mm-h-latest__body {
		justify-content: center;
		padding: 28px;
	}
}

.mm-h-previous-heading {
	margin: 0 0 20px;
	font-size: 22px;
	line-height: 1.3;
}

@media (prefers-reduced-motion: reduce) {
	.mm-h * {
		transition: none !important;
	}
}
