/*
Theme Name: FG Trasporti
Author: PC Extreme
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: fgtrasporti
Update URI: https://kit.wpfactory/fgtrasporti
*/

/* Contratto dei pezzi comuni (Fabbrica Core) */
:root {
	--fc-accento: #61a229;
	--fc-scuro: #444444;
	--fc-chiaro: #ffffff;
	--fc-su-scuro: #ffffff;
	--fc-display: "Montserrat", sans-serif;
	--fc-testo: "Open Sans", sans-serif;
	--fc-raggio: 0;
	--fg-verde: #337d49;
	--fg-testo: #686868;
	--fg-titolo: #323232;
}

/* Base: misure di misure.md (sito attuale) */
*, *::before, *::after { box-sizing: border-box; }
body {
	margin: 0;
	background: #fff;
	color: var(--fg-testo);
	font-family: var(--fc-testo);
	font-size: 15px;
	font-weight: 300;
	line-height: 24px;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, figure, ul { margin: 0; padding: 0; }
.fg-pagina { overflow-x: clip; }
.fg-pagina > .fg-sezione { position: relative; max-width: none; margin: 0; }

/* Gabbia: 1120 px a 1440, 15 px di margine sul telefono */
.fg-gabbia { width: calc(100% - 30px); max-width: 1120px; margin-left: auto; margin-right: auto; }

/* Testata: 55 + 130 (logo) + 25 = 210 px */
.fg-testata { position: relative; background: #fff; padding: 55px 0 25px; }
.fg-testata__riga { display: flex; justify-content: space-between; align-items: flex-start; }
.fg-logo { display: block; width: 237px; height: 130px; line-height: 0; }
.fg-logo img { display: block; width: 237px; height: 130px; }
.fg-menu { display: flex; margin: 46px 83px 0 0; }
.fg-menu a {
	position: relative;
	display: block;
	padding-bottom: 2px;
	color: #404040;
	font-size: 14px;
	font-weight: 700;
	line-height: 19px;
	text-decoration: none;
}
.fg-menu a + a { margin-left: 50px; }
.fg-menu a + a::before { content: ""; position: absolute; left: -27px; top: 8px; width: 4px; height: 4px; background: #aaa; }
.fg-menu a:first-child { color: var(--fg-verde); border-bottom: 1px solid var(--fg-verde); }
.fg-menu a:hover, .fg-menu a:focus-visible { color: var(--fg-verde); }

/* «f» di Facebook in alto a destra della testata */
.fg-testata__facebook { position: absolute; right: 5px; top: 13px; color: #868686; font: 700 16px/20px var(--fc-testo); text-decoration: none; }
.fg-testata__facebook:hover, .fg-testata__facebook:focus-visible { color: var(--fg-verde); }
.fg-testata__riga { position: relative; }

/* Carosello: 900 px di altezza, immagini impilate */
.fg-carosello { position: relative; overflow: hidden; height: 100vh; min-height: 480px; background: #fff; }
.fg-carosello__foto { position: absolute; inset: 0; }
.fg-carosello__foto figure { margin: 0; width: 100%; height: 100%; }
.fg-carosello__foto figure ~ figure { display: none; }
.fg-carosello--pronto .fg-carosello__foto figure { display: block; position: absolute; inset: 0; opacity: 0; transition: opacity .7s; }
.fg-carosello--pronto .fg-carosello__foto figure.fg-attiva { opacity: 1; }
.fg-carosello__foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (prefers-reduced-motion: reduce) { .fg-carosello--pronto .fg-carosello__foto figure { transition: none; } }
/* titolo e frase restano per chi legge con lo schermo e per i motori, ma non si vedono sulle foto (come nel sito attuale) */
.fg-carosello__testi { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fg-carosello__freccia {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 44px;
	height: 80px;
	margin: -40px 0 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font: 300 64px/80px var(--fc-testo);
	text-shadow: 0 0 6px rgba(0, 0, 0, .35);
	cursor: pointer;
	opacity: .8;
}
.fg-carosello__freccia:hover, .fg-carosello__freccia:focus-visible { opacity: 1; }
.fg-carosello__freccia--prec { left: 10px; }
.fg-carosello__freccia--succ { right: 10px; }
.fg-carosello__punti { position: absolute; left: 0; right: 0; bottom: 18px; z-index: 2; display: flex; justify-content: center; gap: 4px; }
.fg-carosello__punti button { width: 22px; height: 4px; padding: 0; border: 0; background: rgba(255, 255, 255, .45); cursor: pointer; }
.fg-carosello__punti button[aria-current="true"] { background: #fff; }
.fg-carosello:not(.fg-carosello--pronto) .fg-carosello__freccia, .fg-carosello:not(.fg-carosello--pronto) .fg-carosello__punti { display: none; }

/* Titoli di sezione: 36/36 chiari, maiuscolo, filetto da 120 px */
.fg-titolo, .fg-fascia h2, .fg-info h2 {
	position: relative;
	margin: 0 0 79px;
	padding-bottom: 16px;
	color: #444;
	font-family: var(--fc-testo);
	font-size: 36px;
	font-weight: 300;
	line-height: 36px;
	text-align: center;
	text-transform: uppercase;
}
.fg-titolo::after, .fg-fascia h2::after, .fg-info h2::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 120px;
	height: 1px;
	margin-left: -60px;
	background: var(--fg-verde);
}
.fg-chi .fg-titolo::after { background: #444; }

/* Chi siamo */
.fg-chi { background: #fbfbfb; padding: 100px 0; }
.fg-chi__colonne { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 30px; border-bottom: 1px solid #e6e6e6; }
.fg-chi h3 { color: var(--fg-titolo); font-size: 24px; font-weight: 700; line-height: 33px; margin: 0 0 13px; }
.fg-chi p { margin: 0; text-align: justify; }
.fg-chi__colonna > p:last-child, .fg-chi__organizzazione > p:last-child { margin-bottom: 20px; }
.fg-chi__colonna:nth-child(2) h3 { margin: 3px 0 22px; font-size: 15px; line-height: 20px; }
.fg-chi__colonna:nth-child(2) p { text-align: start; }
.fg-chi__organizzazione > p:first-of-type { margin-bottom: 20px; }
.fg-chi__organizzazione > p:nth-of-type(2) { margin-bottom: 0; }
.fg-chi__riga { display: grid; grid-template-columns: minmax(0, 737fr) minmax(0, 353fr); gap: 0 30px; margin-top: 19px; }
.fg-chi__indicatori { padding-top: 26px; }
.fg-barra { position: relative; margin: 0 0 25px; }
.fg-barra span { display: block; margin-bottom: 1px; color: var(--fg-titolo); font-size: 14px; font-weight: 700; line-height: 24px; }
.fg-barra i { display: block; height: 10px; background: var(--fg-verde); }
.fg-barra strong {
	position: absolute;
	top: -2px;
	right: -15px;
	min-width: 38px;
	padding: 3px;
	background: #323232;
	color: #fff;
	font-size: 12px;
	font-weight: 400;
	line-height: 15px;
	text-align: center;
}

/* Il Titolare */
.fg-titolare { background: #fff; padding: 100px 0 207px; text-align: center; }
.fg-titolare .fg-titolo { margin-bottom: 20px; }
.fg-titolare .wp-block-image { width: 353px; max-width: 100%; margin: 0 auto; }
.fg-titolare .wp-block-image img { display: block; width: 353px; max-width: 100%; aspect-ratio: 1; object-fit: cover; filter: grayscale(1); }
.fg-titolare h3 {
	display: table;
	margin: 20px auto 0;
	padding-bottom: 5px;
	border-bottom: 1px solid var(--fg-verde);
	color: #444;
	font-size: 14px;
	font-weight: 700;
	line-height: 19px;
	text-transform: uppercase;
}
.fg-titolare .fg-titolare__ruolo { margin: 7px 0 0; padding-bottom: 5px; color: var(--fg-titolo); font-size: 14px; line-height: 20px; }
.fg-titolare p { margin: 10px 0 0; line-height: 22px; }
.fg-titolare .fg-titolare__ruolo + p { margin: 10px 0 20px; }
.fg-titolare__email { display: block; margin-top: 10px; color: var(--fg-titolo); font-size: 14px; line-height: 22px; text-decoration: none; }

/* Fascia Affidabilità: banda #4c4c4c, banda col titolo con la trama a puntini (1 pixel scuro ogni 2x2), banda bianca */
.fg-fascia { background: #4c4c4c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2' shape-rendering='crispEdges'%3E%3Crect width='1' height='1' fill='%23272727'/%3E%3C/svg%3E") 0 0 / 2px 2px; image-rendering: pixelated; padding: 0; color: #fafafa; }
.fg-fascia::before { content: ""; display: block; height: 401px; background: #4c4c4c; }
.fg-fascia::after { content: ""; display: block; height: 260px; background: #fff; }
.fg-fascia h2 { width: calc(100% - 30px); max-width: 1120px; margin: 100px auto 0; color: #fff; }
.fg-fascia h2::after { background: var(--fg-verde); }
.fg-fascia p { width: calc(100% - 30px); max-width: 1120px; margin: 80px auto 120px; text-align: center; }
.fg-fascia h2 + p { margin-top: 80px; }

/* Info e modulo */
.fg-info { background: #4c4c4c; padding: 100px 0; color: #fafafa; }
.fg-info h2 { margin-bottom: 20px; color: #fff; }
.fg-info__sotto { margin: 0 0 60px; color: #fff; font-size: 18px; line-height: 32px; text-align: center; }
.fg-info__colonne { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px; align-items: start; }
.rr-contatto { color: #7f7f7f; }
.rr-contatto__form { display: block; }
.rr-contatto__persona { border: 0; margin: 0; padding: 0; min-width: 0; }
.rr-contatto legend { float: left; width: 100%; padding: 0; color: #7f7f7f; font-size: 15px; font-weight: 400; line-height: 24px; }
.rr-contatto__sotto { clear: both; }
.rr-contatto__sotto label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rr-contatto__campo label { display: block; color: #7f7f7f; font-size: 15px; font-weight: 400; line-height: 24px; }
.rr-contatto input[type="text"], .rr-contatto input[type="email"], .rr-contatto textarea {
	display: block;
	width: 100%;
	height: 46px;
	margin: 0 0 20px;
	padding: 10px 15px;
	border: 1px solid #fff;
	border-radius: 0;
	background: transparent;
	color: #fafafa;
	font: 400 15px/24px var(--fc-testo);
}
.rr-contatto textarea { height: 150px; padding: 11px; resize: vertical; }
.rr-contatto input:focus-visible, .rr-contatto textarea:focus-visible { outline: 2px solid var(--fc-accento); outline-offset: 0; }
.rr-contatto__privacy { position: relative; display: grid; grid-template-columns: 13px minmax(0, 1fr); gap: 0 6px; margin: 0 0 3px 19px; font-size: 15px; font-weight: 400; line-height: 24px; }
.rr-contatto__titoletto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rr-contatto__privacy input { width: 13px; height: 13px; margin: 5px 0 0; }
.rr-contatto__privacy label { color: #7f7f7f; }
.rr-contatto__privacy a { color: inherit; text-decoration: underline; }
.rr-contatto__errore { color: #fff; }
.rr-contatto__invia {
	display: block;
	margin: 0 0 0 auto;
	padding: 10px 19px;
	border: 1px solid #ddd;
	border-radius: 0;
	background: #f0f0f0;
	color: #000;
	font: 300 15px/24px var(--fc-testo);
	cursor: pointer;
}
.fg-contatti h3 { margin: 0 0 29px; color: #fff; font-size: 18px; font-weight: 300; line-height: 24px; }
/* una voce per paragrafo (lo prepara functions.php): icona bianca 25x24 e testo che a capo torna sotto l'icona */
.fg-contatti p, .fg-contatto {
	margin: 0 0 25px;
	min-height: 24px;
	padding: 0;
	text-indent: 39px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 24'%3E%3Crect width='25' height='24' fill='%23fff'/%3E%3Cpath fill='%234c4c4c' fill-rule='evenodd' d='M12.5 4a4.5 4.5 0 0 0-4.5 4.5c0 3.4 4.5 9.5 4.5 9.5s4.5-6.1 4.5-9.5A4.5 4.5 0 0 0 12.5 4zm0 2.7a1.8 1.8 0 1 1 0 3.6 1.8 1.8 0 0 1 0-3.6z'/%3E%3C/svg%3E") no-repeat 0 0 / 25px 24px;
	color: #fff;
	line-height: 22px;
	text-align: left;
}
.fg-contatti .fg-contatto--tel { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 24'%3E%3Crect width='25' height='24' fill='%23fff'/%3E%3Cpath fill='%234c4c4c' d='M8 6.2c0 5.8 4.6 10.4 10.4 10.4l1.1-2.6-3.1-1.6-1.2 1.2c-1.7-.7-3-2-3.7-3.7l1.2-1.2-1.6-3.1z'/%3E%3C/svg%3E"); }
.fg-contatti .fg-contatto--mail { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 24'%3E%3Crect width='25' height='24' fill='%23fff'/%3E%3Crect x='5.5' y='7' width='14' height='10' rx='1' fill='%234c4c4c'/%3E%3Cpath d='M6 8l6.5 5L19 8' stroke='%23fff' stroke-width='1.4' fill='none'/%3E%3C/svg%3E"); }
.fg-contatti p:empty { display: none; }
.fg-contatti p > b { font-weight: 300; }
.fg-contatti p > b + br { display: none; }
.fg-contatti a { color: #fff; text-decoration: none; }

/* Piè di pagina: 50 + 68 + 50 */
.fg-piede { position: relative; overflow: hidden; background: #fff; padding: 50px 0; color: #868686; }
.fg-piede__riga { position: relative; min-height: 68px; }
.fg-piede__riga p { max-width: 732px; margin: 0 0 20px; font-size: 14px; line-height: 24px; }
.fg-piede__riga b { font-weight: 300; }
.fg-piede__riga p > b:first-child { color: #000; font: 300 12px/14px Arial, sans-serif; }
.fg-piede .fg-su { position: absolute; left: 50%; bottom: -10px; width: 36px; height: 46px; margin-left: -18px; background: #121212 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 46'%3E%3Cpath d='M14.7 22l3.3-3.3 3.3 3.3M14.7 27l3.3-3.3 3.3 3.3' stroke='%23fff' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat center; }
.fg-piede__facebook {
	position: absolute;
	right: 0;
	top: 0;
	width: 34px;
	height: 34px;
	border: 1px solid #868686;
	color: #868686;
	font: 700 14px/32px var(--fc-testo);
	text-align: center;
	text-decoration: none;
}

/* Tablet: la riga delle barre va sotto il testo, poi le tre colonne diventano una */
@media (max-width: 1000px) {
	.fg-chi__riga { display: block; }
	.fg-chi__indicatori { padding-bottom: 25px; }
}
@media (max-width: 860px) {
	.fg-chi__colonne { display: block; }
	.fg-chi__colonna:nth-child(2) h3 { margin-top: 0; padding-top: 2px; }
}

/* Telefono: colonne una sotto l'altra, menu nella striscia in fondo alla testata (211 px come l'originale) */
@media (max-width: 767px) {
	.fg-testata { height: 211px; }
	.fg-testata__riga { display: block; }
	.fg-menu { position: absolute; left: 15px; right: 15px; bottom: 0; justify-content: center; margin: 0; }
	.fg-menu a { font-size: 12px; line-height: 20px; padding-bottom: 0; }
	.fg-menu a + a { margin-left: 28px; }
	.fg-menu a + a::before { left: -16px; top: 8px; }
	.fg-menu a:first-child { border-bottom: 0; }
	.fg-testata__facebook { display: none; }
	.fg-contatti p { line-height: 23px; }
	.fg-chi__colonne, .fg-chi__riga, .fg-info__colonne { display: block; }
	.fg-chi__colonne { padding-bottom: 0; }
	.fg-chi__colonna:nth-child(2) h3 { margin-top: 0; padding-top: 2px; }
	.fg-chi__colonna:nth-child(3) h3 { margin-top: -1px; }
	.fg-chi__riga { margin-top: 19px; }
	.fg-chi__indicatori { padding: 25px 0; }
	.fg-titolare .wp-block-image, .fg-titolare .wp-block-image img { width: 100%; max-width: none; }
	.fg-piede { padding-bottom: 86px; }
	.fg-piede__riga { min-height: 0; }
	.fg-piede__riga p { margin-bottom: 50px; text-align: center; }
	.fg-piede__facebook { position: static; display: block; margin: 0 auto; }
	.fg-titolare { padding-bottom: 208px; }
	.fg-titolare .fg-titolo { margin-bottom: 21px; }
	.fg-fascia h2 { margin-top: 100px; }
	.fg-info__sotto { line-height: 32px; }
}
