/* ===== Reset básico ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Montserrat', sans-serif;
  overflow: hidden; /* evita scroll */
}

/* ===== Fondo adaptable ===== */
body {
  position: relative;
  background-image: url('../img/bg-desktop.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  width: 100%;
  height: 100svh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 0;
}

/* ===== Carátula ===== */
.album-cover {
  position: relative;
  width: 22%;
  max-width: 320px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.album-cover img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}


.title-image{
  width:60%;
  max-width: 550px;
  height:auto;
}

/* ===== Botón PRE-SAVE ===== */
.btn-presave {
  display: inline-block;
  background-color: #1B1733;
  color: #fff;
  font-weight: 600;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: transform 0.2s ease, background-color 0.3s ease;
  z-index: 2;
}

.btn-presave:hover {
  background-color: #1B1733;
  transform: scale(1.03);
}

/* ===== Fondo y textura para dispositivos móviles ===== */
@media (max-width: 768px) {
  html, body {
    overflow: hidden;
  }

  body {
    background-image: url('../img/bg-mobile.webp');
    background-attachment: scroll;
    gap:1.5vh;
  }

  .album-cover {
    width: 55%;
  }

  .title-image{
  width:85%;
  max-width: 450px;
  height:auto;
}
}


/* ====== Variables configurables ====== */
:root {
  --cols-desktop: 3;    /* columnas deseadas en escritorio */
  --cols-tablet: 3;     /* columnas deseadas en tablet */
  --cols-mobile: 2;     /* columnas deseadas en móvil */

  --btn-width: 18vw;   /* ancho fijo (ideal) de cada botón */
  --btn-gap: 2vw;      /* separación entre botones */
  --btn-max-width: 250px; /* ancho máximo absoluto de cada botón */

}

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --btn-width: 22vw;
    --btn-max-width: 250px;
  }
}

/* Móvil */
@media (max-width: 600px) {
  :root {
    --btn-width: 45vw;
    --btn-max-width: 170px;
  }
}

/* ====== Contenedor (flex) ====== */
.platform-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--btn-gap);
  width: 100%;
  max-width: calc((var(--cols-desktop) * var(--btn-width)) + ((var(--cols-desktop) - 1) * var(--btn-gap)));
  margin: 0 auto;
  padding-top: 3vh;
  box-sizing: border-box;
}

/* ====== Botones (tamaño fijo para que el contenedor calcule bien) ====== */
.platform-buttons a {
  flex: 0 0 var(--btn-width);
  width: var(--btn-width);
  max-width: var(--btn-max-width);
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Efecto hover */
.platform-buttons a:hover {
  transform: scale(1.1);
}

/* ====== ÍCONOS ====== */
.platform-buttons img {
  width: 100%;
  height: auto;
  display: block;
}

/* ====== Responsive: recalculamos max-width para cada breakpoint ====== */

/* Tablet */
@media (max-width: 1024px) {
  .platform-buttons {
    max-width: min(
      calc(var(--cols-tablet) * var(--btn-width) + (var(--cols-tablet) - 1) * var(--btn-gap)),
      100%
    );
  }
}

/* Móvil */
@media (max-width: 600px) {
  .platform-buttons {
    max-width: min(
      calc(var(--cols-mobile) * var(--btn-width) + (var(--cols-mobile) - 1) * var(--btn-gap)),
      100%
    );
    gap: 0.8rem;
    padding-top: 2.5vh;
  }
}


