@import url("https://fonts.googleapis.com/css?family=IBM%20Plex%20Sans:500|IBM%20Plex%20Sans:300");

:root {
  --m: 4rem;
}

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

/* Asegurar que el footer sea responsive */
footer,
#footer {
  max-width: 100vw;
  overflow-x: hidden;
}

h2 {
  font-weight: 500;
  text-align: center;
  font-size: var(--m);
  margin: 0;
}

h3 {
  font-weight: 500;
  font-size: calc(0.6 * var(--m));
  margin: 0;
}

/* .card {
  height: calc(8 * var(--m));
  width: calc(12 * var(--m));
  background: linear-gradient(120deg, #ff8064, #725bdc);
  color: rgb(255, 255, 255);
  border-radius: calc(0.5 * var(--m));

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--m);

  position: fixed;
  margin: calc(2 * var(--m)) calc(5 * var(--m)) calc(5 * var(--m))
    calc(5 * var(--m));
} */

button {
  background-color: #000;
  font-size: calc(0.4 * var(--m));
  border: none;
  color: #e5e5e5;
  font-family: "IBM Plex Sans";
  font-weight: 400;
  padding: calc(0.35 * var(--m)) calc(0.8 * var(--m));
  border-radius: calc(0.3 * var(--m));
}

footer {
  margin-top: auto; /* empuja el footer al fondo */
  width: 100%;
  max-width: 100vw;
  height: auto; /* no ocupa toda la pantalla */
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: flex-end;
  padding: 5rem 2vw;
  position: relative;
  box-sizing: border-box;
}

footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(253, 253, 253, 0));
  z-index: -7;
}

.backdrop {
  z-index: -5;
  position: absolute;
  inset: 0;

  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
}

.col1,
.col2,
.col3 {
  background-color: transparent; /* deja actuar .glass-effect */
  border-radius: calc(0.5 * var(--m));
  padding: calc(0.22 * var(--m)) calc(0.7 * var(--m));
  position: relative;
  z-index: 1;
}

img {
  height: calc(0.3 * var(--m));
  object-fit: cover;
}

/* Logo ORIGAMI - tamaño independiente */
.logo-origami {
  width: 200px; /* controla por ancho en lugar de alto */
  height: auto; /* altura proporcional automática */
  margin-top: 0;
  margin-bottom: 1rem;
  object-fit: contain;
  grid-column: 1 / -1; /* ocupa toda la fila superior */
  align-self: start; /* no estira el grid verticalmente */
  max-width: 100%; /* no se desborda horizontalmente */
}

.social {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.col2 a:hover,
.col3 a:hover {
  color: var(--active-text-color, #fff);
  opacity: 0.8;
}

.link {
  width: calc(0.8 * var(--m));
  height: calc(0.8 * var(--m));
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: calc(0.1 * var(--m));

  display: flex;
  justify-content: center;
  align-items: center;
}

@media screen and (max-width: 1000px) {
  :root {
    --m: 3rem;
  }

  #footer {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.8rem;
    padding: 1rem 4vw;
  }
}

@media screen and (max-width: 768px) {
  :root {
    --m: 2.5rem;
  }

  footer {
    flex-direction: column;
    padding: 2rem 4vw;
    gap: 1rem;
  }

  #footer {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.5rem 4vw;
    width: 100%;
    max-width: 100%;
  }

  .col,
  .col1,
  .col2,
  .col3 {
    width: 100%;
    max-width: 100%;
    padding: 0.8rem;
    box-sizing: border-box;
  }

  .logo-origami {
    width: 140px;
    margin-bottom: 0.5rem;
  }

  .payments {
    grid-template-columns: repeat(3, 44px);
    column-gap: 6px;
    row-gap: 6px;
    width: calc(3 * 44px + 2 * 6px);
    margin-top: 0.5rem;
  }

  .pay {
    width: 44px;
    height: 44px;
  }

  .link {
    width: 50px;
    height: 50px;
  }

  .social {
    gap: 0.6rem;
    margin-top: 0.5rem;
  }

  #footer .col1 {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    row-gap: 0.8rem;
  }

  #footer .col1 .social {
    grid-column: 1;
    justify-self: start;
    margin-top: 0;
  }

  #footer .col1 .payments {
    grid-column: 1;
    justify-self: start;
    margin-top: 0;
  }

  #footer .col1 > p:last-of-type {
    margin-top: 0.5rem;
    font-size: 0.8rem;
  }

  #footer .col2,
  #footer .col3 {
    margin-top: 0;
    text-align: left;
    padding: 1rem;
  }

  #footer .col2 p,
  #footer .col3 p {
    margin: 0.4rem 0;
    font-size: 0.95rem;
  }

  #footer .col2 p a,
  #footer .col3 p a {
    display: block;
    padding: 0.3rem 0;
  }
}

