/*
Theme Name: IES ADV
Description: Tema del sito IES ADV (Marketing e Comunicazione). Riproduce l'aspetto del vecchio sito Enfold con un block theme scritto da zero.
Version: 1.0.0
Requires at least: 6.8
Requires PHP: 8.1
Text Domain: iesadv
*/

/* ------------------------------------------------------------------ base
   Misure prese dal vecchio sito: contenuto largo 1210px (1310 con i margini), testo Lato 13px #696969,
   titoli Oswald (un solo peso, il grassetto lo fa il browser come prima), rosso #d63e2d. */
html { background: #191919; }
body { background: #191919; }
.wp-site-blocks { background: #fff; }
html body { --ies-pad: 50px; --wp--style--root--padding-left: var(--ies-pad); --wp--style--root--padding-right: var(--ies-pad); }
img { max-width: 100%; height: auto; }
p { margin: 0.85em 0; }
strong, b { font-weight: 700; }
.ies-main { background: #fff; border-top: 1px solid #e1e1e1; }
.ies-riga, .ies-legale { display: flow-root; }
.ies-content { padding-top: 50px; padding-bottom: 50px; }
.ies-content > :first-child { margin-top: 0; }
.ies-content > :last-child { margin-bottom: 0; }
.ies-wrap { box-sizing: border-box; max-width: 1310px; margin: 0 auto; padding: 0 var(--ies-pad); }
.ies-pad-l20 { padding-left: 20px !important; box-sizing: border-box; }
.has-grande-font-size { line-height: 1.65em; }

/* righe del costruttore di Enfold: due blocchi "di primo livello" uno sotto l'altro stanno a 50px */
.ies-content > * + * { margin-top: 50px; }
.ies-content > .wp-block-buttons,
.ies-content > .is-style-sezione + .is-style-sezione { margin-top: 0; }

/* ------------------------------------------------------------------ testata */
.ies-site-header { position: relative; z-index: 100; }
.ies-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: #fff; border-top: 1px solid #e1e1e1; border-bottom: 1px solid #e1e1e1; }
.admin-bar .ies-header { top: 32px; }
.wp-site-blocks { padding-top: 116px; }
.ies-header__inner { --h: 116px; display: flex; align-items: stretch; justify-content: space-between; height: var(--h); }
.ies-logo { display: block; height: var(--h); line-height: 0; }
.ies-logo img { height: 100%; width: auto; max-width: none; }
.ies-nav { display: flex; }
.ies-menu { display: flex; list-style: none; margin: 0; padding: 0; }
.ies-menu > li { position: relative; margin: 0; }
.ies-menu > li > a { position: relative; display: block; height: var(--h); line-height: var(--h); padding: 0 13px; font-size: 13px; font-weight: 700; color: #7d7d7d; text-decoration: none; transition: color .3s; }
.ies-menu > li:last-child > a { padding-right: 0; }
.ies-menu > li + li > a::before { content: ""; position: absolute; left: 0; top: 50%; height: 15px; margin-top: -8px; border-left: 1px solid #e1e1e1; }
.ies-menu > li > a:hover,
.ies-menu > li.current-menu-item > a,
.ies-menu > li.current_page_item > a { color: #000; }
.ies-menu__fx { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: #d63e2d; opacity: 0; transition: opacity .3s; }
.ies-menu > li > a:hover .ies-menu__fx,
.ies-menu > li.current-menu-item .ies-menu__fx,
.ies-menu > li.current_page_item .ies-menu__fx { opacity: 1; }
.ies-burger, .ies-mobile { display: none; }

/* ------------------------------------------------------------------ titoli */
.is-style-linea { display: flex; align-items: flex-start; margin: 0; padding-bottom: 13px; }
.is-style-linea::after { content: ""; flex: 1 1 auto; min-width: 20px; margin: .62em 0 0 15px; border-top: 1px solid #e9e9e9; }
h1.is-style-linea { padding-bottom: 16.6px; }
h3.is-style-linea { font-size: 20px; line-height: 22px; }
.wp-block-heading { margin: 0 0 8px; }
h1.wp-block-heading { margin-bottom: 14px; }
.is-style-linea + p { margin-top: 17px; }

/* ------------------------------------------------------------------ colonne */
.wp-block-columns.ies-cols { gap: 0 6%; margin-bottom: 0; align-items: flex-start !important; }
.wp-block-columns.ies-cols-0 { gap: 0; }
.wp-block-column > :first-child { margin-top: 0; }

.wp-block-column { display: flow-root; }
.wp-block-column > figure:last-child { margin-bottom: 0; }
.ies-content > .is-style-slider + * { margin-top: 51px; }

/* ------------------------------------------------------------------ home: slider (galleria "Slider") */
.wp-block-gallery.is-style-slider { position: relative; display: block !important; overflow: hidden; height: min(56.25vw, 720px);
	margin-top: -51px !important; margin-bottom: 0 !important; border-top: 1px solid #e1e1e1; box-shadow: inset 0 1px 3px rgba(0,0,0,.1); background: #fff; }
.wp-block-gallery.is-style-slider .ies-track { display: flex; height: 100%; transition: transform .8s cubic-bezier(.4,0,.2,1); }
.wp-block-gallery.has-nested-images.is-style-slider figure.wp-block-image:not(#individual-image) { flex: 0 0 100%; width: 100%; height: 100%; margin: 0; display: flex; align-items: center; justify-content: center; }
.wp-block-gallery.has-nested-images.is-style-slider figure.wp-block-image:not(#individual-image) img { width: 100%; height: 100%; object-fit: contain; flex: none; }
.wp-block-gallery.is-style-slider:not(.is-ready) figure.wp-block-image + figure.wp-block-image { display: none !important; }
.ies-dots { position: absolute; left: 0; right: 0; bottom: 52px; display: flex; justify-content: center; gap: 1px; z-index: 2; }
.ies-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.33); cursor: pointer; }
.ies-dots button.is-active { background: rgba(0,0,0,.62); }
.wp-block-gallery.is-style-slider .ies-dots { gap: .5px; }

/* ------------------------------------------------------------------ home: colonne con icona */
.wp-block-columns.ies-cols-0 > .wp-block-column { text-align: center; }
.wp-block-image.is-style-cresce { margin: 0 0 52px; }
.wp-block-image.is-style-cresce img { border-radius: 50%; transition: transform .7s; }
.wp-block-image.is-style-cresce a:hover img { transform: scale(1.1); }
.wp-block-separator.ies-hr { border: 0; border-top: 1px solid #e1e1e1; margin: 0; opacity: 1; height: 0; width: 100%; }
.ies-cols-0 > .wp-block-column { padding-bottom: 43px; }
.ies-content .wp-block-separator.ies-hr-grande { margin: 41px 0 43px; }
.ies-cols-0 p { margin: 42px 0 53px; }
.ies-cols-0 p a { color: inherit; text-decoration: underline; }

/* ------------------------------------------------------------------ servizi: sezioni */
.wp-block-group.is-style-sezione { border-top: 1px solid #e1e1e1; padding-top: 50px; padding-bottom: 50px; }
.ies-content > .is-style-sezione:last-child { margin-bottom: -50px; }
.wp-block-buttons { justify-content: center; margin: 0; }
.wp-block-button.is-style-contorno .wp-block-button__link { display: inline-block; margin: 3px 0; padding: 25px 50px 23px; border: 3px solid rgba(0,0,0,.6); border-radius: 3px;
	background: transparent; color: rgba(0,0,0,.6); font-size: 15px; line-height: 18px; text-decoration: none; transition: all .3s; }
.wp-block-button.is-style-contorno .wp-block-button__link:hover { background: rgba(0,0,0,.6); color: #fff; }
.ies-colore-rosso, .ies-content .ies-colore-rosso { color: #d63e2d; }
.ies-content .has-grande-font-size a { color: inherit; text-decoration: underline; }

/* chi siamo: citazione */
.wp-block-quote { margin: 0 24.7px 24.7px 0; padding: 0 0 0 20px; border-left: 7px solid #d63e2d; font-size: 24.7px; line-height: 1.5em; }
.wp-block-quote p { margin: .85em 0; }

/* testo delle pagine legali e dei vecchi articoli: il grassetto è rosso, come prima */
.ies-content > p strong { color: #d63e2d; }

/* ------------------------------------------------------------------ progetti */
.ies-sort { margin: 0 0 14px; text-align: center; font-size: 11.7px; line-height: 30px; }
.ies-sort button { border: 0; background: none; padding: 0; font: inherit; color: #7d7d7d; cursor: pointer; }
.ies-sort button.is-active, .ies-sort button:hover { color: #d63e2d; }
.ies-sort__sep { padding: 0 5px; color: #7d7d7d; }
.ies-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-right: -20px; }
.ies-grid__item { padding: 0 16px 17px 0; }
.ies-grid__item { display: block; transition: opacity .4s; }
.ies-grid__item.is-hidden { display: none; }
.ies-grid__img { display: block; aspect-ratio: 394 / 311; overflow: hidden; opacity: .7; transition: opacity .4s; }
.ies-grid__item:hover .ies-grid__img { opacity: 1; }
.ies-grid__img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* singolo progetto */
.ies-progetto-testo { padding: 0 50px; }
.ies-progetto-testo.ies-nero, .ies-progetto-testo.ies-nero p { color: #000; }
.ies-progetto-testo h3 { margin: 0 0 8px; }
.ies-progetto-testo h3 + p { margin-top: 0; }
.ies-content > .ies-tre-quarti { max-width: 73.5%; margin-left: 0 !important; }
.wp-block-gallery.is-style-slideshow { position: relative; display: block !important; overflow: hidden; margin-bottom: 0; }
.wp-block-gallery.is-style-slideshow .ies-track { display: flex; align-items: flex-start; transition: transform .6s ease, height .4s; }
.wp-block-gallery.has-nested-images.is-style-slideshow figure.wp-block-image:not(#individual-image) { flex: 0 0 100%; width: 100%; margin: 0; display: flex; justify-content: center; }
.wp-block-gallery.has-nested-images.is-style-slideshow figure.wp-block-image:not(#individual-image) img { width: auto; max-width: 100%; height: auto; flex: none; border-radius: 3px; }
.wp-block-gallery.is-style-slideshow:not(.is-ready) figure.wp-block-image + figure.wp-block-image { display: none !important; }
.wp-block-gallery.is-style-slideshow .ies-dots { bottom: 15px; gap: 6px; }
.wp-block-gallery.is-style-slideshow .ies-dots button { background: rgba(0,0,0,.2); border: 2px solid #fff; width: 14px; height: 14px; box-sizing: border-box; }
.wp-block-gallery.is-style-slideshow .ies-dots button.is-active { background: #d63e2d; }
.ies-prev, .ies-next { position: absolute; top: 50%; z-index: 2; width: 60px; height: 60px; margin-top: -30px; border: 0; border-radius: 3px; background: rgba(0,0,0,.3); color: #fff; font-size: 0; cursor: pointer; opacity: 0; transition: opacity .3s; }
.ies-prev { left: 15px; } .ies-next { right: 15px; }
.ies-prev::before, .ies-next::before { content: ""; display: inline-block; width: 14px; height: 14px; border: solid #fff; border-width: 0 0 3px 3px; transform: translateX(3px) rotate(45deg); }
.ies-next::before { transform: translateX(-3px) rotate(-135deg); }
.wp-block-gallery.is-style-slideshow:hover .ies-prev, .wp-block-gallery.is-style-slideshow:hover .ies-next { opacity: 1; }

/* ------------------------------------------------------------------ contatti */
.wp-block-group[class*="is-style-icona-"] { margin: 20px 0 30px; text-align: center; }
.wp-block-group[class*="is-style-icona-"]::before { content: ""; display: block; box-sizing: border-box; width: 92px; height: 92px; margin: 0 auto 20px; border: 1px solid #e1e1e1; border-radius: 50%; background: center / 30px no-repeat; }
.wp-block-group[class*="is-style-icona-"] p { margin: 0; padding-top: 2px; font-family: var(--wp--preset--font-family--oswald); font-size: 16.25px; font-weight: 600; line-height: 1.1em; letter-spacing: 1px; text-transform: uppercase; color: #000; }
.wp-block-group.is-style-icona-indirizzo::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5a7.2 7.2 0 0 0-7.2 7.2c0 5.4 7.2 13.8 7.2 13.8s7.2-8.4 7.2-13.8A7.2 7.2 0 0 0 12 1.5zm0 9.9a2.7 2.7 0 1 1 0-5.4 2.7 2.7 0 0 1 0 5.4z'/%3E%3C/svg%3E"); background-size: 26px; }
.wp-block-group.is-style-icona-telefono::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.6 16.3c-.6-.6-2.4-1.7-3-2-.6-.3-1.2-.2-1.6.3l-.9 1.1c-.3.4-.8.5-1.2.3-1.3-.7-2.4-1.6-3.6-2.8S8.3 10.8 7.6 9.5c-.2-.4-.1-.9.3-1.2l1.1-.9c.5-.4.6-1 .3-1.6-.3-.6-1.4-2.4-2-3-.5-.5-1.3-.6-1.9-.2C3.6 3.4 2.4 4.6 2.6 6.4c.3 3.2 2.3 6.6 5 9.4 2.8 2.8 6.2 4.7 9.4 5 1.8.2 3-.9 3.8-2.6.4-.6.3-1.4-.2-1.9z'/%3E%3C/svg%3E"); background-size: 24px; }
.wp-block-group.is-style-icona-email::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1.5 5.2V19h21V5.2l-10.5 8z M2.6 4.3 12 11.5l9.4-7.2z'/%3E%3C/svg%3E"); background-size: 22px; }
.wp-block-group[class*="is-style-icona-"] p a { color: inherit; }
.ies-form-titolo { font-size: 20px; line-height: 22px; margin: 0 0 8px; }

/* Contact Form 7 con l'aspetto del modulo di Enfold */
.wpcf7 form { margin-top: 19px; }
.wpcf7 form p { margin: 0 0 22px; }
.wpcf7 form p:last-of-type { margin-bottom: 31px; }
.wpcf7 label { display: block; margin: 0 0 7px; font-size: 11.96px; font-weight: 700; line-height: 21.45px; color: #696969; }
.wpcf7 label abbr { color: #d63e2d; text-decoration: none; border: 0; }
.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 textarea { box-sizing: border-box; width: 100%; margin: 0; padding: 13px; border: 1px solid #e1e1e1; border-radius: 2px; background: #f8f8f8;
	color: #7d7d7d; font: 13px/1.5 HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif; }
.wpcf7 input[type=text], .wpcf7 input[type=email] { height: 43px; }
.wpcf7 textarea { display: block; height: 165px; resize: vertical; }
.wpcf7 input[type=submit] { min-width: 142px; height: 47px; margin: 8px 0 0; padding: 16px 20px; border: 0; border-bottom: 1px solid #b41c0b; border-radius: 2px; background: #d63e2d; color: #fff; font: 11.96px Arial, sans-serif; cursor: pointer; }
.wpcf7 input[type=submit] { margin-top: 6px; }
.wpcf7 input[type=submit]:hover { background: #eb5c23; }
.wpcf7 .wpcf7-spinner { margin: 0 0 0 10px; }
.wpcf7 form .wpcf7-response-output { margin: 0; padding: 10px 15px; border-radius: 2px; font-size: 13px; }
.wpcf7-not-valid-tip { font-size: 12px; }

/* ------------------------------------------------------------------ footer */
.ies-footer { background: #111; color: #aaa; border-top: 1px solid #111; padding-top: 15px; padding-bottom: 91px; }
.ies-footer .wp-block-column { margin: 30px 0 0; }
.ies-footer a { color: #fff; }
.ies-footer a:hover { color: #eee; }
.ies-footer p { margin: 11.05px 0; }
.ies-footer .ies-widget-title { margin: 12.155px 0 8px; color: #fff; font-size: 14.3px; line-height: 15.73px; letter-spacing: 1px; text-transform: uppercase; }
.ies-footer__logo { margin: 0; line-height: 0; }
.ies-footer__logo img { display: inline-block; }
.ies-socket { background: #191919; color: #eee; font-size: 11px; margin-top: -1px; border-top: 1px solid #191919; }
.ies-socket__inner { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; line-height: 21.45px; }
.ies-socket__menu .ies-menu { gap: 0; }
.ies-socket__menu .ies-menu > li + li { padding-left: 10px; margin-left: 10px; border-left: 1px solid #191919; }
.ies-socket__menu .ies-menu > li > a,
.ies-socket__menu .ies-menu > li:last-child > a { display: inline; height: auto; line-height: 10px; padding: 0; font-size: 11px; font-weight: 400; color: #fff; }
.ies-socket__menu .ies-menu > li + li > a::before, .ies-socket__menu .ies-menu__fx { display: none; }

/* ------------------------------------------------------------------ tablet e telefono (Enfold cambia a 767px) */
@media (max-width: 989px) {
	.ies-menu > li > a { padding: 0 10px; }
}
@media (max-width: 767px) {
	html body { --ies-pad: 7.5vw; }
	.ies-header { position: relative; top: 0 !important; }
	.wp-site-blocks { padding-top: 0; }
	.ies-header__inner { --h: 80px !important; }
	.ies-nav { display: none; }
	.ies-burger { display: block; align-self: center; position: relative; z-index: 102; width: 46px; height: 46px; padding: 7px; border: 1px solid #e1e1e1; border-radius: 2px; background: #fff; color: #000; cursor: pointer; }
	.ies-burger svg { display: block; width: 30px; height: 30px; fill: currentColor; }
	.ies-burger .ies-burger__close, .ies-burger[aria-expanded=true] .ies-burger__open { display: none; }
	.ies-burger[aria-expanded=true] .ies-burger__close { display: block; }
	.ies-menu-aperto .ies-header { background: transparent; border-color: transparent; }
	.ies-menu-aperto .ies-logo { visibility: hidden; }
	.ies-mobile:not([hidden]) { display: block; position: absolute; top: 0; left: 0; right: 0; z-index: 99; min-height: 100vh; padding-top: 88px; background: #fff; border-left: 1px solid #e1e1e1; }
	.admin-bar .ies-mobile:not([hidden]) { top: 46px; }
	.ies-mobile .ies-menu { display: block; border-bottom: 1px solid #e1e1e1; }
	.ies-mobile .ies-menu > li { border-top: 1px solid #e1e1e1; }
	.ies-mobile .ies-menu > li > a, .ies-mobile .ies-menu > li:last-child > a { height: auto; line-height: 21.45px; padding: 13px 28px; font-weight: 400; color: #696969; }
	.ies-mobile .ies-menu > li > a::before { content: ""; position: absolute; left: 19px; top: 50%; height: 0; margin-top: -3px; border: 3px solid transparent; border-left: 5px solid #d63e2d; border-right: 0; }
	.ies-mobile .ies-menu__fx { display: none; }

	.wp-block-gallery.is-style-slider { margin-top: -51px !important; }
	.wp-block-columns.ies-cols { flex-direction: column; }
	.wp-block-columns.ies-cols > .wp-block-column { flex-basis: auto !important; width: 100%; }
	.wp-block-columns.ies-cols-0 > .wp-block-column + .wp-block-column { margin-top: 20px; }
	.ies-content > .ies-tre-quarti { max-width: none; }
	.ies-progetto-testo { padding: 0; }
	.ies-grid { grid-template-columns: 1fr; }
	.ies-socket__inner { display: block; }
	.ies-socket__menu .ies-menu { display: flex; }
	.ies-footer .wp-block-columns.ies-cols:not(.ies-cols-0) > .wp-block-column + .wp-block-column { margin-top: 86px; }
	.ies-footer { padding-bottom: 113px; }

	/* spazi del layout mobile di Enfold */
	.ies-main { border-top: 0; }
	.ies-content > * + * { margin-top: 20px; }
	.ies-content > .is-style-slider + *, .ies-content > .is-style-sezione { margin-top: 50px; }
	.ies-content > .is-style-sezione + .is-style-sezione { margin-top: 0; }
	.wp-block-columns.ies-cols:not(.ies-cols-0) > .wp-block-column + .wp-block-column { margin-top: 20px; }
	.wp-block-group[class*="is-style-icona-"]:last-child { margin-bottom: 16px; }
	.is-style-sezione .wp-block-buttons { margin-top: 20px; }
	.wp-block-group.is-style-sezione { padding-bottom: 67px; }
	.ies-content .wp-block-separator.ies-hr-grande { margin-top: 62px; }
	.wpcf7 form { margin-top: 11px; }
	.wpcf7 form p { margin-bottom: 11px; }
	.wpcf7 form p:last-of-type { margin-bottom: 51px; }
}
