.footer {
  padding: var(--espaciado-2xl) var(--espaciado-lg);
  margin-top: var(--espaciado-2xl);
  
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--espaciado-xl);
  text-align: center;
  
  background: linear-gradient(
    180deg,
    var(--bg-secundario) 0%,
    var(--bg-principal) 100%
  );
  border-top: 0.0625rem solid var(--borde-color);
  
  position: relative;
  
  scroll-margin-top: 5rem;
}

body.dark .footer {
  background: linear-gradient(
    180deg,
    var(--bg-secundario) 0%,
    var(--bg-principal) 100%
  );
}

.footer h3,
.footer h4 {
  font-weight: var(--peso-bold);
  color: var(--texto-primario);
  margin: var(--espaciado-md) 0 var(--espaciado-sm) 0;
  
  position: relative;
  padding-bottom: var(--espaciado-sm);
}

.footer h4 {
  font-size: var(--texto-xl);
  color: var(--color-primario);
}

.footer h3 {
  font-size: var(--texto-lg);
  margin-top: var(--espaciado-xl);
}

.footer h3::after,
.footer h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3rem;
  height: 0.1875rem;
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--color-primario) 50%,
    transparent 100%
  );
}

.footer iframe {
  width: 100%;
  max-width: 37.5rem;
  height: 18.75rem;
  
  border: none;
  border-radius: var(--radio-xl);
  
  box-shadow: var(--sombra-lg);
  
  margin: var(--espaciado-sm) 0 var(--espaciado-md) 0;
  
  transition: var(--transicion-normal);
}

.footer iframe:hover {
  box-shadow: var(--sombra-xl);
  transform: translateY(-0.25rem);
}

.footer > ul:first-of-type {
  list-style: none;
  padding: 0;
  margin: var(--espaciado-md) 0;
  
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--espaciado-md);
}


.footer > ul:first-of-type a {
  width: 3rem;
  height: 3rem;
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  background-color: var(--bg-terciario);
  color: var(--texto-primario);
  border-radius: var(--radio-full);
  border: 0.125rem solid var(--borde-color);
  
  box-shadow: var(--sombra-sm);
  
  transition: var(--transicion-normal);
  
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.footer > ul:first-of-type a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background-color: var(--color-primario);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  z-index: 0;
}

.footer > ul:first-of-type a:hover::before {
  width: 100%;
  height: 100%;
}

.footer > ul:first-of-type a:hover {
  color: var(--texto-inverso);
  border-color: var(--color-primario);
  transform: translateY(-0.25rem) scale(1.1);
  box-shadow: var(--sombra-md);
}

.footer > ul:first-of-type a i {
  font-size: 1.25rem;
  position: relative;
  z-index: 1;
  transition: var(--transicion-normal);
}

.footer > ul:first-of-type a:hover i {
  transform: scale(1.1);
}

.footer > ul:first-of-type li:nth-child(1) a:hover {
  background-color: #1877f2;
  border-color: #1877f2;
}

.footer > ul:first-of-type li:nth-child(2) a:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-color: #e1306c;
}

.footer > ul:first-of-type li:nth-child(3) a:hover {
  background-color: #000000;
  border-color: #000000;
}

body.dark .footer > ul:first-of-type li:nth-child(3) a:hover {
  background-color: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.footer > ul:first-of-type li:nth-child(4) a:hover {
  background-color: #000000;
  border-color: #00f2ea;
}

.footer-a-Direccion,
.footer > a[href^="tel"] {
  font-size: var(--texto-base);
  font-weight: var(--peso-medio);
  color: var(--texto-secundario);
  text-decoration: none;
  
  display: inline-flex;
  align-items: center;
  gap: var(--espaciado-sm);
  padding: var(--espaciado-md) var(--espaciado-lg);
  
  background-color: var(--bg-terciario);
  border-radius: var(--radio-lg);
  border: 0.0625rem solid var(--borde-color);
  
  transition: var(--transicion-normal);
  
  position: relative;
}

.footer-a-Direccion::before {
  content: '📍';
  font-size: var(--texto-lg);
}

.footer > a[href^="tel"]::before {
  content: '📞';
  font-size: var(--texto-lg);
}

.footer-a-Direccion:hover,
.footer > a[href^="tel"]:hover {
  background-color: var(--bg-secundario);
  border-color: var(--color-primario);
  color: var(--color-primario);
  transform: translateY(-0.125rem);
  box-shadow: var(--sombra-md);
}

.footer-a-Direccion:focus,
.footer > a[href^="tel"]:focus {
  outline: 0.125rem solid var(--color-primario);
  outline-offset: 0.125rem;
}

.footer-ul-horario {
  list-style: none;
  padding: 0;
  margin: var(--espaciado-md) 0;
  
  display: flex;
  flex-direction: column;
  gap: var(--espaciado-sm);
  
  width: 100%;
  max-width: 25rem;
}

.footer-ul-horario li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--espaciado-md) var(--espaciado-lg);
  
  background-color: var(--bg-terciario);
  border-radius: var(--radio-md);
  border-left: 0.25rem solid var(--color-acento);
  
  font-size: var(--texto-sm);
  color: var(--texto-secundario);
  
  transition: var(--transicion-normal);
}

