/* ==========================================================
   日本水道協会 応急給水様式アプリ
   ========================================================== */

:root {
  --gray: gray;
  --blue: #0a62c4;
  --blue-dark: #0b4f9e;
  --red: #d6102f;
  --red-dark: #b50d27;
  --green: #0b8a6e;
  --green-dark: #0a5f55;
  --orange: #c46a0a;
  --navy: #1e4a7a;
  --text: #222;
  --max: 1120px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

.inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 3px solid #f5a300;
  outline-offset: 2px;
}

/* ---------- ヘッダー ---------- */
.site-header {
  background: #e8f8fe url("../images/header_bg.jpg") no-repeat right center;
}

.site-header__top {
  /* 右側（蛇口）は透過させて背景画像を見せる */
  background: linear-gradient(90deg, rgba(255,255,255,.8) 0%, rgba(255,255,255,.8) 55%, rgba(255,255,255,0) 85%);
  padding: 8px 0;
}

.org {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-dark);
  font-weight: 700;
}
.org__drop { width: 24px; height: 30px; flex: none; }
.org__small { font-size: 13px; }
.org__name { font-size: 18px; margin-left: -2px; }

.hero { padding: 24px 0 26px; }
.hero__inner {
  display: flex;
  align-items: center;
  gap: 20px;
}
.hero__badge {
  flex: none;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--blue);
  display: grid;
  place-items: center;
}
.hero__badge svg { width: 38px; height: 46px; }

.hero h1 {
  font-size: clamp(22px, 3.6vw, 38px);
  font-weight: 900;
  line-height: 1.3;
  color: var(--blue-dark);
  letter-spacing: .02em;
}
.hero p {
  margin-top: 6px;
  font-size: clamp(12px, 1.6vw, 15px);
  font-weight: 500;
  color: var(--blue-dark);
}

/* ---------- メイン ---------- */
.main { flex: 1; padding: 28px 0 36px; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 14px;
}

.card {
  border: 2px solid;
  border-radius: var(--radius);
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
}

.card__head {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 100px; /* 本番/テストの見出し高さをそろえる */
}
.card__head h2 {
  font-size: clamp(20px, 2.4vw, 27px);
  font-weight: 700;
  line-height: 1.4;
}

.card__icon { flex: none; display: block; width: auto; max-width: none; }
.card__icon--truck { width: 110px; height: auto; }
.card__icon--train { width: 100px; height: auto; }

.card__desc {
  margin: 8px 0 18px 16px;
  font-size: 15px;
  line-height: 1.8;
}

/* 本番 / テスト */
.card--live {
  border-color: #ef5c72;
  background: linear-gradient(180deg, #fff 0%, #fde3e8 100%);
  box-shadow: 0 0 8px rgba(214,16,47,.28);
}
.card--live h2 { color: var(--red); }

.card--test {
  border-color: var(--blue);
  background: linear-gradient(180deg, #fff 0%, #dcebfa 100%);
  box-shadow: 0 0 8px rgba(16, 141, 214, 0.28);
}
.card--test h2 { color: var(--blue); }

/* ボタン */
.btn {
  position: relative;
  display: block;
  margin: auto 16px 0;
  padding: 14px 40px;
  border-radius: 8px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 3px 0 rgba(0,0,0,.18);
  transition: filter .15s, transform .15s;
}
.btn::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
  transform: translateY(-50%) rotate(45deg);
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn--red  { background: linear-gradient(180deg, #e8143a, var(--red-dark)); }
.btn--blue { background: linear-gradient(180deg, #1471d8, var(--blue-dark)); }
.btn--gray { background: var(--gray); }

/* マニュアル / 関連リンク */
.card--manual {
  border-color: #22a58a; background: #eaf8f4;
    box-shadow: 0 0 8px rgba(16,214,131,.28);
}

.card--related {
  border-color: #f0b94a; background: #fff7e3; 
  box-shadow: 0 0 8px rgba(214, 194, 16, 0.28);
}

.card__head--small { min-height: 64px; margin-bottom: 4px; } /* マニュアル/関連リンクの見出し高さをそろえる */
.card__head--small h2 { font-size: 26px; }
.card__icon--sm { width: 58px; height: auto; }
.card--manual h2 { color: var(--green); }
.card--related h2 { color: var(--orange); }

.links { margin-top: 2px; }
.links li { border-top: 1px solid; }
.card--manual .links li { border-color: #9fd6c8; color: var(--green-dark); }
.card--related .links li { border-color: #f2d9a0; color: var(--orange); }
.card--manual .links li:first-child { border-top: 2px solid #5db8a3; }
.card--related .links li:first-child { border-top: 2px solid #efc57a; }

.links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 6px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}
.links a:hover { background: rgba(255,255,255,.7); }
.card--related .links a { color: var(--text); }
.card--manual .links a span { color: var(--green-dark); }

.links__icon { flex: none; width: 28px; height: 30px; }
.card--related .links__icon { color: var(--orange); }
.links span { flex: 1; }

.chev {
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border-top: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
  transform: rotate(45deg);
}
.card--related .chev { color: var(--orange); }

/* ---------- フッター ---------- */
.site-footer {
  background: var(--navy);
  color: #fff;
  text-align: center;
  font-size: 13px;
  padding: 16px 12px;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 860px) {
  .inner { padding: 0 14px; }

  /* 蛇口がタイトルと重なって見づらいため、背景画像を薄く表示 */
  .site-header {
    background-image:
      linear-gradient(rgba(232,248,254,.7), rgba(232,248,254,.7)),
      url("../images/header_bg.jpg");
  }

  .hero { padding: 16px 0 18px; }
  .hero__inner { gap: 12px; align-items: flex-start; }
  .hero__badge { width: 52px; height: 52px; }
  .hero__badge svg { width: 26px; height: 32px; }

  .card { padding: 16px 14px 20px; }
  .card__head { gap: 10px; }
  .card__head { min-height: 80px; }
  .card__icon--truck { width: 80px; }
  .card__icon--train { width: 72px; }
  .card__desc { margin-left: 0; font-size: 14px; }
  .card__desc br { display: none; }

  .btn { margin-left: 0; margin-right: 0; font-size: 17px; padding: 14px 32px; }
  .btn::after { right: 16px; }

  .card__head--small h2 { font-size: 22px; }
  .card__head--small { min-height: 52px; }
  .card__icon--sm { width: 46px; }
  .links a { font-size: 14px; gap: 10px; }
  .links__icon { width: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
