/* ============================================================
   トップページ固有スタイル
============================================================ */

/* --- ヒーロースライダー --- */
.hero {
  position: relative;
  width: 100%;
  /* SP：画像アスペクト比（3:2）に合わせる */
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--color-dark);
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease-in-out;
}

.hero__slide.is-active {
  opacity: 1;
}

.hero__slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* スライド2（レール）：右寄りにシフトしてレール断面をメインに */
.hero__slide:nth-child(2) .hero__slide-img {
  object-position: 50% 120%;  /* 右寄り・垂直中央 */
  transform: scale(1.3);
}

/* 暗めオーバーレイ＋左グラデーション */
.hero__slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(20,12,6,.72) 0%,
    rgba(20,12,6,.45) 50%,
    rgba(20,12,6,.2) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: var(--space-md) var(--pad-sp) 0 var(--pad-sp);
}

.hero__catch {
  font-family: var(--font-serif);
  font-size: var(--text-h3);
  font-weight: 300;
  color: var(--color-bg);
  line-height: 1.6;
  letter-spacing: .08em;
  margin-bottom: var(--space-xs);
}

.hero__sub {
  font-size: var(--text-xsmall);
  color: rgba(255,255,255,.75);
  line-height: 1.8;
  font-family: var(--font-sans);
  font-weight: 300;
  margin-bottom: var(--space-md);
  max-width: 360px;
}

/* ドットインジケーター */
.hero__dots {
  position: absolute;
  bottom: var(--space-sm);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: var(--space-xs);
}

.hero__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .2s, transform .2s;
}

.hero__dot.is-active {
  background: var(--color-bg);
  transform: scale(1.3);
}

/* PC：固定高さ580px */
@media (min-width: 768px) {
  .hero {
    height: 580px;
    aspect-ratio: unset;
  }

  .hero__content {
    justify-content: center;
    padding: 0 var(--pad-pc) 0 83px;
  }

  .hero__catch {
    font-size: var(--text-hero);
    margin-bottom: var(--space-md);
  }

  .hero__sub {
    font-size: var(--text-small);
    margin-bottom: var(--space-lg);
    max-width: 560px;
  }

  .hero__dots {
    bottom: var(--space-md);
  }

  .hero__dot {
    width: 8px;
    height: 8px;
  }
}

/* SP：ヒーローボタン（btn-ghost）をひとまわり小さく ※イレギュラーパターン */
@media (max-width: 767px) {
  .hero .btn-ghost {
    font-size: var(--text-label);
    padding: 9px var(--space-sm);
    letter-spacing: .15em;
  }
}

/* 大型モニター：高さをvwに比例させて画像の見える範囲を確保（最小580px・最大800px） */
@media (min-width: 1440px) {
  .hero {
    height: clamp(580px, 40vw, 800px);
  }
}

/* --- お知らせセクション --- */
.news-list {
  margin-top: var(--space-lg);
}

/* リンクなしの項目もあるため、上下余白は li 側で持つ */
.news-item {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border-light);
}

/* リンクなしの項目（日付＋見出しを li 直下に置く）も、リンクありと同じ並び・間隔にする */
.news-item a,
.news-item:not(:has(a)) {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs); /* SP：日付と見出しが近すぎないよう最小の余白トークンを使う */
  transition: color .2s;
}

.news-item a:hover {
  color: var(--color-primary);
}

.news-item__date {
  font-size: var(--text-xsmall);
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-weight: 300;
  letter-spacing: .05em;
}

.news-item__title {
  font-size: var(--text-small);
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.7;
}

/* --- 施工例：トップは2枚のみのため、PCで右に空きが出ないよう2列にする --- */
@media (min-width: 768px) {
  .section .cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .news-item a,
  .news-item:not(:has(a)) {
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-md);
  }

  .news-item__date {
    flex-shrink: 0;
  }
}

/* --- No.68: スライド3（コンテナ）テキストブロックを右寄せ --- */
.hero__slide:nth-child(3) .hero__content {
  align-items: flex-end; /* 本文・ボタンも右端へ */
  text-align: right;
}

/* btn-ghost の align-self: flex-start を上書き */
.hero__slide:nth-child(3) .hero__content .btn-ghost {
  align-self: flex-end;
}

/* PC：左右パディングを反転（左 pad-pc / 右 83px） */
@media (min-width: 768px) {
  .hero__slide:nth-child(3) .hero__content {
    padding: 0 83px 0 var(--pad-pc);
  }
}
