html, body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 100%;
  box-sizing: border-box;
}


header {
  height: 80px;
  background-color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  box-sizing: border-box;
}

.menu-logo,
.social-icons,
.menu-footer-logo {
  display: none;
}

/* ロゴ左寄せ */
.header-logo {
  height: 100%;
  display: flex;
  align-items: center;
}

.header-logo img {
  height: 100px;
  width: auto;
}

/* gnav 横並び・右寄せ（IDセレクタに修正） */
#gnav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

/* メニューリスト横並び＆マーカー削除 */
#gnav ul {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#gnav li {
  margin: 0;
  padding: 0;
  list-style: none;
}

#gnav li a {
  text-decoration: none;
  color: #000;
  font-weight: bold;
  font-size: 30px;
}


/* 今は非表示にしておく部分 */
.menu-logo,
.social-icons,
.menu-footer-logo {
  display: none;
}

/* main */
.slideshow-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: #000;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide img {
  width: 100%;      /* 画面横幅にフィットさせる */
  height: auto;     /* 高さはアスペクト比を保持 */
  display: block;
  object-fit: cover;
}

/* 表示用の fade クラス（必要であれば） */
.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from { opacity: 0.4 }
  to { opacity: 1 }
}

/* スライドショーの親に position: relative を設定 */
.slideshow-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* テキストを中央に重ねて表示 */
.logo-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  white-space: nowrap; /* 改行させない */
  width: 90%; /* 画面幅の9割以内に収める */
  overflow: hidden;
}

.logo-text .title {
  font-size: clamp(2rem, 14vw, 10rem); /* 画面サイズに応じて縮小・拡大 */
  font-weight: bold;
  color: #fff;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
  display: inline-block;
  white-space: nowrap;
  letter-spacing: -0.05em; /* ← 文字間隔を詰める */
}

/* 各文字にアニメーション */
.logo-text .title span {
  opacity: 0;
  display: inline-block;
  animation: fadeIn 1s ease forwards;
}

/* アニメーション定義 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 各文字にディレイを加えて順番に表示 */
.logo-text .title span:nth-child(1) { animation-delay: 0.1s; }
.logo-text .title span:nth-child(2) { animation-delay: 0.2s; }
.logo-text .title span:nth-child(3) { animation-delay: 0.3s; }
.logo-text .title span:nth-child(4) { animation-delay: 0.4s; }
.logo-text .title span:nth-child(5) { animation-delay: 0.5s; }
.logo-text .title span:nth-child(6) { animation-delay: 0.6s; }
.logo-text .title span:nth-child(7) { animation-delay: 0.7s; }
.logo-text .title span:nth-child(8) { animation-delay: 0.8s; }
.logo-text .title span:nth-child(9) { animation-delay: 0.9s; }
.logo-text .title span:nth-child(10) { animation-delay: 1s; }
.logo-text .title span:nth-child(11) { animation-delay: 1.1s; }
.logo-text .title span:nth-child(12) { animation-delay: 1.2s; }
.logo-text .title span:nth-child(13) { animation-delay: 1.3s; }
.logo-text .title span:nth-child(14) { animation-delay: 1.4s; }
.logo-text .title span:nth-child(15) { animation-delay: 1.5s; }
.logo-text .title span:nth-child(16) { animation-delay: 1.6s; }
.logo-text .title span:nth-child(17) { animation-delay: 1.7s; }
.logo-text .title span:nth-child(18) { animation-delay: 1.8s; }
.logo-text .title span:nth-child(19) { animation-delay: 1.9s; }
.logo-text .title span:nth-child(20) { animation-delay: 2s; }
.logo-text .title span:nth-child(21) { animation-delay: 2.1s; }
.logo-text .title span:nth-child(22) { animation-delay: 2.2s; }
.logo-text .title span:nth-child(23) { animation-delay: 2.3s; }
.logo-text .title span:nth-child(24) { animation-delay: 2.4s; }

