/* ==========================================================================
   sections.css
   ブロックパターン用のセクションスタイル。
   ========================================================================== */

/* ===== ページ共通ヒーロー（FAQ・お問合せの簡易ヒーロー） ===== */
.page-hero {
  padding: 120px 24px 64px;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: var(--white);
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: 16px;
}
.page-hero p {
  font-size: 16px;
  opacity: 0.85;
}

/* ===== ホーム サービスグリッド ===== */
.service { background: var(--gray-bg); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.service-grid-bottom {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  transition: all 0.3s;
  border: 1px solid var(--gray-mid);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,22,122,0.15);
  border-color: var(--gold);
}

.service-card:hover .card-header {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
}

.card-header {
  background: linear-gradient(135deg, var(--navy), #1a2a9a);
  padding: 20px 24px 16px;
  transition: background 0.3s;
  border-top: 3px solid var(--gold);
}

.card-title {
  color: var(--white);
  font-size: 17px;
  font-weight: bold;
  margin-bottom: 4px;
  font-family: 'BIZ UDPMincho', serif;
}

.card-sub {
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  letter-spacing: 0.05em;
  font-family: 'BIZ UDPMincho', serif;
}

.card-body {
  padding: 0;
  height: 120px;
  background: linear-gradient(180deg, #f9f9fb 0%, var(--white) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-placeholder {
  width: 100%;
  height: 120px;
  background: var(--gray-bg);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  font-size: 12px;
  border: 1px dashed var(--gray-mid);
}

.card-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--gray-mid);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--navy);
  font-size: 13px;
  font-family: 'Noto Sans JP', sans-serif;
  gap: 4px;
}

/* ===== GMOバナー ===== */
.gmo-banner {
  padding: 80px 24px;
  background: var(--purple);
  color: var(--white);
}
.gmo-banner-inner {
  display: flex;
  align-items: center;
  gap: 48px;
}
.gmo-logo { max-width: 180px; flex-shrink: 0; }
.gmo-title { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.gmo-body  { font-size: 15px; line-height: 1.9; opacity: 0.9; }
@media (max-width: 768px) {
  .gmo-banner-inner { flex-direction: column; text-align: center; }
}

/* ===== 対応書類グリッド ===== */
.doc-types { padding: 96px 24px; background: var(--white); }
.doc-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.doc-type-card {
  background: var(--gray-bg);
  border-left: 3px solid var(--purple);
  padding: 24px;
  border-radius: 4px;
}
.doc-type-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.doc-type-sub   { font-size: 13px; color: var(--text-sub); }

/* ===== 検針種別グリッド ===== */
.meter-types { padding: 96px 24px; background: var(--gray-bg); }
.meter-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}
.meter-type-card {
  background: var(--white);
  text-align: center;
  padding: 32px 16px;
  border-radius: 8px;
  border-top: 3px solid var(--blue);
}
.meter-title { font-size: 18px; font-weight: 700; }

/* ===== 活用シーン ===== */
.use-cases { padding: 96px 24px; background: var(--white); }
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.use-case-card {
  padding: 32px 24px;
  background: var(--gray-bg);
  border-radius: 8px;
  position: relative;
}
.use-case-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--teal);
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1;
}
.use-case-title { font-size: 18px; font-weight: 700; margin: 12px 0 12px; }
.use-case-body  { font-size: 14px; line-height: 1.9; color: var(--text-sub); }

/* ===== 業務フロー ===== */
.flow { padding: 96px 24px; background: var(--gray-bg); }
.flow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.flow-step {
  background: var(--white);
  padding: 32px 24px;
  border-radius: 8px;
  border-top: 3px solid var(--slate);
}
.flow-step-number {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--slate);
  font-family: 'Noto Sans JP', sans-serif;
}
.flow-step-title { font-size: 18px; font-weight: 700; margin: 8px 0 12px; }
.flow-step-body  { font-size: 14px; line-height: 1.9; color: var(--text-sub); }

/* ===== お知らせ（Query Loop） ===== */
.news { padding: 48px 24px; background: var(--white); }
.news-title {
  font-size: clamp(24px, 3vw, 32px);
  margin-bottom: 24px;
}
.news-item {
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-mid);
}
.news-date {
  font-size: 13px;
  color: var(--text-sub);
  font-family: 'Noto Sans JP', sans-serif;
  min-width: 100px;
}
.news-link a { font-size: 15px; color: var(--text); }
.news-link a:hover { color: var(--navy); }
.news-more { margin-top: 24px; }
.news-more a { color: var(--navy); font-weight: 700; }

