footer {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0 70px;
  width: calc(100% - 140px);
  box-sizing: border-box;
  background: #3AAEDE;
  color: #fff;
  overflow: hidden;
  border-top: none;
  position: relative;
  border-radius: 0;
  border-radius: 0 0 40px 40px;
  padding-top: 0;
}

footer::before,
footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-repeat: repeat-x;
}

/* Nubes capa trasera — grandes */
footer::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='90' viewBox='0 0 700 90'%3E%3Cpath fill='rgba(255,255,255,0.18)' d='M30,90 C30,90 10,90 10,72 C10,56 22,50 36,52 C38,38 50,28 66,28 C72,18 84,12 98,16 C108,6 124,6 134,16 C148,10 162,18 164,32 C178,30 190,40 190,54 C204,52 216,60 216,74 C216,90 196,90 196,90 Z'/%3E%3Cpath fill='rgba(255,255,255,0.18)' d='M360,90 C360,90 338,90 338,70 C338,54 352,46 368,50 C372,34 386,24 404,24 C410,12 424,6 440,12 C452,2 470,4 478,16 C494,10 510,22 510,38 C526,36 540,46 540,62 C540,90 516,90 516,90 Z'/%3E%3C/svg%3E");
  background-size: 700px 90px;
  background-position: 0 bottom;
  animation: footer-clouds-slow 38s linear infinite;
}

/* Nubes capa delantera — pequeñas */
footer::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='500' height='70' viewBox='0 0 500 70'%3E%3Cpath fill='rgba(255,255,255,0.18)' d='M20,70 C20,70 4,70 4,56 C4,44 14,38 26,40 C28,28 38,20 52,20 C56,12 66,8 76,12 C84,4 96,6 102,14 C114,10 124,18 124,30 C134,28 144,36 144,48 C144,70 126,70 126,70 Z'/%3E%3Cpath fill='rgba(255,255,255,0.18)' d='M290,70 C290,70 272,70 272,54 C272,40 284,34 298,38 C302,24 314,16 330,16 C336,6 348,2 360,8 C370,0 384,2 390,12 C404,8 416,18 416,32 C428,30 440,40 440,54 C440,70 420,70 420,70 Z'/%3E%3C/svg%3E");
  background-size: 500px 70px;
  background-position: 0 bottom;
  animation: footer-clouds-fast 26s linear infinite;
}

@keyframes footer-clouds-slow {
  from { background-position: 0 bottom; }
  to   { background-position: 700px bottom; }
}

@keyframes footer-clouds-fast {
  from { background-position: 0 bottom; }
  to   { background-position: 500px bottom; }
}

.footer-cloud-divider {
  background: #3AAEDE;
  margin: 0 70px -2px;
  overflow: hidden;
  max-width: 100%;
  position: relative;
}

@media (max-width: 900px) {
  .footer-cloud-divider {
    margin: 0 20px -2px;
  }
}

@media (max-width: 600px) {
  .footer-cloud-divider {
    margin: 0 0 -2px;
  }

  .footer-cloud-divider svg {
    height: 16px !important;
  }
}

.footer-wave-anim {
  animation: footer-wave-move 35s linear infinite;
}

.footer-wave-back {
  animation-duration: 14s;
  animation-direction: reverse;
}

.footer-wave-mid {
  animation-duration: 22s;
  animation-direction: normal;
}

@keyframes footer-wave-move {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.footer-wave {
  position: relative;
  width: 100%;
  line-height: 0;
  margin-bottom: -2px;
  z-index: 1;
}

.footer-wave svg {
  display: block;
  width: 100%;
  height: 60px;
}

footer > * {
  position: relative;
  z-index: 1;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 60px;
  border-bottom: 1px solid rgba(255,255,255,0.25);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
}

.footer-logo img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.footer-tagline {
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 60px;
  width: 100%;
}

.footer-nav {
  display: flex;
  gap: 32px;
}

.footer-nav a {
  text-decoration: none;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

.footer-nav a:visited {
  color: #fff;
  background: none;
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus,
.footer-nav a:active {
  color: #d1286a !important;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.footer-social {
  display: flex;
  gap: 20px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  background: none;
  color: #fff;
  border-radius: 0;
  border: none !important;
  transition: color 0.2s ease, transform 0.2s ease;
  outline: none !important;
  box-shadow: none !important;
}

.footer-social a:visited {
  color: #fff;
}

.footer-social a:hover,
.footer-social a:focus,
.footer-social a:active {
  background: none;
  color: #d1286a !important;
  opacity: 1;
  transform: translateY(-3px);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.footer-social a:focus {
  outline: none;
  box-shadow: none;
}

.footer-social svg {
  width: 22px;
  height: 22px;
  display: block;
}

a[href^="mailto"],
a[href^="tel"] {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

a[href^="mailto"]:hover,
a[href^="mailto"]:focus,
a[href^="mailto"]:active,
a[href^="tel"]:hover,
a[href^="tel"]:focus,
a[href^="tel"]:active {
  color: #d1286a !important;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 900px) {
  footer {
    margin: 0 20px;
    width: calc(100% - 40px);
  }
  .footer-top,
  .footer-bottom {
    padding: 24px 24px;
  }
}

@media (max-width: 768px) {
  .footer-tagline {
    display: none;
  }
}

@media (max-width: 600px) {
  footer {
    margin: 0;
    width: 100%;
  }
  .footer-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 20px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
  }

  .footer-nav a {
    font-size: 17px;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
}
