/*
Theme Name: Salient Child Theme
Description: This is a custom child theme for Salient
Theme URI:   https://themeforest.net/item/salient-responsive-multipurpose-theme/4363266
Author: ThemeNectar
Author URI:  https://themeforest.net/user/themenectar
Template: salient
Version: 1.0
*/

/* ------------------------------------------------------------------
 * Variabili colore
 * ------------------------------------------------------------------ */
:root {
	--agid-principale: #007b3d;   /* strip superiore header + footer */
	--agid-secondario:      #0d3739;   /* strip principale header + nav */
	--agid-secondario-deep: #b09563;   /* hover/separator */
	--agid-white:     #ffffff;
}

/* ------------------------------------------------------------------
 * Nascondi header/footer di Salient (override completo)
 * ------------------------------------------------------------------ */
#header-outer,
#header-secondary-outer,
#footer-outer,
#footer-widgets,
#ajax-loading-screen {
	display: none !important;
}

body {
	font-family: "Titillium Web", "Helvetica Neue", Arial, sans-serif;
	color: #1b1b1b;
	padding-top: 0 !important;
}

main#main-content {
	min-height: 60vh;
	padding: 24px 0 48px;
}

.agid-container {
	width: 100%;
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 24px;
	box-sizing: border-box;
}

.agid-skiplink {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--agid-secondario);
	color: #fff;
	padding: 12px 24px;
	z-index: 9999;
}
.agid-skiplink:focus { left: 0; }

.icon {
	display: inline-block;
	width: 20px;
	height: 20px;
	fill: currentColor;
	vertical-align: middle;
}

.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;
}

/* ==================================================================
 *  HEADER AGID
 * ================================================================== */
.agid-header {
	background-color: var(--agid-secondario);
	color: var(--agid-white);
	font-family: "Titillium Web", "Helvetica Neue", Arial, sans-serif;
}

/* --- Strip superiore #004D99 --- */
.agid-header__top {
	background-color: var(--agid-principale);
	color: var(--agid-white);
	padding: 2px 0;
	font-size: 0.95rem;
}

.agid-header__top-label {
	color: var(--agid-white);
	letter-spacing: 0.2px;
}

/* Logo immagine nella strip superiore (sostituisce la scritta) */
.agid-header__top-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.agid-header__top-logo {
	display: inline-flex;
	align-items: center;
}
.agid-header__top-logo img {
	height: 40px;
	width: auto;
	display: block;
}

/* Menu superiore nella strip verde (desktop) */
.agid-header__top-menu,
.agid-header__top-menu li {
	list-style: none;
	margin: 0;
	padding: 0;
}
.agid-header__top-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
}
.agid-header__top-menu a {
	display: inline-block;
	color: var(--agid-white);
	text-decoration: none;
	padding: 4px 10px;
	font-size: 0.9rem;
	font-weight: 600;
}
.agid-header__top-menu li.current-menu-item > a,
.agid-header__top-menu a:hover { text-decoration: underline; }

/* Indicatore voci con sottomenu */
.agid-header__top-menu > li.menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	margin-left: 6px;
	border: 4px solid transparent;
	border-top-color: var(--agid-white);
	vertical-align: middle;
}

/* Dropdown del menu superiore (desktop) */
.agid-header__top-menu li { position: relative; }
.agid-header__top-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 8px 0;
	background: var(--agid-white);
	color: #1b1b1b;
	box-shadow: 0 6px 16px rgba(0,0,0,0.15);
	min-width: 220px;
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 200;
}
.agid-header__top-menu > li:hover > .sub-menu,
.agid-header__top-menu > li:focus-within > .sub-menu { display: block; }
.agid-header__top-menu .sub-menu li { width: 100%; }
.agid-header__top-menu .sub-menu a {
	display: block;
	padding: 8px 16px;
	color: #1b1b1b;
	text-decoration: none;
	white-space: nowrap;
	font-weight: 600;
}
.agid-header__top-menu .sub-menu a:hover { background: #f0f4fa; color: var(--agid-principale); text-decoration: none; }

/* --- Strip principale #0066CC --- */
.agid-header__main {
	background-color:#fff;/* var(--agid-secondario);*/
	padding: 20px 0;
}

.agid-header__main-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.agid-header__brand {
	display: flex;
	align-items: center;
	gap: 16px;
	color:  var(--agid-principale);
	text-decoration: none;
	min-width: 0;
}
.agid-header__brand:hover { color: var(--agid-white); text-decoration: none; }

.agid-header__brand-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 100px;
	width: auto; 

	border-radius: 4px;
	flex-shrink: 0;
}
.agid-header__brand-logo img,
.agid-header__brand-logo-img { max-width: 100%; max-height: 100%; display: block; }
.agid-header__brand-logo--placeholder .icon { width: 36px; height: 36px; fill: var(--agid-secondario); }

