/*
  front-page.css
  front-page.php(トップページ)専用のスタイルをまとめるファイル。
  ヒーローセクションやWorks抜粋セクションなど、トップページにしか出てこない要素をここに書く。
*/

/* ===== メインビジュアルスライダー(Swiper fadeエフェクト) ここから ===== */
/* 不要になった場合はこのブロックとfront-page.php内の<!-- メインビジュアルスライダー -->を削除すればOK */
.mv-slider {
  position: relative;
  width: 100%;
  height: 100vh;
}

/* 画像の明るさに関わらず白文字が読めるよう、全体に暗いオーバーレイ(スクリム)を重ねる */
.mv-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 5;
  pointer-events: none;
}

/* メインビジュアル上に重ねる文字(Hello & Welcome!)。左右からフワッとフェードインする */
.mv-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.3em;
  color: #fff;
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.mv-text-part {
  opacity: 0;
}

@keyframes mv-text-fade-left {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes mv-text-fade-right {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mv-text-left {
  animation: mv-text-fade-left 0.8s ease forwards;
}

.mv-text-right {
  animation: mv-text-fade-right 0.8s ease forwards;
}

/* 左・右・左の順に少しずつ遅らせて表示 */
.mv-text-part:nth-child(1) {
  animation-delay: 0.3s;
}

.mv-text-part:nth-child(2) {
  animation-delay: 0.7s;
}

.mv-text-part:nth-child(3) {
  animation-delay: 1.1s;
}

@media (max-width: 768px) {
  .mv-text {
    font-size: 1.75rem;
    white-space: normal;
  }
}

.mv-swiper {
  width: 100%;
  height: 100%;
}

.mv-swiper .swiper-slide {
  width: 100%;
  height: 100%;
}

.mv-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* スマホサイズ(〜768px)ではビジュアルを少し短くして縦スクロールしやすくする */
@media (max-width: 768px) {
  .mv-slider {
    height: 60vh;
  }
}
/* ===== メインビジュアルスライダー ここまで ===== */

/* ===== 制作実績抜粋(横スクロール+カスタムスクロールバー) ここから ===== */
/* chiburutechpro.comのnews_sectionを参考に実装。不要になった場合はこのブロックとfront-page.php内の該当箇所・js/works-track.jsを削除すればOK */
.works-highlight {
  padding: 30px 0;
}

.front-title {
  font-size: 2.5rem;
  margin-bottom: 25px;
  position: relative;
}

/* 見出しの下に短い線を引き、見出しだと一目で分かるようにする */
.front-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: #3f955b;
}

@media (max-width: 768px) {
  .front-title {
    font-size: 1.75rem;
    margin-bottom: 20px;
  }
}

.track-wrap {
  overflow: hidden;
}

/* 横スクロールの本体。ブラウザ標準のスクロールバーは隠し、下の自作バーで操作する */
.track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.track .card {
  flex: 0 0 260px;
}

@media (min-width: 769px) {
  .track .card {
    flex: 0 0 380px;
  }
}

.track .card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.track .card .thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.track .card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.track .card:hover .thumb img {
  transform: scale(1.05);
}

.track .card .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.track .card .date {
  font-size: 14px;
  color: #767676;
}

.track .card h3 {
  margin: 12px 0 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}

/* 自作スクロールバー */
.scrollbar-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 40px;
}

.scrollbar-track {
  position: relative;
  flex: 1 1 auto;
  height: 6px;
  background: #e5e5e5;
  border-radius: 3px;
  cursor: pointer;
}

.scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 0;
  height: 6px;
  width: 20%;
  border-radius: 3px;
  background: #000;
  cursor: grab;
  touch-action: none;
}

.scrollbar-thumb:active {
  cursor: grabbing;
}

@media (max-width: 768px) {
  .scrollbar-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .scrollbar-wrap .btn-black {
    margin: 0 auto;
  }
}
/* ===== 制作実績抜粋 ここまで ===== */

/* ===== スキル ここから ===== */
/* 不要になった場合はこのブロックとfront-page.php内の該当箇所を削除すればOK */
.skills {
  padding: 30px 0;
}

.skills-table {
  width: 100%;
  border-collapse: collapse;
}

.skills-table th,
.skills-table td {
  padding: 20px;
  text-align: left;
  border: 1px solid #ddd;
}

.skills-table th {
  width: 240px;
  font-weight: 700;
  background-color: #f5f5f5;
}

/* スマホではth/tdをブロック化して縦積みにする */
@media (max-width: 768px) {
  .skills-table,
  .skills-table tbody,
  .skills-table tr,
  .skills-table th,
  .skills-table td {
    display: block;
    width: 100%;
  }

  .skills-table tr {
    margin-bottom: 0;
  }

  .skills-table th {
    border-bottom: none;
    padding-bottom: 8px;
  }

  .skills-table td {
    padding-top: 0;
    border-bottom: none;
  }

  .skills-table tr:last-child td {
    border-bottom: 1px solid #ddd;
  }
}
/* ===== スキル ここまで ===== */

/* ===== プロフィール ここから ===== */
/* 不要になった場合はこのブロックとfront-page.php内の該当箇所を削除すればOK */
.profile {
  padding: 30px 0;
}

.profile-inner {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.profile-text {
  flex: 1 1 0;
}

.profile-image {
  flex: 0 0 400px;
}

.profile-image img {
  width: 100%;
  height: auto;
  display: block;
}

.profile-history dt {
  font-weight: 700;
  line-height: 1.4;
}

.profile-history dt:first-child {
  margin-top: 0;
}

.profile-history dd {
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .profile-inner {
    flex-direction: column;
  }

  .profile-image {
    flex: 0 0 auto;
    width: 100%;
  }
}
/* ===== プロフィール ここまで ===== */

/* ===== お問合せ ここから ===== */
/* 不要になった場合はこのブロックを削除すればOK */
.contact {
  padding: 30px 0;
}
/* ===== お問合せ ここまで ===== */

/* セクション上下の余白を統一(PC: 30px、スマホ: 20px) */
@media (max-width: 768px) {
  .works-highlight,
  .skills,
  .profile,
  .contact {
    padding: 20px 0;
  }
}
