/**
 * Footer
 * Referencia: docs/referencia-visual.png
 */

.site-footer {
  padding: var(--esac-section-padding-y) 0;
  background-color: var(--esac-color-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(4, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
}

.site-footer__col {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  padding: 0 clamp(0.75rem, 1.5vw, 1.25rem);
}

.site-footer__col:not(:first-child)::before {
  content: "";
  position: absolute;
  top: 5%;
  left: 0;
  bottom: 5%;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.14) 20%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.14) 80%,
    transparent 100%
  );
}

/* —— Columna 1: Marca —— */
.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  text-decoration: none;
}

.site-footer__logo {
  display: block;
  width: min(100%, 11rem);
  height: auto;
}

.site-footer__tagline {
  margin: 0;
  max-width: 14rem;
  color: #ffffff;
  font-family: var(--esac-font-family-nav);
  font-size: clamp(0.72rem, 0.95vw, 0.88rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-footer__slogan {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.35rem 0 0;
  color: transparent;
  font-family: var(--esac-font-family-nav);
  font-size: clamp(0.78rem, 1vw, 0.95rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
  background: linear-gradient(
    180deg,
    #ffe566 0%,
    #f5c518 45%,
    #e89a0a 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
}

.site-footer__slogan-wave {
  display: inline-block;
  width: 1.75rem;
  height: 0.45rem;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #f5c518 20%,
    #ffe566 50%,
    #f5c518 80%,
    transparent 100%
  );
  clip-path: polygon(
    0 55%,
    12% 35%,
    24% 65%,
    36% 30%,
    48% 60%,
    60% 35%,
    72% 65%,
    84% 40%,
    100% 55%,
    100% 100%,
    0 100%
  );
}

/* —— Columnas info —— */
.site-footer__heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: #ffffff;
  font-family: var(--esac-font-family-nav);
  font-size: clamp(0.82rem, 1vw, 0.98rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.site-footer__heading-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--esac-color-primary);
  font-size: 1.1rem;
  line-height: 1;
}

.site-footer__text {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--esac-font-family-lead);
  font-size: clamp(0.72rem, 0.9vw, 0.84rem);
  font-style: normal;
  font-weight: 400;
  line-height: 1.45;
}

.site-footer__text + .site-footer__text {
  margin-top: 0.15rem;
}

.site-footer__text a,
.site-footer__text a:hover,
.site-footer__text a:focus {
  color: inherit;
  text-decoration: none;
  cursor: text;
}

.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}

.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 1.85rem;
  height: 1.85rem;
  color: #fff;
  text-decoration: none;
  line-height: 1;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-footer__social-link:hover,
.site-footer__social-link:focus-visible {
  color: #fff;
  opacity: 0.9;
  transform: translateY(-1px);
}

.site-footer__social-link--facebook {
  border-radius: 50%;
  background-color: #1877f2;
  font-size: 0.9rem;
}

.site-footer__social-link--youtube {
  width: 2.1rem;
  height: 1.45rem;
  border-radius: 0.35rem;
  background-color: #ff0000;
  font-size: 0.85rem;
}

.site-footer__social-link--instagram,
.site-footer__social-link--tiktok {
  background-color: transparent;
  font-size: 1.25rem;
}

.site-footer__flag {
  display: block;
  width: 2.5rem;
  height: auto;
  margin-top: 0.35rem;
  border-radius: 0.15rem;
}

.site-footer__seal {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  margin-bottom: auto;
}

.site-footer__seal img {
  display: block;
  width: min(100%, 8.5rem);
  height: auto;
  object-fit: contain;
}

/* Desktop (992px - 1199.98px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .site-footer__grid {
    gap: 0.75rem 0;
  }
}

/* Tablet & pantallas intermedias (<= 991.98px) */
@media (max-width: 991.98px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 0;
  }

  .site-footer__col::before {
    display: none;
  }

  .site-footer__col:nth-child(odd):not(:first-child)::before {
    display: block;
  }

  .site-footer__col:first-child {
    grid-column: 1 / -1;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-footer__seal {
    justify-content: flex-start;
  }
}

@media (max-width: 575.98px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    text-align: center;
  }

  .site-footer__col::before {
    display: none !important;
  }

  .site-footer__col {
    align-items: center;
    text-align: center;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1.25rem;
  }

  .site-footer__col:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .site-footer__brand {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .site-footer__logo {
    margin-inline: auto;
  }

  .site-footer__tagline {
    text-align: center;
    margin-inline: auto;
  }

  .site-footer__slogan {
    justify-content: center;
    text-align: center;
    margin-inline: auto;
  }

  .site-footer__heading {
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  .site-footer__text {
    text-align: center;
    width: 100%;
  }

  .site-footer__social {
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .site-footer__flag {
    margin-inline: auto;
  }

  .site-footer__seal {
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .site-footer__seal img {
    margin-inline: auto;
  }
}
