/**
 * Footer Golcam - coerente con header (sfondo chiaro, blu primario #1e5799)
 * Stessa palette di tpl.header e home-layout.css
 */

/* Palette condivisa header/footer (in :root per backtotop fuori dal footer) */
:root {
  --footer-bg: #ffffff;
  --footer-bg-subtle: #f5f7fa;
  --footer-primary: #1e5799;
  --footer-primary-dark: #173e6d;
  --footer-text: #333333;
  --footer-text-muted: #666666;
  --footer-border: #eeeeee;
}

/* Contenitore principale footer */
#footer.gc-footer,
.gc-footer {
  margin-top: 3rem !important;
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 2.5rem 0 1.5rem;
  border-top: 2px solid var(--footer-border);
  box-shadow: 0 -2px 4px rgba(0,0,0,0.06);
  font-size: 0.95rem;
  line-height: 1.5;
}

.gc-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Logo / brand area (opzionale) */
.gc-footer__brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.gc-footer__brand a {
  color: var(--footer-primary);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
}

/* Blocco link in colonne */
.gc-footer__links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  justify-content: center;
  margin-bottom: 2rem;
  text-align: center;
}

@media (min-width: 768px) {
  .gc-footer__links {
    text-align: left;
    grid-template-columns: repeat(3, 1fr);
  }
}

.gc-footer__group h5 {
  color: var(--footer-text);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--footer-border);
}

.gc-footer__group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gc-footer__group li {
  margin-bottom: 0.5rem;
}

.gc-footer__group a {
  color: var(--footer-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.gc-footer__group a:hover {
  color: var(--footer-primary);
}

/* Pulsanti pagine (row-links) */
.gc-footer .row-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.gc-footer .row-links .btn {
  background: var(--footer-bg-subtle);
  color: var(--footer-text);
  border: 1px solid var(--footer-border);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.gc-footer .row-links .btn:hover {
  background: #e8eef5;
  color: var(--footer-primary);
  border-color: var(--footer-primary);
}

/* Social */
.gc-footer__socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.gc-footer__socials ul.socialfooter {
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
}

.gc-footer__socials ul.socialfooter li {
  display: inline-block;
  float: none;
}

.gc-footer__socials ul.socialfooter li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--footer-bg-subtle);
  color: var(--footer-primary);
  border: 1px solid var(--footer-border);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s, border-color 0.2s;
}

.gc-footer__socials ul.socialfooter li a:hover {
  background: var(--footer-primary);
  color: #fff;
  border-color: var(--footer-primary);
  transform: translateY(-2px);
}

/* Icone social: sprite esistente; il box usa i colori del tema */
.gc-footer__socials ul.socialfooter li a {
  background-size: 24px 24px !important;
  background-position: center !important;
}

/* Copyright / bottom bar */
.gc-footer__copy {
  text-align: center;
  padding-top: 1.25rem;
  border-top: 1px solid var(--footer-border);
  color: var(--footer-text-muted);
  font-size: 0.85rem;
}

.gc-footer__copy a {
  color: var(--footer-primary);
  text-decoration: none;
}

.gc-footer__copy a:hover {
  color: var(--footer-primary-dark);
}

/* Back to top - stesso blu dell'header/sito */
a.backtotop,
a#linkTop.backtotop {
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: fixed !important;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 48px !important;
  height: 48px !important;
  background: var(--footer-primary) !important;
  color: #fff !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 8px rgba(30, 87, 153, 0.35) !important;
  z-index: 999;
  text-decoration: none;
  transform: none !important;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

a.backtotop:hover {
  background: var(--footer-primary-dark) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(30, 87, 153, 0.45) !important;
}

a.backtotop i {
  color: #fff !important;
  font-size: 1.25rem !important;
  transform: none !important;
  margin: 0 !important;
}

a.backtotop.hidden {
  bottom: -80px !important;
}

.body-conversation #footer,
.body-conversation #linkTop {
  display: none !important;
}
