/* ========================================
   福岡水道設備 HP — style.css
   ======================================== */

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

:root {
  --color-primary:   #1a7abf;
  --color-primary-d: #135c96;
  --color-accent:    #00b4d8;
  --color-line:      #06c755;
  --color-text:      #1a1a2e;
  --color-text-sub:  #555;
  --color-bg:        #fff;
  --color-bg-light:  #f0f7ff;
  --color-border:    #d0e4f5;
  --font-base: 'Noto Sans JP', sans-serif;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(26,122,191,0.12);
  --transition: 0.3s ease;
  /* iPhoneのセーフエリア対応 */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.75;
  font-size: 16px;
  /* スマホのFixed CTAの高さ分 + セーフエリア */
  padding-bottom: calc(64px + var(--safe-bottom));
}

img { max-width: 100%; height: auto; display: block; object-fit: cover; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- Utilities ---------- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 72px 0; }
.bg-light { background: var(--color-bg-light); }

.section-head { text-align: center; margin-bottom: 48px; }

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  background: rgba(26,122,191,0.08);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 12px;
}

.section-desc { color: var(--color-text-sub); font-size: 15px; }

/* ---------- Fade-in animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible { opacity: 1; transform: none; }

/* ============================================================
   HEADER — 水色固定ヘッダー
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #4db8d4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.header-logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-logo-en {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.85);
  font-style: italic;
}

.header-logo-ja {
  font-size: clamp(16px, 3vw, 22px);
  font-weight: 700;
  color: #fff;
  font-family: 'Noto Serif JP', 'Yu Mincho', '游明朝', 'Hiragino Mincho ProN', serif;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.header-nav {
  display: flex;
  gap: 24px;
}

.header-nav a {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

.header-nav a:hover { color: #fff; }

@media (max-width: 768px) {
  .header-nav { display: none; }
  .header-inner { height: 60px; }
}

/* ============================================================
   HERO — カーテンワイプ切り替え
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 560px;
  max-height: 960px;
  overflow: hidden;
  margin-top: 72px; /* ヘッダー分 */
}

@media (max-width: 768px) {
  .hero { margin-top: 60px; }
}

/* スライダー本体 */
.hero-slider {
  position: absolute;
  inset: 0;
}

/* 各スライド：横並びで配置 */
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  @media (min-width: 769px) {
  .hero-slide {
    background-position: center center;
  }
}
  transform: translateX(100%);
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.18, 1);
  z-index: 1;
}

.hero-slide.active {
  transform: translateX(0%);
  z-index: 2;
}

.hero-slide.exit {
  transform: translateX(-30%);
  z-index: 1;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.18, 1);
}

/* オーバーレイ */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8, 35, 70, 0.38) 0%,
    rgba(8, 35, 70, 0.50) 55%,
    rgba(8, 35, 70, 0.72) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* メインコピー（中央） */
.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 0 24px;
  /* ロゴの高さ分、少し下にずらす */
  padding-top: 80px;
}

.hero-lead {
  font-size: clamp(12px, 3vw, 15px);
  letter-spacing: 0.15em;
  opacity: 0.88;
  margin-bottom: 16px;
}

