/* =========================================
   layout.css
   ヘッダー / フッター / 2カラムレイアウト
   （横須賀市・葉山町消防指令センター用）
========================================= */

/* 上部の細いナビバー */
.top-bar {
  background-color: #f4f4f4;
  border-bottom: 1px solid #ddd;
  font-size: 0.9rem;
}

.top-bar-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 32px;
}

.top-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.top-links li a {
  color: #555;
  text-decoration: none;
}

.top-links li a:hover {
  text-decoration: underline;
}


/* ヘッダー（ロゴ + メインナビ） */
.site-header {
  background-color: #ffffff;
  border-bottom: 2px solid #005bac;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
  gap: 2rem;
}

/* ロゴ・サイト名部分 */
.logo-area {
  display: flex;
  align-items: center;
}

.site-title {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.4;
  color: #004178;
}

/* メインナビ */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  color: #004178;
  font-weight: 500;
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a:focus {
  border-bottom-color: #004178;
}

/* パンくずリスト */
.breadcrumb {
  background-color: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.9rem;
}

.breadcrumb .container {
  padding-block: 8px;
}

.breadcrumb a {
  color: #555;
}

.breadcrumb span {
  color: #222;
}


/* メインレイアウト（2カラム） */
.main-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 2rem;
  padding-block: 24px 40px;
}

/* サイドバー */
.sidebar {
  background-color: #ffffff;
  border: 1px solid #ddd;
  padding: 16px;
}

.sidebar-title {
  font-size: 1.1rem;
  margin-bottom: 0.8em;
}

.side-nav {
  list-style: none;
}

.side-nav li + li {
  margin-top: 0.5em;
}

.side-nav a {
  display: block;
  padding: 6px 8px;
  border-left: 4px solid transparent;
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
}

.side-nav li.active a,
.side-nav a:hover,
.side-nav a:focus {
  border-left-color: #005bac;
  background-color: #f2f7fb;
}

/* メインコンテンツ側 */
.content {
  background-color: #ffffff;
  border: 1px solid #ddd;
  padding: 20px 24px 28px;
}

.content-header h1 {
  font-size: 1.6rem;
}

.section-divider {
  margin-top: 0.5em;
  margin-bottom: 1.5em;
}

/* ヒーローブロック（画像＋テキスト横並び） */
.hero-block {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
}

.hero-image {
  flex: 0 0 260px;
}

.hero-image img {
  border-radius: 4px;
}

.hero-text {
  flex: 1 1 260px;
}

/* フッター */
.site-footer {
  background-color: #004178;
  color: #ffffff;
  margin-top: 24px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 16px;
}

.footer-title {
  font-weight: 600;
  margin-bottom: 0.5em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}

.footer-links a {
  color: #e0ecf7;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  text-decoration: underline;
}


/* -----------------------------------------
   レスポンシブ対応（タブレット・スマホ）
----------------------------------------- */

@media (max-width: 900px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav ul {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .main-layout {
    grid-template-columns: 1fr;   /* サイドバーと内容を縦並びに */
  }

  .sidebar {
    order: 2;   /* 必要なら順番変更も可能（今はそのまま） */
  }
}

@media (max-width: 600px) {
  .top-bar-inner {
    justify-content: center;
  }

  .top-links {
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .header-inner {
    padding-block: 12px;
  }

  .content {
    padding: 16px;
  }
}


/* ===== サイドバーを使わない場合の1カラム化 ===== */
.main-layout,
.container.main-layout {
  display: block !important;
}

.sidebar {
  display: none !important;
}

.content {
  width: 100% !important;
  max-width: 100% !important;
}


/* 関連リンクなどで使うボタン風リンク */
a.link-button {
  display: inline-block;
  padding: 8px 14px;
  background-color: #005bac; /* ヘッダーと同じ色 */
  color: #ffffff;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

a.link-button:hover,
a.link-button:focus {
  opacity: 0.9;
  text-decoration: none;
}


/* ボタンリンク専用リストの体裁調整 */
.link-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;  /* ボタンを縦並びに強制 */
  gap: 12px;               /* ボタン間のスペース */
}

.link-list li {
  margin: 0;
}