/* ===================================================================
   05_page_index.css
   トップページ (index.html) 専用スタイル
   ヒーロースライダー / サービスバナー / 特徴セクション
   ふれあい24ハイライト / ニュース / インフォカード
   =================================================================== */

/* ===== Vivus オープニングアニメーション レイヤー ===== */
    .hero-vivus-layer {
      position: absolute;
      inset: 0;
      z-index: 3;
      display: flex;
      justify-content: center;
      align-items: center;
      background: #ffffff; /* 背景を白に設定 */
      pointer-events: none;
    }

    /* 1. 初期状態：全てのパスを完全に隠す（チラつき防止） */
    #vivus-logo path {
      fill-opacity: 0;
      stroke: #000;           /* 線の色は黒 */
      stroke-width: 1px;      /* 線が見えない場合はここを 2px などに太くしてください */
      visibility: hidden;     /* 最初は存在自体を隠す */
    }

    /* 2. アニメーション開始時：Vivusが動き出したら表示する */
    /* Vivusが実行されると、SVGタグに自動で「vivus-instance」的な状態になるか、
       手動でクラスをつけた瞬間に visibility を解除します */
    #vivus-logo.active path {
      visibility: visible;
    }

    /* 3. アニメーション完了後：塗りを適用 */
    #vivus-logo.done path {
      visibility: visible;
      stroke: none;
    }

    /* アニメーション完了後（done クラス付与）→ 塗りを適用 */
    #vivus-logo.done .half-moon { fill: #1A79BF;       fill-opacity: 1; }
    #vivus-logo.done .fire-out  { fill: rgb(6,4,105);  fill-opacity: 1; }
    #vivus-logo.done .fire-in   { fill: #e53e3e;       fill-opacity: 1; }
    #vivus-logo.done .vv-K      { fill: #000;          fill-opacity: 1; }
    #vivus-logo.done .vv-E1     { fill: #000;          fill-opacity: 1; }
    #vivus-logo.done .vv-I      { fill: #000;          fill-opacity: 1; }
    #vivus-logo.done .vv-N1     { fill: #000;          fill-opacity: 1; }
    #vivus-logo.done .vv-E2     { fill: #000;          fill-opacity: 1; }
    #vivus-logo.done .vv-N2     { fill: #000;       fill-opacity: 1; }
    #vivus-logo.done path       { stroke: none; }

    /* done後：レイヤーごとフェードアウト（3秒） */
    .hero-vivus-layer.fadeout {
      animation: vivus-fadeout 2.5s ease-in forwards;
    }
    @keyframes vivus-fadeout {
      0%   { opacity: 1; }
      100% { opacity: 0; pointer-events: none; visibility: hidden; }
    }

/* --- ヒーロースライダー・ケンバーンズアニメーション ------------------------------------- */

/* ===========================================================
   11. ヒーロー（トップ）  ※ index.html 固有
       純粋CSSによるフルスクリーンスライドショー背景
   =========================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 580px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0a1628;/* 動画読み込み前の背景色 */
}

/* ===== スライドコンテナ ===== */
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* 動画を画面いっぱいに表示し、比率を保ってクロップする設定 */
.hero-video {
  width: 100%;
  height: 100vh;
  object-fit: cover; /* 16:9の枠に動画をフィットさせます */
  position: absolute;
  top: 0;
  left: 0;
}

/* 各スライド共通 */
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  /* アニメーション時間は30秒のまま、全スライド共通の設定 */
  animation-duration: 30s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

/* 既存のオーバーレイ（文字を読みやすくする暗幕） */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3); /* 動画の明るさに合わせて調整してください */
  z-index: 1;
}

/* 計算式: 全体25秒 / 5枚 = 1枚あたり5秒の持ち時間
   表示タイミングを5秒ずつズラす 
*/
.slide-1 {
  background-image: url('../img/hero/slide1.jpg');
  animation-name: kenburns-zoomout-rd;
  animation-delay: 3s;
}
.slide-2 {
  background-image: url('../img/hero/slide2.jpg');
  animation-name: kenburns-zoomout-lu;
  animation-delay: 10s;
}
.slide-3 {
  background-image: url('../img/hero/slide3.jpg');
  animation-name: kenburns-zoomout-ru;
  animation-delay: 15s;
}
.slide-4 {
  background-image: url('../img/hero/slide4.jpg');
  animation-name: kenburns-zoomout-ld;
  animation-delay: 20s;
}
.slide-5 {
  background-image: url('../img/hero/slide5.jpg');
  animation-name: kenburns-zoomout-rd;
  animation-delay: 25s;
}

