/**
 * NavalHEAD — Elenco News and Events (page-templates/news.php) e card delle news.
 * Caricato solo sulla pagina elenco (template «News and events») e sulla singola news.
 */


.nh-news-listing #content > .ast-container {
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

.nh-news {
	--nh-news-width: 1240px;    
	--nh-news-gutter: 20px;
	--nh-news-gap: 15px;
	--nh-news-line: color-mix(in srgb, var(--nh-softblue) 45%, #fff);
	--nh-news-tint: color-mix(in srgb, var(--nh-softblue) 14%, #fff);

	width: 100%;
	padding-bottom: 80px;
	color: var(--nh-ink);
}

.nh-news__container {
	box-sizing: border-box;
	width: 100%;
	max-width: calc(var(--nh-news-width) + 2 * var(--nh-news-gutter));
	margin-left: auto;
	margin-right: auto;
	/*padding-left: var(--nh-news-gutter);*/
	/*padding-right: var(--nh-news-gutter);*/
}

/* Intestazione ---------------------------------------------------------- */

.nh-news__header {
	padding-top: 0px;
	padding-bottom: 32px;
}

.nh-news__title {
	margin: 0;
	font-size: clamp(30px, 4vw, 50px);
	font-weight: 400;
	line-height: 1.05;
	color: var(--nh-blue);
}

/* Barra: tab, conteggio, filtri ------------------------------------------ */

.nh-news__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	margin-bottom: 32px;
}

.nh-news__bar-start {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
}

.nh-news__tab-list {
	display: flex;
	margin: 0;
	padding: 4px;
	list-style: none;
	border-radius: 4px;
	background: var(--nh-news-tint);
}

.nh-news__tab-item {
	margin: 0;
	display: flex;
}

.nh-news__tab-item + .nh-news__tab-item::before {
	content: "";
	align-self: center;
	width: 1px;
	height: 16px;
	background: var(--nh-news-line);
}

.nh-news__tab {
	display: block;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.2;
	color: var(--nh-ink);
	text-decoration: none;
	border-radius: 3px;
}

.nh-news__tab:hover,
.nh-news__tab:focus-visible {
	color: var(--nh-blue);
}

.nh-news__tab.is-active {
	font-weight: 700;
	color: #000;
}

.nh-news__count {
	margin: 0;
	font-size: 14px;
}

.nh-news__clear {
	font-size: 14px;
	color: var(--nh-blue);
}

.nh-news__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
}

.nh-news__field {
	position: relative;
}

.nh-news__select,
.nh-news__search {
	box-sizing: border-box;
	height: 44px;
	margin: 0;
	font: inherit;
	font-size: 15px;
	color: var(--nh-ink);
	background-color: #fff;
	border: 1px solid var(--nh-news-line);
	border-radius: 4px;
	box-shadow: none;
}

.nh-news__select {
	min-width: 120px;
	padding: 0 36px 0 14px;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
}

.nh-news__search {
	width: 340px !important;
	max-width: 100% !important;
	padding: 0 14px 0 46px !important;
    border-color: #ccc !important;
}

.nh-news__search::placeholder {
	color: color-mix(in srgb, var(--nh-ink) 55%, #fff);
	opacity: 1;
}

.nh-news__select:focus,
.nh-news__search:focus {
	outline: 2px solid var(--nh-blue);
	outline-offset: 1px;
	border-color: var(--nh-blue);
}

.nh-news__search-submit {
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	color: var(--nh-ink);
	background: none;
	border: 0;
	cursor: pointer;
}

.nh-news__search-submit:hover,
.nh-news__search-submit:focus-visible {
	color: var(--nh-blue);
	background: none;
}

/* Tab News: griglia di card a tutta larghezza ---------------------------- */

.nh-news__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--nh-news-gap);
}

@media (min-width: 600px) {
	.nh-news__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 900px) {
	.nh-news__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.nh-news-card {
	margin: 0;
}

.nh-news-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.nh-news-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--nh-photo-bg);
    border-radius: 2px;
}

.nh-news-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.nh-news-card__link:hover .nh-news-card__image,
.nh-news-card__link:focus-visible .nh-news-card__image {
	transform: scale(1.03);
}

