/* Molyplast Hero Slider — banner inteiro e full-width, legenda em cápsula de vidro na base. */

.mph {
	--mph-navy: #050f2c;
	--mph-yellow: #ffc800;
	--mph-max-h: min(660px, 74vh); /* acima disso as laterais viram a própria imagem desfocada */
	--mph-ease: cubic-bezier(.22, .8, .24, 1);

	position: relative;
	overflow: hidden;
	width: 100%;
	background: var(--mph-navy);
	color: #fff;
	font-family: inherit;
	touch-action: pan-y;
}

/* Rompe o contêiner do Oxygen e ocupa a tela toda; o JS ajusta a largura sem a barra de rolagem */
.mph--bleed {
	flex-shrink: 0;
	width: 100vw;
	max-width: none;
	margin-left: calc(50% - 50vw);
}

.mph,
.mph *,
.mph *::before,
.mph *::after { box-sizing: border-box; }

/* ---------- Banner: proporção original, nunca cortado ---------- */

.mph-frames {
	display: grid;
	width: 100%; /* sem isso o max-height encolheria a largura junto */
	aspect-ratio: 1040 / 500;
	max-height: var(--mph-max-h);
}

.mph-frame {
	grid-area: 1 / 1;
	position: relative;
	display: block;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transition: opacity .9s var(--mph-ease), visibility 0s linear .9s;
}

.mph-frame.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity .9s var(--mph-ease), visibility 0s;
}

/* Preenchimento lateral em telas largas: a mesma imagem, desfocada */
.mph-frame__fill {
	position: absolute;
	inset: -60px;
	width: calc(100% + 120px);
	height: calc(100% + 120px);
	max-width: none;
	object-fit: cover;
	filter: blur(48px) saturate(1.3) brightness(.75);
}

.mph-frame__img {
	position: relative;
	display: block;
	width: auto;
	height: 100%;
	max-width: 100%;
	margin: 0 auto;
	object-fit: cover;
	-webkit-mask: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
	mask: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}

/* ---------- Legenda: cápsula de vidro discreta ---------- */

/* Acompanha a largura da imagem (não do preenchimento) e encosta no canto inferior
   direito, longe do título e do logo que as artes trazem à esquerda. */
.mph-captions {
	position: absolute;
	left: 50%;
	bottom: clamp(14px, 2vw, 26px);
	z-index: 2;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	justify-items: end;
	align-items: end; /* legendas de alturas diferentes não esticam até a maior */
	width: min(100%, calc(var(--mph-max-h) * 1040 / 500));
	padding: 0 clamp(14px, 2.4vw, 32px);
	transform: translateX(-50%);
	pointer-events: none;
}

.mph-caption {
	grid-area: 1 / 1;
	display: flex;
	align-items: center;
	gap: 18px;
	width: min(500px, 100%);
	padding: 12px 12px 12px 18px;
	border-radius: 20px;
	background: rgba(5, 15, 44, .38);
	-webkit-backdrop-filter: blur(22px) saturate(170%);
	backdrop-filter: blur(22px) saturate(170%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .22),
		inset 0 0 0 1px rgba(255, 255, 255, .10),
		0 12px 32px -14px rgba(0, 0, 0, .55);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .6s var(--mph-ease), transform .6s var(--mph-ease), visibility 0s linear .6s;
}

.mph-caption.is-active {
	opacity: 1;
	visibility: visible;
	transform: none;
	pointer-events: auto;
	transition: opacity .6s var(--mph-ease) .2s, transform .6s var(--mph-ease) .2s, visibility 0s;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.mph-caption { background: rgba(5, 15, 44, .85); }
}

.mph-caption__text {
	flex: 1;
	min-width: 0;
}

/* Categoria como rótulo discreto acima do título */
.mph-cat {
	display: inline-block;
	max-width: 100%;
	overflow: hidden;
	color: var(--mph-yellow);
	font-size: 10.5px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
	opacity: .9;
}

.mph-cat:hover { opacity: 1; }

.mph-title {
	margin: 2px 0 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	text-wrap: balance;
}

.mph-title a {
	color: #fff;
	text-decoration: none;
}

.mph-title a:hover { text-decoration: underline; text-underline-offset: 3px; }

.mph-excerpt {
	margin: 3px 0 0;
	color: rgba(255, 255, 255, .68);
	font-size: 12.5px;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.mph-cta {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 10px 7px 14px;
	border-radius: 999px;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	background: rgba(255, 255, 255, .12);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
	transition: background .2s ease, gap .3s var(--mph-ease);
}

.mph-cta:hover {
	background: rgba(255, 255, 255, .22);
	gap: 9px;
}

.mph-cta svg,
.mph-arrow svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ---------- Setas laterais ---------- */

.mph-arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	background: rgba(5, 15, 44, .3);
	-webkit-backdrop-filter: blur(14px) saturate(160%);
	backdrop-filter: blur(14px) saturate(160%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 0 0 1px rgba(255, 255, 255, .12);
	opacity: .75;
	transition: opacity .25s ease, background .2s ease;
}

.mph:hover .mph-arrow,
.mph-arrow:focus-visible { opacity: 1; }

.mph-arrow:hover { background: rgba(255, 255, 255, .2); }

.mph-arrow--prev { left: clamp(12px, 2vw, 28px); }
.mph-arrow--next { right: clamp(12px, 2vw, 28px); }

/* ---------- Linha de tempo na base ---------- */

.mph-progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	height: 3px;
	background: rgba(255, 255, 255, .12);
}

.mph-progress span {
	display: block;
	height: 100%;
	background: var(--mph-yellow);
	transform: scaleX(0);
	transform-origin: left;
}

.mph.is-playing .mph-progress span { animation: mph-progress var(--mph-duration) linear forwards; }
.mph.is-paused .mph-progress span { animation-play-state: paused; }
.mph:not(.is-playing) .mph-progress { display: none; }

@keyframes mph-progress {
	to { transform: scaleX(1); }
}

.mph a:focus-visible,
.mph button:focus-visible {
	outline: 2px solid var(--mph-yellow);
	outline-offset: 3px;
}

/* ---------- Mobile: a cápsula desce para logo abaixo do banner ---------- */

@media (max-width: 760px) {
	.mph-captions {
		position: static;
		width: 100%;
		padding: 12px 12px 15px;
		transform: none;
	}

	.mph-caption {
		width: 100%;
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		padding: 16px;
	}

	.mph-caption__text { width: 100%; }

	/* No toque a navegação é por arraste; as setas cobririam o texto da arte */
	.mph-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.mph-frame,
	.mph-caption { transition: none; }
}
