/* Go Gao mobile layout and menu compatibility with gogao-theme. */
@media (max-width: 989px) {
  /* The theme positions the drawer at left:0 but retains translateX(-50%). */
  #gogao-header .gg-mobile-nav .gg-mobile-panel {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: min(350px, 88vw);
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden auto;
    overscroll-behavior: contain;
    border-radius: 0 22px 22px 0;
    background: #faf8f4;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(-14px, 0, 0);
    transform-origin: left center;
    transition: opacity .24s ease, transform .32s cubic-bezier(.22,.8,.22,1), visibility .24s;
  }

  #gogao-header .gg-mobile-nav[open] .gg-mobile-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
  }

  #gogao-header .gg-mobile-nav .gg-mobile-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
  }

  #gogao-header .gg-mobile-nav .gg-mobile-panel__content {
    padding: 82px 20px 20px;
  }

  #gogao-header .gg-mobile-nav .gg-mobile-menu__link {
    min-width: 0;
  }

  #gogao-header .gg-mobile-nav .gg-mobile-menu__text {
    min-width: 0;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }

  /* A transformed shell makes fixed children anchor to the shell instead of viewport. */
  body #gogao-header.is-floating .gg-shell {
    transform: none;
  }

  #gogao-header.gg-drawer-open .gg-shell {
    transform: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  #gogao-header.gg-drawer-open .gg-mobile-nav .gg-mobile-toggle {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    left: 16px;
    z-index: 2147480300;
  }

  body.gg-mobile-menu-open {
    overflow: hidden;
  }
}

