/* Footer Styles for DigitalHamster Theme - Mobile First */

.footer {
  display: flex;
  padding: 30px 20px;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  background: var(--primary-red-100);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
}

.footer-columns {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
}

.footer-content-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  row-gap: 30px;
  column-gap: auto;
  max-width: 100%;
  overflow-x: hidden;
}

.footer-logo-section {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.footer-logo {
  width: 160px;
  height: 42px;
}

.footer-social-icons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer-social-icons a {
  display: inline-block;
  width: 22px;
  height: 22px;
  position: relative;
}

.footer-social-icons img {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
}

/* Estado normal: mostrar icono normal, ocultar hover */
.social-icon-normal {
  display: block;
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
}

.social-icon-hover {
  display: none;
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
}

/* Estado hover: ocultar normal, mostrar hover */
.footer-social-icons a:hover .social-icon-normal {
  display: none;
}

.footer-social-icons a:hover .social-icon-hover {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
}

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

.footer-column h3 {
  color: var(--primary-grey-10);
  font-family: var(--font-lato);
  font-size: 12px;
  font-weight: 800;
  line-height: normal;
  letter-spacing: 0.72px;
  text-transform: uppercase;
  margin: 0;
  /* Trucos para ajustar peso visual como Figma */
  font-synthesis: none;
  /* Evita síntesis automática de bold */
  -webkit-font-smoothing: antialiased;
  /* Suavizado para macOS */
  -moz-osx-font-smoothing: grayscale;
  /* Suavizado para Firefox */
  font-feature-settings: "liga" 0;
  /* Desactiva ligaduras */
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Cada item debe mantener line-height normal para que el salto a dos líneas del mismo enlace
   no afecte la separación vertical entre elementos */
.footer-column li {
  line-height: normal;
  padding: 2px;
}

.footer-column a {
  color: var(--primary-grey-20);
  text-decoration: none;
  font-family: var(--font-lato);
  font-size: var(--body-xs-size);
  font-weight: var(--body-weight-regular);
  line-height: normal;
  letter-spacing: 0.28px;
  transition: border-bottom 0.3s ease;
  /* Trucos para ajustar peso visual como Figma */
  font-synthesis: none;
  /* Evita síntesis automática de bold */
  -webkit-font-smoothing: antialiased;
  /* Suavizado para macOS */
  -moz-osx-font-smoothing: grayscale;
  /* Suavizado para Firefox */
  font-feature-settings: "liga" 0;
  /* Desactiva ligaduras */
}

.footer-column a:hover {
  color: var(--primary-grey-20);
  border-bottom: 1px solid var(--primary-grey-20);
}

/* Estilos para símbolo de marca registrada */
.footer-column sup {
  font-size: 0.7em;
  vertical-align: super;
  line-height: 0;
}

.footer-bottom {
  width: 100%;
  max-width: 1440px;
  padding-top: 16px;
  border-top: 1px solid var(--primary-grey-40);
  margin: 0 auto;
}

.footer-bottom-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  width: 100%;
}

.footer-bottom-left {
  order: 2;
}

.footer-bottom-center {
  order: 1;
  display: flex;
  align-items: center;
  align-content: center;
  gap: 5px 6px;
  align-self: stretch;
  flex-wrap: wrap;
  text-align: left;
}

.footer-bottom-center a {
  color: var(--primary-grey-20);
  text-decoration: none;
  font-family: var(--font-lato);
  font-size: var(--btn-xs-size);
  font-weight: var(--body-weight-regular);
  line-height: normal;
  letter-spacing: 0.26px;
  transition: text-decoration 0.3s ease;
  position: relative;
  /* Trucos para ajustar peso visual como Figma */
  font-synthesis: none;
  /* Evita síntesis automática de bold */
  -webkit-font-smoothing: antialiased;
  /* Suavizado para macOS */
  -moz-osx-font-smoothing: grayscale;
  /* Suavizado para Firefox */
  font-feature-settings: "liga" 0;
  /* Desactiva ligaduras */
}

.footer-bottom-center a:hover {
  color: var(--primary-grey-20);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-bottom-center .separator {
  display: inline-block;
  width: 3px;
  height: 4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='4' viewBox='0 0 3 4' fill='none'%3E%3Ccircle cx='1.5' cy='2' r='1.5' fill='white'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

.footer-link-group {
  display: inline-flex;
  align-items: center;
  gap: 5px 4px;
}

.footer-bottom-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  order: 2;
}

.footer-bottom p {
  color: var(--primary-grey-40);
  font-family: var(--font-lato);
  font-size: 12px;
  font-weight: var(--body-weight-regular);
  line-height: normal;
  letter-spacing: 0.24px;
  margin: 0;
}

.footer-zvoove-logo {
  height: 33px;
  width: auto;
}

/* Tablet - Rango intermedio 768px-992px (Figma Design) */
@media (min-width: 768px) and (max-width: 992px) {
  .footer {
    padding: 60px 40px;
  }

  .footer-columns {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: flex-start;
    max-width: 1440px;
    margin: 0 auto;
  }

  .footer-content-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    width: 100%;
  }

  /* Permitir wrapping en tablet */
  .footer-column a {
    white-space: normal;
  }

  .footer-logo-section {
    width: 100%;
    justify-content: space-between;
  }
}

/* Desktop - Rango intermedio 993px-1240px */
@media (min-width: 993px) and (max-width: 1240px) {
  .footer {
    padding: 80px 40px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .footer-columns {
    display: grid;
    grid-template-columns: 190px 1fr;
    column-gap: clamp(24px, 2vw, 160px);
    row-gap: 0;
    align-items: start;
    max-width: 1440px;
    justify-content: center;
    margin: 0 auto;
  }

  .footer-column {
    gap: 24px;
  }

  .footer-content-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(24px, 2vw, 60px);
  }

  /* Permitir que los links partan en dos líneas en desktop si es necesario */
  .footer-column a {
    white-space: normal;
  }

  /* Mantener logos verticales en rango intermedio */
  .footer-logo-section {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: flex-start;
  }

  .footer-logo {
    width: 190.759px;
    height: 49.85px;
  }
}

/* Desktop - Pantallas grandes desde 1241px */
@media (min-width: 1241px) {
  .footer {
    padding: 80px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .footer-columns {
    display: grid;
    grid-template-columns: 190px 1fr;
    column-gap: clamp(24px, 8vw, 160px);
    row-gap: 0;
    align-items: start;
    max-width: 1440px;
    justify-content: center;
    margin: 0 auto;
  }

  .footer-column {
    gap: 24px;
  }

  .footer-content-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(24px, 4vw, 60px);
  }

  /* Permitir que los links partan en dos líneas en desktop si es necesario */
  .footer-column a {
    white-space: normal;
  }

  .footer-logo-section {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: flex-start;
  }

  .footer-logo {
    width: 190.759px;
    height: 49.85px;
  }

  .footer-bottom-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0;
  }

  .footer-bottom-center {
    order: 2;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    text-align: left;
    justify-content: flex-start;
  }

  .footer-bottom-bottom-row {
    display: contents;
  }

  .footer-bottom-left {
    order: 1;
  }

  .footer-bottom-right {
    order: 3;
  }

  .footer-zvoove-logo {
    height: 33px;
  }
}

