/*
Theme Name: Vito Gurrado
Description: Child theme di Twenty Twenty-Five per vitogurrado.com.
Author: Marco Cavallo
Template: twentytwentyfive
Version: 1.0
Requires at least: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: vitogurrado
*/

/* Logo in home: dissolvenza come nel vecchio slider */
.vg-hero__logo img {
	animation: vg-fade-in 3s ease 0.5s both;
}

/* Proporzioni delle immagini della home: lo spazio è riservato prima del caricamento */
.vg-hero__logo img {
	aspect-ratio: 638 / 309;
}

.vg-citazione img {
	aspect-ratio: 571 / 225;
}

.vg-payoff img {
	aspect-ratio: 860 / 117;
}

@keyframes vg-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.vg-hero__logo img {
		animation: none;
	}
}

/* Menu come in Stormday */
.vg-header .wp-block-navigation a:hover,
.vg-header .wp-block-navigation .current-menu-item > a,
.vg-header .wp-block-navigation .current-menu-ancestor > a {
	color: var(--wp--preset--color--accent-1);
	text-decoration: none;
}

.vg-header .wp-block-navigation__submenu-container {
	min-width: 180px !important;
	margin-top: 14px;
	padding: 0 15px;
	border: 0 !important;
	border-bottom: 3px solid var(--wp--preset--color--accent-1) !important;
	background: rgba(255, 255, 255, 0.98) !important;
	box-shadow: 0 1px 10px rgba(0, 0, 0, 0.15);
}

.vg-header .wp-block-navigation.items-justified-right .has-child > .wp-block-navigation__submenu-container {
	right: auto;
	left: -15px;
}

/* Ponte invisibile sopra il sottomenu: non si chiude passando dalla voce al sottomenu */
.vg-header .wp-block-navigation__submenu-container::before {
	content: "";
	position: absolute;
	top: -14px;
	right: 0;
	left: 0;
	height: 14px;
}

.vg-header .wp-block-navigation__submenu-container .wp-block-navigation-item {
	border-bottom: 1px solid #eaeaea;
}

.vg-header .wp-block-navigation__submenu-container .wp-block-navigation-item:last-child {
	border-bottom: 0;
}

.vg-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 13px 0 !important;
	color: #2a2b2c;
}

/* Menu da cellulare: elenco sotto l'header, non a tutto schermo */
.vg-header {
	position: relative;
}

.vg-header .wp-block-navigation {
	position: static;
}

.vg-header .wp-block-navigation__responsive-container.is-menu-open {
	position: absolute;
	top: 100%;
	bottom: auto;
	z-index: 100;
	height: auto;
	padding: 0;
	border-bottom: 1px solid #ddd;
	overflow: visible;
	background: var(--wp--preset--color--base);
	animation: none;
}

.vg-header .is-menu-open .wp-block-navigation__responsive-container-content,
.vg-header .is-menu-open .wp-block-navigation__container,
.vg-header .is-menu-open .wp-block-navigation-item,
.vg-header .is-menu-open .wp-block-navigation__submenu-container {
	align-items: stretch !important;
	justify-content: flex-start !important;
	text-align: left;
}

.vg-header .is-menu-open .wp-block-navigation__responsive-close,
.vg-header .is-menu-open .wp-block-navigation__responsive-dialog {
	position: static;
}

/* Il pulsante di chiusura prende il posto dell'icona del menu nell'header */
.vg-header .wp-block-navigation:has(.is-menu-open) .wp-block-navigation__responsive-container-open {
	visibility: hidden;
}

.vg-header .is-menu-open .wp-block-navigation__responsive-container-close {
	top: auto;
	bottom: calc(100% + 28px);
	right: 30px;
	padding: 2px;
	background: var(--wp--preset--color--base);
}

.vg-header .is-menu-open .wp-block-navigation__responsive-container-content {
	padding: 0 !important;
}

.vg-header .is-menu-open .wp-block-navigation__container,
.vg-header .is-menu-open .wp-block-navigation__submenu-container {
	gap: 0 !important;
	width: 100%;
}

.vg-header .is-menu-open .wp-block-navigation-item {
	width: 100%;
	border-bottom: 1px solid #ddd;
	font-size: 0.875rem;
}

.vg-header .is-menu-open .wp-block-navigation-item:last-child {
	border-bottom: 0;
}

