/* ===========================
   STYLES (styles.css)
   ===========================
   - Hero card (estilo NASA)
   - Fondo con imagen y overlay obscuro ~70%
   - Form y tabla responsivas
*/

/* --- Fondo con imagen y overlay --- */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  min-height: 100vh;

  /* Imagen de fondo (la que pediste) */
  background-image: url("https://static.nationalgeographicla.com/files/styles/image_3200/public/49855.jpg?w=1900&h=1749");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-direction: column;
  color: #f0f0f0;
}

/* overlay oscuro del 80% (tipo NASA) - no afecta el contenido porque .contenedor tiene z-index > 0 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.80); /* 70% obscuridad */
  pointer-events: none;
  z-index: 0;
}

/* Contenedor principal sobre el overlay */
.contenedor {
  width: 95%;
  max-width: 1100px;
  margin: 28px auto;
  position: relative;
  z-index: 1; /* por encima del overlay */
}

/* ---------- HERO CARD (estilo NASA) ---------- */
/* Wrapper para centrar la hero card en desktop y adaptar en móvil */
.hero-card-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Card principal: ancho responsive, sombras y borde dorado sutil */
.hero-card {
  width: 100%;
  max-width: 900px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(3,8,23,0.45), rgba(2,6,18,0.75));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 30px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.02) inset;
}

/* Imagen hero: cover, altura controlada, object-fit para que no se distorsione */
.hero-img {
  width: 100%;
  height: 260px; /* desktop */
  object-fit: cover;
  filter: saturate(0.95) contrast(1.02);
  background-position: center;
}

/* Card body: texto centrado y elegante */
.hero-card .card-body {
  padding: 20px 28px;
  text-align: center;
  color: #eaf3ff;
}

.hero-card .card-title {
  color: #ffd54a; /* dorado suave */
  font-weight: 700;
  margin-bottom: 8px;
}

/* datos del astronauta */
#datos-astronauta {
  color: #dfefff;
  font-size: 0.98rem;
  margin-bottom: 6px;
}

/* ---------- FORMULARIO ---------- */
.formulario-lunar {
  margin-top: 18px;
  border-radius: 12px;
  padding: 18px;
  background-color: rgba(1, 12, 28, 0.55);
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}

/* Grid del form (desktop) */
form {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 12px 16px;
}

/* Labels (solo labels dentro del form) */
form label {
  text-align: right;
  font-weight: 600;
  color: #e6f3ff;
}

/* Inputs y selects */
input, select, textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.1);
  background: #fbfbff;
  color: #062029;
  font-size: 0.95rem;
}

/* Submit */
input[type="submit"] {
  grid-column: 1 / span 2;
  justify-self: center;
  padding: 10px 18px;
  background: linear-gradient(180deg, #ffd54a, #ffb300);
  border-radius: 8px;
  border: none;
  font-weight: 700;
  color: #071220;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.45);
}
input[type="submit"]:hover { transform: translateY(-1px); }

/* ---------- FORMAT TOGGLE (RADIOS) ---------- */
.format-toggle {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.format-toggle .form-check {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- TABLA ---------- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  padding: 8px;
}

.table-responsive table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.table-responsive th,
.table-responsive td {
  border: 1px solid rgba(255,255,255,0.06);
  padding: 8px 10px;
  text-align: left;
  color: #eaf3ff;
  background: rgba(0,0,0,0.03);
}
.table-responsive thead th {
  background: rgba(255,255,255,0.04);
  color: #fffbe6;
  font-weight: 700;
}

/* ---------- RESPONSIVE (MÓVIL) ---------- */
@media (max-width: 800px) {
  .hero-img { height: 180px; }      /* imagen más corta en móvil */
  .hero-card { max-width: 720px; }
  form { grid-template-columns: 1fr; }
  form label { display: none; }     /* labels del form desaparecen en móvil (placeholders se aplican) */
  input[type="submit"] { grid-column: auto; width: 100%; }

  .table-responsive table { min-width: 520px; }
}

@media (max-width: 420px) {
  .hero-img { height: 140px; }
  .hero-card { padding: 0; }
  .hero-card .card-body { padding: 14px; }
  .contenedor { padding-left: 12px; padding-right: 12px; }
}


