/* =====================================
   HEVER - INTESTAZIONE PERSONALIZZATA
   ===================================== */
/* ===== DESKTOP ===== */
@media screen and (min-width: 1024px) {
	#masthead {
		display: grid;
		grid-template-columns: 100px minmax(0, 1fr);
		grid-template-rows: auto auto auto;
		column-gap: 15px;
		align-items: center;
	}
	
	/* Monogramma FD */
	#masthead .site-logo {
		grid-column: 1;
		grid-row: 1 / 3;
		position: static;
		transform: none;
		margin: 0;
		align-self: center;
	}
	
	#masthead .site-logo img {
		width: 95px;
		max-width: 100%;
		height: auto;
	}
	
	/* Nome */
	#masthead .site-title {
		grid-column: 2;
		grid-row: 1;
		margin: 0;
		align-self: end;
		white-space: nowrap;
	}
	
	/* Motto */
	#masthead .site-description {
		grid-column: 2;
		grid-row: 2;
		margin: 0;
		align-self: start;
	}
	
	/* Menu sotto il logo, allineato a sinistra */
	#masthead .main-navigation {
		grid-column: 1 / -1;
		grid-row: 3;
		justify-self: start;
		width: 100%;
		margin-top: 8px;
		padding-left: 0;
		box-sizing: border-box;
		text-align: left;
	}
	
	#masthead .main-navigation ul {
		justify-content: flex-start;
		margin-left: 0;
		padding-left: 0;
	}
}

/* ===== TABLET E SMARTPHONE ===== */
@media screen and (max-width: 1023px) {
	#masthead {
		display: grid;
		grid-template-columns: 52px minmax(0, 1fr) 44px;
		grid-template-rows: auto auto;
		column-gap: 8px;
		align-items: center;
	}
	
	/* Monogramma */
	#masthead .site-logo {
		grid-column: 1;
		grid-row: 1 / 3;
		position: static;
		transform: none;
		margin: 0;
		align-self: center;
	}
	
	#masthead .site-logo img {
		width: 52px;
		max-width: 100%;
		height: auto;
	}
	
	/* Nome */
	#masthead .site-title {
		grid-column: 2;
		grid-row: 1;
		margin: 0;
		font-size: 18px;
		line-height: 1.15;
		align-self: end;
		overflow-wrap: normal;
	}
	
	/* Motto */
	#masthead .site-description {
		grid-column: 2;
		grid-row: 2;
		margin: 0;
		font-size: 10px;
		line-height: 1.3;
		align-self: start;
	}
	
	/* Navigazione */
	#masthead .main-navigation {
		grid-column: 3;
		grid-row: 1 / 3;
		align-self: center;
		justify-self: end;
		margin: 0;
		width: auto;
	}
	
	/* Pulsante hamburger */
	#masthead #toggle-menu {
		display: flex;
		align-items: center;
		justify-content: center;
		box-sizing: border-box;
		position: relative;
		width: 42px;
		height: 42px;
		padding: 0;
		margin: 0;
		font-size: 0;
		line-height: 1;
		color: transparent;
		overflow: hidden;
	}
	
	/* Simbolo hamburger centrato */
	#masthead #toggle-menu::before {
		content: "\2630";
		display: block;
		position: absolute;
		top: 50%;
		left: 50%;
		width: auto;
		height: auto;
		margin: 0;
		padding: 0;
		transform: translate(-50%, -50%);
		font-size: 25px;
		line-height: 1;
		color: #ffffff;
		text-align: center;
	}
	
	#masthead #toggle-menu::after {
		display: none;
	}
}

/* Correzione navigazione tablet */
@media screen and (min-width: 560px)
and (max-width: 1023px) {
	#masthead .main-navigation {
		position: relative;
	}
	
	#masthead .main-menu-container {
		display: none;
	}
	
	#masthead #toggle:checked
					  ~ .main-menu-container {
		display: block;
		position: absolute;
		top: 100%;
		right: 0;
		width: 250px;
		max-width: 80vw;
		z-index: 100;
		background: white;
		padding: 15px;
		box-shadow: 0 4px 12px rgba(0,0,0,0.12);
	}
	
	#masthead .main-menu-container ul {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		margin: 0;
		padding: 0;
	}
}

