/**
 * Hub editorial de Notícias COTEC — interface pública v2.3.
 */

body.cotec-noticias-archive {
	background: var(--cotec-color-surface-soft);
}

.cotec-noticias {
	--cotec-noticias-ink: var(--cotec-color-text);
	--cotec-noticias-muted: rgb(var(--cotec-color-black-rgb) / 40%);
	--cotec-noticias-paper: var(--cotec-color-surface-soft);
	--cotec-noticias-white: var(--cotec-color-surface);
	--cotec-noticias-line: var(--cotec-color-border);
	--cotec-noticias-red: var(--cotec-color-red);
	/* Largura do conteúdo, alinhada com o contentor do tema Astra. */
	--cotec-noticias-shell: 1461px;
	--cotec-noticias-gutter: clamp(1rem, 4vw, 2.5rem);
	color: var(--cotec-noticias-ink);
	background: var(--cotec-noticias-white);
	-webkit-font-smoothing: antialiased;
}

.cotec-noticias *,
.cotec-noticias *::before,
.cotec-noticias *::after {
	box-sizing: border-box;
}

.cotec-noticias a {
	color: inherit;
}

.cotec-noticias a:focus-visible,
.cotec-noticias button:focus-visible,
.cotec-noticias input:focus-visible {
	outline: 3px solid var(--cotec-noticias-red);
	outline-offset: 3px;
}

.cotec-noticias button,
.cotec-noticias input {
	font: inherit;
}

.cotec-noticias [hidden] {
	display: none !important;
}

.cotec-noticias-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ----------------------------------------------------------- Contentor */

/*
 * Wrapper interno de cada secção. As bandas de fundo continuam a ocupar a
 * largura total do ecrã; só o conteúdo é limitado e centrado.
 */
.cotec-noticias-shell {
	width: 100%;
	max-width: var(--cotec-noticias-shell);
	margin-inline: auto;
	padding-inline: var(--cotec-noticias-gutter);
}

/* A capa e o cabeçalho mantêm-se à largura total do ecrã. */
.cotec-noticias-intro > .cotec-noticias-shell {
	max-width: none;
}

/* ------------------------------------------------------------------- Capa */

.cotec-noticias-hero {
	position: relative;
	width: 100%;
	min-height: 1px;
	overflow: hidden;
	background: var(--cotec-noticias-ink);
}

.cotec-noticias-hero img {
	display: block;
	max-width: 100%;
}

.cotec-noticias-hero .n2-section-smartslider,
.cotec-noticias-hero .n2-ss-align {
	margin-block: 0 !important;
}

/* ---------------------------------------------------------- Título/filtros */

.cotec-noticias-intro {
	position: relative;
	z-index: 5;
	padding: clamp(2.75rem, 6vw, 4.7rem) 0 clamp(1.5rem, 3vw, 2.4rem);
	text-align: center;
	background: var(--cotec-noticias-white);
}

.cotec-noticias-intro h1 {
	margin: 0;
	color: var(--cotec-noticias-ink);
	font-size: clamp(2.15rem, 4.8vw, 3.35rem);
	font-weight: 400;
	letter-spacing: 0.025em;
	line-height: 1.08;
	text-transform: uppercase;
}

.cotec-noticias-context {
	margin: 0.7rem 0 0;
	color: var(--cotec-noticias-muted);
	font-size: 0.84rem;
	font-weight: 500;
	letter-spacing: 0.025em;
}

.cotec-noticias-filterbar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.8rem;
	width: 100%;
	margin-top: clamp(1.7rem, 4vw, 2.6rem);
}

.cotec-noticias-topic-nav-shell {
	display: flex;
	flex: 0 1 auto;
	align-items: center;
	min-width: 0;
}

.cotec-noticias-topic-nav {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	gap: clamp(0.2rem, 1.5vw, 1rem);
	min-width: 0;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	scrollbar-width: thin;
}

