/* The four panels follow the 1920px guide-page artwork. */
.guide-section {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.guide-hero {
  height: calc(100vh - var(--header-height));
  height: calc(100svh - var(--header-height));
  background: #70b8ea url("../imgs/ydy-hero-img1.jpg") center / cover no-repeat;
}
.guide-welcome {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 78.1%;
  display: grid;
  place-items: center;
  width: min(478px, calc(100% - 40px));
  height: 68px;
  transform: translateX(-50%);
  background: #fff;
  color: #3285ff;
  font-size: 33px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.guide-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.guide-welcome:hover,
.guide-welcome:focus-visible {
  background: #edf5ff;
  color: #0053bf;
  box-shadow: 0 8px 32px #154d8c44;
}

.guide-products {
  background: #fff;
}
.guide-products-inner {
  width: min(1340px, 69.8vw);
  height: 100%;
  margin-inline: auto;
  padding-top: 18.3svh;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  column-gap: clamp(15px, 3.02vw, 58px);
}
.guide-product {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  align-content: start;
  text-align: center;
}
.guide-product h2 {
  justify-self: center;
  width: max-content;
  margin: 0;
  font-size: clamp(15px, 1.35vw, 26px);
  font-weight: 700;
  font-style: italic;
  line-height: 32px;
  white-space: nowrap;
}
.guide-product-visual {
  min-width: 0;
  width: 100%;
  height: 45.93svh;
  min-height: 0;
  display: grid;
  place-items: center;
  padding-top: 16px;
}
.guide-product-visual img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 32svh;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.45s cubic-bezier(.2, .75, .2, 1);
}
@media (hover: hover) and (pointer: fine) {
  .guide-product:hover .guide-product-visual img,
  .guide-product:focus-within .guide-product-visual img {
    transform: scale(1.045);
  }
}
.guide-product-options {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: clamp(5px, 1.2svh, 13px);
}
.guide-product-options a {
  height: clamp(25px, 3.15svh, 34px);
  display: grid;
  place-items: center;
  background: #efefef;
  color: #878788;
  font-size: clamp(10px, .885vw, 17px);
  line-height: 1.1;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease;
}
.guide-product-options a:hover,
.guide-product-options a:focus-visible {
  background: #e1eaff;
  color: #0b478d;
}

.guide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.guide-world {
  background: radial-gradient(ellipse at 50% 49%, #fff 42%, #f7f7f7 100%);
  color: #000;
}
.guide-world-inner {
  width: min(1340px, 69.8vw);
  height: 100%;
  margin-inline: auto;
  padding-top: 8.7svh;
  text-align: center;
}
.guide-world h2 {
  margin: 0;
  font-size: clamp(34px, 2.82vw, 54px);
  line-height: 1.18;
  font-weight: 500;
  letter-spacing: .01em;
}
.guide-world p {
  margin: 0;
  color: #003f8e;
  font-size: clamp(20px, 1.46vw, 28px);
  font-weight: 700;
  font-style: italic;
  line-height: 1.2;
}
.guide-enter {
  display: grid;
  place-items: center;
  width: min(480px, 100%);
  height: 65px;
  margin: 51px auto 0;
  background: #003e8a;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.guide-enter:hover,
.guide-enter:focus-visible {
  background: #003e8a;
  box-shadow: 0 10px 30px #00418f33;
}
.guide-countries {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 65px;
  column-gap: clamp(18px, 2.45vw, 47px);
  row-gap: clamp(24px, 6.94svh, 75px);
  margin-top: 70px;
}
.guide-countries span {
  display: grid;
  place-items: center;
  min-width: 0;
  border: 1px solid #e1e1e1;
  color: #003e8a;
  font-size: clamp(15px, 1.3vw, 25px);
  line-height: 1.15;
  white-space: nowrap;
}
.guide-country-mark img {
  width: 34px;
  height: 29px;
  object-fit: contain;
}

@media (min-width: 1001px) {
  body[data-screen-page] .guide-world-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 24px;
    box-sizing: border-box;
  }
  body[data-screen-page] .guide-enter {
    flex: none;
    margin-top: clamp(24px, 3.5svh, 38px);
  }
  body[data-screen-page] .guide-countries {
    margin-top: clamp(28px, 4svh, 44px);
    grid-auto-rows: clamp(44px, 6svh, 65px);
    row-gap: clamp(16px, 3svh, 32px);
  }
}
@media (min-width: 1001px) and (max-height: 820px) {
  .guide-product h2 { line-height: clamp(23px, 2.96svh, 32px); }
  .guide-product-visual { padding-top: 1svh; }
  .guide-enter {  margin-top: 4.7svh; }
  .guide-countries { margin-top: 6.5svh; grid-auto-rows: min(65px, 6svh); }
}

@media (max-width: 1000px) {
  .guide-products-inner {
    width: 100%;
    padding: 12svh max(24px, 4vw) 5svh;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(40vw, 260px);
    gap: clamp(18px, 4vw, 32px);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .guide-products-inner::-webkit-scrollbar { display: none; }
  .guide-product { scroll-snap-align: center; }
  .guide-product h2 { font-size: 20px; line-height: 1.25; }
  .guide-product-visual { height: 48svh; padding-top: 0; }
  .guide-product-visual img { max-height: 40svh; }
  .guide-product-options a { height: 30px; font-size: 13px; }
  .guide-world-inner { width: calc(100% - 48px); padding-top: 7svh; }
  .guide-enter { margin-top: 4svh; }
  .guide-countries {
    grid-auto-rows: min(55px, 6svh);
    column-gap: 16px;
    row-gap: clamp(14px, 3svh, 28px);
    margin-top: 6svh;
  }
  .guide-countries span { font-size: clamp(12px, 1.6vw, 17px); white-space: normal; padding: 4px; }
}

@media (max-width: 650px) {
  .guide-hero { background-position: center; }
  .guide-welcome { top: 76%; height: 54px; font-size: clamp(21px, 6vw, 27px); }
  .guide-products-inner {
    padding: 11svh 10vw 5svh;
    grid-auto-columns: 72vw;
    gap: 8vw;
  }
  .guide-product h2 { font-size: clamp(18px, 5vw, 22px); }
  .guide-product-visual { height: 48svh; }
  .guide-product-visual img { max-height: 42svh; }
  .guide-product-options { gap: 7px; }
  .guide-product-options a { height: 29px; font-size: 12px; }
  .guide-world-inner { width: calc(100% - 32px); padding-top: 5svh; }
  .guide-world h2 { font-size: clamp(30px, 8vw, 40px); }
  .guide-world p { font-size: clamp(17px, 5vw, 22px); }
  .guide-enter {
    width: min(320px, 100%);
    height: 48px;
    margin-top: 3svh;
    font-size: 20px;
  }
  .guide-countries {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(32px, 5.6svh, 44px);
    column-gap: 10px;
    row-gap: clamp(5px, 1svh, 10px);
    margin-top: 4svh;
  }
  .guide-countries span { font-size: clamp(10px, 2.75vw, 14px); }
  .guide-country-mark img { width: 24px; height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .guide-welcome,
  .guide-product-visual img,
  .guide-product-options a,
  .guide-enter { transition: none; }
}
