/*
 Theme Name:   Astra Child
 Theme URI:    https://wpastra.com/
 Description:  Child Theme per Astra
 Author:       Il tuo nome
 Template:     astra
 Version:      1.0.0
*/

/* Qui puoi aggiungere il tuo CSS personalizzato */
/***************************/
/* Breadcrumb customize 
/***************************/
.rank-math-breadcrumb a:first-of-type {
  background: #eee;
    border-radius: 0.5em;
    border: 1px solid #1f2937;
    margin-bottom: 0em;
    padding: 0.2em 0.5em 0.2em 0.5em;
}

/***************************/
/* Header e Breadcrumb statici */
/***************************/
/* Header sticky */
#masthead {
  position: sticky;
  top: var(--wp-admin-bar-offset, 0px);
  z-index: 1000;
  background: #fff;
}

/* Breadcrumb sticky subito sotto l'header */
.main-header-bar.ast-header-breadcrumb,
.ast-breadcrumbs-wrapper,
.rank-math-breadcrumb {
  position: sticky;
  top: calc(var(--wp-admin-bar-offset, 0px) + var(--site-header-height, 80px));
  z-index: 999;
  background: #fff;
}

/* Evita che i contenuti passino “sotto” gli sticky (non cambia il flow, ma aiuta layering) */
.site-content, .content-area, main { position: relative; z-index: 1; }

/***************************/
/* Header ristretto allo scrolling */
/***************************/
:root{
  --header-height: 74px;       
  --header-compact-height: 48px; 
  --link-pad-y: 0px;         
  --link-pad-y-compact: 0px;   
}

/* Mobile (Astra passa in breakpoint ~921px) */
@media (max-width: 921px){
  :root{
    --header-height: 56px;
    --header-compact-height: 44px;
  }
}

/* Allinea i contenuti dell'header */
#masthead .ast-builder-grid-row,
.site-branding{ align-items: center; }

#masthead .ast-primary-header-bar,
#masthead .main-header-bar,
#masthead .site-primary-header-wrap {
  min-height: var(--header-height) !important;
}

body.header-compact #masthead .ast-primary-header-bar,
body.header-compact #masthead .main-header-bar,
body.header-compact #masthead .site-primary-header-wrap {
  min-height: var(--header-compact-height) !important;
}

.ast-desktop .ast-primary-header-bar .main-header-menu > .menu-item {
  line-height: normal !important;
}


.ast-desktop .ast-primary-header-bar .main-header-menu > .menu-item > .menu-link {
  line-height: 1.2;           
  padding-top: var(--link-pad-y);
  padding-bottom: var(--link-pad-y);
}
body.header-compact .ast-desktop .ast-primary-header-bar .main-header-menu > .menu-item > .menu-link {
  padding-top: var(--link-pad-y-compact);
  padding-bottom: var(--link-pad-y-compact);
}


#masthead .ast-primary-header-bar .ast-builder-grid-row {
  padding-top: 0;
  padding-bottom: 0;
}


#masthead{
  background:#fff;
  transition: min-height .25s ease, box-shadow .25s ease, top .25s ease;
  min-height: var(--header-height);
  z-index: 1000;
}


#masthead .main-header-bar{
  transition: min-height .25s ease, padding .2s ease;
  min-height: var(--header-height);

}

body.header-compact #masthead{
  min-height: var(--header-compact-height);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
body.header-compact #masthead .main-header-bar{
  min-height: var(--header-compact-height);
}

.main-header-bar .ast-container,
.main-header-bar .site-branding,
.main-header-bar .main-header-menu > li > a{
  transition: padding .2s ease, height .2s ease, line-height .2s ease;
}

.main-header-bar .main-header-menu > li > a{
  padding-top: var(--link-pad-y);
  padding-bottom: var(--link-pad-y);
}
body.header-compact .main-header-bar .main-header-menu > li > a{
  padding-top: var(--link-pad-y-compact);
  padding-bottom: var(--link-pad-y-compact);
}

/* Il wrapper del logo ha un'altezza che cambia, l'immagine riempie il 100% */
.site-logo-img,
.custom-logo-link{
  display: inline-flex;
  align-items: center;
  height: 48px;                     /* altezza logo a header normale */
  transition: height .25s ease;
}