.cotec-noticias-topic-nav-arrow {
	display: none;
	flex: 0 0 2.75rem;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	padding: 0;
	color: var(--cotec-noticias-ink);
	background: var(--cotec-noticias-white);
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
}

.cotec-noticias-topic-nav-arrow:hover {
	color: var(--cotec-noticias-red);
	background: var(--cotec-noticias-white);
}

.cotec-noticias-topic-nav-arrow:disabled {
	color: var(--cotec-noticias-muted);
	cursor: default;
}

.cotec-noticias-topic-nav-arrow svg {
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.cotec-noticias-topic-link {
	position: relative;
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.55rem clamp(0.55rem, 1.5vw, 0.85rem);
	color: var(--cotec-noticias-muted);
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
}

.cotec-noticias-topic-link::after {
	position: absolute;
	right: 0.65rem;
	bottom: 0.24rem;
	left: 0.65rem;
	height: 2px;
	content: "";
	background: var(--cotec-noticias-red);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 160ms ease;
}

.cotec-noticias-topic-link:hover,
.cotec-noticias-topic-link[aria-current="page"] {
	color: var(--cotec-noticias-ink);
}

.cotec-noticias-topic-link[aria-current="page"] {
	font-weight: 700;
}

.cotec-noticias-topic-link:hover::after,
.cotec-noticias-topic-link[aria-current="page"]::after {
	transform: scaleX(1);
}

.cotec-noticias-search-control {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: flex-end;
	min-width: 2.75rem;
}

.cotec-noticias-search-toggle,
.cotec-noticias-search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	min-width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	padding: 0;
	color: var(--cotec-noticias-muted);
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
}

.cotec-noticias-search-toggle:hover,
.cotec-noticias-search-submit:hover {
	color: var(--cotec-noticias-red);
	background: transparent;
}

.cotec-noticias-search-toggle svg,
.cotec-noticias-search-submit svg {
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-width: 1.6;
}

.cotec-noticias-search-toggle .cotec-noticias-icon--close {
	display: none;
}

.cotec-noticias-search-control.is-open .cotec-noticias-search-toggle .cotec-noticias-icon--search {
	display: none;
}

.cotec-noticias-search-control.is-open .cotec-noticias-search-toggle .cotec-noticias-icon--close {
	display: block;
}

.cotec-noticias-search-form {
	display: flex;
	flex: 0 1 auto;
	align-items: stretch;
	width: min(23rem, 42vw);
	min-height: 2.75rem;
	background: var(--cotec-noticias-white);
	border: 1px solid var(--cotec-noticias-line);
}

.cotec-noticias-search-form input[type="search"] {
	flex: 1 1 auto;
	width: 100%;
	min-width: 7rem;
	height: 2.75rem;
	margin: 0;
	padding: 0 0.9rem;
	color: var(--cotec-noticias-ink);
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	font-size: 0.78rem;
}

.cotec-noticias-search-form input[type="search"]::placeholder {
	color: var(--cotec-noticias-muted);
	opacity: 1;
}

.cotec-noticias-search-form input[type="search"]:focus {
	outline: 0;
}

.cotec-noticias-search-form:focus-within {
	border-color: var(--cotec-noticias-red);
	box-shadow: 0 0 0 1px var(--cotec-noticias-red);
}

.cotec-noticias-search-submit {
	border-left: 1px solid var(--cotec-noticias-line);
}

