/*
 * Maingraf – stile del sito.
 * Bootstrap 5 fa da base (griglia, carosello, tab); qui sotto sono riprodotte
 * misure e colori del vecchio tema "Milo", rilevati dal sito pubblicato.
 */
:root {
  --mg-rosso: #ce281c;
  --mg-testo: #3b3e43;
  --mg-bordo: #d7d7d7;
  --mg-scuro: #333333;
  --mg-footer: #2b2e31;
  --mg-font: 'Open Sans', Helvetica, Arial, sans-serif;
  --bs-body-font-family: var(--mg-font);
  --bs-link-color-rgb: 206, 40, 28;
  --bs-link-hover-color-rgb: 206, 40, 28;
}

/* ---------- Griglia: stesse larghezze di Bootstrap 3 (750/970/1170) ---------- */
.container, .row { --bs-gutter-x: 30px; }
.container { padding-left: 15px; padding-right: 15px; }
@media (min-width: 576px) { .container { max-width: 100%; } }
@media (min-width: 768px) { .container { max-width: 750px; } }
@media (min-width: 992px) { .container { max-width: 970px; } }
@media (min-width: 1200px) { .container { max-width: 1170px; } }
@media (min-width: 1400px) { .container { max-width: 1170px; } }
/* nel tema alcune colonne stanno direttamente nel container, senza .row */
.row-senza-margini { margin-left: 0; margin-right: 0; }

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; }
/* il tema non aveva lo scorrimento fluido che Bootstrap 5 attiva di default */
:root { scroll-behavior: auto; }
body {
  font-family: var(--mg-font);
  font-size: 13px;
  line-height: 24px;
  letter-spacing: 1px;
  color: var(--mg-testo);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--mg-rosso); text-decoration: none; transition: all .3s; }
a:hover, a:focus { color: var(--mg-rosso); outline: 0; }
p { margin: 0 0 20px; }
img { max-width: 100%; height: auto; vertical-align: middle; }
strong, b { font-weight: 700; }
hr { margin: 20px 0; border: 0; border-top: 1px solid #eee; opacity: 1; color: inherit; }
/* elenchi come nel tema: ul senza rientro (pallino esterno), ol rientrato */
ul { margin: 0 0 10px; padding-left: 0; }
ol { margin: 0 0 10px; padding-left: 40px; }
li > ul, li > ol { margin-bottom: 0; }
::selection { background: var(--mg-rosso); color: #fff; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--mg-font);
  font-weight: 800;
  text-transform: uppercase;
  color: inherit;
}
h1 { font-size: 36px; line-height: 48px; letter-spacing: 4.5px; margin-bottom: 16px; }
h2 { font-size: 24px; line-height: 36px; letter-spacing: 4px; margin-bottom: 14px; }
h3 { font-size: 18px; line-height: 27px; letter-spacing: 3.5px; margin-bottom: 12px; }
h4 { font-size: 13px; line-height: 20px; letter-spacing: 3px; margin-bottom: 10px; }
h5 { font-size: 12px; line-height: 18px; letter-spacing: 2.5px; margin-bottom: 8px; }
h6 { font-size: 11px; line-height: 16px; letter-spacing: 2px; margin-bottom: 6px; }
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { color: var(--mg-testo); text-decoration: none; }
h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { font-weight: 400; line-height: 1; }
.text-primary { color: var(--mg-rosso) !important; }

#page-wrapper { position: relative; background-color: #fff; overflow-x: clip; }

/* ---------- Pulsanti ---------- */
.btn {
  position: relative;
  z-index: 0;
  display: inline-block;
  padding: 15px 20px;
  margin-bottom: 20px;
  font-size: 12px;
  font-weight: 400;
  line-height: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 0;
  white-space: nowrap;
  transition: all .3s;
  --bs-btn-padding-x: 20px;
  --bs-btn-padding-y: 15px;
  --bs-btn-font-size: 12px;
  --bs-btn-line-height: 12px;
  --bs-btn-border-radius: 0;
}
.btn:after {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 50%;
  width: 0;
  height: 100%;
  opacity: 0;
  content: "";
  transform: translateX(-50%);
  transition: all .2s;
}
.btn:hover:after { width: 101%; opacity: 1; }
.btn:focus, .btn:focus-visible { outline: 0; box-shadow: none; }
.btn i {
  display: inline-block;
  line-height: 43px;
  text-align: center;
  border-left: 1px solid #fff;
  padding-left: 20px;
  margin: -15px 0 -15px 20px;
  color: #fff;
}
.btn-default, .btn-default:focus, .btn-default:active {
  border: 1px solid var(--mg-rosso);
  background-color: var(--mg-rosso);
  color: #fff;
}
.btn-default:after { background-color: var(--mg-testo); }
.btn-default:hover { border-color: var(--mg-testo); background-color: var(--mg-rosso); color: #fff; }

/* ---------- Ricerca ---------- */
#search-container {
  position: relative;
  display: none;
  padding: 30px 0 20px;
  background-color: var(--mg-testo);
  color: #fff;
  text-align: center;
}
#search-container form, #search-container fieldset { margin: 0; padding: 0; border: 0; }
#search-container input[type="text"] {
  display: block;
  width: 75%;
  margin: 0 auto;
  padding: 5px 10px;
  border: none;
  background-color: transparent;
  color: #fff;
  font-size: 13px;
  letter-spacing: normal;
  line-height: 24px;
  outline: 0;
}
#search-container input::placeholder { color: #999; opacity: 1; }

