/* ============================================================
   procurement-common.css
   入札・契約情報ページ 共通スタイル
   ============================================================ */

/* ========== 色・サイズの共通設定 ========== */
:root {
  --green-dark:    #0f9d70;
  --green-main:    #17b586;
  --green-mid:     #2bc99a;
  --green-light:   #d7f3e9;
  --green-pale:    #f0fbf7;
  --blue-link:     #1668c0;
  --blue-hover:    #0d4a94;
  --gray-900:      #1a1a1a;
  --gray-700:      #3a3a3a;
  --gray-500:      #757575;
  --gray-400:      #9e9e9e;
  --gray-300:      #e0e0e0;
  --gray-200:      #eeeeee;
  --gray-100:      #f5f5f5;
  --white:         #ffffff;
  --shadow-card:   0 1px 4px rgba(15,157,112,0.12);
  --shadow-hover:  0 4px 12px rgba(15,157,112,0.22);
  --radius-sm:     6px;
  --radius-md:     10px;
  --focus-ring:    0 0 0 2px var(--white), 0 0 0 4px var(--green-dark);

  /* フォントサイズ（1rem = 10px 換算。style.cssの font-size:62.5% が前提） */
  --fs-base:       1.5rem;
  --fs-sm:         1.3rem;
  --fs-xs:         1.2rem;
  --fs-nav:        1.5rem;
  --fs-link:       1.5rem;
  --fs-card-title: 1.9rem;   /* 中項目（工事・コンサル業務など）。1.6→1.9に拡大 */
  --fs-section:    2.4rem;   /* 大項目（入札公告等など）・見出し。2.1→2.4に拡大 */
  --fs-h1:         3.0rem;
  --fs-breadcrumb: 1.3rem;
  --fs-th:         1.5rem;
}

/* ========== 基本設定 ========== */
body {
  font-size: var(--fs-base);
  color: var(--gray-900);
  background: #f8faf9;
  -webkit-font-smoothing: antialiased;
}
.breadcrumb,
.page-header,
.toc,
.content,
.layout,
.detail-wrapper {
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.85;
}

.breadcrumb a,
.page-header a,
.toc a,
.content a,
.layout a {
  color: var(--blue-link);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover,
.page-header a:hover,
.toc a:hover,
.content a:hover,
.layout a:hover {
  color: var(--blue-hover);
}

.breadcrumb a:focus-visible,
.page-header a:focus-visible,
.toc a:focus-visible,
.content a:focus-visible,
.layout a:focus-visible,
.content button:focus-visible,
.layout button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

img { max-width: 100%; height: auto; }

section.smenu { display: none; }

.nobr { white-space: nowrap; }

/* スクリーンリーダー専用（視覚的には非表示だが読み上げられる）
   テーブルの caption 等、目には見せず読み上げだけしたい要素に使う */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

header {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
header + .breadcrumb {
  margin-top: 0;
}

html { scroll-behavior: smooth; }

/* 既存style.cssの body { text-align: justify } を左揃えに上書き
   （両端揃えは単語間隔が不均一になり可読性が下がるため。入札・契約情報ページ群のみ適用） */
.breadcrumb,
.page-header,
.toc,
.content,
.layout,
.detail-wrapper,
.doc-layout {
  text-align: left;
}

/* ========== パンくずリスト ========== */
.breadcrumb {
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  padding: 10px 40px;
  font-size: var(--fs-breadcrumb);
  color: var(--gray-700); /* gray-500 → gray-700（コントラスト改善） */
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.6;
}
.breadcrumb a { color: var(--gray-700); } /* gray-500 → gray-700（コントラスト改善） */
.breadcrumb a:hover { color: var(--green-dark); }
.breadcrumb .sep { color: var(--gray-500); } /* gray-300 → gray-500（区切りのコントラスト改善） */
.breadcrumb .current { color: var(--gray-700); font-weight: 500; }

/* ========== ページ見出し（共通部分） ========== */
.page-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
}
.page-header h1 {
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: 0.02em;
  line-height: 1.4;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}
.page-header h1::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg,
    var(--green-main) 0%, var(--green-light) 100%);
  border-radius: 2px;
}

/* ========== 外部リンクアイコン ========== */
.ext-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px; height: 15px;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.2s;
}
.ext-icon svg { width: 15px; height: 15px; fill: var(--gray-500); }
.content a:hover .ext-icon,
.layout a:hover .ext-icon { opacity: 0.9; }

/* ========== スキップリンク ========== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--green-dark);
  color: var(--white);
  padding: 12px 24px;
  font-size: var(--fs-sm);
  font-weight: 700;
  z-index: 9999;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; color: var(--white); }

/* ========== トップへ戻るボタン ========== */
#pageTop {
  position: fixed;
  right: 28px;
  bottom: 28px;
  margin: 0;
  z-index: 900;
}
#pageTop a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--green-dark);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.8) inset,
    0 3px 10px rgba(15,157,112,0.35);
  color: var(--white);
  text-decoration: none;
  overflow: hidden;
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s,
    background 0.3s;
}
#pageTop a .pt-arrow {
  width: 24px;
  height: 24px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}
#pageTop a:hover .pt-arrow {
  animation: pt-arrow-cycle 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes pt-arrow-cycle {
  0%   { transform: translateY(0);     opacity: 1; }
  45%  { transform: translateY(-16px); opacity: 0; }
  55%  { transform: translateY(16px);  opacity: 0; }
  100% { transform: translateY(0);     opacity: 1; }
}
#pageTop a:hover {
  background: var(--green-main);
  transform: translateY(-5px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.9) inset,
    0 8px 18px rgba(15,157,112,0.4);
}
#pageTop a:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px var(--white),
    0 0 0 5px var(--green-dark),
    0 3px 10px rgba(15,157,112,0.35);
}

/* ========== アクセシビリティ：動きを減らす設定への対応 ========== */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  #pageTop a:hover .pt-arrow { animation: none; }
}

/* ========== タッチ端末での調整 ========== */
@media (hover: none) {
  .content a:hover .ext-icon,
  .layout a:hover .ext-icon { opacity: 0.55; }
}

/* ========== 画面幅に応じた調整 ========== */
@media screen and (max-width: 768px) {
  .breadcrumb { padding: 10px 20px; }
}
@media screen and (max-width: 560px) {
  #pageTop { right: 18px; bottom: 18px; }
  #pageTop a { width: 46px; height: 46px; }
  #pageTop a .pt-arrow { width: 22px; height: 22px; }
}
@media screen and (max-width: 480px) {
  .breadcrumb { padding: 8px 16px; font-size: 1.2rem; }
}