  * {
      box-sizing: border-box;
    }

    body, html {
      margin: 0;
      padding: 0;
      height: 100%;
      font-family: 'Segoe UI', sans-serif;
    }

  .bg {
    background-image: url("/fondo-hogar.png");
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
  }

header {
  background-color: #07326f;
  height: 70px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  position: relative;
}

.header-inner {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

    .header-title {
      font-size: 1.4rem;
      font-weight: 600;
      color: white;
      margin: 0 auto;
    }

    .desktop-right-link {
      display: none;
      color: white;
      text-decoration: none;
      font-weight: 600;
      font-size: 0.95rem;
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
    }

    .desktop-right-link:first-child {
      right: 7rem;
    }

    .desktop-right-link:last-child {
      right: 1rem;
    }

    .burger-menu {
      display: none;
      cursor: pointer;
      position: absolute;
      left: 1rem;
      top: 50%;
      transform: translateY(-50%);
    }

    .burger-menu div {
      width: 25px;
      height: 3px;
      background-color: white;
      margin: 4px 0;
    }

    .mobile-menu {
      display: none;
      flex-direction: column;
      background-color: #003580;
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
      z-index: 1000;
    }

    .mobile-menu a {
      color: white;
      text-decoration: none;
      padding: 0.75rem;
      text-align: left;
      font-weight: 600;
      border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    @media (min-width: 602px) {
      .desktop-right-link {
        display: block;
      }

      .burger-menu,
      .mobile-menu {
        display: none;
      }
    }

    @media (max-width: 601px) {
      .header-inner {
        justify-content: center;
        padding-right: 0rem;
      }

      .burger-menu {
        display: block;
      }

      .header-title {
        font-size: 1.2rem;
        text-align: center;
      }
    }

    .logo-image {
  height: 50px; /* 🔹 tamaño más adecuado para header */
  object-fit: contain;
  display: block;
}

.form-container {
  background: rgba(0,0,0,0.6);
  padding: 2rem;
  max-width: 900px;
  width: 90%;
  margin: auto;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  backdrop-filter: blur(6px);
}
  .form-container h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
  }


form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.full-width {
  grid-column: span 2;
}

.form-container h2 {
  text-align: center;
  margin-bottom: 1rem;
  grid-column: span 2;
  margin-top: -1rem
}

  label {
    margin: 0.3rem 0 0.1rem;
    font-weight: bold;
    font-size: 0.9rem;
  }
  input, select, button {
    padding: 0.5rem;
    margin-bottom: 0.6rem;
    border: none;
    border-radius: 5px;
    font-size: 0.95rem;
  }
  button {
    background-color: #f8b400;
    color: #000;
    cursor: pointer;
    font-weight: bold;
  }
  button:hover {
    background-color: #ffc107;
  }

  footer {
    background: rgba(0, 0, 0, 0.5);
    text-align: center;
    padding: 0.6rem;
    font-size: 0.8rem;
  }
 @media (max-height: 700px) {
    .form-container {
      max-height: 100%;
      overflow-y: auto;
    }
  }

  @media (min-width: 768px) {
  form {
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
  }

  form button {
    grid-column: span 2; /* botón ocupa todo el ancho */
  }

  .form-container h2 {
    grid-column: span 2; /* título centrado arriba */
  }
}

form label {
  font-weight: bold;
}

form input, form select {
  padding: 0.6rem;
  font-size: 1rem;
  border-radius: 5px;
  border: none;
}

form button {
  background-color: #f8b400;
  color: #000;
  padding: 0.7rem;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

form button:hover {
  background-color: #ffc107;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.row {
  display: flex;
  gap: 1rem;
  align-items: flex-end; 

}

.field {
  flex: 1 1 45%; /* dos columnas en desktop */
  min-width: 280px; /* asegura una sola columna en móvil */
  display: flex;
  flex-direction: column;
}

input, select {
  padding: 0.4rem;
  font-size: 0.9rem;
  border-radius: 4px;
  border: none;
}

label {
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 0.2rem;
}

button {
  width: 100%;
  padding: 0.6rem;
  font-size: 1rem;
  font-weight: bold;
  background-color: #f8b400;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background-color: #ffc107;
}

.row.single {
  justify-content: center;
}

.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  flex-direction: column;
  font-family: 'Segoe UI', sans-serif;
  font-size: 1.2rem;
  color: #333;
}


@media (max-width: 700px) {
  .row {
    flex-direction: column;
    align-items: stretch;
  }
}
.button-right {
  align-self: flex-end;
  display: flex;
  justify-content: flex-end;
}

.button-right button {
  width: auto;
  padding: 0.5rem 1rem;
}
.spinner {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #f8b400;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.formulario-usuario {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
}

.full-width {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .formulario-usuario {
    display: flex;
    flex-direction: column;
  }

  .campo-nombre      { order: 1; }
  .campo-apellido    { order: 2; }
  .campo-dni         { order: 3; }
  .campo-email       { order: 4; }
  .campo-usuario     { order: 5; }
  .campo-password    { order: 6; }

  .campo-institucion { order: 7; }
  .campo-localidad   { order: 8; }
  .campo-provincia   { order: 9; }
  .campo-cuit        { order: 10; }
  .campo-categoria   { order: 11; }
  .campo-ubicacion   { order: 12; }

  .full-width        { order: 99; }
}
