.soga-common-hero,
.soga-common-hero * {
  box-sizing: border-box;
}

.soga-common-hero {
  position: relative;
  z-index: 1;
  display: grid;
  place-content: center;
  width: 100%;
  min-height: clamp(620px, 72vh, 820px);
  margin-top: min(
    var(--soga-common-hero-top-space, 0px),
    clamp(132px, 9.7vw, 200px)
  );
  padding: clamp(150px, 10vw, 190px) 5vw clamp(54px, 5vw, 76px);
  overflow: hidden;
  color: #fff;
  text-align: center;
  background-color: var(--soga-common-hero-background, #63443e);
}

.soga-common-hero__image {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--soga-common-hero-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.soga-common-hero__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(53, 43, 41, 0.16) 0%,
    rgba(94, 53, 46, 0.4) 48%,
    rgba(93, 47, 40, 0.7) 100%
  );
}

.soga-common-hero__content {
  position: relative;
  z-index: 2;
  width: min(900px, 90vw);
  margin: 0 auto;
  animation: soga-common-hero-copy-in 1.2s 0.12s both cubic-bezier(0.22, 0.61, 0.36, 1);
}

.soga-common-hero--cleansing .soga-common-hero__content {
  width: min(1200px, 90vw);
}

.soga-common-hero h1,
.soga-common-hero__title {
  margin: 18px 0 24px;
  color: #fff;
  font-family: "Shippori Mincho", "Yu Mincho", YuMincho, serif;
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.07em;
  text-shadow: 0 2px 18px rgba(38, 20, 16, 0.32);
}

.soga-common-hero__content p {
  max-width: 760px;
  margin: 0 auto;
  color: #fff;
  font-family: "Shippori Mincho", "Yu Mincho", YuMincho, serif;
  font-size: clamp(16px, 1.4vw, 19px);
  font-weight: 500;
  line-height: 2;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 14px rgba(38, 20, 16, 0.42);
}

.soga-common-hero .soga-common-hero__semantic-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.soga-common-hero__content p.soga-common-hero__visual-title {
  max-width: none;
  margin: 18px auto 8px;
  font-size: clamp(24px, 7.6vw, 72px);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.soga-common-hero__content p.soga-common-hero__treatment-type {
  margin: 0 auto 18px;
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.7;
}

.soga-common-hero__content p.soga-common-hero__visual-copy {
  font-size: clamp(16px, 1.4vw, 19px);
  text-wrap: balance;
}

.single-post .soga-common-hero__title {
  max-width: 1000px;
  margin-right: auto;
  margin-left: auto;
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 1.65;
}

.page-id-1819 .soga-common-hero__pain-title {
  margin: 18px auto 24px;
  font-size: inherit;
  line-height: 1.35;
  letter-spacing: 0.04em;
}

.page-id-1819 .soga-common-hero__pain-primary,
.page-id-1819 .soga-common-hero__pain-secondary {
  display: block;
}

.page-id-1819 .soga-common-hero__pain-primary {
  font-size: clamp(44px, 4.8vw, 68px);
}

.page-id-1819 .soga-common-hero__pain-secondary {
  margin-top: clamp(14px, 1.8vw, 24px);
  font-size: clamp(26px, 2.8vw, 40px);
  letter-spacing: 0.06em;
}

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

.soga-post-nav,
.soga-post-nav * {
  box-sizing: border-box;
}

.single-post .soga-post-nav {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  width: 100% !important;
  margin: 0 !important;
  padding: clamp(36px, 5vw, 64px) clamp(24px, 5vw, 72px);
}

.soga-post-nav__slot {
  display: flex;
}

.soga-post-nav__slot--next {
  justify-content: flex-end;
}

.soga-post-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 150px;
  min-height: 64px;
  padding: 14px 24px;
  border-radius: 8px;
  color: #2e2b2a;
  background: #dedbd9;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.soga-post-nav__link:hover,
.soga-post-nav__link:focus-visible {
  color: #fff;
  background: #70534d;
  transform: translateY(-2px);
}

.soga-post-nav__link:focus-visible {
  outline: 3px solid rgba(112, 83, 77, 0.35);
  outline-offset: 3px;
}

.soga-post-nav__arrow {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 38px;
  font-weight: 400;
  line-height: 0.6;
}

.single-post .post .post-content p,
.single-post .post .post-content li,
.single-post .post .post-content dt,
.single-post .post .post-content dd,
.single-post .post .post-content blockquote {
  font-size: 18px !important;
  line-height: 2;
  letter-spacing: 0.035em;
}

.single-post .post .post-content h2 {
  font-size: 34px !important;
  line-height: 1.5;
}

.single-post .post .post-content h3 {
  font-size: 30px !important;
  line-height: 1.5;
}

.single-post .post .post-content h4 {
  font-size: 26px !important;
  line-height: 1.55;
}

.single-post .post .post-content h5 {
  margin: 32px 0 12px;
  font-size: 21px !important;
  font-weight: 600;
  line-height: 1.7;
}

.single-post .post .post-content h6 {
  margin: 28px 0 10px;
  font-size: 20px !important;
  font-weight: 600;
  line-height: 1.7;
}

.soga-common-hero__breadcrumb {
  position: absolute;
  right: max(24px, calc((100% - 1100px) / 2));
  bottom: clamp(22px, 3vw, 40px);
  left: max(24px, calc((100% - 1100px) / 2));
  z-index: 3;
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
  text-shadow: 0 1px 7px rgba(0, 0, 0, 0.82);
}

.soga-common-hero__breadcrumb,
.soga-common-hero__breadcrumb * {
  color: #fff !important;
}

.soga-common-hero__breadcrumb #bread {
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
}