.cotec-noticias-search-clear {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	padding: 0 0.75rem;
	color: var(--cotec-noticias-muted);
	font-size: 0.66rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.cotec-noticias--enhanced .cotec-noticias-search-form:not(.is-open) {
	display: none;
}

.cotec-noticias--enhanced .cotec-noticias-search-form.is-open {
	animation: cotec-noticias-reveal-search 180ms ease-out both;
}

.cotec-noticias-admin-note {
	margin: 1rem auto 0;
	padding: 0.7rem 0.9rem;
	color: var(--cotec-noticias-ink);
	background: var(--cotec-noticias-paper);
	border-left: 3px solid var(--cotec-noticias-red);
	font-size: 0.75rem;
	line-height: 1.45;
	text-align: left;
}

@keyframes cotec-noticias-reveal-search {
	from {
		opacity: 0;
		transform: translateX(0.5rem);
	}

	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* --------------------------------------------------------- Títulos/bandas */

.cotec-noticias-section-title {
	margin: 0 0 clamp(1.35rem, 3vw, 2rem);
	color: var(--cotec-noticias-ink);
	font-size: clamp(1.25rem, 2.3vw, 1.65rem);
	font-weight: 700;
	letter-spacing: -0.018em;
	line-height: 1.16;
	text-transform: uppercase;
}

.cotec-noticias-featured {
	padding: clamp(2.2rem, 5vw, 4.25rem) 0 clamp(3.25rem, 7vw, 5.75rem);
	background: var(--cotec-noticias-white);
}

.cotec-noticias-featured-card {
	display: grid;
	grid-template-columns: minmax(0, 1.12fr) minmax(18rem, 0.88fr);
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
}

.cotec-noticias-featured-copy {
	padding-right: clamp(0rem, 3vw, 2.5rem);
}

.cotec-noticias-featured-title {
	max-width: 24ch;
	margin: 0.65rem 0 0;
	color: var(--cotec-noticias-ink);
	font-size: clamp(1.45rem, 3vw, 2.2rem);
	font-weight: 700;
	letter-spacing: -0.035em;
	line-height: 1.15;
}

.cotec-noticias-featured-title a,
.cotec-noticias-card-title a {
	text-decoration: none;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
}

.cotec-noticias-featured-title a:hover,
.cotec-noticias-card-title a:hover {
	color: var(--cotec-noticias-red);
	text-decoration: underline;
}

.cotec-noticias-featured-excerpt {
	max-width: 52ch;
	margin: 1.1rem 0 0;
	color: var(--cotec-noticias-muted);
	font-size: 0.92rem;
	line-height: 1.65;
}

.cotec-noticias-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 9.5rem;
	min-height: 3.25rem;
	margin-top: 1.55rem;
	padding: 0.85rem 1.8rem;
	color: var(--cotec-noticias-white) !important;
	background: var(--cotec-noticias-red);
	border: 1px solid var(--cotec-noticias-red);
	border-radius: var(--cotec-radius-pill);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: color 160ms ease, background-color 160ms ease;
}

.cotec-noticias-button:hover {
	color: var(--cotec-color-white) !important;
	background: var(--cotec-color-salmon);
	border-color: var(--cotec-color-salmon);
}

/* ---------------------------------------------- Notícia individual/Astra */

.cotec-noticias-back {
	display: flex;
	margin: 0 0 1.5rem;
}

.cotec-noticias-back__link {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	color: var(--cotec-color-text);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--cotec-color-red);
	text-underline-offset: 0.24em;
}

.cotec-noticias-back__link:hover {
	color: var(--cotec-color-red);
}

.cotec-noticias-back__link:focus-visible {
	outline: 3px solid var(--cotec-color-red);
	outline-offset: 3px;
}

.cotec-noticias-topic-section,
.cotec-noticias-grid-view {
	padding: clamp(3.25rem, 7vw, 5.7rem) 0;
	background: var(--cotec-noticias-paper);
}

.cotec-noticias-topic-sections .cotec-noticias-topic-section:nth-child(even) {
	background: var(--cotec-noticias-white);
}

.cotec-noticias-section-heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1.5rem;
}

.cotec-noticias-results-count {
	margin: 0 0 clamp(1.35rem, 3vw, 2rem);
	color: var(--cotec-noticias-muted);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.035em;
	text-transform: uppercase;
}

/* --------------------------------------------------------- Imagens/cards */

.cotec-noticias-media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--cotec-noticias-line);
}

.cotec-noticias-media::after {
	position: absolute;
	inset: 0;
	content: "";
	border: 1px solid var(--cotec-noticias-muted);
	pointer-events: none;
}

.cotec-noticias-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 240ms ease;
}