.site-logo-img img,
.custom-logo-link img{
  height: 100% !important;          /* riempi il wrapper */
  width: auto;
  max-height: none !important;
  flex: 0 0 auto !important;      
}

body.header-compact .site-logo-img img,
body.header-compact .custom-logo-link img{
  height: 30px;  
}


body.header-compact .site-description,
body.header-compact .ast-below-header,
body.header-compact .site-header-below-wrap,
body.header-compact .site-header-above-wrap,
body.header-compact .ast-header-search,
body.header-compact .ast-header-widget-area,
body.header-compact .ast-header-custom-item:not(.language-switcher){
  display: none !important;
}


.main-header-bar .wpml-ls,
.main-header-bar .wpml-ls-legacy-list-horizontal,
.main-header-bar .wpml-ls-statics-shortcode_actions,
.main-header-bar .lang-item,
.main-header-bar .language-switcher{
  display: block;
}

.site-title a{
  display:inline-block;
  line-height:1.2;
  padding-top: var(--link-pad-y);
  padding-bottom: var(--link-pad-y);
  transition: padding .2s ease;
}
body.header-compact .site-title a{
  padding-top: var(--link-pad-y-compact);
  padding-bottom: var(--link-pad-y-compact);
}
  

/* Mobile: se vuoi lasciare l’header “normale”, disattiva la compattazione */
/*
@media (max-width: 768px){
  body.header-compact #masthead,
  body.header-compact #masthead .main-header-bar{
    min-height: var(--header-height);
    box-shadow: none;
  }
}
*/

/***************************/
/* Anchor offset globale  */
/***************************/

:root {
  --breadcrumbs-height: 0px;
  /* Offset = admin bar + header (normale/compatto) + breadcrumbs */
  --offset-ancore: calc(var(--admin-bar, 0px) + var(--site-header-height, var(--header-height)) + var(--breadcrumbs-height));
}

/* Quando l'header è compatto, aggiorna l'offset */
body.header-compact {
  --offset-ancore: calc(var(--admin-bar, 0px) + var(--header-compact-height) + var(--breadcrumbs-height));
}

/* Se sei loggato in WP, aggiungi l'altezza della admin bar (tipicamente 32px) */
body.admin-bar { --admin-bar: 32px; }

/* Applica l'offset a QUALSIASI target con id (non solo ai titoli) */
[id] { scroll-margin-top: var(--offset-ancore); }

/* Facoltativo ma comodo: vale anche per scrollIntoView/anchor jump */
html { scroll-padding-top: var(--offset-ancore); scroll-behavior: smooth; }


/***************************/
/* Barra laterale */
/***************************/
#primary {
    margin: 0em 0;
}

.ast-left-sidebar #primary {
    padding-left: 30px;
}

#secondary {
    margin: 0em 0 2em;
}

#secondary button, #secondary input, #secondary select, #secondary textarea {
    font-size: 17px;
    font-size: 0.9rem;
}

.ast-left-sidebar #secondary {
    padding-right: 30px;
}

/***************************/
/* Pagina Archivio         */
/***************************/
.archive .ast-article-post .ast-article-inner, .blog .ast-article-post .ast-article-inner, .archive .ast-article-post .ast-article-inner:hover, .blog .ast-article-post .ast-article-inner:hover {
    background-color: #fff;
}

.ast-article-inner {
    padding: 0em 0em 0em 0.5em;
}

/***************************************/
/* Paginazione sopra e sotto archivio  */
/***************************************/

