#gallery-wrapperr {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  column-gap: 1em;
}

#gallery-wrapper * {
  box-sizing: border-box;
}

#form-wrapper {
  display: flex;
  flex-direction: column;
  margin: auto;
}

#form-wrapper > article:nth-child(2) {
  border: 2px solid blue;
  border-radius: 8px;
  padding: 0.5em 1.5em;
}

#form-wrapper > article:nth-child(2) > h3 {
  margin: 0.5em 0;
  color: blue;
  font-weight: bold;
}

#form-wrapper > article:nth-child(2) > h3,
#form-wrapper > article:nth-child(2) > p {
  text-align: center;
}

#form-wrapper .form-group {
  margin: 0.5em 0;
  width: 100%;
}

#form-wrapper .form-group input[type="text"] {
  padding: 0.5em;
  border-radius: 4px;
  border: 1px solid #cccccc;
  display: block;
  width: 100%;
  margin-top: 0.5em;
}

#form-wrapper > article:nth-child(2) > p {
  text-wrap: balance;
  width: 60%;
  margin: 1em auto;
}

#title {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  width: 100%;
  margin-bottom: 2em;
}

#title::before,
#title::after {
  content: "";
  height: 3px;
  background-color: #2e008b; /* Color violeta del diseño */
  border-radius: 2px;
}

#title > h3 {
  color: #2e008b;
  font-family: 'Arial Black', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 1px;
  margin: 0;
  text-transform: uppercase;
  text-align: center;
}

.upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 16px;
  border: 1.5px dashed #002288; /* Azul oscuro ajustado a la imagen */
  border-radius: 8px;
  background-color: #ffffff;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  user-select: none;
}

/* Efecto hover */
.upload-dropzone:hover {
  background-color: #f8fafc;
  border-color: #001155;
}

/* Ícono */
.upload-icon {
  width: 36px;
  height: 36px;
  color: #002288;
  margin-bottom: 12px;
}

/* Texto principal */
.upload-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #002288;
  margin-bottom: 4px;
}

/* Texto secundario */
.upload-subtitle {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  color: #64748b;
}

/* Estado cuando el usuario arrastra un archivo sobre la zona */
.upload-dropzone.drag-over {
  background-color: #eff6ff;
  border-color: #1d4ed8;
}

/*
 * Estado con archivos listos para subir.
 *
 * `.has-files` la pone el JS sobre #upload-container (un input[type=file] no
 * expone un selector CSS para "tiene archivos"), y desde ahí se conmuta todo
 * el bloque: la zona pasa de borde punteado azul a borde sólido verde y el
 * mensaje "click to upload" se reemplaza por el resumen de lo seleccionado.
 */
.upload-container.has-files .upload-dropzone {
  border-style: solid;
  border-color: #16a34a;
  background-color: #f0fdf4;
}

.upload-container.has-files .upload-dropzone:hover {
  background-color: #dcfce7;
  border-color: #15803d;
}

.upload-container.has-files .upload-icon,
.upload-container.has-files .upload-title,
.upload-container.has-files .upload-dropzone > .upload-subtitle {
  display: none;
}

.upload-selected {
  display: none;
  flex-direction: column;
  align-items: center;
}

.upload-container.has-files .upload-selected {
  display: flex;
}

.upload-check-icon {
  width: 36px;
  height: 36px;
  color: #16a34a;
  margin-bottom: 12px;
}

.upload-selected-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #15803d;
  margin-bottom: 4px;
}

/* Listado de archivos en espera: nombre, peso y miniatura de cada uno */
.upload-file-list {
  display: none;
  list-style: none;
  margin: 0.6em 0 0;
  padding: 0;
}

.upload-container.has-files .upload-file-list {
  display: grid;
  gap: 0.5em;
}

.upload-file {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.5em;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  background-color: #f8fafc;
}

.upload-file-thumb {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 4px;
  background-color: #e2e8f0;
}

.upload-file-name {
  flex: 1;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: #0f172a;
  word-break: break-word;
}

.upload-file-size {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}

/*
 * Hereda la forma, el color y la tipografía de `#form-wrapper button` (el
 * mismo bloque que estiliza SUBMIT PHOTO), así que aquí solo se controla
 * cuándo aparece.
 */
#form-wrapper .upload-clear {
  display: none;
  cursor: pointer;
}

#form-wrapper .upload-container.has-files .upload-clear {
  display: block;
}

.image {
  width: 100%;
}

.image img {
  width: 100%;
  object-fit: cover;
}

.images-container {
  display: grid;
  gap: 0.75em;
  margin-top: 0.3em;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  justify-items: center;
}

.crew-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75em;
  margin: 1.5em 0;
}

.crew-gallery-item {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background-color: #f1f5f9;
}

.crew-gallery-item a {
  display: block;
  line-height: 0;
}

.crew-gallery-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.crew-gallery-item:hover .crew-gallery-image {
  transform: scale(1.04);
}

.crew-gallery-empty {
  color: #64748b;
  text-align: center;
  margin: 2em 0;
}

@media screen and (min-width: 768px) {
  .crew-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

.form-group:not(.checkbox) input {
  width: 100%;
}

#form-wrapper hr {
  border: 1px solid #DDdddd;
}

#form-wrapper button {
  display: block;
  width: 100%;
  padding: 0.8em 0.45em;
  border: none;
  border-radius: 4px;
  background-color: #1d4ed8;
  color: white;
  font-weight: bold;
  margin-top: 1em;
}

article.footer {
  display: flex;
  place-items: center;
  margin: 0.6em 0;
}

.consent-footer {
  font-size: 14px;
  color: #555555;
  flex: 1;
  margin: 0;
  margin-left: 0.75em;
}

.shield-check-icon {
  width: 24px;
  height: 24px;
  color: #2563eb; /* Color azul de la imagen */
  display: inline-block;
  vertical-align: middle;
}

@media screen and (min-width: 768px) {
    #title > h3 {
        letter-spacing: 10px;
    }
}

@media screen and (min-width: 768px) {
  #form-wrapper {
    width: 70%;
  }
}

@media screen and (min-width: 1280px) {
  #form-wrapper {
    width: 50%;
  }
}