/* ---------- Header ---------- */
header#testata { position: relative; background-color: #fff; z-index: 1000; }
header#testata .barra {
  display: flex;
  align-items: center;
}
.logo-wrapper { padding: 30px 0; }
.logo { display: block; }
.logo img { display: block; width: 250px; max-width: 100%; height: auto; }
header#testata .nav-holder { margin-left: auto; }
.menu, .menu ul { padding: 0; margin: 0; list-style: none; }
header#testata .menu { display: flex; }
header#testata .menu > li { position: relative; }
header#testata .menu li a {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--mg-testo);
  text-decoration: none;
}
header#testata .menu > li > a {
  position: relative;
  padding: 51px 20px;
  margin-right: 15px;
  font-size: 12px;
  text-transform: uppercase;
  transition: all .3s;
}
@media (min-width: 1200px) {
  header#testata .menu > li > a { margin-right: 20px; }
}
header#testata .menu > li:last-child > a { margin-right: 0; }
header#testata .menu li a:hover,
header#testata .menu li.active > a,
header#testata .menu li:hover > a { color: var(--mg-rosso); }
header#testata .menu li.dropdown ul {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  z-index: 2000;
  min-width: 240px;
  padding: 25px 0;
  border: 1px solid var(--mg-bordo);
  border-top: 2px solid var(--mg-rosso);
  background-color: #fff;
}
header#testata .menu li.dropdown:hover > ul { display: block; }
header#testata .menu li.dropdown ul li a { padding: 10px 53px; }
header#testata .menu li.dropdown ul li a:before {
  display: inline-block;
  color: var(--mg-rosso);
  border: 1px solid var(--mg-rosso);
  border-radius: 50%;
  width: 17px;
  height: 17px;
  padding-left: 1px;
  font-size: 13px;
  line-height: 15px;
  text-align: center;
  font-family: 'FontAwesome';
  font-weight: normal;
  content: "\f105";
  margin-right: 10px;
  margin-left: -27px;
}
.search-button-holder { position: relative; }
a.search-button {
  position: relative;
  display: block;
  margin: 2px 0 0 10px;
  width: 30px;
  height: 30px;
  font-size: 16px;
  line-height: 30px;
  text-align: center;
  text-decoration: none;
  color: var(--mg-testo);
  letter-spacing: 1px;
  opacity: 1;
  transition: all .3s;
}
a.search-button:before { font-family: 'miu-icon-font'; content: "\e66d"; }
a.search-button.open, a.search-button:hover { background-color: var(--mg-rosso); color: #fff; }
a.search-button .triangle { display: none; }
#search-container .triangle {
  position: absolute;
  bottom: -13px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 13px solid var(--mg-testo);
}
#mobile-menu-button {
  display: none;
  margin-left: 25px;
  margin-right: 5px;
  padding: 5px 10px;
  font-size: 32px;
  line-height: 32px;
  border-radius: 3px;
  color: var(--mg-rosso);
  transition: all .3s;
}
#mobile-menu-button:hover, #mobile-menu-button.open { background-color: var(--mg-rosso); color: #fff; }

