/* ==========================================================================
   Footer - Sagra del Borgo Antico di Montefiore
   Dark footer with 4-column grid, bottom bar, and social links.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Site Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-charcoal);
  color: var(--color-cream);
  padding-top: var(--space-3xl);
  padding-bottom: 0;
}

/* --------------------------------------------------------------------------
   Footer grid
   4 columns: title+description, nav links, info links, social+contact.
   Stacks to single column on mobile (see responsive.css).
   -------------------------------------------------------------------------- */
.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2xl);
  padding-bottom: var(--space-3xl);
  border-bottom: 1px solid rgba(250, 245, 238, 0.1);
}

/* Footer column headings (h4) */
.footer__heading {
  font-family: var(--font-display);
  font-size: var(--text-md);
  color: var(--color-warm-white);
  margin-bottom: var(--space-lg);
  font-weight: 700;
}

/* Footer title (h3 in first column) */
.footer__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-warm-white);
  margin-bottom: var(--space-md);
  font-weight: 700;
}

/* Footer description text */
.footer__text {
  font-size: var(--text-sm);
  color: var(--color-stone);
  line-height: 1.8;
}

/* Footer logo (if present) */
.footer__logo {
  margin-bottom: var(--space-md);
}

.footer__logo img {
  height: 40px;
  width: auto;
}

/* --------------------------------------------------------------------------
   Footer navigation links
   -------------------------------------------------------------------------- */
.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__links a {
  font-size: var(--text-sm);
  color: var(--color-stone);
  transition: color var(--transition-fast);
}

.footer__links a:hover {
  color: var(--color-primary-light);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Footer contact info
   -------------------------------------------------------------------------- */
.footer__contact {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-stone);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Footer social links
   -------------------------------------------------------------------------- */
.footer__social {
  display: flex;
  gap: var(--space-md);
}

.footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background-color: rgba(250, 245, 238, 0.08);
  color: var(--color-cream);
  transition: transform var(--transition-fast),
              background-color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.footer__social-link:hover {
  background-color: var(--color-primary);
  color: var(--color-warm-white);
  transform: scale(1.1);
  text-decoration: none;
}

.footer__social-link svg {
  width: 20px;
  height: 20px;
}

/* --------------------------------------------------------------------------
   Footer bottom bar
   Copyright and "developed by" credit.
   -------------------------------------------------------------------------- */
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  font-size: var(--text-xs);
  color: var(--color-stone);
}

.footer__bottom a {
  color: var(--color-primary-light);
  transition: color var(--transition-fast);
}

.footer__bottom a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.footer__credit {
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   Mobile: footer compatto
   Nasconde descrizione, 2 colonne link, contatti inline, social centrati.
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .site-footer {
    padding-top: var(--space-2xl);
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg) var(--space-md);
    padding-bottom: var(--space-2xl);
  }

  /* Nasconde prima colonna (titolo+desc), ridondante su mobile */
  .footer__col:first-child {
    display: none;
  }

  /* Ultima colonna: full-width */
  .footer__col:last-child {
    grid-column: 1 / -1;
  }

  /* Contatti: nasconde <br> per tenere indirizzo su una riga */
  .footer__contact br {
    display: none;
  }

  /* Ultima colonna centrata */
  .footer__col:last-child {
    text-align: center;
  }

  .footer__social {
    justify-content: center;
  }

  /* Contatti inline per risparmiare righe */
  .footer__contact {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs) var(--space-md);
  }
}
