/* Common styles - Variables moved to _variables.css */
html {
  overflow-y: scroll;
  width: 100%;
  overflow-x: hidden;
}

/* スクロールバーを非表示にするオプション */
html.hide-scrollbar {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

html.hide-scrollbar::-webkit-scrollbar {
  display: none; /* Webkit系ブラウザ（Chrome, Safari, Edge） */
}

body.hide-scrollbar::-webkit-scrollbar {
  display: none; /* Webkit系ブラウザ（Chrome, Safari, Edge） */
}

/* スクロールバーの動的調整用CSS変数 */
:root {
  --scrollbar-width: 0px;
  --scrollbar-visible: 0;
}

/* スクロールバー調整の基本設定 */
body {
  /* 基本的なbody設定 */
  width: 100%;
  margin: 0;
  padding: 0;
  /* スクロールバー調整はvw単位の調整で対応 */
  box-sizing: border-box;
}

/* スクロールバーがある場合のレイアウト調整 */
body.has-scrollbar {
  /* スクロールバーの幅を考慮した幅設定 */
  /* スクロールバー分を引いた幅で100vw相当の表示部分にする */
  width: calc(100vw - var(--scrollbar-width));
  /* margin-rightは削除 - 幅調整で対応 */
}

/* 固定要素のスクロールバー調整 */
.fixed-element {
  right: calc(var(--scrollbar-width) * var(--scrollbar-visible));
}

/* 全幅要素のスクロールバー調整（必要に応じて使用） */
.full-width-element {
  /* スクロールバー分を引いた幅で100vw相当の表示部分にする */
  width: calc(100vw - var(--scrollbar-width));
  margin-left: calc(-50vw + 50% + (var(--scrollbar-width) / 2));
}

/* スクロールバーがある場合の全幅要素調整 */
body.has-scrollbar .full-width-element {
  /* スクロールバーがある場合は幅を調整 */
  width: calc(100vw - var(--scrollbar-width));
}

/* スクロールバーがない場合の全幅要素調整 */
body.no-scrollbar .full-width-element {
  /* スクロールバーがない場合は通常の100vw */
  width: 100vw;
}

/* モーダルやオーバーレイのスクロールバー調整 */
.modal,
.overlay {
  padding-right: calc(var(--scrollbar-width) * var(--scrollbar-visible));
}

/* 絶対配置要素のスクロールバー調整 */
.absolute-element {
  right: calc(var(--scrollbar-width) * var(--scrollbar-visible));
}

body {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  width: 100%;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
}

/* Common Section Name Style */
.section-name {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-primary);
  font-family: Noto Sans JP;
  font-weight: 700;
  font-size: 2.033rem;
  line-height: 1;
  text-align: center;
  margin-bottom: 0.3rem;
}

.section-name::before {
  content: "";
  width: 1.778rem;
  height: 1.694rem;
  border: 0.4rem solid var(--color-primary);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Common Section Title Style */
.section-title,
.c-section-title {
  font-size: 4rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 1.1rem;
  line-height: 1.3;
}

/* Responsive Design for Section Title */
@media (max-width: 768px) {
  .section-name {
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
  }

  .section-name::before {
    content: "";
    width: 1.427rem;
    height: 1.359rem;
    border: 0.3rem solid var(--color-primary);
  }

  .section-title,
  .c-section-title {
    font-size: 3.6rem;
    line-height: 1;
    padding: 0.24rem 0;
    margin-bottom: 1.4rem;
  }
}

@media screen and (min-width: 769px) {
  .sp {
    display: none;
  }
  .u-only-sp {
    display: none;
  }
}

@media screen and (max-width: 768px) {
  .sp {
    display: block;
  }
  .u-only-sp {
    display: block;
  }
}

@media screen and (min-width: 1024px) {
  .tablet {
    display: none;
  }
}

@media screen and (max-width: 1023px) {
  .tablet {
    display: block;
  }
}

@media screen and (min-width: 769px) {
  .pc {
    display: block;
  }
  .u-only-pc {
    display: block;
  }
}

@media screen and (max-width: 768px) {
  .pc {
    display: none;
  }
  .u-only-pc {
    display: none;
  }
}

/* Common Section Layout */
.section__inner {
  margin: 0 auto;
  padding: 0 2rem;
}

.section__header {
  text-align: center;
  margin-bottom: 6rem;
}

/* Common CTA Button Centering */
.section__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 auto;
}

/* Responsive Design for Common Section Layout */
@media (max-width: 768px) {
  .section__inner {
    padding: 0 1.5rem;
  }

  .section__header {
    margin-bottom: 4rem;
  }
}

/* より具体的な用途別クラス */
.text-bold {
  font-weight: 700;
}

/* Visually hidden (for accessible headings, labels, etc.) */
.u-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;
}

/* Skip link: 通常は視覚的に非表示、フォーカス時のみ表示 */
.u-skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
/* 非対応環境の過度な強調を抑制 */
.u-skip-link:focus {
  outline: none;
}
.u-skip-link:focus-visible {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.8rem 1.2rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 0.4rem;
  z-index: 9999;
  outline: none;
}