/* Logo standard di default; quello mobile resta nascosto sopra il breakpoint.
   Doppia classe per superare la specificità di ".agid-header__brand-logo img". */
.agid-header__brand-logo .agid-header__brand-logo-img--mobile { display: none; }

.agid-header__brand-name1 {
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.2;
	color:  var(--agid-principale);
}

.agid-header__brand-name2 {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
	color:  var(--agid-principale);
}

/* --- Tools (social + search), desktop a destra --- */
.agid-header__tools {
	display: flex;
	align-items: center;
	gap: 24px;
}

.agid-social,.agid-social li {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0; padding: 0;
}
.agid-social a {
	color: var(--agid-white);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px; height: 36px;
	border-radius: 50%;
	transition: background-color .15s ease;
}
.agid-social a:hover { background-color: rgba(255,255,255,0.18); }
.agid-social .icon { width: 20px; height: 20px; fill: var(--agid-white); }

.agid-search {
	display: flex;
	align-items: center;
	background: var(--agid-white);
	border-radius: 999px;
	padding: 4px 4px 4px 16px;
	min-width: 240px;
}
.agid-search__input {
	border: 0;
	background: transparent;
	flex: 1;
	font-size: 0.95rem;
	color: #1b1b1b;
	outline: none;
	min-width: 0;
}
.agid-search__input::placeholder { color: #6c757d; }
.agid-search__btn,
.agid-search__btn:hover,
.agid-search__btn:focus,
.agid-search__btn:active {
	border: 0 !important;
	background: transparent !important;
	color: var(--agid-secondario) !important;
	width: 36px; height: 36px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	box-shadow: none !important;
	padding: 0 !important;
}
.agid-search__btn .icon { fill: var(--agid-secondario); }

/* --- Hamburger toggle --- */
.agid-header__toggle {
	display: none;
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 8px;
	flex-shrink: 0;
}
.agid-header__toggle-bar {
	display: block;
	width: 28px;
	height: 3px;
	background: var(--agid-secondario);
	margin: 6px 0;
	transition: transform .2s ease, opacity .2s ease;
}
.agid-header__toggle.is-active .agid-header__toggle-bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.agid-header__toggle.is-active .agid-header__toggle-bar:nth-child(2) { opacity: 0; }
.agid-header__toggle.is-active .agid-header__toggle-bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* --- Navigazione desktop --- */
.agid-header__nav {
	background-color: var(--agid-secondario);
	border-top: 1px solid rgba(255,255,255,0.18);
}
.agid-header__menu ,.agid-header__menu li{
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	margin: 0; padding: 0;
}
.agid-header__menu > li > a {
	display: inline-block;
	color: var(--agid-white);
	text-decoration: none;
	padding: 14px 18px;
	font-weight: 600;
	font-size: 1rem;
}
.agid-header__menu > li.current-menu-item > a,
.agid-header__menu > li > a:hover {
	background-color: rgba(255,255,255,0.08);
}
.agid-header__menu > li.menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	margin-left: 6px;
	border: 4px solid transparent;
	border-top-color: var(--agid-white);
	vertical-align: middle;
}
.agid-header__menu li { position: relative; }
.agid-header__menu .sub-menu {
	list-style: none;
	margin: 0; padding: 8px 0;
	background: var(--agid-white);
	color: #1b1b1b;
	box-shadow: 0 6px 16px rgba(0,0,0,0.15);
	min-width: 220px;
	display: none;
	position: absolute;
	top: 100%; left: 0;
	z-index: 100;
}
.agid-header__menu > li:hover > .sub-menu,
.agid-header__menu > li:focus-within > .sub-menu { display: block; }
.agid-header__menu .sub-menu a {
	display: block;
	padding: 8px 16px;
	color: #1b1b1b;
	text-decoration: none;
}
.agid-header__menu .sub-menu a:hover { background: #f0f4fa; color: var(--agid-secondario); }

/* ==================================================================
 * DRAWER MOBILE (off-canvas, side panel)
 * ================================================================== */
.agid-drawer {
	position: fixed;
	inset: 0;
	z-index: 9999;
	visibility: hidden;
	opacity: 0;
	transition: opacity .25s ease, visibility 0s linear .25s;
}
.agid-drawer.is-open {
	visibility: visible;
	opacity: 1;
	transition: opacity .25s ease, visibility 0s linear 0s;
}

.agid-drawer__backdrop {
	position: absolute;
	inset: 0;
	background: var(--agid-secondario-deep);
	opacity: 0.85;
	border: 0;
	padding: 0;
	cursor: pointer;
}

.agid-drawer__panel {
	position: absolute;
	top: 0; left: 0;
	width: min(85vw, 360px);
	height: 100%;
	background: #fff;
	color: #1b1b1b;
	box-shadow: 4px 0 24px rgba(0,0,0,0.18);
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	transform: translateX(-100%);
	transition: transform .25s ease;
}
.agid-drawer.is-open .agid-drawer__panel { transform: translateX(0); }

.agid-drawer__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 24px 24px 16px;
	margin-top: 50px;
}
.agid-drawer__title {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--agid-secondario-deep);
	line-height: 1.25;
}
.agid-drawer__close {
	position: fixed;
	top: 16px;
	left: calc(min(85vw, 360px) + 16px);
	background: transparent;
	border: 0;
	color: #fff;
	width: 40px; height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 10000;
}
.agid-drawer__close .icon { width: 22px; height: 22px; fill: #fff; }
.agid-drawer:not(.is-open) .agid-drawer__close { display: none; }

.agid-drawer__nav { padding: 0 24px; margin-top: 24px; }
/* Menu superiore dentro il drawer: separato dal menu principale */
.agid-drawer__nav--top {
	margin-top: 16px;
	padding-top: 8px;
	border-top: 1px solid rgba(0,0,0,0.12);
}

.agid-drawer__menu,
.agid-drawer__menu .sub-menu {
	list-style: none !important;
	margin: 0; padding: 0;
}
.agid-drawer__menu li,
.agid-drawer__menu .sub-menu li {
	list-style: none !important;
	width: 100%;
}
.agid-drawer__menu li::marker,
.agid-drawer__menu .sub-menu li::marker { content: ""; }
.agid-drawer__menu > li > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	color: var(--agid-secondario-deep);
	text-decoration: none;
	padding: 14px 0;
	font-weight: 700;
	font-size: 1.05rem;
	border-bottom: 1px solid rgba(0,0,0,0.08);
}
.agid-drawer__menu > li > a:hover { color: var(--agid-secondario); }
.agid-drawer__menu > li.menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	border: 5px solid transparent;
	border-top-color: var(--agid-secondario-deep);
	margin-top: 4px;
	transition: transform .2s ease;
}
.agid-drawer__menu > li.is-expanded > a::after { transform: rotate(180deg); margin-top: -2px; }