/* Barra di controllo archivi: sinistra (totali), destra (paginazione compatta) */
.ast-archive-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.ast-archive-controls__left,
.ast-archive-controls__right {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.ast-archive-total { font-weight: 600; }
.ast-archive-current { font-weight: 600; }

.ast-archive-controls__right a,
.ast-archive-controls__right .disabled {
  text-decoration: none;
}

.ast-archive-controls__right .disabled {
  opacity: .5;
  pointer-events: none;
}

/* (Opzionale) nascondi la paginazione numerica standard di Astra */
.ast-pagination { display: none; }




/***************************/
/* Astra Theme             */
/***************************/

.uagb-slick-carousel {
    padding: 0px;
}

:root {
	--wp--custom--ast-default-block-top-padding: 0em; 
	--wp--custom--ast-default-block-right-padding: 0em;
	--wp--custom--ast-default-block-bottom-padding: 0em;
	--wp--custom--ast-default-block-left-padding: 0em;
}

a.ast-button.ast-badge-tax
{
    padding: 1px 8px;
}

.ast-separate-container .ast-article-post, .ast-separate-container .ast-article-single {
	padding: 1.5em 1.5em;
}

.ast-separate-container #primary, .ast-separate-container.ast-left-sidebar #primary, .ast-separate-container.ast-right-sidebar #primary
 {
	margin: 0em 0;
	padding: 0;
}

.ast-container-fluid {
	padding-left: 0px;
	padding-right: 0px;
}

.single .entry-header {
    margin-bottom: 0em;
}

/***************************/
/* Generic Style */
/***************************/

.list-cols {
  --cols: 2; /* default */
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-cols li {
  /*background: #eee;*/
	position: relative;
	padding-left: 40px; 
	margin-bottom: 10px;
	line-height: 15px;
}

.list-cols li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    background-size: contain;
    background-repeat: no-repeat;
  }

.list-cols li.wide {
  grid-column: span var(--cols); /* occupa 2 colonne */
}

.list-cols li.border {
  background: #eee;
	border-radius: 0.75em;
	border: 1px solid #1f2937;
	line-height: 35px;
	margin-bottom: 0em;
}

@media (max-width: 600px) {
  .list-cols {
    grid-template-columns: 1fr; /* una sola colonna */
    gap: 0.75rem;              /* un po’ meno spazio */
  }

  .list-cols li {
    padding-left: 32px;        /* riduco l’offset per l’icona */
    margin-bottom: 8px;
    line-height: 18px;         /* più leggibile su mobile */
  }

  .list-cols li::before {
    width: 24px;               /* icone più piccole */
    height: 24px;
  }
	
	.list-cols li.wide {
    grid-column: span 1; /* occupa 1 colonna */
  }
}


.icon-website::before {
    background-image: url('/wp-content/uploads/2025/09/ic-web.png');
  }

.icon-email::before {
    background-image: url('/wp-content/uploads/2025/09/ic-email.png');
  }

.icon-phone::before {
    background-image: url('/wp-content/uploads/2025/09/ic-phone.png');
  }

.icon-mobile::before {
    background-image: url('/wp-content/uploads/2025/09/ic-mobile.png');
  }

.icon-family::before {
    background-image: url('/wp-content/uploads/2025/09/ic-family.png');
  }

.icon-map::before {
    background-image: url('/wp-content/uploads/2025/09/ic-map.png');
  }

.icon-car::before {
    background-image: url('/wp-content/uploads/2025/09/ic-car.png');
  }

.icon-budget-low::before {
    background-image: url('/wp-content/uploads/2025/09/ic-budget_low.png');
  }


.icon-budget-medium::before {
    background-image: url('/wp-content/uploads/2025/09/ic-budget_medium.png');
  }


.icon-budget-high::before {
    background-image: url('/wp-content/uploads/2025/09/ic-budget_hign.png');
  }

.icon-images::before {
    background-image: url('/wp-content/uploads/2025/09/ic-images.png');
  }

.icon-gmaps::before {
    background-image: url('/wp-content/uploads/2025/09/ic-gmap.png');
  }

.icon-arrow-r::before {
    background-image: url('/wp-content/uploads/2025/09/ic-arrow_r.png');
  }
/***************************/

/* MAIN Article */

.article-top-img {
	width: 100%; 
	border-radius: 0.75em; 
	box-shadow: 0 0 12px #0001;
	margin-top: 1em;
	}

.div-wrap { 
  --left-width: 60%;
  --right-width: 40%;
  display: flex; 
  gap: 1rem; 
}

.div-wrap .left  { 
  width: var(--left-width); 
}

.div-wrap .right { 
  width: var(--right-width); 
}

.div-wrap .left .leaflet-container {
  min-height: 150px; 
}

@media (max-width: 600px) and (orientation: portrait) {
  .div-wrap { flex-direction: column-reverse; }
  .div-wrap .left,
  .div-wrap .right { flex-basis: auto; width: auto; }
	.div-wrap .right .leaflet-container,
  .div-wrap .right .leaflet-map,
  .div-wrap .right .WPLeafletMap {
    height: 50vh !important;   
    min-height: 150px !important;
    width: 100% !important;
  }
  .div-wrap .right {
    width: 100% !important;
  }
}

.div-wrap-4060 { 
	display:flex; 
	gap:1rem; 
}
.div-wrap-4060 .left  { 
	width: 40%; 
}
.div-wrap-4060 .right { 
	width: 60%; 
}
.div-wrap-4060 .right .leaflet-container {
  min-height: 360px; 
}

@media (max-width: 600px) and (orientation: portrait) {
  .div-wrap-4060 { flex-direction: column; }
  .div-wrap-4060 .left,
  .div-wrap-4060 .right { flex-basis: auto; width: auto; }
	.div-wrap-4060 .right .leaflet-container,
  .div-wrap-4060 .right .leaflet-map,
  .div-wrap-4060 .right .WPLeafletMap {
    height: 50vh !important;   
    min-height: 300px !important;
    width: 100% !important;
  }
  .div-wrap-4060 .right {
    width: 100% !important;
  }
}

.div-wrap-right { 
	display:flex; 
	margin-bottom: 1em;
}

.div-wrap-right h6 { 
	margin:0em; 
}

.div-wrap-right .left  { 
	width: 40%; 
}
.div-wrap-right .right { 
	width: 60%; 
	text-align: right; 
	line-height: 1.25em;
}

@media (max-width: 600px) and (orientation: portrait) {
  .div-wrap-right { 
		flex-direction: column; }
  .div-wrap-right .left,
  .div-wrap-right .right { 
		flex-basis: auto; 
		width: auto;
		text-align:right;
	}
}

.quick-facts-section {
	background: #f4f8fb; 
	border-radius: 1em; 
	padding: 1.4em 1.4em 0em 1.4em; 
	box-shadow: 0 0 12px #0001; 
	margin-top: 1em;
	margin-bottom: 1em;
	}

.quick-facts-section h3 {
  margin-top: 0; 
	margin-bottom: 0.8em; 
	color: #2563eb;
}

.quick-facts-section ul {
  list-style: square; 
	padding-left: 0; 
	font-size: 1.08em;
}

.itinerary-overview-title {
  margin-top: 1.5em;
	margin-bottom: 0.5em;
}

.itinerary-overview-title h4 {
  margin: 0;
}

.itinerary-overview-section {
  margin-top: 1em;
	margin-bottom: 2em;
}

.itinerary-overview-section h5 {
	margin-top: 0.5em;
	margin-bottom: 0.2em;
}

.itinerary-overview-section-li {
	margin-bottom: 1em;
	margin-left: 1em;
}

.deep-dive-section {
  margin-bottom: 0.5em;
}

.deep-dive-section-back{
  text-align:right; 
}

.deep-dive-item {
  margin-bottom: 1em;
  padding: 1em;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 1em;
  background: #fff;
}

.deep-dive-item-header {
  background: linear-gradient(90deg, #f8fafc 0%, #e0e7ef 100%); 
  padding: 1em 1em 1em 1em; 
  border-radius: 1em; 
  margin-bottom: 0em;
}

.deep-dive-item-header-list {
  list-style: disc; 
  margin-left: 1.2em; 
  margin-bottom: 0em
}

.deep-dive-item-body {
  /*overflow: hidden; */
	margin-bottom: 0em;
	padding-top: 1em;
}

.deep-dive-item-image {
  max-width: 350px; 
	max-height: 250px; 
	float: right; 
	margin: 0 15px 0px 0;
	height: auto;
}


/* Smartphone in verticale */
@media (max-width: 600px) and (orientation: portrait) {
  .deep-dive-item-image {
    float: none;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 0 0; /* spazio sotto l’immagine */
    height: auto;
  }
}

.deep-dive-item-bq {
  margin: 1em 0em 0.5em 0em;
	border-left: 4px solid #ccc;
	padding: 0.5em 1em 0.1em 1em; 
	font-style: italic;
	background: #f9f9f9;
}

.deep-dive-item-bq-sp {
  font-weight: bold; 
	margin-bottom: 0em; 
	color: #333;
}

.deep-dive-item-mod {
  display:none;
	position:fixed; 
	top:0; 
	left:0; 
	width:100vw; 
	height:100vh; 
	background-color:rgba(0,0,0,0.8); 
	align-items:center; 
	justify-content:center; 
	z-index:9999;
}

.deep-dive-item-mod-img {
  max-width:90vw; 
	max-height:90vh; 
	box-shadow: 0 0 10px #fff;
}

.deep-dive-item-mod-title {
  position:absolute; 
	bottom: 0px; 
	right:10px; 
	color:#fff;
	background:rgba(0,0,0,0.6);
	padding:4px 8px; 
	border-radius:4px; 
	font-size:14px
}

.article-hero-section { 
  margin-top: 1em;
	margin-bottom: 0em;
}

.article-summary-section {
  background: linear-gradient(90deg, #f8fafc 0%, #e0e7ef 100%); 
  padding: 1em 1em 1em 1em; 
	border: 1px solid #1f2937;
  border-radius: 1em; 
  margin-bottom: 0em;
}

.article-summary-section h6 {
  margin-top: 1em; 
  margin-bottom: 0.5em
}

.article-summary-section ul {
  list-style: disc; 
  margin-left: 1.2em; 
  margin-bottom: 0em
}

.article-summary-section-img img {
  width: 100%; 
	border-radius: 0.75em; 
	box-shadow: 0 0 12px #0001;
	margin-top: 0em;
}

.article_items-section {
  margin-bottom: 0.5em;
}

.article-item-body {
  /*overflow: hidden; */
	margin-bottom: 0em;
	margin-top: 1em;
	padding-top: 1em;
}

.article-item-body h2 {
	margin: 0em;
}

.article-item-body span {
  font-weight: bold; 
	margin-bottom: 0em; 
	color: #333;
}

.article-item-body blockquote {
  font-weight: bold; 
	margin-bottom: 0em; 
	color: #333;
}

.article-item-text
{
	margin-top: 1em; 
}

.article-overview-section {
	background: #f4f8fb; 
	border: 1px solid #1f2937;
	border-radius: 1em; 
	padding: 1.4em 1.4em 1em 1.4em; 
	box-shadow: 0 0 12px #0001; 
	margin-top: 0.5em;
	margin-bottom: 1em;
	}

.article-overview-section h2 {
  margin-top: 0; 
	margin-bottom: 0.1em; 
	color: #2563eb;
}

.article-overview-section ul {
  list-style: square; 
	padding-left: 0; 
	font-size: 1.08em;
  margin-left: 0.5em; 
}

.article-overview-list {
  margin-left: 0.5em; 
}

.article-final-section {
  margin: 2em 0em 0em 0em; 
	background: #f4f8fb;
}

.article-final-section blockquote {
  margin: 0em; 
	color: #333;
}

.article-final-section h3 {
  margin: 0em 0em 0.2em 0em; 
}

/* =========================
   POST PLACE
   ========================= */
.place-hero-section { 
  margin-top: 1em;
	margin-bottom: 0em;
}

.place-summary-section {
  background: linear-gradient(90deg, #f8fafc 0%, #e0e7ef 100%); 
  padding: 1em 1em 1em 1em; 
	border: 1px solid #1f2937;
  border-radius: 1em; 
  margin-bottom: 0em;
  margin-top: 1em;
}

.place-summary-section h5 {
  margin-top: 0.5em; 
  margin-bottom: 0.5em
}

.place-summary-section ul {
  list-style: none; 
  margin-left: 0em; 
  margin-bottom: 0em;
  margin-top: 1em;
}

.place-summary-section-img img {
  width: 100%; 
	border-radius: 0.75em; 
	box-shadow: 0 0 12px #0001;
	margin-top: 0em;
}

.place-overview-section {

	margin-top: 1em;
	margin-bottom: 0em;
	}

.place-overview-section h2 {
  margin-top: 0; 
	margin-bottom: 0.5em; 
}

.place-overview-section ul {
  list-style: square; 
	padding-left: 0; 
	font-size: 1.08em;
}

.place-overview-list {
  margin-left: 1em; 
}

.place-items-section {
  margin-bottom: 0.5em;
}

.place-item-body {
  /*overflow: hidden; */
	margin-bottom: 0em;
	margin-top: 1em;
	padding-top: 0em;
}

.place-item-body h2 {
	margin-bottom: 0em;
}

.place-items-section .place-item-body .div-wrap-right .right {
	display: none; 
}

/* Smartphone in verticale */
@media (max-width: 600px) and (orientation: portrait) {
  .place-items-section .place-item-body .div-wrap-right .right {
	display: inline; 
}
}

.place-item-text
{
	margin-top: 0em; 
}

.place-final-section {
  margin: 2em 0em 0em 0em; 
	background: #f4f8fb;
}

.place-final-section blockquote {
  margin: 0em; 
	color: #333;
}

.place-final-section h3 {
  margin: 0em 0em 0.2em 0em; 
}


/***************************/
/* POST ITINERARY
/***************************/
.itinerary-hero-section-gallery {
	width: 80%;  
	margin: 0.5em auto;
}

.itinerary-hero-section-text {  
	margin-top: 0.5em;
}

.itinerary-overview-section h2  {
	margin-bottom: 0em;
}

.itinerary-overview-list  {
	margin-left: 0.5em;
}

.itinerary-overview-section-day-title  {
	width: 30%;
	font-size:1.1rem;
	font-weight: bold;
	margin: 0 auto;
}

.itinerary-items-section {
  margin-bottom: 0.5em;
}

.itinerary-items-section-day-title  {
	width: 80%;
	font-size:1.5rem;
	font-weight: bold;
	margin: 0 auto;
}

.itinerary-item-body {
  /*overflow: hidden; */
	margin-bottom: 0em;
	margin-top: 2em;
	padding-left: 0.5em;
	padding-right: 0.5em;
	border-radius: 0.75em;
	border-top: 1px solid #1f2937;
	position: relative;       
  isolation: isolate;       
  overflow: hidden;
}

.itinerary-item-body::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 70px;
  pointer-events: none;
  z-index: 1;                /* metti le sfumature sopra i figli */
  border-radius: inherit;    /* segue il raggio del contenitore */
}

.itinerary-item-body::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1), transparent);
}

