/* Estilos del footer */
.site-footer{
  position: relative;
  z-index: 1; /* más bajo que la píldora para permitir que se superponga */
  isolation: isolate; /* permite que los pseudos usen z-index negativo sin escapar */
  color: #fff;
  --footer-bg-y: 40%; /*CAMBIAR VERTICALMENTE IMAGEN DE FONDO*/
  --footer-brightness: 0.78;
  --footer-contrast: 0.96;
  --footer-saturate: 0.65;
  --footer-zoom: 1;
  /* Padding y altura fluidos para transiciones suaves entre resoluciones (más compacto en desktop grande) */
  padding: clamp(4.5rem, 3vw + 2rem, 7rem) 1rem 2.5rem 1rem;
  min-height: clamp(14vh, 18vh, 22vh);
  overflow-x: hidden;
  overflow-y: visible;
}

.site-footer::before{
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(29,20,12,0.58);
  backdrop-filter: blur(3px); /*EFECTO DE BLUR*/
  -webkit-backdrop-filter: blur(3px);
  pointer-events: none;
  z-index: -1; 
}

.site-footer::after{
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url('/images/footer.png');
  background-position: 50% var(--footer-bg-y);
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(var(--footer-zoom));
  filter: brightness(var(--footer-brightness)) contrast(var(--footer-contrast)) saturate(var(--footer-saturate));
}

.site-footer__inner{
  position: relative;
  z-index: 2;
  max-width: 1220px;
  width: min(94%, 1220px);
  margin: 0 auto;
  margin-top: clamp(4rem, 3vw + 2rem, 6rem); /* baja el grid de logo/socials/recursos */
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: clamp(2rem, 3vw, 3rem);
  align-items: flex-start;
}

/* PILDORAS DEL FOOTER */
.footer-pill-bridge{
  position: relative;
  z-index: 200001; /* sitúa el contenedor por encima del footer */
  display: flex;
  justify-content: center;
  /* Posición fluida para que no brinque entre resoluciones */
  margin-top: clamp(4.5rem, 3vw + 3rem, 6.5rem);
  margin-bottom: clamp(-5rem, -2vw - 0.5rem, -3.5rem); /* separa la píldora del inicio visual del footer */
  pointer-events: none; /* evita tapar clicks */
}

.footer__pill{
  position: relative;
  left: auto;
  /* bajamos visiblemente la píldora (más que antes) */
  transform: translateY(clamp(0.8rem, 1.4vw, 1.6rem));
  top: auto;
  z-index: 200002; /* más alto que footer y su overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2.25rem;
  border-radius: 48px;
  background: rgba(57,36,23,1);
  box-shadow: 0 12px 28px rgba(8,6,4,0.45);
  transition: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  pointer-events: auto;
}

.footer__pill-inner{
  display: inline-block;
  padding: 0.65rem clamp(1.8rem, 5vw, 3.6rem);
  border-radius: 24px;
  background: #caae8f;
  color: #faf6f0;
  font-weight: 700;
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  line-height: 1.4;
  text-align: center;
  font-family: 'Playfair Display', serif;
  max-width: min(65vw, 560px);
}

.site-footer__inner > .footer__col:nth-child(2),
.site-footer__inner > .footer__col:nth-child(3) {
  transform: none;
}

.footer__brand{
  display: flex;
  flex-direction: column;
}

.footer__logo{
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer__logo img{
  max-width: clamp(220px, 20vw, 340px);
  transform: none;
}

.footer__brand p{
  margin-top: -1.4rem;
  color: rgba(255,255,255,0.98);
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  line-height: 1.6;
  max-width: 40rem;
}

.footer__col{
  border-left: none;
  padding-left: 0;
}

.footer__col + .footer__col{
  border-left: 1px solid rgba(255,255,255,0.12);
  padding-left: clamp(1.5rem, 3vw, 3.5rem);
}

.footer__col h4{
  margin: 0 0 1rem 0;
  font-size: clamp(1.3rem, 2.3vw, 2.1rem);
  color: rgba(255,255,255,0.98);
  letter-spacing: 0.6px;
}

.footer__socials{
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer__socials a{
  width: clamp(64px, 6vw, 88px);
  height: clamp(64px, 6vw, 88px);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.44);
  color: #fff;
  text-decoration: none;
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.footer__socials a{
  background-position: center;
  background-repeat: no-repeat;
  background-size: 60% auto;
}
.footer__socials a:nth-child(1){ background-image: url('/images/facebook.png'); }
.footer__socials a:nth-child(2){ background-image: url('/images/linkedin.png'); }
.footer__socials a:nth-child(3){ background-image: url('/images/instagram.png'); }

.footer__col ul li a{
  font-size: clamp(1rem, 1.45rem, 1.3rem);
  color: rgba(255,255,255,0.95);
}

.footer__col ul li{
  margin-bottom: 0.9rem; /* SEPARACION ENTRE RECURSOS */
}