.agid-drawer__menu .sub-menu {
	list-style: none;
	margin: 0; padding: 8px 0 8px 16px;
	display: none;
}
.agid-drawer__menu > li.is-expanded > .sub-menu { display: block; }
.agid-drawer__menu .sub-menu a {
	display: block;
	color: #1b1b1b;
	text-decoration: none;
	padding: 8px 0;
	font-size: 0.95rem;
}
.agid-drawer__menu .sub-menu a:hover { color: var(--agid-secondario); }

/* Social dentro il drawer */
.agid-drawer__social {
	padding: 0 24px;
	margin-top: 24px;
}
.agid-drawer__social .agid-social a {
	color: var(--agid-secondario-deep);
	width: 40px; height: 40px;
}
.agid-drawer__social .agid-social a:hover {
	background-color: rgba(0,77,153,0.1);
}
.agid-drawer__social .agid-social .icon { fill: var(--agid-secondario-deep); }

/* Ricerca dentro il drawer (underline) */
.agid-drawer__search {
	padding: 0 24px 24px;
	margin-top: 30px;
}
.agid-search--underline {
	display: flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	border-radius: 0;
	border-bottom: 1px solid #999;
	padding: 8px 0;
}
.agid-search--underline .agid-search__input {
	border: 0;
	background: transparent;
	color: #1b1b1b;
	flex: 1;
	font-size: 0.95rem;
	outline: none;
	min-width: 0;
}
.agid-search--underline .agid-search__btn {
	background: transparent;
	border: 0;
	color: var(--agid-secondario-deep);
	width: 32px; height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.agid-search--underline .agid-search__btn .icon { fill: var(--agid-secondario-deep); }

/* Blocca lo scroll del body quando il drawer è aperto */
body.agid-drawer-open { overflow: hidden; }

/* ==================================================================
 * BREAKPOINT
 * ================================================================== */
@media (max-width: 991px) {
	.agid-header__tools--desktop { display: none!important; }
	.agid-header__nav { display: none; }
	/* Il menu superiore su mobile compare nel drawer, non nella strip verde */
	.agid-header__top-nav { display: none; }

	/* Hamburger visibile, ancorato in alto a destra fuori dal flusso:
	   così il logo centrato resta intatto e l'icona non viene spinta via. */
	.agid-header__main-inner { position: relative; }
	.agid-header__toggle {
		display: inline-block !important;
		position: absolute;
		top: 50%;
		left: 0;
		transform: translateY(-50%);
		z-index: 10;
	}

	/* Mobile: usa il logo "solo mobile" del tema e nascondi il testo brand. */
	.agid-header__brand .agid-header__brand-text { display: none; }
	.agid-header__brand { flex: 1 1 auto; min-width: 0; }
	.agid-header__brand-logo {
		width: 100%;
		height: auto;
		justify-content: center;
	}
	.agid-header__brand-logo .agid-header__brand-logo-img--desktop { display: none; }
	.agid-header__brand-logo .agid-header__brand-logo-img--mobile {
		display: block;
		height: 120px;
		width: auto;
		max-height: none;
	}
}

@media (min-width: 992px) {
	.agid-drawer { display: none !important; }
}

@media (max-width: 575px) {
	.agid-header__brand-name1,.agid-header__brand-name2 { font-size: 1.1rem; }
	/* Il logo mobile resta a piena larghezza; dimensiona solo il placeholder. */
	.agid-header__brand-logo--placeholder { width: 44px; height: 44px; }
	.agid-header__brand-logo--placeholder .icon { width: 28px; height: 28px; }
	.agid-header__top-logo img { height: 32px; }
}

/* ==================================================================
 *  FOOTER (stile MiC Musei civici)
 * ================================================================== */
.agid-footer {
	background-color: var(--agid-secondario);
	color: var(--agid-white);
	padding: 48px 0 24px;
	font-family: "Titillium Web", "Helvetica Neue", Arial, sans-serif;
}
.agid-footer a { color: var(--agid-white); }

/* --- 1. BRAND ROW --- */
.agid-footer__brands {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 32px;
	margin-bottom: 40px;
}
.agid-footer__brand-card {
	display: flex;
	align-items: center;
	gap: 16px;
}
.agid-footer__brand-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px; height: 44px;
	flex-shrink: 0;
}
.agid-footer__brand-icon .icon { width: 36px; height: 36px; fill: var(--agid-white); }
.agid-footer__brand-icon img { max-width: 100%; max-height: 100%; display: block; }
.agid-footer__brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}
.agid-footer__brand-text strong {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--agid-white);
}
.agid-footer__brand-text strong.title1 {
	font-size: 1rem;
}