.itinerary-item-body h3 {
	margin-bottom: 0.5em;
}

.itinerary-item-body p {
	margin-top: 0.3em;
	margin-bottom: 0em;
}

.itinerary-item-body span {
  font-weight: bold; 
	margin-bottom: 0em; 
	color: #333;
}

.itinerary-item-body blockquote {
  font-weight: bold; 
	margin-bottom: 0em; 
	color: #333;
}

.itinerary-item-text
{
	margin-top: 1em; 
}

.itinerary-item-image
{
	max-width: 350px; 
	max-height: 250px;
	float: left; 
	margin: 0 15px 0px 0;
	height: auto;
}

/* Smartphone in verticale */
@media (max-width: 600px) and (orientation: portrait) {
  .itinerary-item-image {
    float: none;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;         /* mantiene le proporzioni */
    max-height: 400px;    /* limite massimo */
    margin: 0;
		object-fit: cover;
  }
}


.itinerary-item-evidence {
  background-color: #f0f8ff;
  border-left: 4px solid #0077b6;
  padding: 1em;
  margin: 1em;
  border-radius: 8px;
}

.evidence-header {
  display: flex;
  align-items: center; /* centra verticalmente icona e testo */
  gap: 8px;            /* spazio orizzontale tra icona e testo */
  margin-bottom: 0.5em;
}

