/* Keep the active WordPress theme responsible for the real site header and footer. */
body.yc-home-experience-page {
  overflow-x: clip;
  background: #050813;
}

body.yc-home-experience-page #content,
body.yc-home-experience-page .page_content_wrap,
body.yc-home-experience-page .content_wrap,
body.yc-home-experience-page .content,
body.yc-home-experience-page article,
body.yc-home-experience-page .post_content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Stargaze enables its regular page sidebar at the body level.  The preview
   is a full-width landing page, so remove only that page's content sidebar. */
body.yc-home-experience-page .content {
  float: none !important;
}

body.yc-home-experience-page .sidebar.widget_area {
  display: none !important;
}

.yc-homepage-experience {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: clip;
  background: #050813;
  color: #fff;
}

/* With the numbered chapter labels removed, lift the Hero message and search
   panel so they remain balanced within the first viewport. */
.yc-homepage-experience .hero-content {
  padding-top: clamp(74px, 9vh, 108px);
  padding-bottom: 9vh;
  transition: top .35s ease;
  top: clamp(36px, 5vh, 52px);
}

/* Keep expanded destination results inside the sticky viewport.  The scroll
   animation owns transform, so use the independent top offset here. */
.yc-homepage-experience .hero-content.has-result {
  top: 0;
}

/* Theme heading colours must not leak into the dark homepage experience.
   Apply this to every heading because Stargaze targets later sections with
   generic h2/h3 rules as well as the Hero. Gradient spans remain transparent
   through their more specific component rules. */
.yc-homepage-experience h1,
.yc-homepage-experience h2,
.yc-homepage-experience h3,
.yc-homepage-experience .result strong {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Preserve the branded gradient while preventing the active theme from
   painting the unwrapped heading text black. */
.yc-homepage-experience h1 .glow,
.yc-homepage-experience h2 .glow,
.yc-homepage-experience h3 .glow {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

/* Keep the editorial headline prominent without letting it push the complete
   destination finder below the first viewport. */
.yc-homepage-experience .hero-content h1 {
  max-width: 720px;
  font-size: clamp(46px, 4.8vw, 80px) !important;
  line-height: .96 !important;
}

/* The original demo used intentionally tiny technical captions.  Production
   needs readable search controls and results in both languages. */
.yc-homepage-experience .search-heading span {
  font-size: 10px !important;
}

.yc-homepage-experience .search-heading h2 {
  font-size: 24px !important;
}

.yc-homepage-experience .search-heading p {
  font-size: 13px !important;
}

.yc-homepage-experience .search-field input,
.yc-homepage-experience .search-button {
  font-size: 15px !important;
}

/* Draw the clear icon instead of relying on the font's multiplication glyph.
   This keeps the X optically centred on every mobile browser and language. */
.yc-homepage-experience .clear {
  position: relative !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden;
  font-size: 0 !important;
  line-height: 1 !important;
  touch-action: manipulation;
}

.yc-homepage-experience .clear.show {
  display: grid !important;
}

.yc-homepage-experience .clear::before,
.yc-homepage-experience .clear::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform-origin: center;
}

.yc-homepage-experience .clear::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.yc-homepage-experience .clear::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.yc-homepage-experience .trip-switch button,
.yc-homepage-experience .popular button {
  font-size: 12px !important;
}

.yc-homepage-experience .popular > span {
  font-size: 11px !important;
}

.yc-homepage-experience .result strong {
  font-size: 16px !important;
}

.yc-homepage-experience .result small {
  font-size: 13px !important;
}

.yc-homepage-experience .result a {
  padding: 10px 14px !important;
  font-size: 14px !important;
}

/* A country can have an exact single-country product plus broader regional
   plans.  Present those as explicit choices instead of silently redirecting
   the visitor to the first multi-country product. */
.yc-homepage-experience .result.has-options {
  display: block;
  padding: 14px !important;
  overflow: hidden;
}

.yc-homepage-experience .result-options-heading {
  margin-bottom: 9px;
  padding: 0 2px;
}

.yc-homepage-experience .result-options-heading strong,
.yc-homepage-experience .result-options-heading small {
  display: block;
}

.yc-homepage-experience .result-options-heading small {
  margin-top: 3px !important;
}

.yc-homepage-experience .result-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  max-height: min(34vh, 286px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(111,232,255,.42) transparent;
}

.yc-homepage-experience .result a.result-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 10px 12px !important;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  background: rgba(255,255,255,.045);
  color: #fff !important;
  text-decoration: none !important;
  transition: border-color .2s, background .2s, transform .2s;
}

.yc-homepage-experience .result a.result-option:hover,
.yc-homepage-experience .result a.result-option:focus-visible {
  border-color: #6fe8ff;
  background: rgba(111,232,255,.09);
  transform: translateY(-1px);
  outline: none;
}