/* =====================================
   OTTIMIZZAZIONE SMARTPHONE
   ===================================== */
@media screen and (max-width: 559px) {
	#masthead {
		grid-template-columns: 62px minmax(0, 1fr) 44px;
		column-gap: 10px;
	}
	
	/* Monogramma più grande */
	#masthead .site-logo img {
		width: 62px;
		height: auto;
	}
	
	/* Nome più leggibile */
	#masthead .site-title {
		font-size: 20px;
		line-height: 1.15;
	}
	
	/* Motto più leggibile */
	#masthead .site-description {
		font-size: 12px;
		line-height: 1.3;
	}
}

/* =====================================
   HEADER STICKY - TABLET E SMARTPHONE
   ===================================== */
@media screen and (max-width: 1023px) {
	#masthead {
		position: sticky;
		top: 0;
		z-index: 999;
		background-color: #ffffff;
	}
}

/* Test intestazione sticky mobile e tablet */
@media screen and (max-width: 1023px) {
	#page #masthead {
		position: sticky !important;
		top: 0;
		z-index: 9999;
		background: #ffffff;
	}
}

/* Ombra delicata sotto la testata sticky */
@media screen and (max-width: 1023px) {
	#page #masthead {
		box-shadow: 0 3px 12px rgba(0, 0, 0, 0.10);
	}
}

/* =====================================
   FIRMA PERSONALE - SMARTPHONE
   ===================================== */
@media screen and (max-width: 559px) {
	/* Firma con immagine sopra il testo */
	.firma-personale {
		text-align: center;
	}
	
	/* Contenitore del ritratto */
	.firma-personale .wp-block-media-text__media {
		width: 140px;
		max-width: 140px;
		margin: 0 auto 12px;
	}
	
	/* Immagine proporzionata */
	.firma-personale .wp-block-media-text__media img {
		display: block;
		width: 100%;
		height: auto;
		object-fit: contain;
	}
	
	/* Contenitore del testo */
	.firma-personale .wp-block-media-text__content {
		padding: 0;
		text-align: center;
	}
}

/* =====================================
   HEADER STICKY - DESKTOP
   ===================================== */
@media screen and (min-width: 1024px) {
	#page #masthead {
		position: sticky !important;
		top: 0;
		z-index: 9999;
		background-color: #ffffff;
		box-shadow: 0 0 0 100vmax #ffffff;
		clip-path: inset(0 -100vmax -6px -100vmax);
	}
	
	#page #masthead::after {
		content: "";
		display: block;
		position: absolute;
		top: 100%;
		bottom: auto;
		left: -100vw;
		right: -100vw;
		height: 6px;
		margin: 0;
		background: linear-gradient(to bottom,
		      rgba(0, 0, 0, 0.08),
		      transparent);
		pointer-events: none;
		z-index: 1;
	}
}

/* =====================================
   RIFINITURA MENU SMARTPHONE
   ===================================== */