/* Fascia con data e titolo sopra la foto, in basso. */
.nh-news-card__content {
	--nh-card-veil: rgba(0, 87, 184, 0.5);

	position: absolute;
	z-index: 1;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px 15px 20px;
	color: #fff;
	background: var(--nh-card-veil);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	transition: background-color 0.3s ease;
}

.nh-news-card__link:hover .nh-news-card__content,
.nh-news-card__link:focus-visible .nh-news-card__content {
	--nh-card-veil: rgba(0, 87, 184, 0.9);
}

.nh-news-card__date {
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	color: #fff;
}

.nh-news-card__title {
	margin: 0;
	padding: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
	color: #fff;
}

.nh-news-card__link:focus-visible {
	outline: 2px solid var(--nh-blue);
	outline-offset: 4px;
}

/* Tab Press releases: righe ---------------------------------------------- */

.nh-press {
	position: relative;
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	padding: 32px 0;
	border-bottom: 1px solid var(--nh-news-line);
}

.nh-press:first-child {
	border-top: 1px solid var(--nh-news-line);
}

@media (min-width: 900px) {
	.nh-press {
		grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) auto;
		align-items: center;
		gap: 24px;
		padding: 40px 0;
	}

	.nh-press__date {
		align-self: start;
		padding-top: 0.5em;
	}
}

.nh-press__date {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	color: #000;
}

.nh-press__title {
	margin: 0;
	font-size: clamp(17px, 1.8vw, 20px);
	font-weight: 500;
	line-height: 1.15;
	text-transform: uppercase;
	color: var(--nh-blue);
}
.nh-press__title a {
	color: var(--nh-blue);
}
.nh-press__title a:hover {
	color: #000 !important;
}

.nh-press__link {
	color: inherit;
	text-decoration: none;
}

/* Tutta la riga è cliccabile. */
.nh-press__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.nh-press__link:focus-visible {
	outline: none;
}

.nh-press:focus-within {
	outline: 2px solid var(--nh-blue);
	outline-offset: 4px;
}

.nh-press__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	color: #000;
}

.nh-press:hover .nh-press__title,
.nh-press:hover .nh-press__cta {
	color: var(--nh-blue);
}

/* Show more -------------------------------------------------------------- */

.nh-news__more {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
	margin-top: 64px;
}

.nh-news__shown {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}

.nh-news__progress {
	position: relative;
	width: 120px;
	height: 2px;
	background: var(--nh-news-line);
}

.nh-news__progress-bar {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: var(--nh-progress, 0%);
	background: var(--nh-ink);
	transition: width 0.4s ease;
}

.nh-news__more-link {
	display: inline-block;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	text-decoration: none;
	background: var(--nh-blue);
	border-radius: 4px;
}

.nh-news__more-link:hover,
.nh-news__more-link:focus-visible {
	color: #fff;
	background: var(--nh-linear-gradient-vividblue);
}

.nh-news__more-link[aria-busy="true"] {
	opacity: 0.6;
	cursor: progress;
}

/* Nessun risultato ------------------------------------------------------- */

.nh-news__empty p {
	margin: 0;
	padding: 40px 0;
	font-size: 18px;
	border-top: 1px solid var(--nh-news-line);
}

/* Mobile ----------------------------------------------------------------- */

@media (max-width: 767px) {
	.nh-news__filters,
	.nh-news__field--search {
		width: 100%;
	}

	.nh-news__search {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nh-news-card__image,
	.nh-news-card__content,
	.nh-news__progress-bar {
		transition: none;
	}

	.nh-news-card__link:hover .nh-news-card__image,
	.nh-news-card__link:focus-visible .nh-news-card__image {
		transform: none;
	}
}
/* Margini section card archive ------------------------------------------------------- */


@media (min-width: 1240px) {
	body.page-template-news .site-content #primary.nh-news {
        max-width: var(--nh-news-width);
        margin: 0 auto 60px auto;    
    }
}
@media (max-width: 1239px) {
	body.page-template-news .site-content #primary.nh-news {
        max-width: var(--nh-news-width);
        margin: 0 auto 60px auto; 
        padding: 0 20px;
    }
}
@media (max-width: 768px) {
	body.page-template-news .site-content #primary.nh-news {
        padding: 0 12px;
    }
}