.yc-homepage-experience .result-option span {
  min-width: 0;
}

.yc-homepage-experience .result-option strong,
.yc-homepage-experience .result-option small {
  display: block;
  max-width: 100%;
}

.yc-homepage-experience .result-option strong {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.28;
}

.yc-homepage-experience .result-option small {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px !important;
}

.yc-homepage-experience .result-type {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  color: rgba(255,255,255,.78);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.yc-homepage-experience .result-type-global {
  background: rgba(111,232,255,.14);
  color: #9af2ff;
}

.yc-homepage-experience .result-price {
  color: rgba(255,255,255,.7);
  font-size: 11px;
  font-weight: 700;
}

.yc-homepage-experience .result-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
}

.yc-homepage-experience .result-loading span {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.18);
  border-top-color: #6fe8ff;
  border-radius: 50%;
  animation: yc-home-search-spin .75s linear infinite;
}

@keyframes yc-home-search-spin {
  to { transform: rotate(1turn); }
}

.yc-homepage-experience .result-option i {
  flex: 0 0 auto;
  color: #6fe8ff;
  font-style: normal;
}

/* Region results are real links now, so style anchors exactly like the
   previous button cards while preserving keyboard focus. */
.yc-homepage-experience .region-destinations a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 56px;
  padding: 0 17px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.035);
  color: #fff !important;
  text-align: left;
  text-decoration: none !important;
}

.yc-homepage-experience .region-destinations a:hover,
.yc-homepage-experience .region-destinations a:focus-visible {
  border-color: #6fe8ff;
  background: rgba(111,232,255,.07);
  outline: none;
}

/* Keep the illustrated phone settings in two clean horizontal rows, even
   when the phone scales down on narrower desktop and mobile viewports. */
.yc-homepage-experience .s3 .setcard .row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  column-gap: .75em !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.yc-homepage-experience .s3 .setcard .row > span:first-child,
.yc-homepage-experience .s3 .setcard .row > em {
  white-space: nowrap !important;
}

.yc-homepage-experience .s3 .setcard .row > em,
.yc-homepage-experience .s3 .setcard .row > .tog {
  justify-self: end !important;
}

/* English words are wider than Traditional Chinese characters.  Use a more
   compact editorial scale so the heading stays to two lines and leaves the
   complete destination search available in the first viewport. */
.yc-homepage-experience.yc-lang-en .hero-content h1 {
  max-width: 720px;
  font-size: clamp(42px, 4.2vw, 70px) !important;
  line-height: .98 !important;
  letter-spacing: -.035em !important;
}

.yc-homepage-experience.yc-lang-en .hero-content .intro {
  margin-top: 20px;
  margin-bottom: 24px;
}

/* Primary search actions use a clean white treatment on the space backdrop. */
.yc-homepage-experience .search-button,
.yc-homepage-experience .trip-switch button.active {
  background: #fff !important;
  border-color: #fff !important;
  color: #07101f !important;
  box-shadow: 0 10px 28px rgba(255, 255, 255, .14) !important;
}

.yc-homepage-experience .search-button:hover,
.yc-homepage-experience .trip-switch button.active:hover {
  background: #f1f5fb !important;
  color: #07101f !important;
}

/* Desktop Hero: keep the editorial message, finder and its complete result
   panel inside the first viewport.  The result list owns its own scroll, so
   wheel/trackpad movement over many matching plans does not push the visitor
   straight into the next homepage chapter. */