/* header fisso dopo lo scorrimento (solo desktop) */
.segnaposto-testata { display: none; }
@media (min-width: 992px) {
  header#testata.header-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0 auto;
    background-color: #fff;
    z-index: 99999;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  }
  header#testata.header-sticky .logo-wrapper { padding: 10px 0; }
  header#testata.header-sticky .logo img { max-width: 70%; }
  header#testata.header-sticky .menu > li > a { padding-top: 20px; padding-bottom: 20px; }
  header#testata.header-sticky a.search-button { opacity: 0; pointer-events: none; }
  header#testata.header-sticky + .segnaposto-testata { display: block; }
}

/* menu per tablet e smartphone */
#mobile-menu, #mobile-menu ul {
  list-style: none;
  display: none;
  margin: 0;
  padding: 0;
  background-color: var(--mg-rosso);
  color: #fff;
}
#mobile-menu li a {
  display: block;
  padding: 15px 20px;
  color: #fff;
  border-bottom: 1px solid #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
}
#mobile-menu ul a { padding-left: 40px; }
#mobile-menu li.dropdown > a { position: relative; }
#mobile-menu li.dropdown > a:after {
  position: absolute;
  top: 50%;
  right: 20px;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-top-color: #fff;
  margin-top: -2px;
  content: "";
}
#mobile-menu li.dropdown > a.open:after {
  border-top-color: transparent;
  border-bottom-color: #fff;
  margin-top: -7px;
}
@media (max-width: 991.98px) {
  header#testata .nav-holder { display: none; }
  header#testata .search-button-holder { margin-left: auto; }
  #mobile-menu-button { display: block; }
  .logo img { max-width: 570px; }
}
@media (max-width: 767.98px) {
  .logo img { max-width: 170px; }
}

/* ---------- Barra titolo pagina ---------- */
#page-header {
  position: relative;
  padding: 25px 0;
  margin-bottom: 100px;
  border-top: 1px solid var(--mg-bordo);
  border-bottom: 1px solid var(--mg-bordo);
}
#page-header h4 { margin-bottom: 0; font-weight: 700; }
#page-header .breadcrumb {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
  background: transparent;
  text-align: right;
  letter-spacing: 3px;
  font-size: 13px;
  line-height: 24px;
}
#page-header .breadcrumb li { display: inline-block; }
#page-header .breadcrumb li + li:before { content: "/\00a0"; padding: 0 5px; color: #ccc; }
#page-header .breadcrumb li a { color: var(--mg-rosso); }
#page-header .breadcrumb li.active { color: var(--mg-testo); }
@media (max-width: 767.98px) {
  #page-header .breadcrumb { display: none; }
}

