﻿@media screen and (min-width: 769px) {
/* ============================================================
   7. セクション3: サービス・制作実績
   ============================================================ */

.sec-3 {
  position: relative;
  width: 100%;
  max-width: var(--content-max-width);
  min-height: 773px;
  margin: 0 auto;
  overflow-x: clip;
  /* 横のはみ出しのみカットする */
  background: #FFFFFF;
  z-index: 1;
}

.sec-3__inner {
  position: relative;
  width: 1920px;
  min-height: 773px;
  top: 0;
  left: calc(50% - 960px);
  pointer-events: auto;
  padding-top: 447px;
  padding-bottom: 164px; /* 80px(元余白) + 84px(セクション4とのマージン分) = 164px */
}

/* --- 背景 --- */
.sec-3__bg {
  position: absolute;
  width: 1920px;
  height: 100%;
  left: 0;
  top: 0;
  background: url('../images/sec3/背景.png') no-repeat center top;
  background-size: 1920px 773px;
  z-index: 1;
}

/* 擬似要素でハニカム背景を白へシームレスにフェードアウト */
.sec-3__bg::after {
  content: "";
  position: absolute;
  top: 573px; /* 773pxの200px上から白へのグラデーションを開始 */
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
  pointer-events: none;
}

/* --- 01 タイトル --- */
.sec-3__title-1 {
  position: absolute;
  width: 880px;
  height: 241px;
  left: calc(50% - 880px/2);
  top: 30px;
  background: url('../images/sec3/01.png') no-repeat center center / contain;
  z-index: 2;
  overflow: hidden;
  /* 光がはみ出ないように追加 */
}

/* --- タイトルの光が流れるアニメーション --- */
.sec-3__title-1::after {
  content: "";
  position: absolute;
  width: 40%;
  height: 100%;
  top: 0;
  left: -40%;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.15) 30%,
      rgba(255, 255, 255, 0.5) 50%,
      rgba(255, 255, 255, 0.15) 70%,
      transparent 100%);
  z-index: 3;
  pointer-events: none;
  /* ボタンと同じアニメーションを流用 */
  animation: sweepLight 4s ease-in-out infinite;
}

/* --- 注意書きテキスト --- */
.sec-3__note {
  position: absolute;
  width: 299px;
  height: 24px;
  left: calc(50% - 299px/2 - 0.5px);
  top: 205px;
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  text-align: center;
  color: #333333;
  z-index: 2;
}

/* --- 制作実績 見出し --- */
.sec-3__heading {
  position: absolute;
  width: 100px;
  height: 38px;
  left: calc(50% - 100px/2);
  top: 269px;
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 25px;
  line-height: 150%;
  text-align: center;
  color: #333333;
  z-index: 2;
}

.sec-3__line {
  position: absolute;
  width: 55px;
  height: 0px;
  left: calc(50% - 55px/2 + 0.5px);
  top: 312px;
  border-top: 1px solid #333333;
  z-index: 2;
}

/* --- タブ切り替えUI --- */
.sec-3__tab-bg {
  position: absolute;
  width: 1200px;
  height: 35px;
  left: 360px;
  top: 362px;
  background: #D9D9D9;
  border-radius: 100px;
  z-index: 2;
}

.sec-3__tab-active {
  position: absolute;
  width: 600px;
  height: 35px;
  left: 360px;
  top: 362px;
  background: #1E333B;
  border-radius: 100px;
  z-index: 3;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.sec-3__tab-active.is-right {
  transform: translateX(600px);
}

.js-tab-btn {
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 4;
  /* 背景より上に配置してクリック可能にする */
}

.is-active-tab {
  color: #FFFFFF;
}

.is-inactive-tab {
  color: #1E333B;
}

.sec-3__tab-text-left {
  position: absolute;
  width: 600px;
  height: 35px;
  left: 360px;
  top: 362px;
  line-height: 35px;
  /* 一行中央揃え */
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  z-index: 4;
}

.sec-3__tab-text-right {
  position: absolute;
  width: 600px;
  height: 35px;
  left: 960px;
  top: 362px;
  line-height: 35px;
  /* 一行中央揃え */
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  z-index: 4;
}

/* --- 動的コンテンツエリア --- */
.sec-3__dynamic-content {
  position: relative;
  width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 61px;
  /* グリッド部とボタンの間隔 Figma値 */
  z-index: 2;
}

/* --- 制作実績 グリッド --- */
.sec-3__works-grid {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 282px);
  column-gap: 24px;
  row-gap: 26px;
}

