/* ---------------------- FUENTES ---------------------- */
@import url("https://fonts.googleapis.com/css?family=Roboto+Slab:400,700&display=swap");
@import url("https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap");

/* ---------------------- BASE ---------------------- */
body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  background-color: #f2f4f8;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.container {
  background: #fff;
  max-width: 640px;
  width: 95%;
  border-radius: 12px;
  padding: 35px 25px;
  animation: fadeIn 0.6s ease;
  position: relative;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.12),
    0 4px 6px rgba(0, 0, 0, 0.08);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------------- VOLVER BUTTON ---------------------- */
.volver-button {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #0077b6;
  background-color: #e3f2fd;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  margin-bottom: 15px;
  transition: background-color 0.3s ease;
}
.volver-button:hover {
  background-color: #bbdefb;
}

/* ---------------------- HEADER CON IMAGEN ---------------------- */
.header-soloimagen {
  width: 100%;
  margin-bottom: 25px;
}
.header-banner {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

/* ---------------------- FORMULARIO ---------------------- */
.formulario {
  display: flex;
  flex-direction: column;
  gap: 25px;
  align-items: center;
}

.input-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 320px;
}

.input-group label {
  font-weight: 600;
  margin-bottom: 6px;
  text-align: left;
}

.input-group input {
  width: 100%;
  max-width: 320px; /* igual que los resultados */
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.3s;
  text-align: center;
  box-shadow: 0 0 0 3px rgba(15, 172, 238, 0.15);
}

.input-group input:focus {
  border-color: #0facee;
  box-shadow: 0 0 0 3px rgba(15, 172, 238, 0.25);
}

/* Texto debajo del input */
.input-group .unidad {
  font-size: 15px;
  margin-top: 4px;
  color: #666;
  text-align: center;
}

/* Bordes visuales según validez */
.input-valido {
  border: 2px solid #0077b6 !important;
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.25) !important;
}

.input-invalido {
  border: 2px solid #c0392b !important;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.3) !important;
}

.input-valido.en-foco {
  border-color: #00ced1 !important;
  box-shadow: 0 0 0 3px rgba(0, 206, 209, 0.4) !important;
}




/* ---------------------- RESULTADO VISUAL ---------------------- */
.resultado-box {
  font-size: 19px;
  font-weight: bold;
  padding: 12px;
  background: linear-gradient(to right, #e0f7fa, #ffffff);
  border: 1px solid #0facee;
  border-radius: 8px;
  color: #0077b6;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  text-align: center;
  width: 100%;
  max-width: 300px;
  margin-top: 10px;
}


/* ---------------------- BOTÓN ---------------------- */
.limpiar-btn {
  background-color: #0077b6;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 15px;
  font-weight: 600;
}
.limpiar-btn:hover {
  background-color: #005a8a;
}

/* ---------------------- BORDES ---------------------- */
.input-valido {
  border: 2px solid #0077b6 !important;
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.25) !important;
}

.input-invalido {
  border: 2px solid #c0392b !important;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.3) !important;
}

.input-valido.en-foco {
  border-color: #00ced1 !important;
  box-shadow: 0 0 0 3px rgba(0, 206, 209, 0.4) !important;
}


/* ---------------------- RESPONSIVE ---------------------- */
@media screen and (max-width: 600px) {
  body {
    padding: 0;
    display: block;
  }

  .container {
    padding: 20px 15px;
    box-shadow: none;
    border-radius: 0;
    width: 100%;
    margin: 0 auto;
  }

  .formulario {
    gap: 20px;
    padding: 0 10px;
  }

  .input-group {
    max-width: 100%;
  }

  .header-banner {
    margin-top: 10px;
  }

  .volver-button {
    margin-top: 10px;
    display: inline-block;
  }
}