/* Header */
header {
  height: 80px;
  background-color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  box-sizing: border-box;
}

.menu-logo,
.social-icons,
.menu-footer-logo {
  display: none;
}

/* ロゴ左寄せ */
.header-logo {
  height: 100%;
  display: flex;
  align-items: center;
}

.header-logo img {
  height: 100px;
  width: auto;
}

/* gnav 横並び・右寄せ */
#gnav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

#gnav ul {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#gnav li {
  margin: 0;
  padding: 0;
}

#gnav li a {
  text-decoration: none;
  color: #000;
  font-weight: bold;
  font-size: 25px;
}

/* Main */
.slideshow-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  overflow: hidden;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from { opacity: 0.4 }
  to { opacity: 1 }
}

.logo-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  white-space: nowrap;
  width: 90%;
  overflow: hidden;
}

.logo-text .title {
  font-size: clamp(2rem, 9vw, 6rem);
  font-weight: bold;
  color: #fff;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
  display: inline-block;
  white-space: nowrap;
  letter-spacing: -0.05em;
}

.logo-text .title span {
  opacity: 0;
  display: inline-block;
  animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 各文字にディレイを加えて順番に表示 */
.logo-text .title span:nth-child(1) { animation-delay: 0.1s; }
.logo-text .title span:nth-child(2) { animation-delay: 0.2s; }
/* ...続きのアニメーション定義はそのまま保持... */

/* レスポンシブ対応 */
@media screen and (max-width: 1200px) {
  header {
    padding: 0 20px;
  }

  .header-logo img {
    height: 80px;
  }

  #gnav ul {
    gap: 20px;
  }

  #gnav li a {
    font-size: 18px;
  }
}

@media screen and (max-width: 768px) {
  header {
    padding: 0 10px;
    flex-direction: column;
    height: auto;
  }

  .header-logo img {
    height: 70px;
  }

  #gnav ul {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  #gnav li a {
    font-size: 16px;
  }

  .slideshow-container {
    height: 60vh;
  }

  .logo-text .title {
    font-size: clamp(1.2rem, 6vw, 3.5rem);
  }
}

@media screen and (max-width: 480px) {
  header {
    padding: 0 10px;
  }

  .header-logo img {
    height: 60px;
  }

  #gnav ul {
    flex-direction: column;
    gap: 0px;
    align-items: center;
  }

  #gnav li a {
    font-size: 14px;
  }

  .slideshow-container {
    height: 50vh;
  }

  .logo-text .title {
    font-size: clamp(2rem, 10vw, 6rem);
  }
}


/* その他のセクション */
section {
  min-height: 100vh;
  padding: 60px 40px;
  box-sizing: border-box;
}

section p {
  font-size: 20px;
  line-height: 2;
  margin: 20px;
}

.slide-box {
  transform: translateX(-100%);
  opacity: 0;
  transition: transform 1.2s ease-out, opacity 1.2s ease-out;
  background: white;
  padding: 2rem;
  border: 2px solid #333;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 20px auto;
  width: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 30px; /* 中央揃え用 */
}

.slide-box.visible {
  transform: translateX(0);
  opacity: 1;
}

.slide-box h2 {
  font-size: 36px;
  font-weight: bold;
  color: #000;
  margin: 0;
}

/* hero-contentを横並びにする */
.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px; /* ロゴとテキストの間隔 */
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  flex-wrap: wrap; /* 小画面で折り返し可 */
}

/* ロゴ画像の調整（必要に応じてサイズ変更） */
.hero-logo {
  max-width: auto;
  height: auto;
}

.hero-text {
  max-width: 600px;
  text-align: center; /* ← ここで中央揃え */
}

/* 横並びにする */
.top-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px; /* ロゴとテキストの間隔 */
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  flex-wrap: wrap; /* 小画面で折り返し可 */
}

