@charset "UTF-8";

:root {
  --main-color: #491f24;
  --pilatesmusk-color: #b3b3b3;
  --naturafit-color: #00a199;
  --andmake-color: #d7a735;
}

/************************************
** init
************************************/
.top #content {
  padding-top: 0;
}
.l-content {
  margin: 0 auto;
  padding-top: 0;
}
.fw {
  margin-right: calc(50% - 50vw);
  margin-left: calc(50% - 50vw);
}
.inner-wrap,
.wrap {
  width: 1200px;
  margin: 0 auto;
  padding: 60px 0;
}
.pc {
  display: block;
}
.sp {
  display: none;
}
@media screen and (max-width: 480px) {
  .inner-wrap,
  .wrap {
    width: auto;
    padding: 30px 0;
  }
  .sp {
    display: block;
  }
  .pc {
    display: none;
  }
}

/************************************
** 
************************************/
.heading {
  text-align: center;
  margin-bottom: 90px;
  h2 {
    position: relative;
    color: #444;
    font-size: 24px;
    font-weight: normal;
    letter-spacing: 0.15em;
    &:before {
      content: "";
      position: absolute;
      bottom: -15px;
      display: inline-block;
      width: 60px;
      height: 5px;
      left: 50%;
      -webkit-transform: translateX(-50%);
      transform: translateX(-50%);
      background-color: var(--main-color);
      border-radius: 2px;
    }
  }
  span.s1 {
    font-size: 32px;
  }
}
.link a {
  font-size: 20px;
  color: #222;
  i {
    padding-left: 1em;
  }
  &:hover {
    opacity: 0.7;
    transition: all 0.5s ease;
  }
}
@media screen and (max-width: 480px) {
  .heading {
    h2 {
      font-size: 18px;
    }
    span.s1 {
      font-size: 24px;
    }
  }
}
/************************************
** news
************************************/
/* タブ全体のコンテナ */
.news .tab-container {
  position: relative;
  width: 100%;
  overflow: hidden; /* フェード演出のはみ出し防止 */
}

/* タブリスト：スマホでスクロール、PCで等幅 */
.news .tab-container ul {
  margin: 0;
  padding: 20px;
  list-style: none;
  display: flex;
  gap: 8px;
  margin-bottom: 0;
  overflow-x: auto; /* 横スクロール有効 */
  white-space: nowrap; /* 改行禁止 */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox スクロールバー非表示 */
}

/* Chrome, Safari スクロールバー非表示 */
.news .tab-container ul::-webkit-scrollbar {
  display: none;
}

.news .tab-container ul li {
  flex: 1; /* PCでは均等割り */
  min-width: fit-content; /* 文字数に合わせて幅を確保 */
  padding: 12px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  color: #666;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  -webkit-tap-highlight-color: transparent; /* スマホタップ時の色消し */
}

/* 選択状態とホバー */
.news .tab-container ul li.selected {
  color: #fff;
  background: var(--main-color);
  border-color: var(--main-color);
  box-shadow: 0 4px 12px rgb(179 179 179);
  transform: translateY(-2px);
}

.news .tab-container ul li:not(.selected):hover {
  border-color: var(--main-color);
  color: var(--main-color);
  transform: translateY(-1px);
}

/* カテゴリー別カラー設定（共通パーツ化） */
.news .tab-container ul li:nth-child(2).selected,
.news .tab-container ul li:nth-child(2):not(.selected):hover {
  background: var(--pilatesmusk-color);
  border-color: var(--pilatesmusk-color);
  color: #fff;
}
.news .tab-container ul li:nth-child(3).selected,
.news .tab-container ul li:nth-child(3):not(.selected):hover {
  background: var(--naturafit-color);
  border-color: var(--naturafit-color);
  color: #fff;
}
.news .tab-container ul li:nth-child(4).selected,
.news .tab-container ul li:nth-child(4):not(.selected):hover {
  background: var(--andmake-color);
  border-color: var(--andmake-color);
  color: #fff;
}

/* タブコンテンツの表示・非表示 */
.news .tab-container .tab-content {
  display: none;
  padding: 24px;
  min-height: 150px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin: 0 20px 20px 20px;
}

.news .tab-container .tab-content.selected {
  display: block;
  animation: tabFadeIn 0.4s ease; /* ふわっと表示 */
}

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

/* --- コンテンツ内部スタイル --- */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.news-link {
  display: flex;
  gap: 20px;
  text-decoration: none;
  color: inherit;
  padding: 15px;
  border-radius: 8px;
  transition: background 0.3s;
}
.news-link:hover {
  background-color: #f9f9f9;
}

.news-img {
  width: 200px;
  flex-shrink: 0;
}
.news-img img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 5px;
}
.news-body {
  flex-grow: 1;
}
.post-title {
  margin: 10px 0;
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
}
.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.post-meta .cat-label {
  display: inline-block;
  width: auto; /* 幅を自動に */
  min-width: 120px; /* 最低幅を確保 */
  padding: 3px 15px;
  border-radius: 5px;
  color: #fff;
  text-align: center;
  font-size: 0.8rem;
}
/* カテゴリーラベルの色 */
.cat-label.cat-pilatesmusk {
  background: var(--pilatesmusk-color);
}
.cat-label.cat-naturafit {
  background: var(--naturafit-color);
}
.cat-label.cat-andmake {
  background: var(--andmake-color);
}
.post-excerpt {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
}

/* --- スマホ・タブレット用の調整 --- */
@media (max-width: 767px) {
  /* スマホでのみ「続きがある」フェードを表示 */
  .news .tab-container::after {
    content: "";
    position: absolute;
    top: 20px; /* ulのpaddingに合わせる */
    right: 0;
    width: 50px;
    height: 50px; /* タブの高さに合わせる */
    background: linear-gradient(
      to right,
      rgba(255, 255, 255, 0),
      rgba(255, 255, 255, 0.9)
    );
    pointer-events: none; /* クリックを邪魔しない */
    z-index: 2;
  }
  .news .tab-container ul {
    flex: none; /* 均等割りを解除 */
    padding-right: 50px; /* フェードで見えなくなる分を確保 */
  }
  .news .tab-container ul li {
    flex: 0 0 auto; /* 潰れないように固定 */
    padding: 10px 15px;
    font-size: 0.9rem;
  }
  .news .tab-container .tab-content {
    margin: 0 10px 20px 10px; /* 余白を少し詰める */
    padding: 15px;
  }
  .news-link {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }
  .news-img {
    width: 100%;
  }
  .news-img img {
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .post-meta {
    flex-direction: row; /* 横並び維持 */
    font-size: 0.8rem;
  }
}