/* キーフレームの再設計 (5枚ループ用)
   0%〜20%が実質的なその画像のメイン時間（5秒/25秒 = 20%）
   前後数%を使ってゆっくりフェードイン・アウトさせます
*/
@keyframes kenburns-zoomout-rd {
  0%   { opacity: 0; transform: scale(1.25) translate(-4%, -3%); }
  5%   { opacity: 1; } /* 1.25秒かけてフェードイン */
  25%  { opacity: 1; } /* 次の画像が重なり始めるまで維持 */
  30%  { opacity: 0; } /* 1.25秒かけてゆっくりフェードアウト */
  100% { opacity: 0; transform: scale(1.0) translate(2%, 2%); }
}

@keyframes kenburns-zoomout-lu {
  0%   { opacity: 0; transform: scale(1.25) translate(4%, 3%); }
  5%   { opacity: 1; }
  25%  { opacity: 1; }
  30%  { opacity: 0; }
  100% { opacity: 0; transform: scale(1.0) translate(-2%, -2%); }
}

@keyframes kenburns-zoomout-ru {
  0%   { opacity: 0; transform: scale(1.25) translate(-4%, 3%); }
  5%   { opacity: 1; }
  25%  { opacity: 1; }
  30%  { opacity: 0; }
  100% { opacity: 0; transform: scale(1.0) translate(2%, -2%); }
}

@keyframes kenburns-zoomout-ld {
  0%   { opacity: 0; transform: scale(1.25) translate(4%, -3%); }
  5%   { opacity: 1; }
  25%  { opacity: 1; }
  30%  { opacity: 0; }
  100% { opacity: 0; transform: scale(1.0) translate(-2%, 2%); }
}

/* コンテンツは overlay の上へ */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  color: var(--white);
  opacity: 0;
  animation: heroFadeUp 1.4s ease 0.3s both;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.9);
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: 0.08em;
}

.hero-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 20px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

.hero-title em {
  font-style: normal;
  color: rgba(255,255,255,0.85);
  border-bottom: 2px solid rgba(255,255,255,0.5);
}

.hero-sub {
  font-size: 1.05rem;
  opacity: 0.85;
  margin-bottom: 36px;
  max-width: 560px;
  line-height: 1.85;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* スクロール誘導 */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  right: 48px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  opacity: 0;
  animation: heroFadeUp 1s ease 1.2s both;
}

.hero-scroll-label {
  color: rgba(255,255,255,0.55);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
}

.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}

.hero-scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.7);
  animation: scrollLine 1.8s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { top: -100%; }
  100% { top: 100%; }
}

/* --- サービスバナー（5アイコン帯） --------------------------------------------- */

/* ===========================================================
   12. サービスバナー（5アイコン帯）  ※ index.html 固有
   =========================================================== */
.services-banner {
  background: var(--navy);
  padding: 0;
}

.services-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.service-card {
  padding: 28px 16px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.08);
  transition: background 0.2s;
  cursor: pointer;
}

.service-card:last-child { border-right: none; }
.service-card:hover      { background: rgba(255,255,255,0.06); }

.service-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
  display: block;
}

.service-card h3 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.service-card p {
  color: rgba(255,255,255,0.5);
  font-size: 0.72rem;
  line-height: 1.5;
}

/* --- サービス詳細カード --------------------------------------------------- */

/* ===========================================================
   13. サービス詳細カード  ※ index.html 固有
   =========================================================== */
.services-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.svc-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.svc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.svc-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.svc-body { padding: 24px; }

.svc-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.svc-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.svc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--navy);
  font-weight: 500;
  transition: gap 0.2s;
}

.svc-link:hover { gap: 10px; }

/* --- 選ばれる理由（Features） -------------------------------------------- */

/* ===========================================================
   14. 選ばれる理由（Features）  ※ index.html 固有
   =========================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--card-bg);
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left: 3px solid var(--navy);
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 2rem;
  flex-shrink: 0;
  margin-top: 4px;
}

.feature-item h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.feature-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- ふれあい24ハイライト ------------------------------------------------- */

/* ===========================================================
   15. ふれあい24ハイライト  ※ index.html 固有
   =========================================================== */
.fureai-section {
  background: linear-gradient(135deg, var(--blue-grad-start) 0%, var(--blue-grad-end) 100%);
  border-top: 1px solid #cce0f0;
  border-bottom: 1px solid #cce0f0;
}

.fureai-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.fureai-inner .section-label { color: var(--text-muted); }
.fureai-inner .section-title { color: var(--blue-text); }
.fureai-inner .section-desc  { color: #4a5a6e; margin-bottom: 28px; }

.fureai-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fureai-feat {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--blue-text);
}

