.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 80vh;
  padding-block: 8rem 4.8rem;
  overflow: hidden;
  color: var(--color-text-on-dark);
}

/* Imagen de fondo + overlay oscuro */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, var(--color-overlay) 0%, rgba(0, 0, 0, 0.35) 100%);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 4.8rem;
}

.hero__content {
  max-width: 72rem;
}

.hero h1 {
  color: var(--color-text-on-dark);
}

.hero__text {
  margin-top: 1.6rem;
  max-width: 60rem;
}

.hero__actions .btn {
  height: 5.4rem;
  padding-inline: 3.2rem;
  font-size: 1.5rem;
}

.hero__actions .btn--secondary,
.hero__actions .btn--secondary:hover,
.hero__actions .btn--secondary:focus-visible,
.hero__actions .btn--secondary:active {
  color: var(--color-text-on-dark);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 2.4rem;
}

/* Buscador */
.hero-search {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  align-items: end;
  gap: 1.6rem;
  padding: 2rem;
  background-color: var(--color-bg-white);
  border-radius: var(--radius-md);
  color: var(--color-text);
}

.hero-search__field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hero-search label {
  font-size: 1.2rem;
  font-weight: var(--font-weight-semibold);
}

.hero-search select,
.hero-search input {
  display: block;
  width: 100%;
  height: var(--button-height);
  padding: 0 1.4rem;
  border: 0.1rem solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-bg-white);
  color: var(--color-text);
  font-size: 1.4rem;
  line-height: 1.2;
  -webkit-appearance: none;
  appearance: none;
}

.hero-search select {
  padding-right: 4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236b2a10' stroke-width='1.8' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.4rem center;
}

/* Campo de fecha: icono de calendario propio; el nativo queda invisible pero abre el selector al hacer clic en cualquier parte del campo. */
.hero-search input[type="date"] {
  position: relative;
  padding-right: 4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b2a10' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.4rem center;
  cursor: pointer;
}

.hero-search input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.hero-search input[type="date"]::-webkit-datetime-edit {
  padding: 0;
}

.hero-search input[type="date"]:invalid::-webkit-datetime-edit,
.hero-search input[type="date"]:not(:focus):not([value])::-webkit-datetime-edit {
  color: rgba(0, 0, 0, 0.55);
}

.hero-search select:focus-visible,
.hero-search input:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: none;
}

.hero-search .btn {
  height: var(--button-height);
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .hero-search {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  /* Orden en móvil: título, texto, buscador y, al final, los botones. */
  .hero__inner {
    gap: 0;
  }

  .hero__content {
    display: contents;
  }

  .hero__text {
    order: 1;
  }

  .hero-search {
    order: 2;
    margin-top: 2.4rem;
  }

  .hero__actions {
    order: 3;
    flex-direction: column;
    margin-top: 1.6rem;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero {
    min-height: 0;
    padding-block: 4.8rem;
  }

  .hero-search {
    grid-template-columns: 1fr;
  }
}
