/* footer: lema, columnas de enlaces, logos de financiación y barra legal.
   rejilla de 12 columnas con gap de 24px desde tablet.
   la composición de 4 columnas empieza en 1280px: hasta ahí no cabe y el diseño de 1024 es el de 2 columnas */

/* ==========================================================================
   MOBILE (base, mobile-first — sin media query)
   ========================================================================== */

.site-footer {
  color: var(--basalto, #24201A);
  font-size: var(--fs-14);
  line-height: var(--lh-121);
}

/* --- logo y lema --- */

.site-footer__top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-24);
  padding: var(--space-40) var(--space-16);
}

.site-footer__brand {
  display: block;
}

/* solo el símbolo: el svg recorta con preserveAspectRatio slice */
.site-footer__logo {
  width: 4.575rem;
  height: 3.5rem;
}

.site-footer__logo .logo__type {
  display: none;
}

.site-footer__claim {
  font-size: var(--fs-28);
  line-height: var(--lh-110);
}

.site-footer__claim-accent {
  color: var(--arcilla, #9C917B);
}

/* --- columnas --- */

.site-footer__main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-28) var(--space-20);
  padding: var(--space-20) var(--space-16);
  border-top: 1px solid var(--lino, #D1CBBE);
}

.site-footer__group--services,
.site-footer__funding {
  grid-column: 1 / -1;
}

.site-footer__title {
  margin-bottom: var(--space-12);
  color: var(--arcilla, #9C917B);
  font-size: inherit;
  line-height: inherit;
}

.site-footer__address {
  font-style: normal;
}

.site-footer__menu {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.site-footer__link--email {
  overflow-wrap: anywhere;
}

.site-footer__funding {
  display: flex;
  align-items: center;
  gap: var(--space-20);
}

.site-footer__funding-logo {
  width: auto;
  height: 2.25rem;
}

/* --- barra legal --- */

.site-footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
  padding: var(--space-20) var(--space-16);
  border-top: 1px solid var(--lino, #D1CBBE);
  color: var(--arcilla, #9C917B);
  font-size: var(--fs-12);
  text-align: center;
}

.site-footer__legal-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-8) var(--space-24);
}

/* ==========================================================================
   TABLET (>= 768px)
   ========================================================================== */

@media (min-width: 768px) {

  .site-footer__top,
  .site-footer__main {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--space-24);
  }

  .site-footer__top {
    align-items: end;
    padding: var(--space-40) var(--space-20);
  }

  .site-footer__brand {
    grid-column: 1 / 7;
  }

  .site-footer__logo {
    width: 6.8625rem;
    height: 5.25rem;
  }

  .site-footer__claim {
    grid-column: 7 / -1;
  }

  .site-footer__main {
    row-gap: var(--space-40);
    padding: var(--space-20);
  }

  .site-footer__group {
    grid-column: span 6;
  }

  .site-footer__group--services,
  .site-footer__funding {
    grid-column: span 6;
    margin-top: var(--space-24);
  }

  .site-footer__funding {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-24);
  }

  .site-footer__funding-logo {
    height: 2.5rem;
  }

  .site-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    padding: var(--space-20);
    text-align: left;
  }

  .site-footer__legal-menu {
    flex-wrap: nowrap;
  }

}

/* ==========================================================================
   DESKTOP (>= 1280px)
   ========================================================================== */

@media (min-width: 1280px) {

  .site-footer__top {
    align-items: center;
    padding: var(--space-56) var(--space-32);
  }

  .site-footer__brand {
    grid-column: 1 / 5;
  }

  .site-footer__claim {
    grid-column: 5 / 11;
    font-size: var(--fs-40);
  }

  /* la tercera fila (1fr) absorbe el alto de servicios y logos, que ocupan las tres */
  .site-footer__main {
    grid-template-rows: auto auto 1fr;
    padding: var(--space-32);
  }

  .site-footer__group--general {
    grid-area: 1 / 1 / 2 / 4;
  }

  .site-footer__group--contact {
    grid-area: 2 / 1 / 3 / 4;
  }

  .site-footer__group--reformas {
    grid-area: 1 / 4 / 2 / 7;
  }

  .site-footer__group--social {
    grid-area: 2 / 4 / 3 / 7;
  }

  .site-footer__group--services {
    grid-area: 1 / 7 / 4 / 10;
    margin-top: 0;
  }

  .site-footer__funding {
    grid-area: 1 / 10 / 4 / -1;
    margin-top: 0;
  }

  .site-footer__bottom {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--space-24);
    padding: var(--space-32);
    font-size: var(--fs-14);
  }

  .site-footer__copyright {
    grid-column: 1 / 7;
  }

  /* legal alineado con la columna de servicios y crédito con la de los logos de financiación */
  .site-footer__legal {
    grid-column: 7 / 10;
  }

  /* en anchos justos las tres no caben en tres columnas: bajan de línea en vez de pisar el crédito */
  .site-footer__legal-menu {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .site-footer__credit {
    grid-column: 10 / -1;
    white-space: nowrap;
  }

}

/* ==========================================================================
   HOVERS
   ========================================================================== */

@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {

  .site-footer__link {
    transition: color var(--duration-fast) var(--ease-out);
  }

  .site-footer__main .site-footer__link:hover {
    color: var(--arcilla, #9C917B);
  }

  /* la barra legal ya es arcilla */
  .site-footer__bottom .site-footer__link:hover {
    color: var(--basalto, #24201A);
  }

}
