/* =============================================
   FOOTER COMPONENT
   ============================================= */

.footer {
  background-color: var(--color-dark-navy);
  color: var(--color-text-white);
  border-top: none;
}

.footer__inner {
  max-width: var(--size-container-max);
  margin: 0 auto;
  padding: 80px 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* ---- Top Section ---- */

.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr; /* 5 Columns layout */
  gap: 32px;
}

.footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Left column styling */
.footer__col--info {
  font-family: var(--font-sans);
  font-size: 12px;
  opacity: 0.5;
  color: var(--color-text-white);
}

.footer__tagline {
  margin: 0 0 8px 0;
  font-weight: 400;
}

.footer__address {
  font-style: normal;
  line-height: 1.6;
}

.footer__brand-link {
  text-decoration: none;
  display: inline-block;
  margin-bottom: 24px;
}

.footer__brand-logo {
  display: block;
  height: 44px;
  width: auto;
  object-fit: contain;
}

/* Header and Link styling */
.footer__col-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-white);
  margin: 0 0 24px 0;
  opacity: 1;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__nav-link {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  color: var(--color-text-white);
  opacity: 0.6;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.footer__nav-link:hover {
  opacity: 1;
  transform: translateX(4px);
}

.footer__nav-link--back-to-top {
  margin-top: 40px;
  color: var(--color-gold);
  opacity: 1;
}

.footer__nav-link--btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

/* ---- Social icons ---- */

.footer__social {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer__social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  color: var(--color-text-white);
  opacity: 0.6;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer__social-link:hover {
  opacity: 1;
  transform: translateX(4px);
}

/* CTA Button Styling */
.footer__cta-wrapper {
  margin-top: 24px;
}

.footer__cta-btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--color-dark-navy);
  background-color: var(--color-gold);
  padding: 12px 24px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid var(--color-gold);
}

.footer__cta-btn:hover {
  background-color: transparent;
  color: var(--color-gold);
}

/* ---- Bottom Section ---- */

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__copyright {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--color-text-white);
  opacity: 0.4;
  margin: 0;
}

/* Nav group: transparent wrapper on desktop - used only for mobile layout */
.footer__nav-group {
  display: contents;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
  .footer__top {
    grid-template-columns: 1fr 1fr;
    row-gap: 48px;
  }
  .footer__col--info {
    grid-column: span 2;
  }
}

@media (max-width: 767px) {
  .footer__inner {
    padding: 40px 20px 24px;
    gap: 0;
  }

  .footer__top {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  /* ---- Brand block ---- */
  .footer__col--info {
    grid-column: unset;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0;
  }

  .footer__col--info .footer__brand-link {
    margin-bottom: 16px;
  }

  /* ---- Nav block: Lo Studio + Servizi side by side ---- */
  .footer__nav-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  /* ---- Legal: 2×2 grid to halve vertical space ---- */
  .footer__col--legal {
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .footer__col--legal .footer__nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
  }

  /* ---- CTA block ---- */
  .footer__col--cta {
    order: unset;
    padding-top: 24px;
  }

  /* Social as a row */
  .footer__col--cta .footer__social {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
  }

  .footer__nav-link--back-to-top {
    margin-top: 16px;
  }

  /* CTA button: gold, full-width */
  .footer__cta-wrapper {
    margin-top: 20px;
  }

  .footer__cta-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 17px;
    font-size: 11px;
    letter-spacing: 0.16em;
  }

  .footer__bottom {
    text-align: center;
    padding-top: 24px;
    margin-top: 24px;
  }
}
