/* Footer */
:root {
  --footer-bg: rgba(0, 0, 0, 0.35);
}

footer {
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
  padding: 42px 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  grid-template-rows: auto auto;
  column-gap: 24px;
  row-gap: 22px;
  align-items: start;
}

.footer-brand--top {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}

.footer-col {
  grid-row: 2;
  align-self: start;
}

.footer-col--about {
  grid-column: 1;
}

.footer-brand {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
}

.footer-brand:hover { color: var(--text); }

.footer-logo {
  display: block;
  width: auto;
  height: clamp(40px, 5vw, 52px);
  max-width: min(200px, 72vw);
}

.footer-about {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 42ch;
  line-height: 1.55;
}

.footer-strong {
  font-weight: 700;
  margin: 0 0 10px;
}

.footer-col--legal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-col--legal .iubenda-embed {
  display: inline-block;
  margin: 0;
}

footer a:not(.iubenda-embed),
.footer-placeholder {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 2px;
  font-size: 0.92rem;
}

.footer-placeholder { color: var(--text-muted); }

/* Barra credits — stessa larghezza contenuto del footer (wrap), non full viewport */
.site-bottom {
  padding: 0;
}

.site-bottom__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 40px;
  padding: 10px 0;
  background: var(--footer-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-bottom__copy {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.site-bottom__credit {
  margin: 0;
  flex: 0 0 auto;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: right;
  white-space: nowrap;
}

.site-bottom__credit a {
  color: var(--text-secondary);
  font-weight: 700;
  transition: color 0.2s ease;
}

.site-bottom__credit a::after {
  display: none;
}

.site-bottom__credit a:hover {
  color: var(--primary);
}

.glp-credit {
  font-size: .85rem;
  color: var(--subtle, #85868f);
  white-space: nowrap;
}

.glp-credit a {
  color: var(--muted, #b9bac1);
  font-weight: 600;
}

.glp-credit a:hover {
  color: var(--primary);
}

@media (max-width: 720px) {
  .site-bottom__inner {
    flex-wrap: nowrap;
    gap: 12px;
    padding: 12px 0 14px;
  }

  .site-bottom__copy {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.72rem;
  }

  .site-bottom__credit {
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
    font-size: 0.72rem;
  }
}

@media (max-width: 980px) {
  .footer-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    row-gap: 28px;
  }

  .footer-brand--top,
  .footer-col,
  .footer-col--about {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 20px;
  }

  /* Logo + testo: full width */
  .footer-brand--top,
  .footer-col--about {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  /* Link utili | Legal */
  .footer-grid > .footer-col:nth-child(3) {
    grid-column: 1;
    grid-row: auto;
  }

  .footer-col--legal {
    grid-column: 2;
    grid-row: auto;
    gap: 8px;
  }

  /* Contatti: sotto, colonna sinistra */
  .footer-grid > .footer-col:nth-child(5) {
    grid-column: 1;
    grid-row: auto;
  }

  .footer-about {
    max-width: none;
    font-size: 0.85rem;
  }

  footer a:not(.iubenda-embed),
  .footer-placeholder {
    font-size: 0.86rem;
  }
}