.container {
  max-width: 900px;
  margin: 30px auto 0;
  width: 100%;
  overflow: visible;
  position: relative;
}

.slick-img {
  height: auto; 
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 10px; /* マージンとして作用 */
}

.slick-img img {
  width: 100%;
  height: auto; 
  object-fit: contain; /* 縦横比を保ちつつ画像を収める */
  opacity: 0.3;
  transform: scale(0.8);
  transition: opacity 0.5s, transform 0.5s;
  display: block;
}

.slider {
  height: auto;
  overflow: visible;
}

.slider .slick-center img {
  opacity: 1;
  transform: scale(1);
}

/* 拡大モード */
.expanded {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
object-fit: contain; /* 比率維持 */
z-index: 9999;
background-color: rgba(0, 0, 0, 0.9);
margin: 0;
padding: 0;
}

.overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.7);
z-index: 9998;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .slick-img {
    padding: 10px; /* 画像の周りに10pxのパディング */
  }

  .slick-img img {
    opacity: 1;
    transform: scale(1);
  }
}

.temp-gallery h2,
.temp-gallery p {
  margin: 0 auto;
  display: block;
  text-align: center;
}

.temp-gallery p {
  margin: 20px;
}

/* フッター全体のスタイル */
footer {
  background-color: #f8f8f8;
  padding: 30px 20px;
  font-size: 16px;
  color: #333;
}

/* 上段：ロゴ・住所・70thロゴを横並び */
.office {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* 小さい画面で折り返し */
  gap: 20px;
}

/* サンテェムロゴ */
.footer-logo img {
  width: 250px;
  height: auto;
}

/* 住所 */
.address-box {
  flex: 1;
  min-width: 200px;
}

.address {
  list-style: none;
  padding: 0;
  margin: 0;
}

.address li {
  margin-bottom: 4px;
}

/* 70周年ロゴ */
.footer-70throgo img {
  width: 120px;
  height: auto;
}

/* 下段：フッターナビ */
.footer-navi {
  margin-top: 30px;
  text-align: center;
}

.footer-navi ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.footer-navi li a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
}

.footer p {
 text-align: center;
}

/* 通常時は非表示 */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 25px;
  cursor: pointer;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
}

.hamburger .bar {
  width: 100%;
  height: 4px;
  background-color: #333;
  border-radius: 5px;
  transition: 0.4s ease;
  transform-origin: center;
}

/* ✕に変形 */
.hamburger.open .bar:nth-child(1) {
  transform: rotate(45deg);
  position: absolute;
}

.hamburger.open .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.open .bar:nth-child(3) {
  transform: rotate(-45deg);
  position: absolute;
}

/* ナビゲーション初期状態（PC用） */
#gnav {
  display: flex;
  gap: 20px;
}

/* レスポンシブ時の設定 */
@media screen and (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  #gnav {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 60px 20px 20px;
    gap: 20px;
    height: 90vh;
    overflow-y: auto;
  }

  #gnav.show {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 0;
    padding: 50px;
  }

/* 上部ロゴ */
  .menu-logo {
  text-align: center;
  margin: 0;
  padding: 0;
  }

  .menu-logo,
  .menu-footer-logo {
    display: block;
  }

  .menu-logo img,
  .menu-footer-logo img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  #gnav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1; /* 中央部に伸びてスペースを確保 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

  #gnav ul li {
    padding: 10px 0;
  }

  #gnav ul li a {
    color: #000;
    font-size: 26px;
    text-decoration: none;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  }

  #gnav ul li a:hover::after {
    width: 100%;
  }

  .social-icons {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 20px;
  }

  /* 下部ロゴ */
 .menu-footer-logo {
  text-align: center;
  margin-top: 10px;
  }
}