/* ===== お問合せフォーム ===== */
.contact-outer { padding: 96px 24px; background: var(--gray-bg); }
.contact-inner { gap: 48px; align-items: flex-start; }
.form-card {
  flex: 2;
  background: var(--white);
  padding: 48px;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.form-card-title { font-size: 24px; font-weight: 700; margin-bottom: 32px; }
.side-panel { flex: 1; min-width: 280px; }
.side-phone-card {
  background: var(--white);
  padding: 32px 24px;
  border-radius: 8px;
  border-top: 3px solid var(--gold);
}
.side-label    { font-size: 12px; color: var(--text-sub); letter-spacing: 0.1em; }
.phone-number  { font-size: 28px; font-weight: 700; color: var(--navy); margin: 12px 0; }
.phone-info-row{ font-size: 13px; color: var(--text-sub); margin-bottom: 4px; }

@media (max-width: 768px) {
  .contact-inner { flex-direction: column; }
  .form-card     { padding: 24px; }

  /* ===== Related Services Slider ===== */
  .related-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }

  .related-grid::-webkit-scrollbar {
    display: none;
  }

  .related-card {
    min-width: 85%;
    flex: 0 0 auto;
    scroll-snap-align: center;
  }
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Shippori Mincho', 'Noto Sans JP', serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.8;
}

a { text-decoration: none; color: inherit; cursor: pointer; }

/* ===== Section Common ===== */
section { padding: 88px 24px; }

.section-inner { max-width: 1200px; margin: 0 auto; }

/* ===== Related Services ===== */
.related {
  background: var(--gray-bg);
}

.related-slider {
  position: relative;
  padding-left: 50px;
  padding-right: 50px;
  overflow: visible;
}

.related-grid {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-top: 8px;
  margin-top: -8px;
  padding-bottom: 8px;
  scrollbar-width: none;
  padding-left: 4px;
  scroll-padding-left: 4px;
}

.related-grid::-webkit-scrollbar {
  display: none;
}

.related-grid::-webkit-scrollbar-thumb {
  background: rgba(0,22,122,0.25);
  border-radius: 999px;
}

/* 矢印 */
.related-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  color: rgba(0,22,122,0.72);
  cursor: pointer;
  z-index: 30;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.related-arrow:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 8px 24px rgba(0,22,122,0.18);
}

.related-arrow.prev {
  left: -15px;
  padding-right: 9px;
}

.related-arrow.next {
  right: -15px;
  padding-left: 9px;
}

.related-card {
  scroll-snap-align: start;
  flex-shrink: 0;
  flex: 0 0 calc((100% - 48px) / 3);
  min-width: calc((100% - 48px) / 3);
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--gray-mid);
  position: relative;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transform: translateY(0) translateZ(0);
  will-change: transform, box-shadow;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s ease;
}

.related-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gold);
  z-index: 10;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,22,122,0.16);
  border-color: var(--navy);
}

.related-card-header {
  background: linear-gradient(135deg, var(--navy), #1a2a9a);
  padding: 18px 20px 14px;
}

.related-card-title { color: var(--white); font-size: 16px; font-weight: bold; margin-bottom: 4px; font-family: 'BIZ UDPMincho', serif; }
.related-card-sub { color: rgba(255,255,255,0.7); font-size: 12px;
  font-family: 'BIZ UDPMincho', serif; }
.related-card-body { padding: 16px 20px 56px; }
.related-card-text { font-size: 13px; color: var(--text-sub); line-height: 1.8; font-family: 'Noto Sans JP', sans-serif; }
.related-card-footer {
  padding: 12px 20px;
  border-top: none;
  text-align: right;
  font-size: 13px;
  color: var(--navy);
  font-family: 'Noto Sans JP', sans-serif;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.related-card-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: var(--gray-mid);
}

.related-arrow.disabled {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.9);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .related-slider {
    position: relative;
    padding-left: 30px;
    padding-right: 30px;
  } 

  .related-grid {
    gap: 12px;
    padding-left: 8px;
    padding-right: 8px;
    scroll-padding-left: 8px;
    scroll-padding-right: 8px;
  }

  .related-card {
    flex: 0 0 100%;
    min-width: 100%;
    box-shadow: none;
    transition: none;
  }

  /* 矢印 */
  .related-arrow {
    width: auto;
    height: auto;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    font-size: 30px;
    line-height: 1;
    color: rgba(0,22,122,0.72);
    opacity: 0.78;
  }

  .related-arrow.prev {
    left: -30px;
  }

  .related-arrow.next {
    
    right: -30px;
  }

  .related-arrow:hover {
    transform: translateY(-50%);
    box-shadow: none;
  }

  .related-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--gray-mid);
  }
}