* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: Roboto, Arial, Helvetica, sans-serif;
  color: #072e2d;
  background: linear-gradient(135deg, rgba(147, 162, 207, 0.3) 0%, rgb(255, 255, 255) 50%);
}

body {
  display: flex;
  flex-direction: column;
}

@media (max-width: 800px) {
  body {
    height: auto;
  }
}

header {
  position: relative;
  height: 20vh;
  min-height: 200px;
  /*background-color: #000b1b;*/
  background: url('../images/fondo-titulo.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

header h1 {
  background: -webkit-linear-gradient(94.56deg, #1a4b84 -15.55%, #0f2034 91.85%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 3rem;
  text-align: center;
}

@media (max-width: 800px) { 
  header {
    height: auto;
  }
  header h1 {
    font-size: 2.5rem;
    margin: 1em 0.8em;
  }
}

main {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  padding: 50px 30px 50px 30px;
  justify-content: center;
  /*align-items: center;*/
  height: 50vh;
}

main h2, main p {
  margin-bottom: 15px;
}

main ul {
  margin: 15px 30px;
}

.description {
  max-width: 400px;
  margin-right: 30px;
  font-size: 1.8rem;
}

@media (max-width: 1290px) {
  .description {
    max-width: none;
    margin: 30px 30px 50px 30px;
  }
}

form {
  max-width: 800px;
  width: 100%;
  height: max-content;
  /*margin: 0 auto;*/
  padding: 2.5em;
  box-shadow: 0px 18px 45px 0px rgba(65, 124, 202, 0.1);
  border-radius: 8px;
  border: 1px solid #d5d5d5;
}

.form-grid {
  display: grid;
  gap: 1.6em 1.5em;
}

.form-grid input,
.form-grid textarea {
  width: 100%;
  padding: 1em;
  box-sizing: border-box;
  background-color: #f0f5fb;
  border-radius: 6px;
}

@media (min-width: 800px) {
  .form-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
      "nombre apellidos telefono"
      "email email oferta"
      "comentarios comentarios comentarios"
      "check_aceptacion check_aceptacion check_aceptacion"
      "boton boton boton";
  }

  .form-grid input[name="nombre"]         { grid-area: nombre; }
  .form-grid input[name="apellidos"]      { grid-area: apellidos; }
  .form-grid input[name="telefono"]       { grid-area: telefono; }
  .form-grid input[name="email"]          { grid-area: email; }
  .form-grid input[name="oferta"]         { grid-area: oferta; }
  .form-grid textarea[name="comentarios"] { grid-area: comentarios; }
  .form-grid .check_aceptacion            { grid-area: check_aceptacion; }
  .form-grid input[name="boton"]          { grid-area: boton; }
}

input, textarea {
  padding: 8px;
  font-size: 1rem;
  border: 1px solid #f0f5fb;
  border-radius: 4px;
}

textarea {
  resize: vertical;
}

input[type="checkbox"] {
  transform: scale(1);      /* Ajusta el tamaño */
  -webkit-transform: scale(1);
  transform-origin: top left;
}

input[type="submit"] {
  background-color: #007BFF;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

input[type="submit"]:hover {
  background-color: #0056b3;
}

input::placeholder, textarea::placeholder {
  color: #474a57; /* Cambia al color que desees */
  opacity: 1;  /* Para evitar que se vea semitransparente */
  font-family: Roboto, Arial, Helvetica, sans-serif;
}


#aceptacion {
  width: auto;
}
.check_aceptacion label {
  text-align: left; 
  font-size: 14px; 
  margin-top: -7px; 
  margin-bottom: -7px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

footer {
  height: 10vh;
  background-color: #f0f0f0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.9rem;
}

footer a {
  margin: 0 10px;
  color: #333;
  text-decoration: none;
}

@media (max-width: 800px) {
  main {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
  }

  footer {
    flex-direction: column;
    text-align: center;
  }
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-contenido {
  background: white;
  max-width: 1000px;
  width: 90%;
  max-height: 90vh;          /* limita el alto del modal */
  overflow: hidden;
  border-radius: 8px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal-scrollable {
  overflow-y: auto;
  padding: 4rem 3rem;
  flex-grow: 1;              /* ocupa todo el espacio restante */
}

@media (max-width: 800px) {
  .modal-scrollable {
    padding: 3rem 1.7rem;
  }
}

.cerrar-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.hidden {
  display: none;
}
/*End modal*/

#mensaje {
  margin-top: 50px;
  font-weight: bold;
}

.success {
  color: green;
}

.error {
  color: red;
}