body {
  background-color: #fdecc9;
  background-image: url(../../img/asterix/background.png);
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% auto;
}

#main-content {
  max-width: 1700px;
  margin: 0 auto;
  padding: 1rem 1rem 0;
  font-family: "Open Sans", Arial, sans-serif;
  color: #333;
  text-align: center;
}

/* === Layout general: grid de dos columnas (60% / 40%) + pergamino flotante === */
.content-container {
  position: relative;
  display: grid;
  grid-template-columns: 3fr 2fr;
  column-gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

/* === Bloque izquierdo: logo, título y libros, alineados a la izquierda === */
.info-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.info-container-mobile img {
  max-width: 100%;
  height: auto;
  margin: 0 auto 2.2rem;
  display: block;
}

.logo-img {
  max-width: 30%;
  height: auto;
  margin: 0 0 0.5rem;
  display: block;
}

.title-img {
  max-width: 40%;
  height: auto;
  margin: 0 0 1rem;
  display: block;
}

.books-wrap {
  width: 100%;
  z-index: 2;
}

.books-img {
  max-width: 85%;
  height: auto;
  margin: 0 auto;
  display: block;
}

/* === Pergamino: único elemento decorativo con posicionamiento absoluto.
   Flota dentro del tramo derecho del bloque izquierdo, debajo del logo y
   solapando ligeramente la esquina superior de los libros. === */
.parchment {
  position: absolute;
  top: 15%;
  right: calc(34% + clamp(2rem, 6vw, 6rem));
  width: clamp(130px, 13vw, 200px);
}

.parchment img {
  width: 100%;
  height: auto;
  margin: 0;
  display: block;
}

/* === Formulario (columna derecha): centrado respecto a la altura del bloque
   izquierdo, para que no arranque a la altura del logo === */
.form-container {
  align-self: center;
  background-color: #fafafa52;
  padding: 2rem 1.5rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  text-align: left;
  border-radius: 20px;
}

.form-container h1 {
  font-size: 1.5rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.form-container p {
  font-size: 14px;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  font-size: 1rem;
}

/* === Checkbox personalizado === */
.custom-checkbox {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  gap: 0.5rem;
  position: relative;
  cursor: pointer; /* cursor sobre todo el contenedor */
}

/* Hacemos que el input siga recibiendo clics */
.custom-checkbox input[type="checkbox"] {
  opacity: 0;
  width: 20px;
  height: 20px;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

/* El recuadro visual que muestra el check */
.custom-checkbox span {
  width: 20px;
  height: 20px;
  border: 2px solid #004982;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* no interfiere con el clic */
  z-index: 1;
  position: relative;
}

/* Icono check dentro del recuadro */
.custom-checkbox i {
  color: #004982 !important;
  font-size: 0.8rem !important;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

/* Cuando el checkbox está marcado, mostramos el check */
.custom-checkbox input[type="checkbox"]:checked + span i {
  opacity: 1;
}

/* Label a la derecha del checkbox */
.custom-checkbox label {
  cursor: pointer;
  user-select: none;
}

/* === Botón Enviar === */
.btn.btn-primary {
  background-color: #ccc;
  border-color: #ccc;
  color: #fff;
  font-weight: 600;
  padding: 0.6rem 2rem;
  display: block;
  margin: 1rem auto 0;
  transition: background-color 0.25s ease-in-out, border-color 0.25s ease-in-out;
  cursor: not-allowed;
}

/* Estado deshabilitado */
.form-container .btn.btn-primary[disabled] {
  cursor: not-allowed !important;
}

/* Estado activo (si el checkbox está marcado) */
form:has(#accept-terms-conditions:checked) .btn.btn-primary {
  background-color: #004982;
  border-color: #004982;
  cursor: pointer;
}

form:has(#accept-terms-conditions:checked) .btn.btn-primary:hover {
  background-color: #004982;
}

.hidden-on-desktop {
  display: none;
}

/* === Responsive: pantallas grandes reducidas === */
@media (max-width: 1440px) {
  .parchment {
    top: 20%;
    right: calc(30% + clamp(2rem, 6vw, 6rem));
    width: clamp(120px, 12vw, 170px);
  }
}

/* === Responsive: tablet ===
   El grid de dos columnas se mantiene mientras haya espacio; el pergamino y
   el formulario se acercan y los libros reducen su tamaño proporcionalmente. */
@media (max-width: 1200px) {
  .content-container {
    column-gap: 1.5rem;
  }

  .books-img {
    max-width: 80%;
  }

  .title-img {
    max-width: 65%;
  }

  .parchment {
    top: 10%;
    right: calc(38% + 1rem);
    width: clamp(100px, 12vw, 150px);
  }
}

/* === Responsive: mobile === */
@media (max-width: 768px) {
  body {
    background-color: #feefcc;
    background-image: url(../../img/asterix/background-mobile.png);
  }

  .content-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .info-container {
    align-items: center;
    text-align: center;
  }

  .info-container,
  .form-container {
    max-width: 600px;
    width: 100%;
  }

  .logo-img,
  .title-img,
  .books-img {
    margin: 0 auto 0.5rem;
  }

  .form-container h1 {
    font-size: 1rem;
  }

  .logo-img {
    max-width: 75%;
  }

  .title-img {
    max-width: 90%;
  }

  .parchment {
    position: static;
    width: auto;
    margin: 0 auto 0.5rem;
  }

  .parchment img {
    width: 160px;
    margin: 0 auto;
  }

  .hidden-on-mobile {
    display: none;
  }

  .hidden-on-desktop {
    display: block;
  }
}