/* Footer-bottom responsive cuando los links no caben - Pantallas menores a 1100px */
@media (max-width: 1099px) {
  .footer-bottom-content {
    flex-direction: column;
    gap: 32px;
    align-items: center;
    width: 100%;
  }

  .footer-bottom-center {
    order: 1;
    display: flex;
    align-items: center;
    align-content: center;
    gap: 5px 4px;
    align-self: stretch;
    flex-wrap: wrap;
    text-align: left;
  }

  .footer-bottom-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    order: 2;
  }

  .footer-bottom-left {
    order: 2;
  }

  .footer-bottom-right {
    order: 1;
  }
}

/* Tablet - cuando las 4 columnas no caben - Pantallas menores a 768px */
@media (max-width: 767px) {
  .footer-columns {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .footer-content-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    row-gap: 30px;
    column-gap: auto;
  }

  /* Permitir salto a 2 líneas sin alterar tipografía base */
  .footer-column a {
    white-space: normal;
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    letter-spacing: 0.28px;
  }

  .footer-logo-section {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .footer-logo {
    width: 160px;
    height: 42px;
  }


}

/* Mobile - Pantallas muy pequeñas */
@media (max-width: 480px) {
  .footer-logo {
    width: 140px;
    height: 37px;
  }

  .footer-social-icons {
    gap: 12px;
  }

  .footer-social-icons a {
    width: 28px;
    height: 28px;
  }

  .footer-content-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}