.fureai-feat::before {
  content: '✓';
  width: 22px;
  height: 22px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #ffffff;
  flex-shrink: 0;
}

.fureai-img-wrap {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(26,45,74,0.15);
}

.fureai-img-wrap img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

/* --- ニュース -------------------------------------------------------- */

/* ===========================================================
   16. ニュース  ※ index.html 固有
   =========================================================== */
.news-section { background: #ffffff; }

.news-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.news-item {
  display: flex;
  align-items: flex-start;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  gap: 20px;
  transition: background 0.2s;
}

.news-item:last-child { border-bottom: none; }
.news-item:hover      { background: var(--light-bg); }

.news-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 90px;
  margin-top: 2px;
}

.news-tag {
  background: var(--navy);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
  white-space: nowrap;
  margin-top: 2px;
}

.news-title {
  font-size: 0.92rem;
  color: var(--text);
  flex: 1;
  line-height: 1.6;
}

/* --- インフォカード ----------------------------------------------------- */

/* ===========================================================
   17. インフォカード  ※ index.html 固有
   =========================================================== */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.info-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  transition: transform 0.2s, box-shadow 0.2s;
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.info-img {
  width: 160px;
  object-fit: cover;
  flex-shrink: 0;
}

.info-body { padding: 24px; }

.info-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.info-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

/* --- 会社情報テーブル ---------------------------------------------------- */

/* ===========================================================
   18. 会社情報テーブル  ※ index.html 固有
   =========================================================== */
.company-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.company-table th,
.company-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.company-table th {
  width: 200px;
  color: var(--text);
  font-weight: 600;
  background: var(--light-bg);
  white-space: nowrap;
}

.company-table td {
  color: var(--text);
  line-height: 1.8;
}

/* --- お問い合わせセクション（バナー） -------------------------------------------- */

/* ===========================================================
   19. お問い合わせセクション（バナー）  ※ index.html 固有
   =========================================================== */
.contact-section {
  background: linear-gradient(135deg, var(--blue-grad-start) 0%, var(--blue-grad-end) 100%);
  border-top: 1px solid #cce0f0;
  border-bottom: 1px solid #cce0f0;
}

.contact-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.contact-inner h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 2rem;
  color: var(--blue-text);
  margin-bottom: 12px;
}

.contact-inner p {
  color: #4a5a6e;
  font-size: 0.95rem;
  line-height: 1.8;
}

.contact-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(26,45,74,0.12);
  border: 1px solid #cce0f0;
}

.contact-phone {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.contact-phone-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.contact-links { display: flex; gap: 12px; }

.contact-links a {
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
}

.contact-links .btn-contact-primary {
  background: var(--navy);
  color: #fff;
}

.contact-links .btn-contact-outline {
  border: 1px solid var(--border);
  color: var(--text);
}

/* --- 東京ガスグループバナー ------------------------------------------------- */

/* ===========================================================
   20. 東京ガスグループバナー  ※ index.html 固有
   =========================================================== */
.group-banner {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
}

.group-banner p      { font-size: 0.88rem; color: var(--text-muted); }
.group-banner strong { color: var(--navy); }

/* --- index.html レスポンシブ ------------------------------------------- */

/* ===========================================================
   30. index.html レスポンシブ
   =========================================================== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .service-card:nth-child(3) { border-right: none; }
  .service-card:nth-child(4) { border-right: 1px solid rgba(255,255,255,0.08); }
  .services-detail-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero         { min-height: 480px; }
  .hero-content { padding: 56px 20px; }
  .hero-scroll  { display: none; }

  .services-grid              { grid-template-columns: repeat(2, 1fr); }
  .service-card               { border-right: 1px solid rgba(255,255,255,0.08) !important; }
  .service-card:nth-child(2n) { border-right: none !important; }

  .section              { padding: 52px 20px; }
  .services-detail-grid { grid-template-columns: 1fr; }
  .features-grid        { grid-template-columns: 1fr; }

  .fureai-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 52px 20px;
  }

  .info-grid { grid-template-columns: 1fr; }
  .info-card { flex-direction: column; }
  .info-img  { width: 100%; height: 200px; }

  .contact-inner { grid-template-columns: 1fr; gap: 32px; }
  .contact-phone { font-size: 1.8rem; }

  .company-table th { width: 120px; font-size: 0.82rem; }

  .news-item { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 480px) {
  .hero-cta      { flex-direction: column; }
  .hero-cta a    { text-align: center; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card  { border-right: none !important; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .contact-links { flex-direction: column; }
}

