/*
Theme Name: UAL Landing
Theme URI: https://ufficiarredati.info
Author: Tuo Nome
Description: Tema classico con theme.json per la landing della campagna bus.
Version: 1.2.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: ual
*/

:root {
  --ual-rosso: var(--wp--preset--color--rosso-brand);
  --ual-navy: var(--wp--preset--color--blu-navy);
  --ual-verde: var(--wp--preset--color--verde);
  --ual-bebas: var(--wp--preset--font-family--bebas-neue);
  --ual-header-h: 76px;
  --ual-whatsapp: #25D366;
  --ual-icona-whatsapp: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E");
  --whatsApp: #25d366;
  --giallo: rgb(251, 186, 0);
  --gialloscuro: rgb(198, 150, 18);
  --rosso:#990a2c;
  --rossoscuro: #6d061e;
  --lgreen:#44C554;
  --green:#8eba43;
  --greenscuro:#4f5f32;
  --black:#333;
  --beige:#eae0bd;
  --Beigec:#151f42;
}



html { scroll-behavior: smooth; }
[id] { scroll-margin-top: var(--ual-header-h); }

body { margin: 0; }

/* Contenitore di header e footer, largo come i blocchi "wide" */
.contenitore {
  max-width: var(--wp--style--global--wide-size);
  margin-inline: auto;
  padding-inline: var(--wp--preset--spacing--40);
  box-sizing: content-box;
}

/* Pagine standard */
.contenuto { padding-block: var(--wp--preset--spacing--60); }
.contenuto--grazie { text-align: center; }
.contenuto--grazie .wp-block-buttons { justify-content: center; }

/* Landing: sezioni attaccate, senza il blockGap globale */
.landing.landing > * { margin-block: 0; }

/* Punto rosso nei titoli (formato "Evidenzia" dell'editor) */
mark.has-inline-color { background: none; }