@media (min-width: 851px) {
  .yc-homepage-experience .hero-content {
    width: min(860px, 59vw);
    padding-top: clamp(132px, 15vh, 158px);
    padding-bottom: clamp(34px, 5vh, 54px);
  }

  /* Once results are available, use the Hero as a focused destination
     finder.  This mirrors the reference behaviour: the search surface moves
     into a predictable position and the complete plan list remains visible,
     even on shorter laptop screens. */
  .yc-homepage-experience .hero-content.has-result {
    padding-top: clamp(144px, 20vh, 185px);
  }

  .yc-homepage-experience .hero-content.has-result > h1,
  .yc-homepage-experience .hero-content.has-result > .intro {
    display: none !important;
  }

  /* The English template has a second destination navigation row.  Keep the
     focused finder below that row instead of letting both layers overlap. */
  .yc-homepage-experience.yc-lang-en .hero-content.has-result {
    top: clamp(118px, 14vh, 138px);
  }

  .yc-homepage-experience .hero-content h1 {
    max-width: 840px;
    margin: 0;
    font-size: clamp(48px, 3.45vw, 68px) !important;
    line-height: 1.02 !important;
    letter-spacing: -.025em !important;
  }

  .yc-homepage-experience.yc-lang-zh .hero-content h1 {
    max-width: none;
    white-space: nowrap;
  }

  .yc-homepage-experience.yc-lang-zh .hero-content h1 br {
    display: none;
  }

  .yc-homepage-experience .hero-content .intro {
    max-width: 680px;
    margin: 15px 0 18px;
    font-size: 15px !important;
    line-height: 1.65 !important;
  }

  .yc-homepage-experience .search-shell {
    width: min(700px, 100%);
    padding: 17px;
  }

  .yc-homepage-experience .search-heading {
    padding-bottom: 10px;
  }

  .yc-homepage-experience .search-heading h2 {
    font-size: 22px !important;
  }

  .yc-homepage-experience .trip-switch {
    margin-top: 10px;
  }

  .yc-homepage-experience .popular {
    margin-top: 8px;
  }

  .yc-homepage-experience .result.has-options {
    margin-top: 10px;
    padding: 11px 12px 12px !important;
  }

  .yc-homepage-experience .result-options-heading {
    margin-bottom: 7px;
  }

  .yc-homepage-experience .result-options {
    max-height: min(27vh, 238px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .yc-homepage-experience .result a.result-option {
    min-height: 52px;
    padding: 8px 11px !important;
  }

  .yc-homepage-experience.yc-lang-en .hero-content h1 {
    max-width: 800px;
    font-size: clamp(42px, 3.25vw, 64px) !important;
    line-height: 1.01 !important;
  }
}

@media (max-width: 850px) {
  html:has(body.yc-home-experience-page),
  body.yc-home-experience-page {
    max-width: 100%;
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  /* The active theme can reintroduce content-box sizing on nested landing
     page elements.  Pin the Hero column and search card to the visual
     viewport so anonymous mobile visitors never get a horizontally clipped
     search action or result panel. */
  .yc-homepage-experience .hero-content {
    box-sizing: border-box !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
  }

  .yc-homepage-experience .search-shell {
    box-sizing: border-box !important;
    width: calc(100vw - 36px) !important;
    max-width: calc(100vw - 36px) !important;
    min-width: 0 !important;
    align-self: flex-start;
    scroll-margin-top: 88px;
    overflow: visible;
  }

  .yc-homepage-experience .destination-form,
  .yc-homepage-experience .destination-form > *,
  .yc-homepage-experience .search-field {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .yc-homepage-experience .hero-content {
    padding-top: 86px;
    padding-bottom: 132px;
  }

  .yc-homepage-experience .hero-content.has-result {
    top: 0;
  }

  /* Mobile search mode behaves like a focused search panel: the editorial
     headline moves out of the way, the form stays directly below the site
     header and the matching plans scroll inside the available viewport. */
  .yc-homepage-experience .hero-content.search-active {
    top: 0 !important;
    justify-content: flex-start !important;
    padding-top: 86px !important;
    padding-bottom: 20px !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .yc-homepage-experience .hero-content.search-active > .eyebrow,
  .yc-homepage-experience .hero-content.search-active > h1,
  .yc-homepage-experience .hero-content.search-active > .intro {
    display: none !important;
  }

  .yc-homepage-experience .hero-content.search-active .search-shell {
    max-height: calc(100svh - 106px) !important;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .yc-homepage-experience .hero-content.search-active .search-shell::-webkit-scrollbar {
    display: none;
  }

  .yc-homepage-experience .hero-content h1 {
    font-size: clamp(38px, 10.5vw, 54px) !important;
  }

  .yc-homepage-experience .search-heading h2 {
    font-size: 21px !important;
  }

  .yc-homepage-experience .search-field input,
  .yc-homepage-experience .search-button {
    font-size: 16px !important;
  }

  .yc-homepage-experience .search-field input,
  .yc-homepage-experience .search-field input:focus {
    width: 100% !important;
    font-size: 16px !important;
    line-height: 1.25 !important;
    transform: translateZ(0);
  }

  .yc-homepage-experience .trip-switch button {
    font-size: 12px !important;
  }

  .yc-homepage-experience .result.show {
    align-items: flex-start !important;
  }

  .yc-homepage-experience .result-options {
    display: grid;
    max-height: min(42svh, 340px);
    overflow-x: hidden;
    overflow-y: auto;
    gap: 7px;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  .yc-homepage-experience .result-options::-webkit-scrollbar {
    display: none;
  }

  .yc-homepage-experience .result a.result-option {
    width: 100%;
    min-height: 60px;
    scroll-snap-align: none;
  }

  .yc-homepage-experience.yc-lang-en .hero-content h1 {
    max-width: calc(100vw - 36px) !important;
    font-size: clamp(32px, 8.4vw, 44px) !important;
    line-height: .98 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }
}