@media screen and (max-width: 768px) {
  /* ヘッダーの高さを調整 */
  header {
    height: 60px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  /* ロゴ画像を少し小さく */
  header img {
    height: 50px;
    width: auto;
  }

  .hero-logo {
    height: 150px;
    margin-top: 50px;
  }

  .hero-text p {
    margin: 0;
    text-align: center;
  }

  .hero-content {
    margin: 0 !important;
    padding: 0 !important; /* 必要に応じて */
  }

  .top-message p {
    margin: 0;
    margin-top: 40px;
  }

  /* セクション全体のパディングを調整 */
  section {
    padding: 40px 20px;
  }

  /* セクションタイトル（h2）を小さめに */
  section h2 {
    font-size: 16px;
    margin-bottom: 15px;
    text-align: center;
  }
  

  /* 段落の文字サイズを調整 */
  section p {
    font-size: 12px;
    line-height: 2.5;
    text-align: justify;
  }

/* .slide-box 調整 */
.slide-box {
  max-width: 100%;
  height: 50px;
  overflow-x: auto;
  margin: 0 auto;
  padding: 0 10px;
}

.slide-box h2 {
  font-size: 22px;
  font-weight: bold;
  color: #000;
  margin: 0;
}

.slide-box img, .slide-box video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

  /* ナビメニュー（開いた時）のロゴも少し小さく */
  .menu-logo img {
    max-width: 120px;
    height: auto;
    margin-bottom: 20px;
  }

  /* ハンバーガーで開いたメニューのリンクも少し余白を調整 */
  #gnav ul li {
    padding: 10px 0;
  }

  #gnav ul li a {
    font-size: 20px;
  }
}

.footer-70throgo .hero-logo {
  margin: 0;
}

/* フッターナビゲーション（通常時、PC） */
.footer-navi ul.footer-center {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
}

.footer-navi ul.footer-center li {
  margin-right: 10px;
}

.footer-navi ul.footer-center li a {
  display: block;
  text-align: left;
}

/* レスポンシブ時 */
@media screen and (max-width: 768px) {
  .footer-navi ul.footer-center {
      display: flex;
      flex-direction: column; /* 縦並び */
      align-items: center; /* 左揃え */
      padding: 0;
      margin: 0;
  }

  .footer-navi ul.footer-center li {
      margin-bottom: 10px;
      max-width: 200px;
      width: 100%;
      padding: 0;
      line-height: 0.6;
  }

  .footer-navi ul.footer-center li a {
      display: block;
      text-align: left;
      white-space: nowrap;
  }
}

/* 個別指定バージョン */
#gnav ul li a,
.footer-navi ul li a {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: #333;
  font-weight: normal;
  transition: color 0.3s;
}

#gnav ul li a::after,
.footer-navi ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #0044CC;
  transition: width 0.3s;
  transform: translateX(-50%);
}

#gnav ul li a:hover,
.footer-navi ul li a:hover {
  color: #000;
}

#gnav ul li a:hover::after,
.footer-navi ul li a:hover::after {
  width: 100%;
}

#gnav ul li a {
  font-weight: bold;
}

.no-scroll {
  overflow: hidden;
  height: 100vh;
}

@media screen and (min-width: 1024px) {
  header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  body {
    padding-top: 80px; /* ヘッダーの高さ分余白 */
  }
}

/* ① モバイル時にヘッダーを完全に消す */
@media (max-width: 768px) {
  #header {
    background: none !important;   /* 白背景を消す */
    height: 0 !important;          /* 高さをゼロに */
    overflow: hidden !important;   /* 中身を隠す */
    padding: 0 !important;         /* 余白をゼロに */
    border: 0 !important;          /* 枠線があれば消す */
  }
}

/* ② mobile-header の “はみ出し／切れ” 対策 */
.mobile-header {
  box-sizing: border-box;          /* padding を含めて幅100% */
}

