/* ==========================================================================
   Notícias
   ========================================================================== */

.news {
	--news-media-fr: 1.4fr;

	position: relative;
	background: #f0f0f0;
	border-radius: var(--radius-panel);
	margin-top: 1.25rem;
}

.news__inner {
	position: relative;
	max-width: 80rem;
	margin: 0 auto;
	padding: 2.5rem 1.25rem 2.75rem;
	display: flex;
	flex-direction: column;
	gap: 3rem;
}

.news__title {
	margin: 0;
	text-align: center;
	color: var(--color-secondary);
	font-weight: 700;
	font-size: 1.625rem;
}

.news__grid {
	display: none;
}

.news__item {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.news__media {
	position: relative;
	width: 100%;
	flex-shrink: 0;
	aspect-ratio: 3 / 2;
	border-radius: 0.875rem;
	overflow: hidden;
}

.news__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.news__content {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	min-height: 13.5rem;
}

.news__headline {
	margin: 0;
	color: var(--color-primary);
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.4;
	text-wrap: pretty;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.news__excerpt {
	margin: 0;
	color: var(--color-text);
	font-size: 0.875rem;
	line-height: 1.65;
	text-wrap: pretty;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.news__link {
	align-self: flex-start;
	margin-top: auto;
	background: var(--color-primary);
	color: #ffffff;
	font-weight: 700;
	font-size: 0.875rem;
	padding: 0.625rem 1.5rem;
	border-radius: var(--radius-button);
	cursor: pointer;
}

.news__link:hover {
	background: var(--color-secondary);
	color: #ffffff;
}

.news__timeline {
	display: none;
}

/* Timeline mobile */

.news-mobile__list {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.news-mobile__list::before {
	content: '';
	position: absolute;
	left: 0.3125rem;
	top: 1.375rem;
	bottom: 1.375rem;
	width: 0.125rem;
	background: rgba(77, 171, 153, 0.25);
}

.news-mobile__entry {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 0.875rem;
}

.news-mobile__marker {
	flex-shrink: 0;
	margin-top: 1.375rem;
	width: 0.75rem;
	height: 0.75rem;
	border-radius: 50%;
	background: #ffffff;
	border: 2px solid rgba(77, 171, 153, 0.4);
	transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.news-mobile__entry--active .news-mobile__marker {
	background: var(--color-primary);
	border-color: var(--color-primary);
	box-shadow: 0 0 0 0.25rem rgba(77, 171, 153, 0.18);
}

.news-mobile__card {
	flex: 1 1 auto;
	min-width: 0;
	background: #ffffff;
	border-radius: 1.125rem;
	box-shadow: 0 0.5rem 1.25rem -0.75rem rgba(20, 32, 28, 0.25);
	overflow: hidden;
}

.news-mobile__heading {
	margin: 0;
}

.news-mobile__toggle {
	width: 100%;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	background: transparent;
	border: none;
	font-family: inherit;
	text-align: left;
	cursor: pointer;
	padding: 1.125rem 1.25rem;
}

.news-mobile__toggle:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: -2px;
}

.news-mobile__summary {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}

.news-mobile__date {
	align-self: flex-start;
	background: rgba(77, 171, 153, 0.12);
	color: var(--color-secondary);
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 0.1875rem 0.5rem;
	border-radius: 999px;
}

.news-mobile__headline {
	color: var(--color-primary);
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.35;
	text-wrap: pretty;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.news-mobile__chevron {
	flex-shrink: 0;
	margin-top: 0.25rem;
	font-size: 0.875rem;
	color: var(--color-primary);
	transition: transform 0.25s ease;
}

.news-mobile__toggle[aria-expanded="true"] .news-mobile__chevron {
	transform: rotate(180deg);
}

.news-mobile__panel-wrap {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.3s ease;
}

.news-mobile__entry--active .news-mobile__panel-wrap {
	grid-template-rows: 1fr;
}

.news-mobile__panel {
	overflow: hidden;
}

.news-mobile__panel-body {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
	padding: 0 1.25rem 1.25rem;
}

.news-mobile__media {
	width: 100%;
	aspect-ratio: 3 / 2;
	border-radius: 0.75rem;
	overflow: hidden;
}

.news-mobile__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.news-mobile__excerpt {
	margin: 0;
	color: var(--color-text);
	font-size: 0.875rem;
	line-height: 1.6;
	text-wrap: pretty;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.news-mobile__link {
	align-self: flex-start;
}

.news__footer {
	display: flex;
	justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
	.news-mobile__panel-wrap {
		transition: none;
	}

	.news-mobile__chevron {
		transition: none;
	}
}

@media (min-width: 64rem) {

	.news {
		margin-top: 1.25rem;
	}

	.news__inner {
		padding: 3rem 3.5rem 3.5rem;
		gap: 3.5rem;
	}

	.news__title {
		font-size: 2.125rem;
	}

	.news__grid {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 2rem 5.625rem;
	}

	.news-mobile {
		display: none;
	}

	.news__item {
		display: grid;
		grid-template-columns: var(--news-media-fr) 1fr;
		gap: 2rem;
		align-items: stretch;
		min-height: 15rem;
	}

	.news__media {
		align-self: start;
		aspect-ratio: 301 / 262;
	}

	.news__excerpt {
		-webkit-line-clamp: 4;
	}

	.news__item--media-last {
		grid-template-columns: 1fr var(--news-media-fr);
	}

	.news__item--media-last .news__media {
		order: 2;
	}

	.news__item--media-last .news__content {
		order: 1;
	}

	.news__timeline {
		display: grid;
		grid-template-columns: subgrid;
		grid-column: 1 / -1;
		position: relative;
		height: 6rem;
	}

	.news__timeline-line {
		position: absolute;
		inset-inline: 0;
		top: 50%;
		height: 0.125rem;
		background: var(--color-primary);
	}

	.news__marker-slot {
		grid-row: 1;
		height: 50%;
		display: grid;
		grid-template-columns: var(--news-media-fr) 1fr;
	}

	.news__marker-slot--col-1 {
		grid-column: 1;
	}

	.news__marker-slot--col-2 {
		grid-column: 2;
	}

	.news__marker-slot--top {
		align-self: start;
		align-items: end;
	}

	.news__marker-slot--bottom {
		grid-template-columns: 1fr var(--news-media-fr);
		align-self: end;
		align-items: start;
	}

	.news__marker {
		grid-column: 1;
		justify-self: center;
		height: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 0.375rem;
	}

	.news__marker-slot--bottom .news__marker {
		grid-column: 2;
		flex-direction: column-reverse;
	}

	.news__marker-stem {
		width: 0.125rem;
		flex: 1 1 auto;
		min-height: 0.5rem;
		background: var(--color-primary);
	}

	.news__marker-date {
		background: rgba(77, 171, 153, 0.12);
		color: var(--color-secondary);
		font-size: 0.6875rem;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 0.03em;
		padding: 0.1875rem 0.5rem;
		border-radius: 999px;
		white-space: nowrap;
	}
}