.footer-ul-horario li:hover {
  background-color: var(--bg-secundario);
  transform: translateX(0.25rem);
  box-shadow: var(--sombra-sm);
}

.footer-ul-horario strong {
  color: var(--texto-primario);
  font-weight: var(--peso-semibold);
  margin-right: var(--espaciado-sm);
}

.footer > p:last-of-type {
  font-size: var(--texto-sm);
  color: var(--texto-terciario);
  
  margin: var(--espaciado-xl) 0 0 0;
  padding-top: var(--espaciado-lg);
  
  border-top: 0.0625rem solid var(--borde-color);
  width: 100%;
  text-align: center;
  
  font-weight: var(--peso-normal);
}

.footer > p:last-of-type::before {
  content: '💻 ';
}

@media (min-width: 48rem) {
  .footer {
    padding: var(--espaciado-2xl) var(--espaciado-xl);
    gap: var(--espaciado-2xl);
  }
  
  .footer h4 {
    font-size: var(--texto-2xl);
  }
  
  .footer h3 {
    font-size: var(--texto-xl);
  }
  
  .footer iframe {
    max-width: 43.75rem;
    height: 21.875rem;
  }
  
  .footer > ul:first-of-type {
    gap: var(--espaciado-lg);
  }
  
  .footer > ul:first-of-type a {
    width: 3.5rem;
    height: 3.5rem;
  }
  
  .footer > ul:first-of-type a i {
    font-size: 1.5rem;
  }
  
  .footer-a-Direccion,
  .footer > a[href^="tel"] {
    font-size: var(--texto-lg);
  }
  
  .footer-ul-horario {
    max-width: 31.25rem;
  }
  
  .footer-ul-horario li {
    font-size: var(--texto-base);
  }
}

@media (min-width: 64rem) {
  .footer {
    padding: var(--espaciado-2xl) var(--espaciado-2xl);
  }
  
  .footer iframe {
    max-width: 50rem;
    height: 25rem;
  }
  
  .footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--espaciado-2xl);
    text-align: left;
  }
  
  .footer h4:first-child {
    grid-column: 1 / -1;
    text-align: center;
  }
  
  .footer iframe {
    grid-column: 1 / -1;
    justify-self: center;
  }
  
  .footer > ul:first-of-type {
    grid-column: 1 / -1;
    justify-content: center;
  }
  
  .footer-a-Direccion {
    justify-self: center;
  }
  
  .footer > a[href^="tel"] {
    justify-self: center;
  }
  
  .footer h3 {
    grid-column: 1 / -1;
    text-align: center;
  }
  
  .footer-ul-horario {
    grid-column: 1 / -1;
    max-width: 37.5rem;
    justify-self: center;
  }
  
  .footer > p:last-of-type {
    grid-column: 1 / -1;
  }
  
  .footer h3::after,
  .footer h4::after {
  left: 50%;
  }
}

@media (min-width: 90rem) {
  .footer {
    max-width: 90rem;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer,
  .footer iframe,
  .footer > ul:first-of-type a,
  .footer-a-Direccion,
  .footer > a[href^="tel"],
  .footer-ul-horario li {
    transition: none;
    animation: none;
  }
  
  .footer > ul:first-of-type a:hover,
  .footer iframe:hover {
    transform: none;
  }
}

.footer a:focus-visible {
  outline: 0.1875rem solid var(--color-primario);
  outline-offset: 0.25rem;
}

@media print {
  .footer {
    padding: var(--espaciado-lg);
    background: white;
    border-top: 0.125rem solid black;
    display: block;
  }
  
  .footer iframe {
    display: none;
  }
  
  .footer > ul:first-of-type {
    display: none;
  }
  
  .footer h3::after,
  .footer h4::after {
    display: none;
  }
}