.hero-catch {
  font-size: clamp(34px, 9vw, 64px);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 18px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

.hero-catch span { color: #7dd3fc; }

.hero-sub {
  font-size: clamp(13px, 3.5vw, 17px);
  opacity: 0.9;
  margin-bottom: 36px;
  line-height: 1.9;
}

.hero-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* インジケーター */
.hero-indicators {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.indicator.active {
  background: #fff;
  transform: scale(1.25);
}

/* 左右矢印 */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  backdrop-filter: blur(4px);
}

.hero-arrow:hover { background: rgba(255,255,255,0.32); }
.hero-arrow-prev { left: 16px; }
.hero-arrow-next { right: 16px; }

/* スマホでは矢印を少し小さく */
@media (max-width: 480px) {
  .hero-arrow { width: 36px; height: 36px; font-size: 22px; }
  .hero-arrow-prev { left: 10px; }
  .hero-arrow-next { right: 10px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 700;
  font-size: clamp(14px, 3.5vw, 16px);
  transition: var(--transition);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-icon { font-size: 18px; }

.btn-tel {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(26,122,191,0.45);
}
.btn-tel:hover, .btn-tel:active { background: var(--color-primary-d); }

.btn-line {
  background: var(--color-line);
  color: #fff;
  box-shadow: 0 4px 16px rgba(6,199,85,0.4);
}
.btn-line:hover, .btn-line:active { background: #05a847; }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(26,122,191,0.18);
  border-color: var(--color-accent);
}

.service-icon { font-size: 36px; margin-bottom: 14px; }
.service-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; color: var(--color-primary-d); }
.service-card p { font-size: 14px; color: var(--color-text-sub); }

/* ---------- Works ---------- */
.works-ba-title,
.works-gallery-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-left: 14px;
  border-left: 4px solid var(--color-primary);
  color: var(--color-primary-d);
}

.ba-grid {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}

.ba-item {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ba-item img { width: 100%; height: 220px; }

.ba-label {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 14px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 13px;
}

.ba-label.before { background: #f04; color: #fff; }
.ba-label.after  { background: var(--color-primary); color: #fff; }
.ba-arrow { font-size: 28px; color: var(--color-primary); font-weight: 700; }
.ba-caption { text-align: center; font-size: 14px; color: var(--color-text-sub); margin-bottom: 48px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.gallery-item { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery-item img { width: 100%; height: 180px; }
.gallery-item p { padding: 10px 14px; font-size: 14px; background: #fff; color: var(--color-text-sub); }

/* ---------- Reasons ---------- */
.reasons-list { display: flex; flex-direction: column; gap: 20px; }

.reason-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--color-primary);
}

.reason-num {
  font-size: 36px;
  font-weight: 900;
  color: var(--color-accent);
  line-height: 1;
  min-width: 48px;
}

.reason-body h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--color-primary-d); }
.reason-body p { font-size: 14px; color: var(--color-text-sub); }

/* ---------- Voices ---------- */
.voices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.voice-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--color-accent);
}

.voice-stars { color: #f5a623; font-size: 18px; margin-bottom: 12px; }
.voice-text { font-size: 14px; line-height: 1.8; color: var(--color-text); margin-bottom: 12px; }
.voice-name { font-size: 13px; color: var(--color-text-sub); text-align: right; }

/* ---------- Company ---------- */
.company-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 720px) {
  .company-wrap { grid-template-columns: 1fr; }
}

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

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

.company-table th {
  width: 110px;
  color: var(--color-primary-d);
  font-weight: 700;
  white-space: nowrap;
}

.company-table td a { color: var(--color-primary); text-decoration: underline; }
.company-map iframe { border-radius: var(--radius); width: 100%; }

/* ---------- Contact ---------- */
.contact-options {
  display: flex;
  gap: 24px;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.contact-tel, .contact-line {
  flex: 1;
  min-width: 240px;
  background: var(--color-bg-light);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  border: 1px solid var(--color-border);
}

.contact-label { font-size: 13px; color: var(--color-text-sub); margin-bottom: 12px; font-weight: 500; }

.contact-tel-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 900;
  color: var(--color-primary-d);
  margin-bottom: 8px;
}

.contact-hours, .contact-note { font-size: 13px; color: var(--color-text-sub); margin-top: 8px; }
.contact-divider { display: flex; align-items: center; font-size: 14px; color: var(--color-text-sub); }

.btn-line-lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 28px;
  background: var(--color-line);
  color: #fff;
  font-weight: 700;
  font-size: clamp(15px, 4vw, 18px);
  border-radius: 100px;
  box-shadow: 0 4px 16px rgba(6,199,85,0.4);
  transition: var(--transition);
}
.btn-line-lg:hover { background: #05a847; }

.contact-form-wrap {
  max-width: 640px;
  margin: 0 auto;
  background: var(--color-bg-light);
  border-radius: var(--radius);
  padding: 36px 28px;
  border: 1px solid var(--color-border);
}

.form-title { font-size: 18px; font-weight: 700; margin-bottom: 24px; text-align: center; color: var(--color-primary-d); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }

.required {
  background: #e53e3e;
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 16px; /* iOSズーム防止（16px未満だと自動ズームされる） */
  font-family: var(--font-base);
  background: #fff;
  transition: var(--transition);
  -webkit-appearance: none; /* iOS独自スタイルをリセット */
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26,122,191,0.12);
}

.btn-submit {
  width: 100%;
  background: var(--color-primary);
  color: #fff;
  padding: 16px;
  font-size: 17px;
  font-weight: 700;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(26,122,191,0.35);
  transition: var(--transition);
  -webkit-appearance: none;
}
.btn-submit:hover { background: var(--color-primary-d); }

@media (max-width: 600px) {
  .contact-form-wrap { padding: 24px 16px; }
  .section { padding: 56px 0; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-d);
  color: rgba(255,255,255,0.85);
  padding: 40px 20px;
}

.footer-inner { max-width: 1080px; margin: 0 auto; text-align: center; }
.footer-logo .logo-main { color: #fff; font-size: 16px; font-weight: 900; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin: 20px 0;
}

.footer-nav a { font-size: 14px; opacity: 0.8; transition: var(--transition); }
.footer-nav a:hover { opacity: 1; }
.footer-copy { font-size: 12px; opacity: 0.6; }

/* ---------- Fixed CTA（スマホ画面下固定） ---------- */
.fixed-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  /* iPhoneのホームバー分のセーフエリアを確保 */
  padding-bottom: var(--safe-bottom);
  height: calc(60px + var(--safe-bottom));
  box-shadow: 0 -2px 12px rgba(0,0,0,0.14);
}

.fixed-cta a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  gap: 2px;
  color: #fff;
  transition: var(--transition);
  padding-bottom: 4px;
}

.fixed-cta a span { font-size: 20px; }
.fixed-cta-tel  { background: var(--color-primary); }
.fixed-cta-line { background: var(--color-line); }
.fixed-cta-form { background: #f59e0b; }
.fixed-cta a:active { filter: brightness(0.88); }

/* デスクトップでは非表示 */
@media (min-width: 768px) {
  .fixed-cta { display: none; }
  body { padding-bottom: 0; }
}
