/* ==========================================================
   RENIX — FOOTER CANONICO
   Unica sorgente di verità per tutte le pagine.
   Caricato DOPO i CSS di pagina per neutralizzare i vecchi override.
========================================================== */

.site-footer {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
  color: #4c5b5c !important;
  font-family: "Montserrat", Arial, Helvetica, sans-serif !important;
}

.site-footer *,
.site-footer *::before,
.site-footer *::after {
  box-sizing: border-box !important;
}

.footer-main {
  width: 100% !important;
  min-height: 285px !important;
  margin: 0 !important;
  padding: 48px clamp(72px, 6.2vw, 120px) 44px !important;

  display: grid !important;
  grid-template-columns: max-content max-content max-content max-content !important;
  grid-template-areas: "logo contatti link social" !important;
  justify-content: space-between !important;
  align-items: start !important;
  column-gap: clamp(36px, 4vw, 76px) !important;

  background: #ffffff !important;
}

.footer-brand,
.footer-address,
.footer-links,
.footer-social {
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  align-self: start !important;
}

.footer-brand {
  grid-area: logo !important;
  width: max-content !important;
  justify-self: start !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

.footer-symbol {
  width: 145px !important;
  height: auto !important;
  margin: 0 0 20px !important;
  display: block !important;
}

.footer-logo-text {
  margin: 0 !important;
  color: #91c3a2 !important;
  font-family: "Montserrat", Arial, Helvetica, sans-serif !important;
  font-size: 23px !important;
  line-height: 1 !important;
  font-weight: 600 !important;
  letter-spacing: 0.25em !important;
  white-space: nowrap !important;
  text-align: center !important;
}

.footer-address {
  grid-area: contatti !important;
  width: max-content !important;
  max-width: none !important;
  justify-self: start !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;

  color: #4c5b5c !important;
  font-family: "Montserrat", Arial, Helvetica, sans-serif !important;
  font-size: 19px !important;
  line-height: 1.35 !important;
  font-style: normal !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}

.footer-address p {
  margin: 0 0 15px !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

.footer-address p:last-child {
  margin-bottom: 0 !important;
}

.footer-address a {
  color: inherit !important;
  text-decoration: none !important;
}

.footer-address a:hover {
  color: #91c3a2 !important;
}

.footer-links {
  grid-area: link !important;
}

.footer-social {
  grid-area: social !important;
}

.footer-links,
.footer-social {
  width: max-content !important;
  max-width: none !important;
  justify-self: start !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;

  grid-template-rows: none !important;
  row-gap: 0 !important;
}

.footer-links h2,
.footer-social h2 {
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 22px !important;
  padding: 0 !important;

  display: block !important;
  position: static !important;
  transform: none !important;

  color: #344041 !important;
  font-family: "Montserrat", Arial, Helvetica, sans-serif !important;
  font-size: 21px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  text-transform: none !important;
  white-space: nowrap !important;
}

.footer-links a,
.footer-social a {
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 16px !important;
  padding: 0 !important;

  display: flex !important;
  align-items: center !important;
  position: static !important;
  transform: none !important;
  gap: 10px !important;

  color: #4c5b5c !important;
  text-decoration: none !important;
  font-family: "Montserrat", Arial, Helvetica, sans-serif !important;
  font-size: 19px !important;
  line-height: 1.25 !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}

.footer-links a:last-child,
.footer-social a:last-child {
  margin-bottom: 0 !important;
}

.footer-links a:hover,
.footer-social a:hover {
  color: #91c3a2 !important;
}

.social-svg {
  width: 19px !important;
  height: 19px !important;
  flex: 0 0 19px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.social-svg svg {
  width: 19px !important;
  height: 19px !important;
  display: block !important;
  fill: #91c3a2 !important;
}

.footer-bottom {
  width: 100% !important;
  height: 58px !important;
  min-height: 58px !important;
  margin: 0 !important;
  padding: 0 clamp(72px, 6.2vw, 120px) !important;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;

  background: #4c5b5c !important;
  color: #ffffff !important;
}

.footer-bottom a {
  color: #ffffff !important;
  font-family: "Montserrat", Arial, Helvetica, sans-serif !important;
  font-size: 15px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

/* Desktop più stretto: stessa struttura, leggermente più compatta. */
@media (min-width: 981px) and (max-width: 1280px) {
  .footer-main {
    min-height: 250px !important;
    padding: 38px 38px 36px !important;
    column-gap: 28px !important;
  }

  .footer-symbol {
    width: 120px !important;
    margin-bottom: 16px !important;
  }

  .footer-logo-text {
    font-size: 19px !important;
  }

  .footer-address,
  .footer-links a,
  .footer-social a {
    font-size: 15px !important;
  }

  .footer-links h2,
  .footer-social h2 {
    margin-bottom: 18px !important;
    font-size: 17px !important;
  }

  .footer-address p {
    margin-bottom: 12px !important;
  }

  .footer-links a,
  .footer-social a {
    margin-bottom: 13px !important;
  }
}

/* ==========================================================
   MOBILE / TABLET — identico al footer della HOME approvato
========================================================== */
@media (max-width: 980px) {
  .site-footer {
    padding-top: 0 !important;
  }

  .footer-main {
    width: 100% !important;
    min-height: 170px !important;
    padding: 24px 14px !important;

    display: grid !important;
    grid-template-columns: 1.05fr 1.35fr 0.9fr 0.8fr !important;
    grid-template-areas: "logo contatti social link" !important;
    justify-content: stretch !important;
    column-gap: 14px !important;
    row-gap: 0 !important;
    align-items: center !important;
  }

  .footer-brand,
  .footer-address,
  .footer-social,
  .footer-links {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    transform: none !important;
    justify-self: stretch !important;
    align-self: center !important;
  }

  .footer-brand {
    grid-area: logo !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .footer-address {
    grid-area: contatti !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;

    font-size: 9px !important;
    line-height: 1.4 !important;
    white-space: normal !important;
  }

  .footer-social {
    grid-area: social !important;
  }

  .footer-links {
    grid-area: link !important;
  }

  .footer-symbol {
    width: 70px !important;
    height: auto !important;
    margin: 0 0 10px !important;
  }

  .footer-logo-text {
    font-size: 10px !important;
    line-height: 1 !important;
    letter-spacing: 2px !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  .footer-address p {
    margin: 0 0 7px !important;
    padding: 0 !important;
    white-space: normal !important;
  }

  .footer-address p:last-child {
    margin-bottom: 0 !important;
  }

  .footer-links,
  .footer-social {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    grid-template-rows: none !important;
    row-gap: 0 !important;
  }

  .footer-links h2,
  .footer-social h2 {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    display: block !important;

    font-size: 10px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }

  .footer-links a,
  .footer-social a {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 7px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;

    gap: 5px !important;
    font-size: 9px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
  }

  .footer-links a:last-child,
  .footer-social a:last-child {
    margin-bottom: 0 !important;
  }

  .social-svg {
    width: 13px !important;
    height: 13px !important;
    flex: 0 0 13px !important;
  }

  .social-svg svg {
    width: 13px !important;
    height: 13px !important;
  }

  .footer-bottom {
    height: 46px !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }

  .footer-bottom a {
    font-size: 11px !important;
  }
}

/* ==========================================================
   FOOTER DESKTOP — ALLINEAMENTO DEFINITIVO
========================================================== */

@media (min-width: 981px) {

  .footer-main {
    width: 100% !important;
    min-height: 0 !important;

    display: grid !important;
    grid-template-columns:
      max-content
      max-content
      max-content
      max-content !important;

    grid-template-areas:
      "logo contatti link social" !important;

    justify-content: space-between !important;
    align-items: start !important;

    /* stesso spazio sopra e sotto */
    padding: 60px clamp(72px, 6.2vw, 120px) !important;

    column-gap: clamp(36px, 4vw, 76px) !important;
  }

  .footer-brand {
    grid-area: logo !important;
    width: max-content !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;

    align-self: start !important;
  }


  /* LOGO:
    compensiamo il bordo trasparente del PNG */
  .footer-symbol {
    display: block !important;
    width: 132px !important;
    height: auto !important;

    /* niente più margine negativo */
    margin: 0 0 7px !important;

    /* compensazione del trasparente del PNG */
    transform: translateY(-9px) !important;
  }

  .footer-logo-text {
    margin: 0 !important;
    padding: 0 !important;

    font-size: 23px !important;
    line-height: 1 !important;
    font-weight: 600 !important;
    letter-spacing: 0.25em !important;

    white-space: nowrap !important;
    text-align: center !important;
  }

  /* =========================================
    ALLINEAMENTO VERTICALE DELLE 4 COLONNE
  ========================================= */

  .footer-brand,
  .footer-address,
  .footer-links,
  .footer-social {
    height: 190px !important;
    align-self: start !important;
  }


  /* CONTATTI */
  .footer-address {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .footer-address p {
    margin: 0 !important;
  }


  /* LINK UTILI */
  .footer-links {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .footer-links h2,
  .footer-links a {
    margin: 0 !important;
  }


  /* SOCIAL */
  .footer-social {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .footer-social h2,
  .footer-social a {
    margin: 0 !important;
  }


  /* LOGO */
  .footer-brand {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .footer-symbol {
    width: 150px !important;
    margin: 0 !important;
    transform: translateY(-9px) !important;
  }

  .footer-logo-text {
    margin: 0 !important;
    letter-spacing: 0.25em !important;
  }

}


/* =========================================
   ICONE SOCIAL DA FIGMA
========================================= */

.footer-social .social-svg {
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 20px !important;

  display: block !important;

  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
}

/* nasconde le vecchie icone SVG */
.footer-social .social-svg svg {
  display: none !important;
}

/* LinkedIn */
.footer-social a[href*="linkedin"] .social-svg {
  background-image: url("./assets/linkedin.png") !important;
}

/* Facebook */
.footer-social a[href*="facebook"] .social-svg {
  background-image: url("./assets/facebook.png") !important;
}

/* Instagram */
.footer-social a[href*="instagram"] .social-svg {
  background-image: url("./assets/instagram.png") !important;
}

/* =========================================
   MOBILE FOOTER — ALLINEAMENTO CORRETTO
========================================= */

@media (max-width: 980px) {

  .footer-main {
    grid-template-columns: 1.05fr 1.55fr 0.85fr 0.95fr !important;

    /* ORDINE:
       logo | contatti | link utili | social
    */
    grid-template-areas:
      "logo contatti link social" !important;

    align-items: start !important;
    column-gap: 12px !important;

    padding: 28px 18px !important;
  }

  .footer-brand,
  .footer-address,
  .footer-links,
  .footer-social {
    align-self: start !important;
    justify-self: stretch !important;

    margin: 0 !important;
    padding: 0 !important;

    justify-content: flex-start !important;
  }

  /* LOGO */
  .footer-brand {
    grid-area: logo !important;
    align-items: center !important;
  }

  /* CONTATTI */
  .footer-address {
    grid-area: contatti !important;
    align-items: flex-start !important;
  }

  /* LINK UTILI — TERZA COLONNA */
  .footer-links {
    grid-area: link !important;
    align-items: flex-start !important;
  }

  /* SEGUICI — ULTIMA COLONNA */
  .footer-social {
    grid-area: social !important;
    align-items: flex-start !important;
  }

  /* niente centratura verticale interna */
  .footer-address,
  .footer-links,
  .footer-social {
    justify-content: flex-start !important;
  }

}

/* =========================================
   MOBILE FOOTER — CENTRATURA DEFINITIVA
========================================= */

@media (max-width: 980px) {

  .footer-main {
    display: grid !important;

    grid-template-columns: 1.05fr 1.55fr 0.9fr 1fr !important;
    grid-template-areas:
      "logo contatti link social" !important;

    align-items: center !important;
    justify-content: stretch !important;

    column-gap: 12px !important;

    /* stesso spazio sopra e sotto */
    padding: 32px 18px !important;

    min-height: 0 !important;
    height: auto !important;
  }


  /* TUTTE LE COLONNE HANNO LA STESSA ALTEZZA */
  .footer-brand,
  .footer-address,
  .footer-links,
  .footer-social {
    height: 104px !important;

    margin: 0 !important;
    padding: 0 !important;

    align-self: center !important;

    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }


  /* LOGO */
  .footer-brand {
    grid-area: logo !important;
    align-items: center !important;
  }

  .footer-symbol {
    width: 82px !important;
    height: auto !important;
    margin: 0 !important;
    transform: translateY(-4px) !important;
  }

  .footer-logo-text {
    margin: 0 !important;

    font-size: 10px !important;
    line-height: 1 !important;

    letter-spacing: 0.25em !important;
  }


  /* CONTATTI */
  .footer-address {
    grid-area: contatti !important;
    align-items: flex-start !important;
  }

  .footer-address p {
    margin: 0 !important;
    padding: 0 !important;

    font-size: 9px !important;
    line-height: 1 !important;
  }


  /* LINK UTILI */
  .footer-links {
    grid-area: link !important;
    align-items: flex-start !important;
  }


  /* SOCIAL */
  .footer-social {
    grid-area: social !important;
    align-items: flex-start !important;
  }


  /* TITOLI */
  .footer-links h2,
  .footer-social h2 {
    margin: 0 !important;
    padding: 0 !important;

    font-size: 10px !important;
    line-height: 1 !important;
  }


  /* LINK */
  .footer-links a,
  .footer-social a {
    margin: 0 !important;
    padding: 0 !important;

    font-size: 9px !important;
    line-height: 1 !important;
  }

  .footer-social .social-svg {
    width: 11px !important;
    height: 11px !important;
    flex: 0 0 11px !important;

    display: block !important;

    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
  }
}