@import url("https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap");

/* =================== BASE =================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", Arial, sans-serif;
}

.div {
  height: 120px;
  width: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  color: #202124;
}

/* =================== FORM CONTAINER =================== */
main {
  max-width: 1100px;
  margin: 30px auto;
  background: #fff;
  padding: 25px 40px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* =================== TITULOS DE SECCION =================== */
fieldset {
  border: none;
  margin-bottom: 30px;
  padding: 0;
}

legend {
  font-size: 1.2rem;
  font-weight: 600;
  color: #003366;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 5px;
  display: block;
  width: 100%;
}

/* =================== CAMPOS =================== */
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 20px 30px;
  margin-bottom: 15px;
}

label {
  display: flex;
  flex-direction: column;
  font-size: 0.95rem;
  font-weight: 500;
  color: #202124;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea,
select {
  margin-top: 6px;
  padding: 10px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #fff;
  font-size: 0.95rem;
  transition: border 0.2s, box-shadow 0.2s;
  text-transform: uppercase;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border: 1px solid #003366;
  box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.2);
}

textarea {
  resize: vertical;
  min-height: 60px;
}

/* =================== RADIO & CHECKBOX =================== */
.radio-group,
.opciones-inline {
  display: flex;
  gap: 25px;
  align-items: center;
  margin-top: 8px;
}

.radio-group label,
.opciones-inline label {
  display: inline-flex;
  align-items: center;
  font-weight: 400;
  cursor: pointer;
  gap: 6px;
}

.radio-group label {
  align-self: flex-start;
  text-align: center;
}

#actividad-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 2rem; /* espacio horizontal entre opciones */
  row-gap: 0.5rem; /* espacio vertical si bajan de línea */
  margin-bottom: 18px;
}

#actividad-container label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem; /* separación entre el radio y el texto */
  white-space: nowrap; /* evita que el texto se parta */
  cursor: pointer;
  font-size: 1rem;
}

#actividad-container input[type="radio"] {
  margin: 0;
  vertical-align: auto;
  accent-color: #007bff; /* opcional */
}

/* Personalización de radios/checkbox */
input[type="radio"],
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* =================== SECCIONES ESTILO TABLA =================== */
.seccion-tabla {
  border: 1px solid #bbb;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 35px;
}

.fila {
  display: flex;
  border-bottom: 1px solid #bbb;
  margin-bottom: 15px;
}

.fila:last-child {
  border-bottom: none;
}

.columna {
  flex: 1;
  padding: 15px;
  border-right: 1px solid #bbb;
}

.columna:last-child {
  border-right: none;
}

.columna strong {
  color: #003366;
  text-transform: uppercase;
  font-size: 0.95rem;
  margin-bottom: 5px;
  display: block;
}

.subfila {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 6px 0;
}

.subfila span {
  font-weight: 500;
}

textarea,
input[type="text"] {
  width: 100%;
}

.seccion-tabla-doble {
  margin-top: 10px;
  padding-top: 4px;
  margin-left: 10px;
}

.div-check {
  gap: 6px;
  display: flex;
  flex-direction: row;
}

/* =================== BOTÓN =================== */
.btn {
  display: flex;
  justify-content: center;
}

button {
  display: flex;
  justify-content: center;
  width: 200px;
  padding: 12px 25px;
  background: #003366;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

button:hover {
  background: #002244;
}

button:active {
  transform: scale(0.97);
}

/* =================== RESPONSIVE =================== */

@media (max-width: 992px) {
  body {
    align-items: center;
  }

  main {
    max-width: 95%;
    padding: 20px;
    margin: 15px;
  }

  label {
    font-size: 1.8rem;
  }

  legend {
    font-size: 2.2rem;
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  textarea,
  select {
    font-size: 2rem;
  }

  .form-row {
    display: flex;
    flex-direction: column;
    gap: 10px 20px;
    margin-bottom: 10px;
  }

  .radio-group,
  .opciones-inline {
    flex-direction: column;
    align-items: flex-start;
  }

  .radio-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 2rem; /* espacio horizontal entre opciones */
    row-gap: 0.5rem; /* espacio vertical si bajan de línea */
    margin-bottom: 18px;
    font-size: 1.6rem;
  }

  .radio-group label {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem; /* separación entre el radio y el texto */
    white-space: nowrap; /* evita que el texto se parta */
    cursor: pointer;
  }

  .radio-group input[type="radio"] {
    margin: 0;
    vertical-align: auto;
    accent-color: #007bff; /* opcional */
  }

  .fila {
    flex-direction: column;
    margin: 0;
    border: none;
  }

  .subfila {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
  }

  .subfila span {
    font-size: 1.8rem;
  }

  input[type="radio"],
  input[type="checkbox"] {
    width: 32px;
    height: 32px;
  }

  #actividad-container label {
    font-size: 2rem;
  }

  button {
    width: 100%;
    font-size: 1.5rem;
    padding: 15px;
  }
}
