/* Shared HeroSearch component styles — used on every page */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border, #dfe1e6);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-logo {
  display: block;
  height: 48px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.language-switcher {
  position: relative;
  z-index: 1200;
  flex: 0 0 auto;
}

.language-switcher.is-single,
.language-switcher.is-pills {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.language-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 40px;
  padding: 0 10px;
  border: 1px solid var(--border, #dfe1e6);
  border-radius: 10px;
  background: #fff;
  color: var(--text, #172b4d);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
}

.language-link:hover,
.language-link:focus-visible {
  border-color: var(--blue, #0052cc);
  color: #003d99;
  outline: none;
}

.language-link.active,
.language-link[aria-current="page"] {
  border-color: var(--blue, #0052cc);
  background: #eef4ff;
  color: #003d99;
  cursor: default;
}

.language-switcher-sep {
  color: #9aa4b2;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
}

.language-switcher-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--border, #dfe1e6);
  border-radius: 12px;
  background: #fff;
  color: var(--text, #172b4d);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(9, 30, 66, 0.04);
}

.language-switcher-toggle:hover,
.language-switcher-toggle:focus-visible {
  border-color: var(--blue, #0052cc);
  outline: none;
}

.language-switcher.is-open .language-switcher-toggle {
  border-color: var(--blue, #0052cc);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.12);
}

.language-switcher-flag {
  font-size: 1.05rem;
  line-height: 1;
}

.language-switcher-current {
  white-space: nowrap;
}

.language-switcher-caret {
  display: inline-block;
  margin-left: 2px;
  color: #5b6b7c;
  font-size: 0.62rem;
  line-height: 1;
  transition: transform 0.15s ease;
}

.language-switcher.is-open .language-switcher-caret {
  transform: rotate(180deg);
}

.language-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 24px));
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(9, 30, 66, 0.1);
  border-radius: 14px;
  box-shadow:
    0 8px 16px rgba(9, 30, 66, 0.08),
    0 20px 40px rgba(9, 30, 66, 0.14);
}

.language-switcher-menu[hidden] {
  display: none !important;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text, #172b4d);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
}

.language-option:hover,
.language-option:focus-visible {
  background: #f2f6fc;
  outline: none;
}

.language-option-flag {
  flex: 0 0 auto;
  font-size: 1.1rem;
  line-height: 1;
}

.language-option-name {
  flex: 1 1 auto;
  min-width: 0;
}

.language-option-check {
  flex: 0 0 auto;
  min-width: 1rem;
  color: var(--blue, #0052cc);
  font-size: 0.95rem;
  font-weight: 800;
  text-align: right;
}

.language-option.active,
.language-option[aria-selected="true"] {
  background: #eef4ff;
  color: #003d99;
}

@media (max-width: 600px) {
  .language-link {
    min-height: 34px;
    min-width: 36px;
    padding: 0 8px;
    font-size: 0.8rem;
  }

  .language-switcher-toggle {
    min-height: 38px;
    padding: 0 10px 0 8px;
    font-size: 0.88rem;
  }

  .language-switcher-menu {
    right: 0;
    left: auto;
    min-width: min(240px, calc(100vw - 24px));
  }
}

.site-hero {
  position: relative;
  z-index: 40;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background-color: #091e42;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.site-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(
      0deg,
      rgba(9, 30, 66, 0.82) 0%,
      rgba(9, 30, 66, 0.48) 55%,
      rgba(9, 30, 66, 0.22) 100%
    );
  border-radius: inherit;
}

.site-hero .container {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-hero-content {
  position: relative;
  max-width: 760px;
  padding: 100px 0 56px;
}

.site-hero-content h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-hero-content > p {
  margin: 0 0 28px;
  max-width: 42rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
  line-height: 1.55;
}

.hero-search-wrap {
  position: relative;
  width: min(100%, 680px);
}

.hero-search {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(9, 30, 66, 0.22);
}

.hero-search-input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border, #dfe1e6);
  border-radius: 12px;
  color: var(--text, #172b4d);
  font-size: 1rem;
  outline: none;
  background: #fff;
}

.hero-search-input:focus {
  border-color: var(--blue, #0052cc);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.15);
}

.hero-search-button {
  min-height: 48px;
  padding: 0 18px;
  background: var(--blue, #0052cc);
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
}

.hero-search-button:hover {
  background: var(--blue-dark, #003d99);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/*
  Fixed portal dropdown — JS moves #home-search-results under <body> and sets
  top/left/width from the search form's getBoundingClientRect().
  body { overflow-x: hidden } clips fixed descendants; disable that while open.
*/
html.ctg-search-open,
html.ctg-search-open body {
  overflow-x: visible !important;
}

.search-results,
#home-search-results,
.search-results-portal {
  display: none !important;
  position: fixed !important;
  top: 0;
  left: 0;
  right: auto;
  bottom: auto;
  z-index: 99999 !important;
  width: auto;
  max-width: none;
  max-height: min(420px, 60vh) !important;
  margin: 0 !important;
  padding: 8px;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  background: #fff !important;
  border: 1px solid rgba(9, 30, 66, 0.1);
  border-radius: 16px;
  box-shadow:
    0 8px 16px rgba(9, 30, 66, 0.08),
    0 24px 48px rgba(9, 30, 66, 0.18);
  color: var(--text, #172b4d);
  pointer-events: auto;
  transform: none !important;
  filter: none !important;
  contain: none !important;
}

.search-results.is-open,
#home-search-results.is-open,
.search-results-portal.is-open {
  display: flex !important;
  flex-direction: column;
}

.search-results-list {
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

.search-results-list::-webkit-scrollbar {
  width: 8px;
}

.search-results-list::-webkit-scrollbar-thumb {
  background: #c5d0de;
  border-radius: 999px;
}

.search-result-button {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-results-list li + li {
  border-top: 1px solid #eef2f7;
}

.search-result-button:hover,
.search-results-list [role="option"].is-active .search-result-button,
.search-result-button:focus-visible {
  background: #f2f6fc;
  outline: none;
}

.search-results-list [role="option"].is-active .search-result-button {
  box-shadow: inset 0 0 0 2px rgba(0, 82, 204, 0.22);
}

.search-result-media {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #eef3fb;
  font-size: 1.15rem;
  box-shadow: inset 0 0 0 1px rgba(9, 30, 66, 0.06);
}

.search-result-media--city {
  background: linear-gradient(160deg, #e8f1ff, #f5f8ff);
}

.search-result-media--country {
  background: linear-gradient(160deg, #eaf8f0, #f5fbf7);
}

.search-result-media--attraction,
.search-result-media--ticket {
  background: #edf1f7;
}

.search-result-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.search-result-icon {
  line-height: 1;
}

.search-result-body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.search-result-title {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  color: #12263a;
}

.search-highlight {
  background: rgba(0, 82, 204, 0.12);
  color: #003d99;
  font-weight: 800;
  border-radius: 3px;
  padding: 0 1px;
}

.search-result-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
}

.search-result-type {
  color: #5b6b7c;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.search-result-meta {
  color: #6b7c8f;
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-meta::before {
  content: "·";
  margin-right: 10px;
  color: #b0bbc8;
}

.search-result-chevron {
  flex: 0 0 auto;
  color: #9aa8b8;
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0;
  transform: translateX(-2px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.search-result-button:hover .search-result-chevron,
.search-results-list [role="option"].is-active .search-result-chevron {
  opacity: 1;
  transform: translateX(0);
}

.search-empty,
.search-loading {
  margin: 0;
  padding: 16px 14px;
  color: #6b7c8f;
  font-size: 0.95rem;
}

.search-empty--error {
  color: #9a3412;
}

.search-suggest-label {
  margin: 0;
  padding: 4px 12px 8px;
  color: #5b6b7c;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.search-empty--title {
  padding-bottom: 4px;
}

.search-results-list--suggest {
  max-height: none;
}

.search-loading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #d7e0ec;
  border-top-color: var(--blue, #0052cc);
  border-radius: 50%;
  animation: search-spin 0.7s linear infinite;
}

@keyframes search-spin {
  to {
    transform: rotate(360deg);
  }
}

.search-results-footer {
  flex: 0 0 auto;
  margin-top: 4px;
  padding: 4px 4px 2px;
  border-top: 1px solid #e8eef5;
  background: #fff;
}

.search-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--blue, #0052cc);
  font-weight: 800;
  font-size: 0.94rem;
  text-decoration: none;
}

.search-view-all:hover,
.search-view-all:focus-visible {
  background: #f2f6fc;
  outline: none;
}

@media (max-width: 900px) {
  .site-hero {
    min-height: 560px;
  }

  .site-hero-content {
    padding-top: 80px;
    padding-bottom: 48px;
  }
}

@media (max-width: 600px) {
  .site-logo {
    height: 40px;
    max-width: 190px;
  }

  .site-hero {
    min-height: 520px;
  }

  .site-hero-content {
    padding-top: 64px;
    padding-bottom: 40px;
  }

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

  .hero-search-wrap {
    width: 100%;
    max-width: 100%;
  }

  .search-results,
  #home-search-results,
  .search-results-portal {
    left: 12px !important;
    right: 12px !important;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: 55vh !important;
    border-radius: 14px;
  }

  .search-result-button {
    min-height: 64px;
    padding: 12px;
  }

  .search-result-chevron {
    opacity: 0.45;
    transform: none;
  }
}
