/* Footer del sito (views/frontend/layout/footer.ejs) */
.gf-footer {
  --gf-footer-bg: #3e1a09;
  --gf-footer-text: #f5f4ee;
  --gf-footer-muted: rgba(245, 244, 238, 0.68);
  --gf-footer-line: rgba(245, 244, 238, 0.22);
  --gf-footer-accent: #febb00;
  background-color: var(--gf-footer-bg);
  color: var(--gf-footer-text);
  padding: 48px 0 24px;
  font-family: "Satoshi", sans-serif;
}

.gf-footer a,
.gf-footer button {
  color: inherit;
}

.gf-footer a:focus-visible,
.gf-footer button:focus-visible {
  outline: 2px solid var(--gf-footer-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.gf-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand contacts"
    "nav   nav";
  align-items: center;
  gap: 40px 48px;
}

.gf-footer__brand { grid-area: brand; }
.gf-footer__contacts { grid-area: contacts; }
.gf-footer__nav { grid-area: nav; }
/* I social stanno a destra nella stessa riga dei link (stessa cella della griglia) */
.gf-footer__social { grid-area: nav; align-self: start; justify-self: end; }

/* Marchio, claim, contatti e social */
.gf-footer__logo img {
  height: 40px;
  width: auto;
}

.gf-footer__claim {
  margin: 12px 0 0;
  max-width: 44ch;
  font-size: 16px;
  line-height: 1.45;
  color: var(--gf-footer-muted);
}

/* Bottoni di contatto: su desktop una fila di pillole, su mobile in colonna */
.gf-footer__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gf-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 6px 18px 6px 6px;
  border: 1.5px solid var(--gf-footer-line);
  border-radius: 999px;
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s;
}

.gf-contact:hover {
  border-color: var(--gf-footer-accent);
  background-color: rgba(254, 187, 0, 0.08);
}

.gf-contact__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--gf-footer-accent);
  color: var(--gf-footer-bg);
}

.gf-contact--whatsapp .gf-contact__icon {
  background-color: #25d366;
  color: #fff;
}

.gf-contact__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.gf-contact__text strong {
  font-size: 15px;
  font-weight: 700;
}

.gf-contact__text span {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  color: var(--gf-footer-muted);
}

.gf-footer__social {
  display: flex;
  gap: 12px;
}

.gf-footer__social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--gf-footer-line);
  border-radius: 50%;
  transition: border-color 0.2s, background-color 0.2s;
}

.gf-footer__social a:hover {
  border-color: var(--gf-footer-accent);
  background-color: rgba(254, 187, 0, 0.1);
}

.gf-footer__social img {
  width: 20px;
  height: 20px;
}

/* Colonne di link */
.gf-footer__nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 1000px;
  gap: 24px 32px;
}

.gf-footer__title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--gf-footer-accent);
}

.gf-footer__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: default;
}

.gf-footer__chevron {
  display: none;
  transition: transform 0.2s;
}

.gf-footer__links li + li {
  margin-top: 6px;
}

.gf-footer__link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--gf-footer-text);
  text-align: left;
  cursor: pointer;
}

.gf-footer a.gf-footer__link:hover,
.gf-footer button.gf-footer__link:hover {
  color: var(--gf-footer-accent);
}

/* Dati societari, separati da una linea tratteggiata da carta d'imbarco */
.gf-footer__legal {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px dashed var(--gf-footer-line);
  font-size: 13px;
  line-height: 1.6;
  color: var(--gf-footer-muted);
}

/* style.css da' colore e dimensione a tutti i <p>: qui vanno ridichiarati */
.gf-footer__legal p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.gf-footer__company strong {
  color: var(--gf-footer-text);
}

.gf-footer__copy,
.gf-footer__nowrap {
  white-space: nowrap;
}

@media (max-width: 1199.98px) {
  .gf-footer__top {
    grid-template-columns: 1fr;
    grid-template-areas: "brand" "contacts" "nav" "social";
    gap: 32px;
  }

  .gf-footer__nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .gf-footer__social {
    grid-area: social;
    justify-self: start;
  }
}

@media (max-width: 991.98px) {
  .gf-footer__nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Mobile: colonne a fisarmonica */
@media (max-width: 767.98px) {
  .gf-footer {
    padding: 48px 0 28px;
  }

  .gf-footer__top {
    grid-template-areas: "brand" "contacts" "social" "nav";
  }

  .gf-footer__logo img {
    height: 48px;
  }

  .gf-footer__claim {
    margin-top: 20px;
    font-size: 17px;
  }

  .gf-footer__contacts {
    display: grid;
  }

  .gf-contact {
    gap: 14px;
    min-height: 60px;
    padding: 10px 16px 10px 10px;
    border-radius: 14px;
  }

  .gf-contact__icon {
    width: 40px;
    height: 40px;
  }

  .gf-contact__text strong {
    font-size: 16px;
  }

  .gf-contact__text span {
    font-size: 14px;
  }

  .gf-footer__nav {
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid var(--gf-footer-line);
  }

  .gf-footer__group {
    border-bottom: 1px solid var(--gf-footer-line);
  }

  .gf-footer__title {
    margin: 0;
    font-size: 17px;
  }

  .gf-footer__toggle {
    min-height: 56px;
    cursor: pointer;
  }

  .gf-footer.is-collapsible .gf-footer__chevron {
    display: block;
  }

  .gf-footer__toggle[aria-expanded="true"] .gf-footer__chevron {
    transform: rotate(180deg);
  }

  .gf-footer__links {
    padding-bottom: 20px;
  }

  .gf-footer.is-collapsible .gf-footer__group:not(.is-open) .gf-footer__links {
    display: none;
  }

  .gf-footer__link {
    font-size: 17px;
  }

  .gf-footer__links li + li {
    margin-top: 14px;
  }

  .gf-footer__legal {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 36px;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gf-footer__chevron,
  .gf-contact,
  .gf-footer__social a {
    transition: none;
  }
}