.agid-footer__brand-text strong.title2 {
	font-size: 1.7rem;
}
.agid-footer__brand-text span {
	font-size: 1rem;
	font-weight: 400;
	color: var(--agid-white);
	opacity: 0.95;
}

/* --- 2. COLONNE LINK --- */
.agid-footer__cols {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px;
	margin-bottom: 24px;
}
.agid-footer__col-title {
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: var(--agid-white);
	margin: 0 0 16px;
	text-transform: uppercase;
}
.agid-footer__links,
.agid-footer__links li {
	list-style: none;
	margin: 0;
	padding: 0;
}
.agid-footer__links li { margin-bottom: 8px; line-height: 1.5; }
.agid-footer__links a {
	color: var(--agid-white);
	text-decoration: underline;
	font-size: 0.95rem;
}
.agid-footer__links a:hover { text-decoration: none; }

.agid-footer__text {
	color: var(--agid-white);
	font-size: 0.95rem;
	line-height: 1.5;
	margin: 0 0 8px;
}

/* Testo della prima colonna (lista enti) più grande */
.agid-footer__cols > .agid-footer__col:first-child .agid-footer__text {
	font-size: 1.15rem;
	line-height: 1.6;
}

/* --- Separatore --- */
.agid-footer__sep {
	border: 0;
	border-top: 1px solid rgba(255,255,255,0.25);
	margin: 32px 0;
}