@media screen and (max-width: 559px) {
	/* Pulsante hamburger */
	#page #masthead #toggle-menu {
		position: relative !important;
		width: 42px;
		height: 42px;
		padding: 0;
		box-sizing: border-box;
		color: transparent;
	}
	
	/* Tre linee perfettamente centrate */
	#page #masthead #toggle-menu::before {
		content: "";
		position: absolute;
		display: block;
		top: 50%;
		left: 50%;
		width: 20px;
		height: 2px;
		margin: 0;
		padding: 0;
		background: #ffffff;
		box-shadow: 0 -6px 0 #ffffff, 0 6px 0 #ffffff;
		transform: translate(-50%, -50%);
	}
	
	/* Hamburger aperto: prima linea della X */
	#page #masthead #toggle:checked
	  + #toggle-menu::before {
		box-shadow: none;
		transform: translate(-50%, -50%) rotate(45deg);
	}
	
	/* Hamburger aperto: seconda linea della X */
	#page #masthead #toggle:checked
	  + #toggle-menu::after {
		content: "";
		display: block;
		position: absolute;
		top: 50%;
		left: 50%;
		width: 20px;
		height: 2px;
		margin: 0;
		padding: 0;
		background: #ffffff;
		transform: translate(-50%, -50%) rotate(-45deg);
	}
	
	/* Navigazione senza copertura a tutto schermo */
	#page #masthead #site-navigation {
		position: static !important;
		width: auto !important;
		height: auto !important;
		min-height: 0 !important;
		background: transparent;
	}
	
	/* Menu chiuso */
	#page #masthead .main-menu-container {
		display: none !important;
	}
	
	/* Menu aperto a tendina */
	#page #masthead #toggle:checked
	  ~ .main-menu-container {
		display: block !important;
		position: absolute !important;
		top: 100% !important;
		bottom: auto !important;
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		height: auto !important;
		min-height: 0 !important;
		max-height: 65vh;
		overflow-y: auto;
		box-sizing: border-box;
		background: #ffffff;
		padding: 12px 20px;
		box-shadow: 0 5px 10px rgba(0,0,0,0.08);
	}
	
	/* Disposizione delle voci */
	#page #masthead .main-menu-container ul {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		margin: 0;
		padding: 0;
	}
	
	#page #masthead .main-menu-container li {
		margin: 0;
		padding: 0;
	}
	
	#page #masthead .main-menu-container li a {
		display: block;
		padding: 7px 0;
		font-size: 16px;
		line-height: 1.4;
	}
}

/* =====================================
   POSIZIONE PULSANTE MENU MOBILE
   ===================================== */
@media screen and (max-width: 559px) {
	#page #masthead #site-navigation {
		align-self: center !important;
		justify-self: end !important;
		margin: 0 !important;
		padding: 0 !important;
	}
	
	#page #masthead #toggle-menu,
	  #page #masthead #toggle:checked + #toggle-menu {
		position: relative !important;
		top: auto !important;
		bottom: auto !important;
		left: auto !important;
		right: auto !important;
		margin: 0 !important;
		transform: none !important;
		width: 42px !important;
		height: 42px !important;
	}
}
/* =====================================
   TEST FONT BRICOLAGE GROTESQUE
   ===================================== */

h1, h2, h3,
.entry-title,
.wp-block-heading {
  font-family: "Bricolage Grotesque", sans-serif !important;
}

h1, .entry-title {
  font-weight: 700;
}

h2, h3 {
  font-weight: 600;
}

/* =====================================
   BRICOLAGE GROTESQUE - TESTATA E MENU
   ===================================== */

/* Nome nella testata */
#masthead .site-title,
#masthead .site-title a {
  font-family: "Bricolage Grotesque", sans-serif !important;
  font-weight: 700;
}

/* Voci del menu */
#masthead .main-navigation a {
  font-family: "Bricolage Grotesque", sans-serif !important;
  font-weight: 600;
}

/* =====================================
   BRICOLAGE GROTESQUE - PULSANTI E FIRMA
   ===================================== */

/* Pulsanti */
.wp-block-button__link {
  font-family: "Bricolage Grotesque", sans-serif !important;
  font-weight: 700;
}

/* Nome nella firma personale */
.firma-personale .wp-block-media-text__content p:first-child {
  font-family: "Bricolage Grotesque", sans-serif !important;
  font-weight: 700;
}

/* =====================================
   HOMEPAGE - UNIFORMITA COPERTINE ARTICOLI
   ===================================== */

.home .griglia-articoli .post-thumbnail {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.home .griglia-articoli .post-thumbnail a {
  display: block;
  width: 100%;
  height: 100%;
}

.home .griglia-articoli .post-thumbnail img {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
}
/* Copyright personalizzato nel footer */
.site-info {
    font-size: 0 !important;
}

.site-info > * {
    display: none !important;
}

.site-info::after {
    content: "© 2026 Fabio D'Onorio";
    font-size: 16px;
    font-weight: 600;
}