.itinerary-item-evidence .icon {
  width: 40px;
  height: 40px;
}

.itinerary-item-evidence h6 {
  margin: 0; /* toglie margini di default */
}

/* =========================
   CUSTOM GALLERY
   ========================= */
:root{
  --iv-radius: 10px;
  --iv-shadow: 0 8px 24px rgba(0,0,0,.12);
  --iv-text: #1a1a1a;
  --iv-muted: #6b7280;
  --iv-gray: #eee;
  --iv-nav-bg: rgba(0,0,0,.45);
  --iv-nav-bg-hover: rgba(0,0,0,.6);
  --iv-focus: #3b82f6;
}

image-viewer{ display:block; } /* l’host è un blocco */

.iv{ font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial; color:var(--iv-text); }

.iv__frame{ border-radius:var(--iv-radius); overflow:hidden; box-background:#fff; }

.iv__media{ position:relative; background:#fafafa; aspect-ratio:16/10; }

.iv__media > img{ width:100%; height:100%; object-fit:cover; display:block; }

.iv__nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:44px; height:44px; border:0; border-radius:8px;
  background:var(--iv-nav-bg); color:#fff; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  font-size:1.6rem; line-height:1;
}

.iv__nav:hover{ background:var(--iv-nav-bg-hover); }

.iv__nav:focus-visible{ outline:2px solid var(--iv-focus); outline-offset:2px; }

.iv__nav--prev{ left:8px; }

.iv__nav--next{ right:8px; }

.iv__meta { 
	background:var(--iv-gray); 
	padding:.5em 1em 0.5em; 
	line-height:1.35; 
}

.iv__title{ font-weight:600; text-align:center; margin:0 0 .25rem; }

.iv__caption{ font-size:.95rem; color:var(--iv-muted); text-align:center; }

.iv--empty .iv__media{ display:flex; align-items:center; justify-content:center; color:var(--iv-muted); }

.iv--empty .iv__nav{ display:none; }

@media (max-width:520px){
  .iv__title{ font-size:1.02rem; }
  .iv__caption{ font-size:.9rem; }
  .iv__nav{ width:40px; height:40px; font-size:1.45rem; }
}

/* =====================================================
   CATEGORY HUB GRID
   ===================================================== */

/* === Category Hub Grid — groups as vertical flow; children in N columns === */
.chg-wrap{ --chg-gap:1rem; --chg-radius:14px; --chg-p:1rem; --chg-cols:3; }

/* Rimuoviamo la griglia dei gruppi: i gruppi scorrono in verticale, uno dopo l'altro */
.chg-grid{ display:block; }
.chg-group{ 
  margin-bottom: var(--chg-gap);
  padding: var(--chg-p); 
  border-radius: var(--chg-radius); 
  background-size: cover; 
  background-position: center; 
  background-repeat: no-repeat; 
}
.chg-group:last-child{ margin-bottom: 0; }

.chg-group .chg-heading{ margin:0 0 .75rem; font-size:1.125rem; line-height:1.2; }

/* Le sottocategorie del gruppo in griglia orizzontale a N colonne */
.chg-tiles{ display:grid; gap:.75rem; grid-template-columns:repeat(var(--chg-cols), minmax(0,1fr)); }

.chg-tile{ display:block; padding:.75rem; background:rgba(255,255,255,.9); border-radius:10px; text-decoration:none; }
.chg-tile:hover,.chg-tile:focus{ text-decoration:none; outline:0; transform:translateY(-1px); }
.chg-tile .chg-term{ display:block; font-weight:600; margin:0 0 .25rem; }
.chg-tile .chg-count{ display:block; font-size:.9rem; opacity:.8; }

/* MOBILE: impila a COPPIE (2 colonne) all'interno dello stesso gruppo */
@media (max-width: 600px){
  .chg-tiles{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .chg-tile{ padding:.875rem; }
  
  /* (Opzionale) Se il numero di tile è dispari, l’ultimo occupa tutta la riga */
  .chg-tiles > .chg-tile:last-child:nth-child(odd){
    grid-column: 1 / -1;
  }
}


/* =====================================================
   Riquadri GEO my WP
   ===================================================== */

/* Nascondi i div con classe "category" */
.gmw-taxonomy-terms.gmw-taxes.category {
  display: block !important;
}

/* Nascondi i div con classe "tag" */
.gmw-taxonomy-terms.gmw-taxes.tag {
  display: none !important;
}

/* Nascondi i div che NON hanno né "tag" né "category" */
.gmw-taxonomy-terms.gmw-taxes:not(.tag):not(.category) {
  display: none !important;
}


body.archive .ast-archive-description {
    background-color: #9ddbf6;
		padding: 1em 2em 1em;
}