.site-footer__bottom{
  position: relative;
  z-index: 2;
  max-width: 1600px;
  margin: 1.5rem auto 0 auto;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.95);
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  /* smaller lift to reduce perceived footer height */
  transform: translateY(28px);
}

@media (max-width:1280px){
  .site-footer__inner{
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  .footer__col{
    border-left: none;
    padding-left: 0;
  }
  .footer__col + .footer__col{
    border-left: 1px solid rgba(255,255,255,0.12);
    padding-left: clamp(1rem, 2vw, 2.5rem);
  }
  .footer__logo img{ max-width: 370px; transform: translateY(-30px);}
}

/* Compactar footer en desktop ancho (≥1440px, incl. 1920x1080) */
@media (min-width:1440px){
  .site-footer{
    padding-top: 1rem;
    min-height: 16vh;
  }
  .site-footer__inner{
    margin-top: 2rem;
  }
  .footer-pill-bridge{
    margin-top: 6.5rem;
    margin-bottom: -5rem;
  }
  .footer__pill{
    transform: translateY(2.2rem);
  }
}

@media (min-width:1500px){
  .site-footer__inner{
    max-width: 1600px;
    width: calc(100% - 4rem);
    grid-template-columns: 30% 35% 35%;
    gap: 4rem;
  }
  .site-footer__inner > .footer__col:nth-child(2),
  .site-footer__inner > .footer__col:nth-child(3) {
    transform: translate3d(clamp(6rem, 9vw, 10rem), 12rem, 0);
  }
  .footer__col{
    border-left: 1px solid rgba(255,255,255,0.12);
    padding-left: 4rem;
  }
  .footer__col + .footer__col{
    padding-left: 4rem;
  }
  .footer__logo img{
    max-width: 850px;
    transform: translateX(-140px);
  }
  .footer__brand p{
    font-size: 1.4rem;
    max-width: 48rem;
  }
  .footer__socials a{
    width: 96px;
    height: 96px;
    font-size: 2rem;
  }
  .footer__pill{
    transform: translateY(-0.5rem);
    padding: 2rem 3.5rem;
    border-radius: 60px;
  }
  .footer__pill-inner{
    padding: 1rem 3.5rem;
    border-radius: 28px;
    font-size: 2.25rem;
    max-width: 760px;
  }
}

@media (max-width:1100px){
  .site-footer__inner{ grid-template-columns: 1fr; }
  .footer__col{ border-left: none; padding-left: 0; }
  /* más espacio superior para la píldora en mobile/tablet */
  .site-footer{ padding: 6rem 1rem 2.5rem 1rem; }
  .site-footer__inner{ margin-top: clamp(1rem, 2vw, 2rem); }
  .footer__logo img{ max-width: 370px; }
  .footer__brand p{ font-size: 1.05rem; }
  .footer__col h4{ font-size: 1.25rem; }
  .footer__socials a{ width: 56px; height: 56px; font-size: 1.05rem; }
  .site-footer__inner > .footer__col:nth-child(2),
  .site-footer__inner > .footer__col:nth-child(3) { transform: none; }
  .site-footer__bottom{ flex-direction: column; gap: .5rem; align-items: center; }
  .footer__col ul li{ margin-bottom: 0.5rem; }
  .footer-pill-bridge{
    margin-top: clamp(2.5rem, 4vw + 1.25rem, 4rem);
    margin-bottom: clamp(1.5rem, 2vw + 1rem, 3rem);
  }
  .footer__pill{ transform: translateY(clamp(0.4rem, 1vw, 0.8rem)); }
  .footer__pill-inner{ padding: 0.6rem 2.2.2rem; font-size: 0.95rem; }
}

/* Ajuste para pantallas tipo 1280x720: bajar un poco la píldora */
@media (max-width:1366px){
  .footer-pill-bridge{
    margin-top: 5.5rem;
    margin-bottom: -0.4rem;
  }
  .footer__pill{
    transform: translateY(3rem);
  }
}
