.tn-footer {
  position: relative;
  background-color: var(--tn-color-primary);
  margin-top: 0;
}

.tn-footer .tn-container {
  padding: 0;
}

.tn-footer a:hover,
.tn-footer a:visited {
  color: var(--tn-color-text-footer);
  opacity: 1;
}

ul.tn-menu-footer {
  list-style: none;
  color: var(--tn-color-text-footer);
  padding: 0;
  margin: 0;
}

ul.tn-menu-footer a {
  font-family: var(--tn-font-base);
  color: var(--tn-color-text-footer);
  opacity: 0.8;
  text-decoration: none;
  transition: color 0.3s ease;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

ul.tn-menu-footer a:hover {
  opacity: 1;
}

.tn-footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 60px;
}

.tn-footer__logo img {
  width: 150px;
  height: 50px;
}

.tn-footer__title {
  color: var(--tn-color-text-footer);
  font-size: 1.1rem;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 25px;
  position: relative;
}

/* Subrayado rojo corporativo para los títulos del footer */
.tn-footer__title::after {
  content: "";
  display: block;
  width: 30px;
  height: 2px;
  background: var(--tn-color-primary);
  margin-top: 10px;
}

.tn-footer__links {
  list-style: none;
  padding: 0;
}

.tn-footer__links li {
  margin-bottom: 12px;
}

.tn-footer__links a {
  color: var(--tn-color-text-footer);
  opacity: 0.8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.tn-footer__links a:hover {
  opacity: 1;
}

.tn-footer__info {
  list-style: none;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--tn-color-text-footer);
  opacity: 0.8;
}

.tn-footer__info li {
  margin-bottom: 0.5rem;
}

.tn-footer__info .tn-footer__value {
  padding-left: 1rem;
}

.tn-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  padding-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--tn-color-text-footer);
}

.tn-footer__legal a {
  color: inherit;
  margin-left: 20px;
  text-decoration: none;
}

.tn-footer__legal a:hover {
  opacity: 1;
}

.tn-footer__info li {
  display: flex;
  flex-direction: column;
}

.tn-footer__icon {
  color: var(--tn-color-text-footer);
  /* Rojo corporativo para los iconos */
  flex-shrink: 0;
  /* Evita que el icono se encoja */
  margin-top: 4px;
}

.tn-footer__info strong {
  color: var(--tn-color-text-footer);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.tn-footer__info a {
  color: var(--tn-color-text-footer);
  opacity: 0.8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.tn-footer__info .tn-footer__subtitle {
  display: flex;
  align-items: start;
  gap: 0.5rem;
}

.tn-footer__info a:hover {
  opacity: 1;
}

.tn-footer__map-link {
  color: var(--tn-color-text-footer);
  opacity: 0.8;
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-block;
  line-height: 1.4;
}

.tn-footer__map-link:hover {
  color: var(--tn-color-text-footer);
  opacity: 1;
  text-decoration: underline;
  /* Subrayado sutil al pasar el ratón */
}

.tn-footer-shape {
  position: absolute;
  top: -99px;
  /* Lo elevamos para que solape con la sección de arriba */
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  /* Removemos el rotate para que la onda fluya naturalmente */
}

.tn-footer-shape svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 100px;
  /* Altura de la transición */
}

.tn-footer-shape path {
  fill: var(--tn-color-primary);
  /* Debe ser el mismo azul que el fondo del footer */
}

.tn-footer__kit-digital {
  margin: auto;
  margin-top: 1rem;
  margin-bottom: 3rem;
  max-width: 90%;
  text-align: center;
}

/* ============================================
   RESPONSIVE STYLES - FOOTER
   ============================================ */

/* Tablets grandes (992px - 1200px) */
@media (max-width: 1200px) {
  .tn-footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 30px;
  }

}

/* Tablets (768px - 992px) */
@media (max-width: 992px) {
  .tn-footer {
    padding: 60px 0 30px;
  }

  .tn-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
  }

  .tn-footer__logo {
    grid-column: 1 / -1;
    /* Logo ocupa todo el ancho */
    text-align: center;
    margin-bottom: 20px;
  }

  .tn-footer__title {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .tn-footer__bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .tn-footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }

  .tn-footer__legal a {
    margin-left: 0;
  }

  .tn-footer__col:not(:nth-child(3)) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: end;
    text-align: right;
  }
}

/* Móviles grandes (600px - 768px) */
@media (max-width: 768px) {
  .tn-footer {
    padding: 50px 0 25px;
  }

  .tn-footer-shape svg {
    height: 50px;
  }

  .tn-footer__grid {
    gap: 30px;
  }

  .tn-footer__logo img {
    width: 130px;
    height: auto;
  }

  .tn-footer__info {
    font-size: 0.9rem;
  }

  ul.tn-menu-footer a {
    font-size: 0.9rem;
  }

  .tn-footer__links a {
    font-size: 0.9rem;
  }



  .tn-footer-shape {
    top: -49px;
  }
}

/* Móviles (menos de 600px) */
@media (max-width: 600px) {
  .tn-footer {
    padding: 40px 0 20px;
  }

  .tn-footer__grid {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
  }

  .tn-footer__logo {
    margin-bottom: 10px;
  }

  .tn-footer__logo img {
    width: 120px;
  }

  .tn-footer__col {
    text-align: left;
  }

  .tn-footer__title {
    font-size: 0.95rem;
    margin-bottom: 15px;
  }

  .tn-footer__title::after {
    width: 25px;
  }

  .tn-footer__info {
    font-size: 0.85rem;
  }

  .tn-footer__info li {
    margin-bottom: 1rem;
  }

  ul.tn-menu-footer a {
    font-size: 0.85rem;
    line-height: 1.8;
  }

  .tn-footer__links a {
    font-size: 0.85rem;
  }

  .tn-footer__links li {
    margin-bottom: 10px;
  }

  .tn-footer__bottom {
    padding-top: 20px;
    font-size: 0.8rem;
    gap: 15px;
  }

  .tn-footer__legal {
    flex-direction: column;
    gap: 10px;
  }

  .tn-footer__copyright {
    order: 2;
  }

  .tn-footer__legal {
    order: 1;
  }
}

/* Móviles muy pequeños (menos de 400px) */
@media (max-width: 425px) {
  .tn-footer {
    padding: 30px 0 15px;
  }

  .tn-footer__grid {
    gap: 25px;
  }

  .tn-footer__grid * {
    margin: auto;
    display: flex;
    flex-direction: column;
    padding: 0;
  }

  .tn-footer__title {
    font-size: 1.3rem;
  }

  .tn-footer__value {
    padding: 0;
  }

  .tn-footer__subtitle {
    display: flex;
    flex-direction: row;
  }

  .tn-footer__logo img {
    width: 100px;
  }

  .tn-footer__icon {
    width: 16px;
    height: 16px;
  }
}