/* ========== Joanna Holidays — hero banner (below site header) ========== */
:root {
  --jh-red: #e11d2e;
  --jh-red-deep: #b0101e;
}

.jh-hero {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  background: #f3f4f6;
  margin-top: 0;
  font-family: "DM Sans", system-ui, sans-serif;
}

.jh-hero__bg {
  position: relative;
  width: 100%;
  line-height: 0;
}

.jh-hero__slider,
.jh-hero__slider .swiper-wrapper,
.jh-hero__slider .swiper-slide {
  width: 100%;
  height: auto;
}

.jh-hero__slider .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
}

.jh-hero__slide-link {
  display: block;
  width: 100%;
  line-height: 0;
  cursor: pointer;
}

/* Full-width image; height follows natural aspect ratio (contain) */
.jh-hero__slider .swiper-slide img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Arrows */
.jh-hero__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 8;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.35rem;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.jh-hero__nav:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%) scale(1.05);
}

.jh-hero__nav--prev { left: 1.25rem; }
.jh-hero__nav--next { right: 1.25rem; }

.jh-hero__dots {
  position: absolute;
  bottom: 5.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: flex;
  gap: 0.4rem;
  width: auto !important;
}

.jh-hero__dots .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  margin: 0 !important;
  background: rgba(255, 255, 255, 0.55);
  opacity: 1;
  border-radius: 50%;
}

.jh-hero__dots .swiper-pagination-bullet-active {
  width: 22px;
  border-radius: 4px;
  background: #fff;
}

/* —— Search: bottom center overlay —— */
.jh-hero__search-overlay {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  z-index: 12;
  width: min(720px, calc(100% - 2rem));
}

.jh-hero__search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.4rem 0.4rem 1.15rem;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.22);
  min-height: 58px;
}

.jh-hero__pin {
  color: #6b7280;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.jh-hero__search-field {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 42px;
  display: flex;
  align-items: center;
}

.jh-hero__typewriter {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 1rem;
  font-weight: 500;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jh-hero__typewriter::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  background: var(--jh-red);
  vertical-align: text-bottom;
  animation: jhCaret 0.9s step-end infinite;
}

.jh-hero__search.is-focused .jh-hero__typewriter,
.jh-hero__search.has-value .jh-hero__typewriter {
  opacity: 0;
}

.jh-hero__search-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 560;
  color: #111827;
  height: 42px;
  padding: 0;
}

.jh-hero__search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.jh-hero__search-btn {
  flex-shrink: 0;
  border: none;
  border-radius: 12px;
  padding: 0 1.6rem;
  height: 46px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: var(--jh-red);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.jh-hero__search-btn-ico {
  display: none;
}

.jh-hero__search-btn:hover {
  background: var(--jh-red-deep);
  transform: translateY(-1px);
}

.jh-hero__results {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  max-height: min(300px, 40vh);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid #eceff3;
  padding: 0.45rem;
}

.jh-hero__results[hidden] { display: none !important; }

.jh-hero__results .jh-res-group { padding: 0.3rem; }
.jh-hero__results .jh-res-group h5 {
  margin: 0 0 0.35rem;
  padding: 0 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.jh-hero__results a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem;
  border-radius: 10px;
  text-decoration: none;
  color: #111827;
}

.jh-hero__results a:hover { background: #fff5f5; }

.jh-hero__results img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.jh-hero__results .jh-res-meta strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 650;
}

.jh-hero__results .jh-res-meta span {
  font-size: 0.72rem;
  color: #6b7280;
}

.jh-hero__results .jh-res-empty {
  margin: 0;
  padding: 0.9rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.88rem;
}

@keyframes jhCaret { 50% { opacity: 0; } }

@media (max-width: 767.98px) {
  .jh-hero {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    margin-bottom: 2.1rem;
  }

  .jh-hero__bg {
    overflow: hidden;
    border-radius: 0;
  }

  .jh-hero__nav { display: none; }

  .jh-hero__dots {
    bottom: 2.5rem;
  }

  /* Float on the bottom edge — half on image, half below */
  .jh-hero__search-overlay {
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    width: calc(100% - 1.75rem);
    max-width: 520px;
  }

  .jh-hero__search {
    min-height: 52px;
    padding: 0.3rem 0.3rem 0.3rem 1.1rem;
    border-radius: 999px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    gap: 0.25rem;
  }

  .jh-hero__pin {
    display: none;
  }

  .jh-hero__search-btn-text {
    display: none;
  }

  .jh-hero__search-btn-ico {
    display: block;
  }

  .jh-hero__search-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: #1d4ed8;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.35);
  }

  .jh-hero__search-btn:hover {
    background: #1e40af;
    transform: none;
  }

  .jh-hero__typewriter,
  .jh-hero__search-input {
    font-size: 0.95rem;
    color: #6b7280;
  }

  .jh-hero__search-input {
    color: #111827;
  }

  .jh-hero__typewriter::after {
    background: #1d4ed8;
  }

  .jh-hero__results {
    bottom: calc(100% + 10px);
    max-height: min(240px, 32vh);
    border-radius: 14px;
  }
}