.vg-header .is-menu-open .wp-block-navigation-item__content {
	box-sizing: border-box;
	width: 100%;
	padding: 10px 11px !important;
	color: #111111;
}

.vg-header .is-menu-open .wp-block-navigation__submenu-container {
	min-width: 0 !important;
	margin: 0;
	padding: 0 !important;
	border-top: 1px solid #ddd !important;
	border-bottom: 0 !important;
	background: none !important;
	box-shadow: none;
}

.vg-header .is-menu-open .wp-block-navigation__submenu-container::before {
	display: none;
}

.vg-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 10px 11px 10px 25px !important;
	color: #111111;
}

.vg-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content::before {
	content: "•";
	margin-right: 0.4em;
}

/* Fasce a tutta larghezza attaccate tra loro e al footer */
.wp-block-post-content > .alignfull,
.wp-block-post-content > .alignfull + *,
.wp-site-blocks > footer {
	margin-block-start: 0;
}

/* Link nel testo riconoscibili anche senza colore */
.wp-block-post-content :where(p, li, td) a:where(:not(.wp-element-button)) {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* Home: link alle gallerie */
.vg-opere p {
	margin: 0;
}

.vg-opere a {
	color: var(--wp--preset--color--accent-1);
	font-size: 1.375rem;
	font-weight: 300;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
}

.vg-opere a:hover,
.vg-opere a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

/* Modulo contatti su fondo scuro */
.vg-contatti .wpcf7 p {
	margin: 0 0 1.25rem;
	color: var(--wp--preset--color--base);
	font-size: 0.8125rem;
	text-transform: uppercase;
}

.vg-contatti .wpcf7 input:not([type="submit"]),
.vg-contatti .wpcf7 textarea {
	box-sizing: border-box;
	width: 100%;
	margin-top: 0.4rem;
	padding: 0.6rem 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.12);
	color: var(--wp--preset--color--base);
	font: inherit;
	text-transform: none;
}

.vg-contatti .wpcf7 textarea {
	height: 10rem;
}

.vg-contatti .wpcf7 input[type="submit"] {
	padding: 0.9rem 1.75rem;
	border: 0;
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--base);
	font: inherit;
	font-weight: 700;
	text-transform: uppercase;
	cursor: pointer;
}

.vg-contatti .wpcf7 input[type="submit"]:hover {
	background: var(--wp--preset--color--accent-3);
}

/* Campo trappola dell'antispam: fuori dallo schermo, non display:none che alcuni bot riconoscono */
.wpcf7 .vg-trappola {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.vg-contatti .wpcf7-response-output,
.vg-contatti .wpcf7-not-valid-tip {
	color: var(--wp--preset--color--base);
}

.vg-contatti__info {
	background: rgba(255, 255, 255, 0.12);
}

.vg-contatti__privacy a {
	color: var(--wp--preset--color--base);
	text-decoration: underline;
}

/* Titolo sotto le miniature delle gallerie (inc/opere.php) */
.ngg-galleryoverview .ngg-gallery-thumbnail-box:has(.vg-didascalia) {
	width: 130px;
	vertical-align: top;
}

.vg-didascalia {
	margin: 5px 3px 12px;
	font-size: 12px;
	line-height: 1.35;
	text-align: center;
}

/* Link alle altre gallerie in fondo a ogni galleria (inc/seo.php) */
.vg-altre-opere {
	margin: 60px auto 0;
	padding: 40px 30px 0;
	max-width: 900px;
	border-top: 1px solid #e5e5e5;
	text-align: center;
}

.vg-altre-opere ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 32px;
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
}

.vg-altre-opere a {
	color: var(--wp--preset--color--accent-1);
	text-decoration: none;
}

.vg-altre-opere ul a {
	font-size: 1.0625rem;
	font-weight: 300;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.vg-altre-opere a:hover,
.vg-altre-opere a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

.vg-altre-opere__bio {
	margin: 40px 0 0;
}

.vg-altre-opere__bio a {
	display: inline-block;
	padding: 12px 26px;
	border: 1px solid currentColor;
	font-size: 0.8125rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	transition: background-color 0.2s, color 0.2s;
}

.vg-altre-opere .vg-altre-opere__bio a:hover,
.vg-altre-opere .vg-altre-opere__bio a:focus-visible {
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--base);
	text-decoration: none;
}