/* ---------- Sezioni ---------- */
.ff-section-fullwidth { position: relative; }
.ff-section-boxed { position: relative; max-width: 1170px; margin: 0 auto; }
.section-background-block {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.section-background-block.background-image { background-size: cover; background-repeat: no-repeat; }
.section-background-block.background-fixed { background-attachment: fixed; }
.full-section {
  position: relative;
  z-index: 0;
  margin-bottom: 100px;
  padding: 60px 0;
  background: var(--mg-scuro) no-repeat center center;
  color: #fff;
}
.full-section .section-background-block { z-index: -1; }
.full-section h1 a, .full-section h2 a, .full-section h3 a,
.full-section h4 a, .full-section h5 a, .full-section h6 a { color: var(--mg-rosso); }
.bannerscuro { margin-bottom: 30px; }
/* nel tema il container interno (largo come quello esterno) sborda di 30px */
@media (min-width: 768px) {
  .bannerscuro > .container { width: calc(100% + 30px); max-width: none; margin-left: 0; }
}

/* ---------- Titoli di sezione ---------- */
.headline > i { font-size: 25px; line-height: 25px; margin-bottom: 15px; color: var(--mg-rosso); }
.headline.style-1 { margin-bottom: 50px; }
.headline.style-1 h4 { font-weight: 600; margin-bottom: 0; color: var(--mg-rosso); }
.headline.style-1 h2 { font-weight: 700; }
.headline.style-3 { margin-bottom: 70px; text-align: center; }
.headline.style-3 h5 { margin-bottom: 0; color: var(--mg-rosso); }

/* ---------- Box servizi ---------- */
.services-boxes.style-1 { text-align: center; margin-bottom: 30px; }
.services-boxes.style-1 h2 a, .services-boxes.style-1 h2 { font-weight: 400; transition: all .3s; }
.services-boxes.style-1:hover h2 a { color: var(--mg-rosso); }
.services-boxes.style-2 { margin-bottom: 50px; min-height: 250px; }
.services-boxes.style-2 h3 { margin-bottom: 25px; font-weight: 600; }
.services-boxes.style-2 h3 small {
  display: block;
  font-size: 12px;
  line-height: 12px;
  letter-spacing: 3.5px;
  color: var(--mg-rosso);
}
.services-boxes-content h3 img { margin-left: 30%; }
.services-boxes.style-3 { margin-bottom: 50px; }
.services-boxes.style-3 > i { font-size: 32px; line-height: 32px; color: var(--mg-rosso); }
.services-boxes.style-3 .services-boxes-content h3 { position: relative; font-weight: 600; padding-bottom: 15px; }
.services-boxes.style-3 .services-boxes-content h3:after {
  position: absolute;
  bottom: 0;
  display: block;
  border-bottom: 1px solid var(--mg-rosso);
  width: 50px;
  content: "";
}
.services-boxes.style-3.icon-left { padding-left: 20px; }
.services-boxes.style-3.icon-right { padding-right: 20px; }
.services-boxes.style-3.icon-left > i { float: left; }
.services-boxes.style-3.icon-right > i { float: right; }
.services-boxes.style-3.icon-left .services-boxes-content { margin-left: 80px; }
.services-boxes.style-3.icon-right .services-boxes-content { text-align: right; margin-right: 80px; }
.services-boxes.style-3.icon-left .services-boxes-content h3:after { left: 0; }
.services-boxes.style-3.icon-right .services-boxes-content h3:after { right: 0; }
@media (max-width: 767.98px) {
  .services-boxes.style-3.icon-right .services-boxes-content { text-align: left; margin-right: 0; margin-left: 60px; }
  .services-boxes.style-3.icon-right > i { float: left; }
  .services-boxes.style-3.icon-left .services-boxes-content { margin-left: 60px; }
  .services-boxes.style-3.icon-right .services-boxes-content h3:after { left: 0; right: auto; }
  .services-boxes.style-3.icon-left { padding-left: 0; }
  .services-boxes.style-3.icon-right { padding-right: 0; }
}

/* ---------- Fasi di lavorazione ---------- */
.process-steps { position: relative; margin: 15px 0 30px; }
.process-steps:after { content: ""; display: table; clear: both; }
.process-steps:before {
  display: block;
  border-top: 1px solid var(--mg-bordo);
  content: "";
  position: absolute;
  top: 42.5px;
  left: 0;
  right: 0;
  width: 80%;
  z-index: 1;
  margin: 0 auto;
}
.process-steps .step {
  position: relative;
  z-index: 2;
  float: left;
  width: 20%;
  text-align: center;
  transition: all .3s;
}
.process-steps.process-6-steps .step { width: 16.66666%; }
.process-steps .step i {
  display: block;
  width: 85px;
  height: 85px;
  margin: 0 auto;
  font-size: 26px;
  line-height: 85px;
  border: 1px solid var(--mg-testo);
  border-radius: 50%;
  background-color: #fff;
  outline: 10px solid #fff;
  transition: all .3s;
}
.process-steps .step-details { margin-top: 20px; }
.process-steps .step-details h5 { font-weight: 400; transition: all .3s; }
.process-steps .step:hover { transform: scale(1.2); }
.process-steps .step:hover i { border-color: var(--mg-rosso); color: var(--mg-rosso); }
.process-steps .step:hover h5 { color: var(--mg-rosso); }
.full-section .process-steps .step i { outline: 0; color: #fff; background-color: var(--mg-testo); border-color: #fff; }
.full-section .process-steps .step:hover i { border-color: var(--mg-rosso); color: var(--mg-rosso); }
@media (max-width: 767.98px) {
  .process-steps:before { border: none; }
  .process-steps .step,
  .process-steps.process-6-steps .step { float: none; width: 100%; margin-bottom: 30px; }
  .process-steps .step:last-child { margin-bottom: 0; }
}

/* ---------- Contatori ---------- */
.counter { margin-bottom: 30px; color: var(--mg-rosso); text-align: center; }
.counter i { font-size: 32px; line-height: 32px; }
.counter-value { font-size: 72px; line-height: 96px; letter-spacing: 10px; font-weight: 300; }
.full-section .counter-value { color: #fff; }
.counter-details { text-transform: uppercase; font-weight: 700; }
@media (min-width: 768px) and (max-width: 991.98px) {
  .counter-value { font-size: 58px; line-height: 72px; }
}

/* ---------- Grafici circolari ---------- */
.pie-chart { position: relative; text-align: center; margin-bottom: 20px; }
.pie-chart svg { display: inline; vertical-align: baseline; max-width: 100%; height: auto; } /* in linea come il canvas di easyPieChart */
.pie-chart-details {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
}
.pie-chart-details h1 { font-size: 36px; line-height: 60px; font-weight: 300; text-transform: uppercase; margin-bottom: 16px; }
.pie-chart-details h1 small {
  display: block;
  font-size: 14px;
  line-height: 14px;
  font-weight: 700;
  color: var(--mg-rosso);
}

/* ---------- Testi impaginati (pagine Chi siamo, Privacy) ---------- */
.wpb_text_column h2 { font-weight: 800; }
.wpb_content_element { margin-bottom: 35px; }
.alignnone { margin: 5px 20px 0 0 !important; display: inline-block !important; }
.aligncenter { display: block; margin: 5px auto 0 auto !important; }
.alignright { float: right; margin: 5px 0 30px 20px !important; max-width: 100%; }
.alignleft { float: left; margin: 5px 20px 30px 0 !important; max-width: 100%; }

/* ---------- Tab "Chi siamo / Perché noi" (stile classico grigio) ---------- */
.mg-tabs { margin-bottom: 35px; }
.mg-tabs .nav-tabs {
  display: flex;
  flex-wrap: wrap;
  margin: -1px 0 0 -1px;
  padding: 0;
  border: 0;
  list-style: none;
}
.mg-tabs .nav-tabs .nav-item { margin: 1px 0 0 1px; }
.mg-tabs .nav-tabs .nav-link {
  display: block;
  position: relative;
  padding: 14px 20px;
  margin: 0;
  font-size: 13px;
  line-height: 24px;
  letter-spacing: 1px;
  text-transform: none;
  color: #666;
  background-color: #ebebeb;
  border: 1px solid #e0e0e0;
  border-bottom-color: transparent;
  border-radius: 5px 5px 0 0;
  transition: all .2s;
}
.mg-tabs .nav-tabs .nav-link:hover { background-color: #f0f0f0; color: #666; }
.mg-tabs .nav-tabs .nav-link.active {
  background-color: #f8f8f8;
  border-color: #f0f0f0;
  border-bottom-color: transparent;
  color: #666;
  z-index: 1;
}
.mg-tabs .nav-tabs .nav-link.active:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background-color: #f8f8f8;
}
.mg-tabs .tab-content {
  margin: -1px 0 0;
  background-color: #f8f8f8;
  border: 1px solid #f0f0f0;
  border-radius: 0 5px 5px 5px;
}
.mg-tabs .tab-pane { padding: 14px 20px; }
.mg-tabs .tab-pane p:last-child { margin-bottom: 0; }

/* ---------- Contatti ---------- */
.widget { margin-bottom: 75px; }
.footer-top .widget:last-child, #footer-bottom .widget:last-child { margin-bottom: 0; }
.widget_contact ul { list-style: none; padding: 0; margin: 0; }
.widget_contact ul li span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--mg-rosso);
}
#contact-form { margin-bottom: 50px; }
#contact-form fieldset { border: 0; margin: 0; padding: 0; }
#contact-form input[type="text"], #contact-form input[type="email"], #contact-form textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 5px 15px;
  margin: 0 0 20px;
  border: none;
  border-bottom: 1px solid var(--mg-bordo);
  border-radius: 0;
  background-color: transparent;
  color: var(--mg-testo);
  font-size: 13px;
  line-height: 24px;
  letter-spacing: normal;
  -webkit-appearance: none;
  appearance: none;
  outline: 0;
  box-shadow: none;
  transition: border-color .3s;
}
#contact-form textarea { margin-bottom: 40px; resize: vertical; }
#contact-form input:focus, #contact-form textarea:focus { border-bottom-color: #000; }
#contact-form input::placeholder, #contact-form textarea::placeholder { color: #757575; opacity: 1; }
#contact-form input.is-invalid, #contact-form textarea.is-invalid { border-bottom-color: #9e0b0f; }
#contact-form .errore-campo { margin: -15px 0 15px; color: #9e0b0f; font-size: 12px; line-height: 18px; }
#contact-form textarea + .errore-campo { margin-top: -35px; margin-bottom: 35px; }
#contact-form #submit { letter-spacing: normal; }
/* verifica anti-robot (somma) */
#contact-form .verifica-umana { margin-bottom: 10px; }
#contact-form .verifica-umana label { display: block; padding: 0 15px; margin: 0 0 5px; font-size: 13px; line-height: 24px; color: var(--mg-testo); }
#contact-form .verifica-umana strong { font-weight: 600; }
#contact-form .verifica-umana input { max-width: 300px; }
#contact-form .campo-nascosto {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.alert {
  position: relative;
  text-transform: uppercase;
  font-weight: 600;
  border: none;
  border-radius: 0;
  color: #fff;
  margin-bottom: 30px;
  padding: 15px 55px 15px 15px;
}
.alert i { font-size: 18px; line-height: 20px; margin-right: 15px; }
.alert.alert-success { background-color: var(--mg-rosso); color: #fff; }
.alert.alert-danger { background-color: #9e0b0f; color: #fff; }
.alert .chiudi {
  position: absolute;
  top: 0;
  right: 0;
  width: 55px;
  height: 100%;
  border: 0;
  border-left: 1px solid #fff;
  background: transparent;
  color: #fff;
  font-weight: 600;
  text-transform: lowercase;
  cursor: pointer;
}
.map { position: relative; height: 650px; background-color: #e5e3df; }
.map iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 767.98px) { .map { height: 400px; } }

/* ---------- Footer ---------- */
.footer-top .widget { padding: 30px 0; text-align: center; }
.social-media { margin-bottom: 0; }
.social-media a {
  display: inline-block;
  font-size: 24px;
  line-height: 24px;
  color: #acacac;
  text-decoration: none;
  transition: all .3s;
}
.social-media a.facebook:hover { color: #3b5998; }
#footer-bottom { background-color: var(--mg-footer); color: #585c62; }
#footer-bottom a { color: #585c62; }
#footer-bottom a:hover { color: var(--mg-rosso); }
#footer-bottom .widget { padding: 30px 0; }
#footer-bottom p { margin: 0; text-align: center; text-transform: uppercase; }

/* ---------- Torna su ---------- */
#go-top {
  z-index: 99999;
  display: none;
  position: fixed;
  bottom: 25px;
  right: 25px;
  font-size: 48px;
  line-height: 48px;
  text-decoration: none;
  cursor: pointer;
  color: var(--mg-rosso);
  text-align: center;
  border-radius: 5px;
  transition: opacity .3s;
}
#go-top:hover { opacity: .7; }

/* ---------- Avviso cookie ---------- */
#cookie-notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  min-width: 100%;
  color: #fff;
  background-color: #000;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  display: none;
}
#cookie-notice.visibile { display: block; }
#cookie-notice .cookie-notice-container { padding: 10px; }
#cookie-notice .cn-button {
  display: inline-block;
  margin: 0 0 0 10px;
  padding: 2px 12px;
  font-family: sans-serif;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 1px;
  color: #333;
  text-decoration: none;
  text-transform: none;
  border: 1px solid #bbb;
  border-radius: 3px;
  background: linear-gradient(#fefefe, #f4f4f4);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .05);
  white-space: nowrap;
  cursor: pointer;
}
#cookie-notice .cn-button:hover { background: linear-gradient(#fefefe, #e6e6e6); color: #333; }
@media (max-width: 900px) {
  #cookie-notice .cookie-notice-container #cn-notice-text { display: block; margin: 0 0 5px; }
  #cookie-notice .cn-button { margin: 0 5px; }
}

/* ---------- Slider della home (come Revolution Slider: "slotfade-horizontal") ---------- */
.bannercontainer { position: relative; margin-bottom: 0; }
.mg-slider {
  position: relative;
  overflow: hidden;
  background-color: #e9e9e9;
  height: calc(100vw * 635 / 1170);
  max-height: 635px;
  touch-action: pan-y;
}
.mg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  visibility: hidden;
}
.mg-slide.attiva { visibility: visible; z-index: 1; }
/* strisce verticali dell'immagine in arrivo */
.mg-strisce { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.mg-striscia { position: absolute; top: 0; bottom: 0; overflow: hidden; opacity: 0; }
.mg-striscia > div {
  position: absolute;
  top: 0;
  height: 100%;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
.mg-striscia.in { animation: mg-striscia .3s linear forwards; }
@keyframes mg-striscia { from { opacity: 0; } to { opacity: 1; } }

.mg-slider .didascalia {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  z-index: 3;
  transform: translateY(-50%);
  font-size: 48px;
  line-height: 60px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
}
/* ingresso "sft": cala dall'alto con easeOutBack */
.mg-slide.didascalia-in .didascalia { animation: mg-cala .3s cubic-bezier(.175, .885, .32, 1.275) both; }
.mg-slide.didascalia-out .didascalia { animation: mg-esce .3s ease-out both; }
@keyframes mg-cala {
  from { opacity: 0; transform: translateY(calc(-50% - 50px)); }
  to { opacity: 1; transform: translateY(-50%); }
}
@keyframes mg-esce {
  from { opacity: 1; transform: translateY(-50%); }
  to { opacity: 0; transform: translateY(calc(-50% - 50px)); }
}
/* sotto i 1170px lo slider scala la didascalia in proporzione, come Revolution Slider */
@media (max-width: 1169.98px) {
  .mg-slider .didascalia { font-size: 4.1026vw; line-height: 5.1282vw; letter-spacing: normal; }
}

/* frecce: quadrati rossi 36x36 con le icone del tema */
.mg-freccia {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--mg-rosso) no-repeat center center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s ease-out, background-color .2s ease-out;
}
.mg-freccia.prec { left: 20px; background-image: url("../img/prev.02dc9e44dba0.png"); }
.mg-freccia.succ { right: 20px; background-image: url("../img/next.fbb7cdbc8a07.png"); }
.mg-freccia:hover, .mg-freccia:focus-visible { background-color: var(--mg-testo); }
.mg-freccia:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* pallini */
.mg-pallini {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 5;
  display: flex;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity .2s ease-out;
}
.mg-pallini button {
  width: 8px;
  height: 8px;
  margin: 0 3px;
  padding: 0;
  border: 1px solid var(--mg-rosso);
  border-radius: 50%;
  background-color: var(--mg-rosso);
  cursor: pointer;
}
.mg-pallini button.attivo, .mg-pallini button:hover { background-color: #fff; }
/* frecce e pallini compaiono quando il mouse è sullo slider (hideThumbs del tema) */
.mg-slider:hover .mg-freccia, .mg-slider:hover .mg-pallini,
.mg-slider:focus-within .mg-freccia, .mg-slider:focus-within .mg-pallini { opacity: 1; }

/* ---------- Animazioni all'apparire (al posto di WOW.js) ---------- */
.wow { visibility: hidden; }
.wow.animated { visibility: visible; animation-duration: 1.2s; animation-fill-mode: both; }
.no-js .wow, .senza-animazioni .wow { visibility: visible; }
/* l'animazione parte solo quando l'elemento riceve .animated; spostamenti del 30% come nel tema */
.animated.fadeInDown { animation-name: fadeInDown; }
.animated.fadeInLeft { animation-name: fadeInLeft; }
.animated.fadeInRight { animation-name: fadeInRight; }
.animated.bounceInUp { animation-name: bounceInUp; }
.animated.bounce { animation-name: bounce; transform-origin: center bottom; }
@keyframes fadeInDown {
  from { opacity: 0; transform: translate3d(0, -30%, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translate3d(-30%, 0, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translate3d(30%, 0, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes bounceInUp {
  from, 60%, 75%, 90%, to { animation-timing-function: cubic-bezier(.215, .61, .355, 1); }
  from { opacity: 0; transform: translate3d(0, 3000px, 0); }
  60% { opacity: 1; transform: translate3d(0, -20px, 0); }
  75% { transform: translate3d(0, 10px, 0); }
  90% { transform: translate3d(0, -5px, 0); }
  to { transform: translate3d(0, 0, 0); }
}
@keyframes bounce {
  from, 20%, 53%, 80%, to { animation-timing-function: cubic-bezier(.215, .61, .355, 1); transform: translate3d(0, 0, 0); }
  40%, 43% { animation-timing-function: cubic-bezier(.755, .05, .855, .06); transform: translate3d(0, -30px, 0); }
  70% { animation-timing-function: cubic-bezier(.755, .05, .855, .06); transform: translate3d(0, -15px, 0); }
  90% { transform: translate3d(0, -4px, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .wow { visibility: visible; }
  .wow.animated { animation: none; }
  .mg-slider .didascalia { animation: none !important; opacity: 1; }
  .mg-striscia.in { animation-duration: 1ms; }
}

/* ---------- Ricerca e 404 ---------- */
.risultati-ricerca { list-style: none; padding: 0; }
.risultati-ricerca li { margin-bottom: 30px; }
.risultati-ricerca h3 { margin-bottom: 6px; }
.modulo-ricerca-pagina { display: flex; gap: 10px; margin-bottom: 40px; }
.modulo-ricerca-pagina input {
  flex: 1;
  padding: 5px 15px;
  border: none;
  border-bottom: 1px solid var(--mg-bordo);
  font-size: 13px;
  line-height: 24px;
  outline: 0;
}
.modulo-ricerca-pagina .btn { margin-bottom: 0; }
.spazio-fondo { padding-bottom: 80px; }