.soga-common-hero__breadcrumb #bread ul {
  display: flex !important;
  justify-content: flex-end !important;
  flex-wrap: wrap;
}

.soga-common-hero__breadcrumb #bread li {
  float: none !important;
}

.soga-fullwidth-page,
.soga-fullwidth-content {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Legacy Elementor hero blocks stay dormant until their old widgets are removed. */
#content [id$="-hero-mount"],
#content .soga-doctor-hero,
#content .soga-clinic-hero,
#content .soga-yobou-hero,
#content .soga-general-hero,
#content .soga-cavity-hero,
#content .soga-root-hero,
#content .soga-perio-hero,
#content .soga-toothloss-hero,
#content .soga-symptoms-hero,
#content .soga-first-hero,
#content .soga-support-hero,
#content .soga-shinbi-hero {
  display: none !important;
}

@keyframes soga-common-hero-copy-in {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .soga-common-hero__content {
    animation: none;
  }
}

@media (max-width: 560px) {
  .soga-common-hero--cleansing .soga-common-hero__image {
    background-position: right center;
  }

  .soga-common-hero {
    min-height: 680px;
    margin-top: min(var(--soga-common-hero-top-space, 0px), 130px);
    padding: 118px 24px 64px;
  }

  .soga-common-hero h1,
  .soga-common-hero__title {
    margin: 14px 0 18px;
    font-size: clamp(36px, 10vw, 44px);
    line-height: 1.55;
  }

  .soga-common-hero__content p.soga-common-hero__visual-title {
    margin: 14px auto 12px;
    font-size: clamp(24px, 7.6vw, 34px);
    line-height: 1.55;
  }

  .soga-common-hero__content p {
    font-size: clamp(16px, 4.8vw, 20px);
    line-height: 1.8;
  }

  .soga-common-hero__content p.soga-common-hero__treatment-type {
    margin-bottom: 14px;
    font-size: 16px;
  }

  .single-post .soga-common-hero__title {
    font-size: clamp(24px, 7.5vw, 34px);
    line-height: 1.6;
  }

  .page-id-1819 .soga-common-hero__pain-primary {
    font-size: clamp(34px, 10vw, 42px);
  }

  .page-id-1819 .soga-common-hero__pain-secondary {
    margin-top: 16px;
    font-size: clamp(21px, 6.4vw, 27px);
    line-height: 1.65;
  }

  .single-post .soga-post-nav {
    gap: 14px;
    padding: 28px 20px 36px;
  }

  .soga-post-nav__link {
    gap: 10px;
    min-width: 118px;
    min-height: 54px;
    padding: 12px 16px;
    font-size: 16px;
  }

  .soga-post-nav__arrow {
    font-size: 30px;
  }

  .single-post .post .post-content p,
  .single-post .post .post-content li,
  .single-post .post .post-content dt,
  .single-post .post .post-content dd,
  .single-post .post .post-content blockquote {
    font-size: 17px !important;
    line-height: 2;
  }

  .single-post .post .post-content h2 {
    font-size: 28px !important;
  }

  .single-post .post .post-content h3 {
    font-size: 25px !important;
  }

  .single-post .post .post-content h4 {
    font-size: 22px !important;
  }

  .single-post .post .post-content h5 {
    margin-top: 28px;
    font-size: 19px !important;
  }

  .single-post .post .post-content h6 {
    margin-top: 24px;
    font-size: 18px !important;
  }

  .soga-common-hero__breadcrumb {
    right: 20px;
    bottom: 18px;
    left: 20px;
  }
}

@media (max-width: 560px) and (max-height: 620px) {
  .soga-common-hero {
    min-height: 560px;
    padding-top: 94px;
    padding-bottom: 96px;
  }

  .soga-common-hero__content {
    margin-top: -44px;
  }

  .soga-common-hero h1,
  .soga-common-hero__title {
    font-size: 34px;
  }

  .soga-common-hero__content p {
    font-size: 15px;
  }
}

/* Keep the pain-page visual section flush with the shared hero. */
body.page-id-1819 #content {
  padding-top: 0;
}

body.page-id-1819 .soga-pain-lp {
  padding-top: 0 !important;
}