/* --- 3. CONTATTI / ASSISTENZA / SOCIAL --- */
.agid-footer__contacts-row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px;
	margin-bottom: 40px;
}
.agid-footer__contacts-row > * { min-width: 0; }
.agid-footer__contacts-row > .agid-footer__contacts:nth-of-type(1) { grid-column: 1; }
.agid-footer__contacts-row > .agid-footer__contacts:nth-of-type(2) { grid-column: 2; }
.agid-footer__contacts-row > .agid-footer__social-block { grid-column: 3; }
.agid-footer__contacts p {
	
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--agid-white);
	padding: 5px;
}
.agid-footer__contacts a {
	color: var(--agid-white);
	text-decoration: underline;
}
.agid-footer__contacts a:hover { text-decoration: none; }

.agid-footer__social-list,
.agid-footer__social-list li {
	list-style: none;
	margin: 0;
	padding: 0;
}
.agid-footer__social-list {
	display: flex;
	gap: 6px;
}
.agid-footer__social-list a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px; height: 40px;
	color: var(--agid-white);
	transition: opacity .15s ease;
}
.agid-footer__social-list a:hover { opacity: 0.75; }
.agid-footer__social-list .icon {
	width: 28px; height: 28px;
	fill: var(--agid-white);
}

/* --- 4. LOGHI PARTNER --- */
.agid-footer__partners {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 32px;
	padding: 24px 0;
	margin-bottom: 24px;
	border-top: 1px solid rgba(255,255,255,0.25);
	border-bottom: 1px solid rgba(255,255,255,0.25);
}
.agid-footer__partners img {
	max-height: 56px;
	width: auto;
	display: block;
}

/* --- 5. LINK LEGALI --- */
.agid-footer__legal {
    padding-top: 8px;
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-between;
}
.agid-footer__legal-list,
.agid-footer__legal-list li {
	list-style: none;
	margin: 0;
	padding: 0;
}
.agid-footer__legal-list {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}
.agid-footer__legal-list a {
	color: var(--agid-white);
	text-decoration: none;
}
.agid-footer__legal-list a:hover { text-decoration: underline; }

/* --- Responsive --- */
@media (max-width: 991px) {
	.agid-footer__brands { grid-template-columns: 1fr; gap: 20px; }
	.agid-footer__cols   { grid-template-columns: repeat(2, 1fr); gap: 32px; }
	.agid-footer__contacts-row { grid-template-columns: 1fr; gap: 24px; }

	/* Reset delle forzature di colonna desktop: lascia fluire le sezioni in stack */
	.agid-footer__contacts-row > .agid-footer__contacts:nth-of-type(1),
	.agid-footer__contacts-row > .agid-footer__contacts:nth-of-type(2),
	.agid-footer__contacts-row > .agid-footer__social-block {
		grid-column: auto !important;
	}
}

@media (max-width: 575px) {
	.agid-footer__cols   { grid-template-columns: 1fr; }
	.agid-footer__partners { gap: 20px; }
	.agid-footer__partners img { max-height: 44px; }
	.agid-footer__legal-list { gap: 16px; }
}

.agid-header__brand-text {
    display: flex;
    flex-direction: column;
}