.cotec-noticias-media--placeholder {
	isolation: isolate;
	background:
		linear-gradient(135deg, transparent 0 48%, var(--cotec-noticias-muted) 48% 51%, transparent 51% 100%),
		var(--cotec-noticias-line);
}

.cotec-noticias-placeholder-band {
	position: absolute;
	z-index: -1;
	top: 50%;
	right: -4%;
	left: -4%;
	height: 29%;
	background: var(--cotec-noticias-red);
	transform: translateY(-50%) rotate(-2deg);
}

.cotec-noticias-placeholder-label {
	position: absolute;
	top: 50%;
	left: 50%;
	color: var(--cotec-noticias-white);
	font-size: clamp(0.86rem, 2vw, 1.3rem);
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1;
	text-transform: uppercase;
	transform: translate(-50%, -50%);
}

.cotec-noticias-card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.5rem, 3vw, 2.4rem);
}

.cotec-noticias-card {
	min-width: 0;
	margin: 0;
}

.cotec-noticias-card-copy {
	padding-top: 1rem;
}

.cotec-noticias-date {
	display: block;
	margin: 0;
	color: var(--cotec-noticias-muted);
	font-size: 0.68rem;
	font-style: normal;
	font-weight: 500;
	letter-spacing: 0.015em;
	line-height: 1.35;
}

.cotec-noticias-date--featured {
	font-size: 0.74rem;
}

.cotec-noticias-card-title {
	margin: 0.55rem 0 0;
	color: var(--cotec-noticias-ink);
	font-size: clamp(1rem, 1.55vw, 1.18rem);
	font-weight: 700;
	letter-spacing: -0.022em;
	line-height: 1.28;
}

.cotec-noticias-card-excerpt {
	display: -webkit-box;
	margin: 0.7rem 0 0;
	overflow: hidden;
	color: var(--cotec-noticias-muted);
	font-size: 0.8rem;
	line-height: 1.55;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.cotec-noticias-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: clamp(2rem, 5vw, 3.4rem);
}

.cotec-noticias-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.5rem 0.9rem;
	color: var(--cotec-noticias-ink);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
}

.cotec-noticias-more:hover {
	color: var(--cotec-noticias-red);
	text-decoration: underline;
	text-underline-offset: 0.24em;
}

/* ------------------------------------------------- Paginação/estados */

.cotec-noticias-pagination {
	margin-top: clamp(2.7rem, 6vw, 4.6rem);
	padding-top: 1.2rem;
	border-top: 1px solid var(--cotec-noticias-line);
}

.cotec-noticias-pagination .navigation {
	margin: 0;
}

.cotec-noticias-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.3rem;
}

.cotec-noticias-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0.45rem 0.7rem;
	color: var(--cotec-noticias-muted);
	background: transparent;
	border: 1px solid transparent;
	font-size: 0.72rem;
	font-weight: 600;
	text-decoration: none;
}

.cotec-noticias-pagination a.page-numbers:hover {
	color: var(--cotec-noticias-red);
	border-color: var(--cotec-noticias-red);
}

.cotec-noticias-pagination .page-numbers.current {
	color: var(--cotec-noticias-white);
	background: var(--cotec-noticias-red);
	border-color: var(--cotec-noticias-red);
}

.cotec-noticias-pagination .prev,
.cotec-noticias-pagination .next {
	padding-inline: 1rem;
}

.cotec-noticias-empty {
	max-width: 44rem;
	margin: 1rem auto;
	padding: clamp(2.5rem, 7vw, 5rem) clamp(1rem, 4vw, 3rem);
	text-align: center;
	background: var(--cotec-noticias-white);
	border: 1px solid var(--cotec-noticias-line);
}

.cotec-noticias-empty-mark {
	display: block;
	width: 3.5rem;
	height: 0.3rem;
	margin: 0 auto 1.4rem;
	background: var(--cotec-noticias-red);
}