@media (max-width: 749px) {
  [data-gg-camera-section] {
    padding: 22px 0 30px;
  }

  [data-gg-camera-section] .gg-camera-section__container {
    width: calc(100% - 32px);
  }

  [data-gg-camera-section] .gg-camera-section__grid {
    gap: 20px;
  }

  [data-gg-camera-section] .gg-camera {
    height: clamp(225px, 73vw, 405px);
    min-height: 0;
  }

  [data-gg-camera-section] .gg-camera-section__stage {
    perspective: none;
  }

  [data-gg-camera-section].is-scroll-ready .gg-camera-section__portal-page--media {
    transform: translate3d(0, var(--gg-portal-media-y, 0px), 0);
  }

  [data-gg-camera-section].is-scroll-ready .gg-camera-section__portal-page--content {
    transform: translate3d(0, var(--gg-portal-content-y, 0px), 0);
  }

  [data-gg-camera-section] .gg-camera__thumbnails {
    gap: 7px;
    margin-top: 9px;
  }

  [data-gg-camera-section] .gg-camera__thumbnail {
    flex-basis: 64px;
    height: 48px;
  }

  [data-gg-camera-section] .gg-camera-section__eyebrow {
    font-size: 10px;
    letter-spacing: .12em;
  }

  [data-gg-camera-section] .gg-camera-section__heading {
    margin-top: 12px;
    font-size: clamp(29px, 7.8vw, 36px);
    line-height: 1.14;
    text-wrap: balance;
  }

  [data-gg-camera-section] .gg-camera-section__description {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.7;
  }

  [data-gg-camera-section] .gg-camera-section__info-list {
    gap: 11px;
    margin-top: 19px;
  }

  [data-gg-camera-section] .gg-camera-section__info-row,
  [data-gg-camera-section] .gg-camera-section__price-row {
    grid-template-columns: 26px 1px minmax(0,1fr);
    gap: 12px;
    min-height: 39px;
  }

  [data-gg-camera-section] .gg-camera-section__icon,
  [data-gg-camera-section] .gg-camera-section__price-icon {
    width: 26px;
    height: 26px;
  }

  [data-gg-camera-section] .gg-camera-section__info-text {
    font-size: 13px;
    line-height: 1.5;
  }

  [data-gg-camera-section] .gg-camera-section__price-row {
    margin-top: 20px;
  }

  [data-gg-camera-section] .gg-camera-section__price {
    font-size: clamp(20px, 5.3vw, 24px);
    line-height: 1.3;
  }

  [data-gg-camera-section] .gg-camera-section__actions {
    margin-top: 20px;
  }

  [data-gg-camera-section] .gg-camera-section__button {
    min-height: 45px;
    padding: 11px 21px;
    font-size: 12px;
  }

  /* Bring the secondary sections into the same rhythm without hiding content. */
  [data-gges-front-yard],
  [data-gges-backyard-tabs],
  [data-gges-experiences] {
    scroll-margin-top: 70px;
  }

  .ggba .ggba__card,
  .gg-photo-wall .gg-photo-wall__item,
  .gg-video .gg-video__card {
    max-width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #gogao-header .gg-mobile-nav .gg-mobile-panel { transition: none; }
  [data-gg-camera-section].is-scroll-ready .gg-camera-section__portal-page--media,
  [data-gg-camera-section].is-scroll-ready .gg-camera-section__portal-page--content {
    transform: none;
    opacity: 1;
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  [data-gg-rooms-section].gg-mobile-entered .gg-rooms__quote {
    animation: gg-mobile-rooms-entrance .85s cubic-bezier(.22,1,.36,1) both;
  }
  [data-gg-rooms-section].gg-mobile-entered .gg-rooms__intro {
    animation: gg-mobile-rooms-entrance .9s .12s cubic-bezier(.22,1,.36,1) both;
  }
  [data-gg-rooms-section].gg-mobile-entered .gg-room.is-active .gg-room__card {
    animation: gg-mobile-rooms-entrance .7s cubic-bezier(.22,1,.36,1) both;
  }
}

@keyframes gg-mobile-rooms-entrance {
  from { opacity: .72; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}

/* Go Gao Vietnamese typography system - mobile only. */
@media (max-width: 767px) {
  :root {
    --gg-mobile-text-font: "Be Vietnam Pro", system-ui, Arial, sans-serif;
    --gg-mobile-editorial-font: "Noto Serif", Georgia, serif;
  }

  :is([data-gg-rooms-section], [data-gg-scrub], [data-gg-space-collage],
      [data-gg-stay-hero], [data-gg-camera-section], [data-gg-price-reveal],
      [data-gg-quiet-tabs], [data-gges-stay-hero], [data-gges-front-yard],
      [data-gges-backyard-tabs], [data-gges-exp], [data-gges-relax],
      [data-gges-food], [data-gges-services], .gogao-library-page,
      .gg-library-hero, .gg-photo-wall, .gg-video, .ggba, .gcm, .gg-footer) {
    --font-body-family: var(--gg-mobile-text-font);
    --font-heading-family: var(--gg-mobile-editorial-font);
    font-family: var(--gg-mobile-text-font);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    font-kerning: normal;
  }

  :is([data-gg-camera-section], [data-gg-quiet-tabs], [data-gg-price-reveal],
      [data-gges-stay-hero], [data-gges-front-yard], [data-gges-backyard-tabs],
      [data-gges-exp], [data-gges-relax], [data-gges-food], [data-gges-services],
      [data-gg-rooms-section], [data-gg-scrub], [data-gg-space-collage],
      .gg-photo-wall, .gg-video, .ggba, .gcm) :is(p,li) {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
  }

  /* Preserve elegant serif headlines, but use a font with Vietnamese glyphs. */
  :is(.gg-scrub__heading, .gg-rooms__heading, .gg-hp-overlay__heading,
      .gg-space-collage__heading-line, .gg-stay-hero__heading,
      .gg-camera-section__heading, .gg-price-reveal__heading,
      .gg-quiet-tabs__heading, .gges-stay-hero__heading,
      .gges-front-yard__heading, .gges-backyard-tabs__heading,
      .gges-exp__heading, .gges-relax__heading, .gges-food__heading,
      .gges-services__heading, .gg-photo-wall__heading, .gg-video__heading,
      .ggba__heading, .ggba__title, .gcm__heading, .gg-footer__heading) {
    font-family: var(--gg-mobile-editorial-font) !important;
    font-weight: 500;
    line-height: 1.29 !important;
    letter-spacing: -.015em !important;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    text-wrap: balance;
  }

  /* Long prose must be a Vietnamese-optimized sans-serif, never tiny serif. */
  :is(.gg-scrub__quote-text, .gg-scrub__description,
      .gg-rooms__quote-text, .gg-rooms__description,
      .gg-space-collage__description, .gg-hp-overlay__description,
      .gg-stay-hero__description, .gg-camera-section__description,
      .gg-camera-section__description p, .gg-camera-section__info-text,
      .gg-price-reveal__description, .gg-price-reveal__room-description,
      .gg-price-reveal__note, .gg-quiet-tabs__rte,
      .gg-quiet-tabs__rte :is(p,li), .gges-stay-hero__description,
      .gges-front-yard__description, .gges-front-yard__intro,
      .gges-backyard-tabs__description, .gges-exp__intro,
      .gges-exp-detail__description, .gges-relax__description,
      .gges-relax__intro, .gges-food__description, .gges-food__intro,
      .gges-services__description, .gges-services__intro,
      .gg-photo-wall__description, .gg-stay-hero__description,
      .gg-video__description, .ggba__excerpt, .gcm__intro-text,
      .gcm__note, .gg-footer__description) {
    font-family: var(--gg-mobile-text-font) !important;
    font-style: normal;
    letter-spacing: 0 !important;
    word-spacing: normal;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
  }

  /* Homepage: editorial hierarchy plus comfortable room facts. */
  .gg-scrub__quote-text, .gg-rooms__quote-text {
    font-size: clamp(16px, 4.25vw, 18px) !important;
    line-height: 1.75 !important;
  }
  .gg-rooms__quote-text { font-style: italic !important; }

  .gg-scrub__heading, .gg-rooms__heading {
    font-size: clamp(29px, 8.2vw, 36px) !important;
    line-height: 1.3 !important;
  }
  .gg-scrub__description, .gg-scrub__description p,
  .gg-rooms__description, .gg-rooms__description p,
  .gg-space-collage__description, .gg-hp-overlay__description {
    font-size: 15px !important;
    line-height: 1.75 !important;
  }
  .gg-room__title {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: clamp(18px, 5vw, 21px) !important;
    font-weight: 650 !important;
    line-height: 1.42 !important;
    letter-spacing: -.015em !important;
    overflow-wrap: normal;
    word-break: normal;
  }
  .gg-room__feature-title {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
  }
  .gg-room__feature-sub {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: 12.5px !important;
    line-height: 1.58 !important;
  }
  .gg-rooms__eyebrow, .gg-rooms__quote-author,
  .gg-scrub__quote-note, .gg-space-collage__eyebrow {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: 10.5px !important;
    line-height: 1.55 !important;
    letter-spacing: .08em !important;
  }
  .gg-hp-overlay__heading {
    font-size: clamp(29px, 7.6vw, 35px) !important;
    line-height: 1.32 !important;
  }
  .gg-hp-overlay__caption {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: 10.5px !important;
    line-height: 1.6 !important;
    letter-spacing: .07em !important;
  }
  .gg-hp-overlay__link, .gg-room__button {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    letter-spacing: .03em !important;
  }
  .gg-space-collage__heading-line,
  .gg-space-collage__heading-line--accent {
    font-size: clamp(27px, 7.6vw, 34px) !important;
    line-height: 1.3 !important;
  }

  /* Rooms, night prices, details and readable info tabs. */
  .gg-stay-hero__heading,
  [data-gg-camera-section] .gg-camera-section__heading,
  [data-gg-price-reveal] .gg-price-reveal__heading {
    font-size: clamp(28px, 7.9vw, 35px) !important;
    line-height: 1.31 !important;
  }
  .gg-stay-hero__description,
  [data-gg-camera-section] .gg-camera-section__description,
  [data-gg-camera-section] .gg-camera-section__description p,
  [data-gg-price-reveal] .gg-price-reveal__description {
    font-size: 15px !important;
    line-height: 1.76 !important;
  }
  [data-gg-camera-section] .gg-camera-section__info-text {
    font-size: 14px !important;
    line-height: 1.65 !important;
  }
  [data-gg-camera-section] .gg-camera-section__price {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: clamp(20px, 5.4vw, 23px) !important;
    line-height: 1.43 !important;
    letter-spacing: -.025em !important;
    font-weight: 700;
  }
  [data-gg-camera-section] .gg-camera-section__button,
  [data-gg-price-reveal] .gg-price-reveal__button,
  [data-gg-quiet-tabs] .gg-quiet-tabs__button {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: 12px !important;
    letter-spacing: .025em !important;
    line-height: 1.45 !important;
  }
  [data-gg-price-reveal] .gg-price-reveal__room-title {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: 17px !important;
    line-height: 1.48 !important;
    letter-spacing: -.01em !important;
  }
  [data-gg-price-reveal] .gg-price-reveal__room-description,
  [data-gg-price-reveal] .gg-price-reveal__note {
    font-size: 13.5px !important;
    line-height: 1.7 !important;
  }
  [data-gg-price-reveal] .gg-price-reveal__room-subtitle,
  [data-gg-price-reveal] .gg-price-reveal__mobile-label {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: 11px !important;
    line-height: 1.55 !important;
    letter-spacing: .035em !important;
  }
  [data-gg-price-reveal] .gg-price-reveal__price {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: clamp(15px, 4.3vw, 18px) !important;
    font-weight: 600;
  }
  [data-gg-quiet-tabs] .gg-quiet-tabs__heading {
    font-size: clamp(23px, 6.3vw, 28px) !important;
  }
  [data-gg-quiet-tabs] .gg-quiet-tabs__rte,
  [data-gg-quiet-tabs] .gg-quiet-tabs__rte :is(p,li) {
    font-size: 14.5px !important;
    line-height: 1.79 !important;
  }
  [data-gg-quiet-tabs] .gg-quiet-tabs__tab-label {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: 12px !important;
    line-height: 1.52 !important;
    letter-spacing: 0 !important;
  }

  /* Amenities: preserve soft image-led sections, increase Vietnamese text. */
  :is(.gges-stay-hero__heading, .gges-front-yard__heading,
      .gges-backyard-tabs__heading, .gges-exp__heading,
      .gges-relax__heading, .gges-food__heading,
      .gges-services__heading) {
    font-size: clamp(28px, 7.65vw, 34px) !important;
  }
  :is(.gges-stay-hero__description, .gges-front-yard__description,
      .gges-front-yard__intro, .gges-backyard-tabs__description,
      .gges-exp__intro, .gges-relax__description, .gges-relax__intro,
      .gges-food__description, .gges-food__intro,
      .gges-services__description, .gges-services__intro) {
    font-size: 15px !important;
    line-height: 1.76 !important;
  }
  :is(.gges-exp-detail__title, .gges-front-yard__amenity-title,
      .gges-relax__card-title, .gges-food__item-title,
      .gges-services__item-title) {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: clamp(16px, 4.6vw, 18px) !important;
    line-height: 1.5 !important;
    letter-spacing: -.005em !important;
    word-break: normal;
  }
  .gges-exp-detail__description { font-size: 14px !important; line-height: 1.7 !important; }

  /* Photo gallery and videos: readable captions on narrow screens. */
  :is(.gg-photo-wall__heading, .gg-video__heading) {
    font-size: clamp(28px, 7.7vw, 34px) !important;
  }
  :is(.gg-photo-wall__description, .gg-video__description,
      .gg-stay-hero__description) {
    font-size: 15px !important;
    line-height: 1.73 !important;
  }
  .gg-video__title {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
  }

  /* Blog cards and full article content. */
  .ggba { font-family: var(--gg-mobile-text-font) !important; }
  .ggba__heading { font-size: clamp(29px, 8vw, 35px) !important; }
  .ggba__title { font-size: clamp(22px, 6.4vw, 26px) !important; line-height: 1.42 !important; }
  .ggba__excerpt { font-size: 15px !important; line-height: 1.77 !important; }
  .ggba__date {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
    letter-spacing: .025em !important;
  }
  body.single-post :is(.entry-content, .post-content) :is(p,li) {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: 16px !important;
    line-height: 1.83 !important;
    letter-spacing: 0 !important;
    overflow-wrap: break-word;
    word-break: normal;
  }
  body.single-post :is(.entry-content, .post-content) :is(h1,h2,h3) {
    font-family: var(--gg-mobile-editorial-font) !important;
    line-height: 1.38 !important;
    letter-spacing: -.015em !important;
    text-wrap: balance;
  }

  /* Contact forms: easy to read and no automatic iOS focus zoom. */
  .gcm { font-family: var(--gg-mobile-text-font) !important; }
  .gcm .gcm__heading {
    font-size: clamp(29px, 7.8vw, 35px) !important;
  }
  .gcm .gcm__intro-text { font-size: 15px !important; line-height: 1.77 !important; }
  .gcm .gcm__field label {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: 13.5px !important;
    line-height: 1.55 !important;
    letter-spacing: 0 !important;
  }
  .gcm .gcm__field :is(input,select,textarea) {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: 16px !important;
    line-height: 1.55 !important;
    letter-spacing: 0 !important;
  }
  .gcm :is(.gcm__location-name,.gcm__detail-value,.gcm__note) {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: 14px !important;
    line-height: 1.72 !important;
  }
  .gcm .gcm__submit { font-family: var(--gg-mobile-text-font) !important; font-size: 13px !important; }

  /* Footer and short navigation strings. */
  .gg-footer__heading {
    font-size: clamp(27px, 7.7vw, 34px) !important;
  }
  .gg-footer__description,
  .gg-footer__address,
  .gg-footer__phone,
  .gg-footer__contact-row {
    font-family: var(--gg-mobile-text-font) !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
  }
}

@media (max-width: 989px) {
  #gogao-header .gg-mobile-menu__text {
    font-family: "Be Vietnam Pro", system-ui, Arial, sans-serif !important;
    font-size: clamp(15px, 4.2vw, 17px) !important;
    line-height: 1.55 !important;
    letter-spacing: 0 !important;
    overflow-wrap: normal;
    word-break: normal;
  }
}