/* === SEZIONI === */
.sezione { padding-block: var(--wp--preset--spacing--60); }
.sezione--grigia { background: var(--wp--preset--color--grigio-chiaro); }
.sezione--scura { background: var(--ual-navy); color: #fff; }
.sezione--scura :is(h1, h2, h3) { color: #fff; }
.sezione__intro { margin-bottom: var(--wp--preset--spacing--50); }
.sezione__intro h2 { margin-bottom: var(--wp--preset--spacing--30); }
.sottotitolo { max-width: 560px; color: var(--wp--preset--color--testo-secondario); }
#sedi h2, .sezione > h2 { margin-bottom: var(--wp--preset--spacing--50); }

.link-freccia { font-size: var(--wp--preset--font-size--small); font-weight: 700; }
.link-freccia a { color: var(--ual-navy); text-decoration: none; }
.link-freccia a:hover { text-decoration: underline; }

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ual-navy);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  padding-block: 10px;
}
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header__logo a { color: #fff; font-weight: 700; text-decoration: none; }
.custom-logo { display: block; max-height: 60px; width: auto; }
.menu-landing__lista { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }
.menu-landing a { color: #fff; font-size: var(--wp--preset--font-size--medium); font-weight: 600; text-decoration: none; }
.menu-landing a:hover { color: var(--wp--preset--color--grigio-blu); }

.home .menu-landing .home a{display: none;}

.page-id-55 .menu-landing .thanks a,
.privacy-policy .menu-landing .thanks a{display: none;}

/* Box Numero Verde */
.numero-verde {
  position: relative;
  border: 2px solid var(--ual-verde);
  border-radius: 8px;
  padding: 5px 14px 5px 44px;
  color: #fff;
  line-height: 1;
}
.numero-verde::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  background: var(--ual-verde);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / contain no-repeat;
}
a.numero-verde { display: block; flex: none; text-decoration: none; }
.numero-verde.numero-verde > * { display: block; margin: 0; }
.numero-verde__label { font-size: 10px; font-weight: 600; color: var(--ual-verde); }
.numero-verde__numero { font-family: var(--ual-bebas); font-size: 26px; letter-spacing: .02em; }
.numero-verde__numero a { color: inherit; text-decoration: none; }
.numero-verde__numero a::after { content: ""; position: absolute; inset: 0; } /* tutto il box è cliccabile */
.numero-verde:hover { background: rgba(76, 195, 90, .08); }

.numero-verde--grande { display: inline-block; max-width: 340px; width: 100%; padding: 14px 20px 14px 64px; margin-top: var(--wp--preset--spacing--40); }
.numero-verde--grande::before { left: 20px; width: 28px; height: 28px; }
.numero-verde--grande .numero-verde__numero { font-size: 40px; }
.numero-verde--grande .numero-verde__label { font-size: 12px; }

/* Box su sfondo chiaro (sezione contatti) */
.sezione--grigia .numero-verde { color: var(--ual-navy); background: #fff; }
.sezione--grigia .numero-verde__label { color: #2E8F3B; } /* verde più scuro: leggibile su chiaro */

/* Variante WhatsApp */
.box-whatsapp.box-whatsapp { border-color: var(--ual-whatsapp); margin-top: 12px; }
.box-whatsapp::before { background: var(--ual-whatsapp); -webkit-mask-image: var(--ual-icona-whatsapp); mask-image: var(--ual-icona-whatsapp); }
.sezione--grigia .box-whatsapp .numero-verde__label { color: #128C4A; }

/* Pulsante WhatsApp flottante */
.whatsapp-float {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ual-whatsapp);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  transition: transform .2s;
}
.whatsapp-float::before {
  content: "";
  position: absolute;
  inset: 14px;
  background: #fff;
  -webkit-mask: var(--ual-icona-whatsapp) center / contain no-repeat;
          mask: var(--ual-icona-whatsapp) center / contain no-repeat;
}
.whatsapp-float:hover { transform: scale(1.08); }

/* === HERO === */
.hero { background: var(--ual-navy); color: #fff; }
.hero__colonne.hero__colonne { gap: 0; margin-block: 0; align-items: stretch; }
.hero__testo { padding-block: clamp(48px, 8vw, 104px); padding-right: var(--wp--preset--spacing--50); }
.eyebrow {
  font-size: var(--wp--preset--font-size--x-small);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--wp--preset--color--grigio-blu);
}
.hero__titolo { color: #fff; text-shadow: 3px 3px 0 rgba(0, 0, 0, .25); margin-block: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40); }
.hero__intro { max-width: 480px; }

.btn-verde .wp-block-button__link { background: transparent; border: 2px solid var(--ual-verde); padding-block: 11px; }
.btn-verde .wp-block-button__link:hover { background: rgba(76, 195, 90, .12); }

.hero__media { position: relative; min-height: 320px; }
.hero__foto.hero__foto {
  position: absolute;
  inset: 0;
  margin: 0;
  filter: drop-shadow(-6px 0 0 var(--ual-rosso)); /* bordo rosso lungo l'onda */
}
.hero__foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M8 0C1 25 12 50 4 72C0 84 1 94 3 100H100V0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M8 0C1 25 12 50 4 72C0 84 1 94 3 100H100V0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.hero__citta.hero__citta {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 42%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 20px;
  background: rgba(200, 16, 46, .78);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M45 0C12 8 2 24 6 44C10 62 32 68 22 84C16 93 20 98 26 100H100V0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M45 0C12 8 2 24 6 44C10 62 32 68 22 84C16 93 20 98 26 100H100V0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.hero__citta p {
  margin: 0;
  text-align: right;
  font-family: var(--ual-bebas);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.15;
  color: #fff;
}

/* === CARD FORMULE === */
.card {
  border: 1px solid var(--wp--preset--color--bordo);
  border-radius: 10px;
  padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
  background: #fff;
}
.card.card > * { margin-block: 0 12px; }
.card__icona img { width: 44px; height: 44px; }
.card.card > .card__icona { margin-bottom: 20px; }
.card p { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--testo-secondario); }
.card.card > .link-freccia { margin-top: 24px; }

/* === CARD SEDI === */
.card-sede {
  background: var(--ual-navy);
  color: #fff;
  border-radius: 10px;
  padding: var(--wp--preset--spacing--40);
}
.card-sede.card-sede > * { margin-block: 0 6px; }
.card-sede h3 { color: #fff; }
.card-sede__indirizzo { font-size: var(--wp--preset--font-size--x-small); color: rgba(255, 255, 255, .8); }
.card-sede .link-freccia { font-size: var(--wp--preset--font-size--x-small); }
.card-sede .link-freccia a { color: #fff; }

/* === COME FUNZIONA === */
.passo { gap: 16px; }
.passo p { margin: 0; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--testo-secondario); }
.passo .passo__numero {
  font-family: var(--ual-bebas);
  font-size: 64px;
  line-height: .85;
  color: var(--ual-rosso);
}
.passo .passo__titolo { font-size: var(--wp--preset--font-size--medium); font-weight: 700; color: var(--ual-navy); margin-bottom: 4px; }

/* === CONTATTI === */
.contatti__colonne { gap: var(--wp--preset--spacing--60); }
.form-card {
  background: #fff;
  color: var(--wp--preset--color--testo-scuro);
  border-radius: 10px;
  padding: var(--wp--preset--spacing--40);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .18);
}
.sezione--grigia .form-card { box-shadow: 0 10px 30px rgba(31, 45, 82, .10); }

/* === FOOTER === */
.site-footer { background: var(--wp--preset--color--blu-notte); color: #fff; padding-block: var(--wp--preset--spacing--50);font-size: 13px; }
.site-footer__inner { display: flex;flex-direction:column ; gap: 16px 32px; }
.site-footer__inner .site__logo_img{ width: 300px;}
.site-footer__inner .site__logo_img img{width: 100%;height: auto;max-height: none;}
.site-footer__inner .site__logo_img p.description{text-align: center;margin-top: -15px;font-style: italic;}


/* === MOBILE === */
@media (max-width: 781px) {
  .menu-landing { display: none !important; }
  .hero__testo { padding-right: 0; padding-bottom: var(--wp--preset--spacing--50); }
  .hero__media { min-height: 300px; margin-inline: calc(var(--wp--style--root--padding-right) * -1); }
  .hero__foto.hero__foto { filter: none; }
  .hero__foto img { -webkit-mask: none; mask: none; }
  .numero-verde:not(.numero-verde--grande) .numero-verde__label { display: none; }
  .numero-verde:not(.numero-verde--grande) .numero-verde__numero { font-size: 22px; }
}

/* === CONTACT FORM 7 === */
.wpcf7-form p { margin: 0; }
.cf7-griglia {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 14px;
}
.cf7-intera { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .cf7-griglia { grid-template-columns: 1fr; }
}

.wpcf7-form label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  color: var(--ual-navy);
}
.wpcf7-form-control-wrap { display: block; margin-top: 6px; }

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form select,
.wpcf7-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #CDD2DB;
  border-radius: 6px;
  font: inherit;
  font-size: 16px; /* evita lo zoom automatico su iOS */
  font-weight: 400;
  color: var(--wp--preset--color--testo-scuro);
  background: #fff;
  box-sizing: border-box;
  transition: border-color .2s;
}
.wpcf7-form input:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
  border-color: var(--ual-rosso);
  outline: none;
}
.wpcf7-form textarea { height: 90px; min-height: 90px; resize: vertical; }

.wpcf7-acceptance { display: block; margin-top: 16px; }
.wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.wpcf7-acceptance label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 12px; color: var(--wp--preset--color--testo-secondario); }
.wpcf7-acceptance input { margin-top: 2px; width: 16px; height: 16px; flex: none; }
.wpcf7-acceptance a { color: var(--ual-navy); }

.wpcf7-form .wpcf7-submit {
  width: 100%;
  margin-top: 16px;
  padding: 14px 32px;
  border: none;
  border-radius: 999px;
  background: var(--ual-rosso);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s;
}
.wpcf7-form .wpcf7-submit:hover { background: var(--wp--preset--color--rosso-scuro); }
.wpcf7-spinner { display: block; margin: 8px auto 0; }

.wpcf7-not-valid-tip { color: var(--ual-rosso); font-size: 13px; font-weight: 400; margin-top: 4px; }
.wpcf7 form .wpcf7-response-output {
  margin: 16px 0 0;
  padding: 12px;
  border: 2px solid var(--ual-rosso);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--ual-verde); }