@media (max-width: 768px) {
  .mobile-header {
    width: 100%;
    left: 0;
    right: 0;                      /* iOSで横スクロール抑制 */
  }

  /* ハンバーガーバーが切れないよう幅を 100% 指定 */
  .mobile-hamburger {
    width: 30px;                   /* 外枠 */
  }
  .mobile-hamburger .bar {
    width: 100%;                   /* バーを全幅に */
  }
}

/* スライドが最初に重ならないように最初の画像に表示を設定 */
.slide {
  display: none;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  display: block;
  opacity: 1;
}



#history {
  font-family: Georgia, 'Times New Roman', serif;
  background: #f5f1e9;
  color: #333;
  margin: 0;
  padding-top: 30px;
  line-height: 1.7;
  word-wrap: break-word;
}

.era-tabs {
  display: flex;
  justify-content: center;
  padding: 30px 15px;

  border-bottom: 2px solid #999;
}

.era-tabs .tab {
  background: #c2b59b;
  border: none;
  padding: 15px 30px;
  margin: 0 10px;
  font-weight: bold;
  font-family: 'Georgia', serif;
  cursor: pointer;
  font-size: 20px;
  letter-spacing: 1px;
  transition: background 0.2s;
}

.era-tabs .tab.active {
  background: #3b3b3b;
  color: #fff;
}

.slider-container {
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.slide-wrapper {
  display: none;
}

.slide-wrapper.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #555;
  padding: 0 10px;
}

.slides {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px;
  scrollbar-width: none;
}

.slides::-webkit-scrollbar {
  display: none;
}

.card {
  background: #fff;
  border: 1px solid #555;
  box-shadow: 4px 4px 0 #999;
  width: 300px;
  min-width: 300px;
  padding: 15px;
  font-size: 14px;
  line-height: 1.6;
  height: 500px;
}

.card img {
  width: 100%;
  height: auto;
  margin-bottom: 10px;
}

.card h3 {
  font-size: 4rem;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 10px;
  border-bottom: 1px dotted #999;
  padding-bottom: 5px;
}

.card p {
  margin: 0;
  font-size: 1.2rem;
  word-wrap: break-word;
}

.card.final-card {
  background: #111;
  color: #fff;
  border: 1px solid #555;
  box-shadow: 4px 4px 0 #999;
  width: 300px;
  min-width: 300px;
  padding: 15px;
  font-size: 14px;
  line-height: 1.6;
  height: 500px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  display: flex;
}

.card.final-card h3 {
  font-size: 2.8rem;
  margin-top: 80px;
  margin-bottom: 10px;
  color: #fff;
}

.card.final-card p {
  font-size: 2.5rem;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #c2b59b;
}

.card.final-card .highlight {
  font-size: 2.5rem;
  margin-bottom: 5px;
  font-weight: bold;
}

.card.final-card .future {
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 1px;
  color: #fff;
  flex-wrap: nowrap;
}


/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .slides {
    overflow: auto;
    justify-content: center;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  .card {
    display: none;
    width: 90vw;
    min-width: unset;
    height: 100vw;
    aspect-ratio: 3 / 5; /* 縦長のカード比率 */
    padding: 15px;
    box-sizing: border-box;
  }

  .card .card-content {
    font-size: 5vw; /* モバイルではフォントサイズをさらに小さく */
  }

  .card.active {
    display: block;
  }

  .card img {
    max-height: 40%;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto 10px auto;
  }

  .card h3 {
    font-size: 80px ;
  }

  .card p {
    font-size: 20px;
  }

  .card.final-card h3 {
    font-size: 4rem;
  }

  .card.final-card p {
    text-align: center;
    font-size: 3rem;
  }

  .card.final-card .highlight {
    font-size: 2.5rem;
  }

  .card.final-card .future {
    font-size: 2rem;
    
  }

  .card.final-card {
    display: none;
    width: 90vw;
    min-width: unset;
    height: 100vw;
    padding: 15px;
    box-sizing: border-box;
  }

  .card.active {
    display: block;
  }

  .arrow {
    display: inline-block;
  }
}

