@charset "UTF-8";

/* ==========================================
   金沢市消防音楽隊 - 共通デザインCSS (フッター改行最適化版)
   ========================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: clip;
  width: 100%;
}

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "メイリオ", sans-serif;
  color: #333333;
  background-color: #f8f9fa;
  line-height: 1.65;
  word-break: break-word;
}

a {
  color: #b31217;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- ヘッダー（最上部に完全追従固定） --- */
header {
  background: linear-gradient(135deg, #111111 0%, #1a2530 100%);
  color: #ffffff;
  padding: 14px 20px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  border-bottom: 3px solid #d4af37;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
}

.logo-link {
  text-decoration: none !important;
  color: inherit;
  display: block;
}
.logo p {
  font-size: 0.78rem;
  color: #d4af37;
  letter-spacing: 0.5px;
}
.logo h1 {
  font-size: 1.4rem;
  color: #ffffff;
  font-weight: bold;
  word-break: break-all;
  transition: opacity 0.2s;
}
.logo-link:hover .logo h1 {
  opacity: 0.85;
}

/* --- 金沢市消防局 公式HPへ戻るボタン --- */
.btn-official-site {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  color: #d4af37 !important;
  border: 1px solid #d4af37;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-official-site:hover {
  background: #d4af37;
  color: #111111 !important;
  text-decoration: none !important;
}

/* --- ナビゲーション（PC用） --- */
nav {
  margin-top: 5px;
  width: 100%;
}
@media (min-width: 851px) {
  nav {
    margin-top: 0;
    width: auto;
  }
}
nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 8px;
}
nav li a {
  color: #ffffff;
  font-weight: bold;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.88rem;
  display: block;
  transition: background 0.2s;
}
nav li a:hover, nav li a.active {
  background-color: #b31217;
  text-decoration: none;
}

/* --- スマホ用アコーディオン切替用 --- */
.menu-toggle {
  display: none;
}
.menu-btn {
  display: none;
}

/* --- メインビジュアル（滑らか無限ループスライドショー） --- */
.hero-container {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
  background-color: #111111;
}

.slide-box {
  position: absolute;
  top: 0; left: 0;
  width: 400%;
  height: 100%;
  display: flex;
  animation: slideshow 16s infinite ease-in-out;
}

.slide-item {
  width: 25%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}
.slide-item::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0.25) 100%);
}

@keyframes slideshow {
  0%, 25% { transform: translateX(0%); }
  33%, 58% { transform: translateX(-25%); }
  66%, 91% { transform: translateX(-50%); }
  100% { transform: translateX(-75%); }
}

.hero-content {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  text-align: center;
  width: 92%;
  max-width: 900px;
  z-index: 5;
}

.hero-content h2 {
  font-size: 1.85rem;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9), 0 0 12px rgba(0,0,0,0.8);
  line-height: 1.4;
  word-break: keep-all;
  font-weight: bold;
}
.hero-content p {
  font-size: 0.98rem;
  text-shadow: 0 2px 6px rgba(0,0,0,0.9);
  word-break: keep-all;
  color: #f0f0f0;
}

.phrase {
  display: inline-block;
}

/* --- コンテンツレイアウト --- */
.container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 15px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 25px;
}

.section-title {
  font-size: 1.3rem;
  color: #1a2530;
  border-left: 5px solid #b31217;
  padding-left: 10px;
  margin-bottom: 15px;
  font-weight: bold;
}

/* カード（TOPICS） */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}
.card {
  background: #ffffff;
  border-radius: 8px;
  padding: 16px;
  border-top: 3px solid #b31217;
  border-left: 1px solid #eee;
  border-right: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
.card-tag {
  display: inline-block;
  background: #1a2530;
  color: #d4af37;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 8px;
  font-weight: bold;
}
.card-title {
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 1rem;
  color: #1a2530;
}
.card-text {
  font-size: 0.85rem;
  color: #666666;
}

/* スケジュール表 */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 0;
}
.schedule-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eee;
}
.schedule-table th, .schedule-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 0.88rem;
  word-break: break-all;
  vertical-align: middle;
}
.schedule-table th {
  background-color: #1a2530;
  color: #ffffff;
  font-weight: normal;
}

/* 日時セル */
.date-cell span {
  display: block;
}
.date-cell span:nth-child(2) {
  font-weight: bold;
  color: #b31217;
}

@media (min-width: 851px) {
  .date-cell span:nth-child(2) {
    display: inline-block;
    margin-right: 4px;
  }
  .date-cell .schedule-status {
    display: inline-block;
    font-size: 0.85rem;
    color: #666666;
    font-weight: normal;
  }
}

/* ボタン共通設定 */
.btn-main {
  display: inline-block;
  background: linear-gradient(135deg, #b31217 0%, #8c0e12 100%);
  color: #ffffff !important;
  padding: 9px 26px;
  border-radius: 30px;
  font-weight: bold;
  font-size: 0.92rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 1px solid #d4af37;
}

/* サイドバー・フッター */
.sidebar-box {
  background: #ffffff;
  padding: 18px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 20px;
  border-top: 3px solid #d4af37;
  border-left: 1px solid #eee;
  border-right: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
footer {
  background: #111111;
  color: #aaaaaa;
  text-align: center;
  padding: 25px 15px;
  font-size: 0.85rem;
}

/* スマホ用改行タグ（PCでは非表示） */
.sp-only {
  display: none;
}

/* ==========================================
   スマホ専用設定 (画面幅 850px 以下)
   ========================================== */
@media (max-width: 850px) {
  .container { grid-template-columns: 1fr; }
  .hero-container { height: 280px; }
  .hero-content { bottom: 18px; }
  .hero-content h2 { font-size: 1.25rem; }
  .hero-content p { font-size: 0.82rem; }

  /* スマホでのみ改行を有効化 */
  .sp-only {
    display: inline;
  }

  .date-cell .schedule-status {
    display: block;
    font-size: 0.78rem;
    color: #666666;
    font-weight: normal;
    margin-top: 2px;
  }

  .menu-btn {
    display: inline-block;
    background: #1a2530;
    color: #d4af37;
    border: 1px solid #d4af37;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
  }
  
  nav {
    display: none;
    width: 100%;
    margin-top: 10px;
  }

  .menu-toggle:checked ~ nav {
    display: block;
    animation: staveSlideDown 0.3s ease-out forwards;
  }

  .menu-toggle:checked ~ .menu-btn {
    background: #b31217;
    color: #ffffff;
    border-color: #ffffff;
  }

  nav ul {
    flex-direction: column;
    gap: 0;
    background: #1a2530;
    border-radius: 8px;
    padding: 8px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid #d4af37;
  }

  nav li a {
    padding: 12px 18px;
    border-radius: 0;
    font-size: 0.95rem;
    border-bottom: 5px solid transparent;
    border-image: repeating-linear-gradient(
      to bottom,
      #d4af37 0px, #d4af37 1px,
      transparent 1px, transparent 2px
    ) 5;
  }

  nav li:last-child a {
    border-bottom: none;
  }

  @keyframes staveSlideDown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}