.cotec-noticias-empty h2 {
	margin: 0;
	color: var(--cotec-noticias-ink);
	font-size: clamp(1.3rem, 3vw, 1.8rem);
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.2;
}

.cotec-noticias-empty p {
	max-width: 48ch;
	margin: 0.75rem auto 0;
	color: var(--cotec-noticias-muted);
	font-size: 0.86rem;
	line-height: 1.55;
}

/* --------------------------------------------------------------- Hover */

@media (hover: hover) and (pointer: fine) {
	.cotec-noticias-card:hover .cotec-noticias-media img,
	.cotec-noticias-featured-card:hover .cotec-noticias-media img {
		transform: scale(1.025);
	}
}

/* ------------------------------------------------------------ Responsivo */

@media (max-width: 62rem) {
	.cotec-noticias-filterbar {
		align-items: flex-start;
		flex-wrap: wrap;
		gap: 0.45rem;
		justify-content: stretch;
	}

	.cotec-noticias-topic-nav-shell {
		flex: 1 1 calc(100% - 3.25rem);
		min-width: 0;
	}

	.cotec-noticias-topic-nav {
		justify-content: flex-start;
		padding-bottom: 0;
		scroll-behavior: smooth;
		scrollbar-width: none;
	}

	.cotec-noticias-topic-nav::-webkit-scrollbar {
		display: none;
	}

	.cotec-noticias--enhanced .cotec-noticias-topic-nav-arrow:not([hidden]) {
		display: inline-flex;
	}

	.cotec-noticias-search-control {
		flex: 0 0 auto;
	}

	.cotec-noticias-search-control.is-open,
	.cotec-noticias:not(.cotec-noticias--enhanced) .cotec-noticias-search-control {
		flex: 1 0 100%;
		width: 100%;
	}

	.cotec-noticias--enhanced .cotec-noticias-search-control.is-open {
		order: 2;
	}

	.cotec-noticias-search-form {
		width: 100%;
	}

	.cotec-noticias-search-control.is-open .cotec-noticias-search-form {
		flex: 1 1 auto;
		width: auto;
		min-width: 0;
	}

	.cotec-noticias-featured-card {
		grid-template-columns: minmax(0, 1.08fr) minmax(16rem, 0.92fr);
		gap: 2rem;
	}

	.cotec-noticias-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 47.99rem) {
	.cotec-noticias-intro {
		padding-top: 2.5rem;
	}

	.cotec-noticias-featured-card {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.5rem;
	}

	.cotec-noticias-featured-copy {
		padding-right: 0;
	}

	.cotec-noticias-featured-title {
		max-width: 30ch;
	}

	.cotec-noticias-section-heading {
		align-items: flex-start;
		flex-direction: column;
		gap: 0;
	}
}

@media (max-width: 35.99rem) {
	.cotec-noticias-card-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 2.2rem;
	}

	.cotec-noticias-card-title {
		font-size: 1.1rem;
	}

	.cotec-noticias-search-clear {
		padding-inline: 0.6rem;
	}

	.cotec-noticias-pagination .prev,
	.cotec-noticias-pagination .next {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cotec-noticias *,
	.cotec-noticias *::before,
	.cotec-noticias *::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* ---------------------------------------------------------------- Impressão */

@media print {
	.cotec-noticias {
		color: var(--cotec-noticias-ink);
		background: var(--cotec-noticias-white);
	}

	.cotec-noticias-hero,
	.cotec-noticias-filterbar,
	.cotec-noticias-admin-note,
	.cotec-noticias-more-wrap,
	.cotec-noticias-pagination,
	.cotec-noticias-button {
		display: none !important;
	}

	.cotec-noticias-intro,
	.cotec-noticias-featured,
	.cotec-noticias-topic-section,
	.cotec-noticias-grid-view {
		padding: 8mm 0;
		background: var(--cotec-noticias-white) !important;
	}

	.cotec-noticias-card-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 8mm;
	}

	.cotec-noticias-card,
	.cotec-noticias-featured-card {
		break-inside: avoid;
	}
}
