body {
  margin: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  font-family: Arial, sans-serif;
  background: url('./imagenes/fondo.jpg') no-repeat center center fixed;
  background-size: cover;
}

.izquierda {
  width: 33.33%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: rgba(255, 255, 255, 0.3);
}

.izquierda img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.principal {
  width: 66.66%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background-color: rgba(255, 255, 255, 0.8);
}

.principal h2,
.principal p,
.principal form,
.principal .mensaje-error,
.principal .mensaje-ok,
.principal .enlace,
.principal > a {
  max-width: 500px;
  width: 100%;
  text-align: center;
}

.principal form input,
.bloque-recuperar input {
  height: 45px;
  padding: 0 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 70%;
  margin: 0 auto 10px auto;
  display: block;
  box-sizing: border-box;
}

.principal form button,
.bloque-recuperar button,
.principal > a button {
  height: 48px;
  padding: 0 16px;
  font-size: 16px;
  background-color: #002244;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  display: block;
  margin: 10px auto;
  width: 50%;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #001a33;
}

.enlace {
  margin-top: 10px;
  display: block;
  color: #333;
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer;
}

.mensaje-error {
  background-color: #fff3cd;
  color: #856404;
  font-weight: bold;
  padding: 10px;
  border: 1px solid #ffeeba;
  border-radius: 5px;
  margin-bottom: 10px;
}

.mensaje-ok {
  background-color: #d4edda;
  color: #155724;
  font-weight: bold;
  padding: 10px;
  border: 1px solid #c3e6cb;
  border-radius: 5px;
  margin-bottom: 10px;
}

.bloque-recuperar {
  background-color: rgba(100, 100, 100, 0.4);
  border: 2px solid black;
  padding: 20px;
  margin-top: 20px;
  border-radius: 10px;
}

@media (max-width: 767px) and (orientation: portrait) {
  body {
    flex-direction: column;
    align-items: center;
  }

  .izquierda {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    padding: 10px;
  }

  .izquierda img {
    width: 30%;
    max-width: 120px;
    height: auto;
  }

  .principal {
    width: 100%;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .principal form input,
  .bloque-recuperar input,
  .principal form button,
  .bloque-recuperar button,
  .principal > a button {
    width: 90%;
  }
}