@media screen and (max-width: 550px) {
  .era-tabs {
    flex-wrap: wrap;
    gap: 10px;
  }

  .era-tabs .tab {
    padding: 8px 12px;
    font-size: 14px;
  }

  .card h3 {
    font-size: 40px ;
  }

  .card p {
    font-size: 14px;
  }


  .arrow {
    font-size: 1.5rem;
  }

  .card.final-card h3 {
    font-size: 2rem;
    margin-top: 80px;
    margin-bottom: 10px;
    color: #fff;
  }

  .card.final-card .highlight {
    font-size: 1.5rem;
    color: #c2b59b;
  }

  .card.final-card .future {
    font-size: 1rem;
    flex-wrap: wrap;
}
}
.arrow {
  background: #3b3b3b;
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;              /* ← 中央揃え用 */
  align-items: center;        /* 縦中央 */
  justify-content: center;    /* 横中央 */
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.arrow span {
  display: inline-block;
  position: relative;
  top: -1px; /* ← 矢印だけ1px上に動く！ */
}

.arrow:hover {
  background: #555;
  transform: scale(1.1);
}


@media screen and (max-width: 768px) {
  .slides {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 0 10vw; /* 中央に表示されるように左右に余白 */
  }

  .card {
    flex: 0 0 80vw;
    height: auto;
    margin: 0 5vw;
    scroll-snap-align: center;
    box-sizing: border-box;
    aspect-ratio: 3 / 5;
    display: block; /* 全部表示して、スナップで切り替える */
  }

  .arrow {
    display: inline-block;
  }
}


/* 画面幅が768px以下の場合 */
@media screen and (max-width: 768px) {
  .slides {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }

  .card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 80vw;  /* 画面幅の80%に設定 */
    margin: 0 10px;  /* 横のマージン */
    background-color: #fff;
    box-sizing: border-box;
    border-radius: 8px;
    overflow: hidden;
  }

  .card img {
    width: 100%;
    height: auto;
    object-fit: contain;
    margin-bottom: 10px;
  }

  .card h3 {
    font-size: 1.6rem;
    text-align: center;
    margin: 10px 0;
  }

  .card p {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 10px;
  }

  /* 矢印の位置をカード外に */
  .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    z-index: 10;
  }

  .arrow.left {
    left: 5px;
  }

  .arrow.right {
    right: 5px;
  }

  .slides::-webkit-scrollbar {
    height: 8px;
  }

  .slides::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
  }
}

/* スライダーコンテナの外枠 */
.slider-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* カードの親：横スクロール対応 */
.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 16px;
  padding: 16px;
  scroll-behavior: smooth;
}

/* 各カード */
.card {
  flex-shrink: 0;
  scroll-snap-align: start;
  background-color: #fff;
  padding: 16px;
  border-radius: 10px;
  box-sizing: border-box;
  width: 100%;
  max-width: 90%; /* スマホでは1枚がほぼ全幅 */
  margin: auto;
}

/* 画像サイズがはみ出さないように */
.card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-bottom: 12px;
}

/* タイトル・テキスト調整（必要に応じて） */
.card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}
.card p {
  margin: 0 0 8px;
  font-size: 1rem;
}

/* PCでは3枚横並び */
@media screen and (min-width: 768px) {
  .card {
    width: calc((100% - 64px) / 3); /* gap 16px * 2 + 1枚分の余白 */
    max-width: none;
  }
}

@media screen and (max-width: 768px) {
  .card.final-card {
    display: block;
    width: 90vw;
    height: auto;
    aspect-ratio: 3 / 5;
    padding: 15px;
    box-sizing: border-box;
  }

  .card.final-card h3,
  .card.final-card p,
  .card.final-card .highlight,
  .card.final-card .future {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .arrow {
    display: none;  /* スマホ表示時に矢印を非表示にする */
  }
}