@media screen and (max-width: 480px) {
  :root {
    --m: 1.8rem;
  }

  footer {
    padding: 1.5rem 3vw;
    gap: 0.8rem;
  }

  #footer {
    padding: 1rem 3vw;
    gap: 0.8rem;
  }

  .logo-origami {
    width: 120px;
    margin-bottom: 0.4rem;
  }

  .payments {
    grid-template-columns: repeat(3, 38px);
    column-gap: 5px;
    row-gap: 5px;
    width: calc(3 * 38px + 2 * 5px);
    margin-top: 0.4rem;
  }

  .pay {
    width: 38px;
    height: 38px;
    border-radius: 8px;
  }

  .link {
    width: 44px;
    height: 44px;
  }

  .social {
    gap: 0.5rem;
    margin-top: 0.4rem;
  }

  #footer .col {
    padding: 0.6rem;
  }

  #footer .col1 {
    gap: 0.4rem;
    row-gap: 0.6rem;
  }

  #footer .col1 > p:last-of-type {
    font-size: 0.75rem;
    margin-top: 0.4rem;
  }

  #footer .col2,
  #footer .col3 {
    padding: 0.8rem;
  }

  #footer .col2 p,
  #footer .col3 p {
    font-size: 0.85rem;
    margin: 0.3rem 0;
  }

  #footer .col2 p a,
  #footer .col3 p a {
    padding: 0.25rem 0;
  }
}

#footer {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr; /* 3 cards */
  gap: 1rem;
  align-items: start;
  height: auto; /* antes era 100vh */
  padding: 1.25rem 5vw;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

/* aseguro glass consistente aun si faltan variables */
.glass-effect {
  background: rgba(255, 255, 255, var(--glass-opacity, 0.08));
  backdrop-filter: blur(var(--glass-blur, 14px))
    saturate(var(--glass-saturation, 140%));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.18));
  box-shadow: 0 8px 30px var(--shadow-color, rgba(0, 0, 0, 0.25)),
    0 0 40px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.backdrop {
  z-index: 0;
}

#footer {
  display: grid; /* tu layout */
}
#footer .col {
  border-radius: calc(0.5 * var(--m));
}
#footer .glass-effect {
  background: rgba(255, 255, 255, var(--glass-opacity, 0.08));
  backdrop-filter: blur(var(--glass-blur, 14px))
    saturate(var(--glass-saturation, 140%));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0));
  box-shadow: 0 8px 30px var(--shadow-color, rgba(0, 0, 0, 0.25));
}

.payments {
  display: grid;
  grid-template-columns: repeat(3, 60px); /* 3 por fila */
  column-gap: 10px;
  row-gap: 8px;
  justify-content: start;
  width: calc(3 * 60px + 2 * 12px); /* 3 cuadrados + 2 gaps */
  margin: 6px 0 4px; /* aire correcto */
}

.pay {
  width: 60px;
  height: 60px; /* cuadrado estable */
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.06),
      rgba(0, 0, 0, 0.18)
    ),
    rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.15s ease, border-color 0.15s ease,
    background-color 0.15s ease;
}
.pay:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.4);
}
.pay img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}

.pay img {
  width: 80%;
  height: 70%;
  object-fit: contain;
}
:root {
  --payments-shift: 36px;
} /* prueba 24–48px */

/* Poner social + payments a la misma altura (misma fila) */
#footer .col1 {
  display: grid;
  grid-template-columns: auto auto; /* izquierda: social | derecha: payments */
  grid-template-rows: auto auto auto; /* logo | social+payments | copyright */
  column-gap: 12px;
  row-gap: 6px;
  align-items: start; /* evita redistribución vertical */
}
#footer .col1 p:empty {
  display: none;
}

/* El título (ORIGAMI) ocupa toda la fila superior */
#footer .col1 :is(h1, h2, h3) {
  grid-column: 1 / -1;
}

/* Ubicaciones explícitas */
#footer .col1 .social {
  grid-column: 1;
  align-self: center; /* alinea con payments */
  justify-self: start; /* alinea a la izquierda */
}
#footer .col1 .payments {
  grid-column: 2;
  margin: 0;
  align-self: center; /* alinea con social */
  justify-self: end; /* alinea a la derecha */
}

/* El texto legal vuelve a ocupar toda la fila */
#footer .col1 :is(.legal, .copyright, small) {
  grid-column: 1 / -1;
}
#footer .col1 > p:last-of-type {
  grid-column: 1 / -1;
  align-self: start;
}

/* Mantener 3x2 también en mobile, pero ya en columna única */
@media (max-width: 768px) {
  #footer .col1 {
    grid-template-columns: 1fr;
  }
  #footer .col1 .payments {
    grid-column: 1;
    justify-self: start;
  }
  #footer .col1 .social {
    justify-self: start;
  }
}

/* alinear las tarjetas derechas con el resto del contenido */
#footer .col2,
#footer .col3 {
  margin-top: 0;
}

/* en mobile, menos desplazamiento */
@media (max-width: 900px) {
  #footer .col2,
  #footer .col3 {
    margin-top: 12px;
  }
}