.sec-3__work-item {
  position: relative;
  width: 282px;
  height: 282px;
  background: #D9D9D9;
  overflow: hidden;
  /* 拡大時にはみ出ないように制御 */
  cursor: pointer;
  /* クリックできることを提示 */
}


.sec-3__work-img {
  position: absolute;
  width: 282px;
  height: 235px;
  left: 0;
  top: 23px;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ホバー時の拡大アニメーション */
.sec-3__work-item:hover .sec-3__work-img {
  transform: scale(1.08);
}

.delay-1 {
  transition-delay: 0.05s;
}

.delay-2 {
  transition-delay: 0.10s;
}

.delay-3 {
  transition-delay: 0.15s;
}

.delay-4 {
  transition-delay: 0.20s;
}

.delay-5 {
  transition-delay: 0.25s;
}

.delay-6 {
  transition-delay: 0.30s;
}

.delay-7 {
  transition-delay: 0.35s;
}

.delay-8 {
  transition-delay: 0.40s;
}

.delay-9 {
  transition-delay: 0.45s;
}

.delay-10 {
  transition-delay: 0.50s;
}

.delay-11 {
  transition-delay: 0.55s;
}

.delay-12 {
  transition-delay: 0.60s;
}

.delay-13 {
  transition-delay: 0.65s;
}

.delay-14 {
  transition-delay: 0.70s;
}

.delay-15 {
  transition-delay: 0.75s;
}

.delay-16 {
  transition-delay: 0.80s;
}

/* ============================================================
   もっと見る ボタン
   ============================================================ */
.sec-3__more-btn {
  position: relative;
  width: 500px;
  height: 40px;
  background: #FFFFFF;
  border: 1px solid #1E333B;
  border-radius: 100px;
  box-sizing: border-box;
  z-index: 2;
  transition: all 0.3s ease;
  cursor: pointer;
  display: block;
  text-decoration: none;
}

.sec-3__more-text {
  position: absolute;
  width: 80px;
  height: 24px;
  left: 210px;
  /* 500pxの中央 */
  top: 7px;
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  line-height: 150%;
  text-align: center;
  color: #1E333B;
  transition: color 0.3s ease;
}

/* 矢印パーツ（1要素で隙間なし） */
.sec-3__more-chevron {
  position: absolute;
  width: 8px;
  height: 8px;
  left: 310px;
  top: 13px;
  border-right: 2px solid #1E333B;
  border-bottom: 2px solid #1E333B;
  transform: rotate(45deg);
  transition: border-color 0.3s ease;
}

/* ホバーエフェクト（背景色と文字色の反転） */
.sec-3__more-btn:hover {
  background: #1E333B;
}
.sec-3__more-btn:hover .sec-3__more-text {
  color: #FFFFFF;
}
.sec-3__more-btn:hover .sec-3__more-chevron {
  border-color: #FFFFFF;
}

} /* end @media PC */

/* ============================================================
   ブレークポイント非依存（PC/SP共通）
   ============================================================ */

/* --- タブ切り替え時のフェードアニメーション --- */
.is-tab-fade {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.is-tab-fade.is-tab-visible {
  opacity: 1;
  transform: translateY(0);
}

.js-work-item {
  cursor: pointer;
}

/* ============================================================
   Lightbox (拡大表示) - PC/SP共通
   ============================================================ */
.sec-3__lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sec-3__lightbox.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sec-3__lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

.sec-3__lightbox-content {
  position: relative;
  background: #EEEEEE;
  padding: 40px;
  border-radius: 10px;
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sec-3__lightbox-img {
  display: block;
  width: auto;
  height: 85vh;
  max-width: 90vw;
  object-fit: contain;
}

.sec-3__lightbox-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 35px;
  height: 35px;
  background: #EEEEEE;
  border: none;
  border-radius: 50%;
  color: #000;
  font-size: 20px;
  font-family: sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background 0.2s;
}

.sec-3__lightbox-close:hover {
  transform: scale(1.1);
  background: #fff;
}
