/* =========================================================
   基本設定（フォント・背景色）
========================================================= */
body {
  font-family: 'Yu Gothic', sans-serif;
  line-height: 1.7;
  margin: 0;
  padding: 0;
  color: #333;
  background-color: #fefefe;
}

/* =========================================================
   ヘッダー（ロゴ・連絡先）
========================================================= */
.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
}

.logo-area {
  flex: 0 0 55%;
  position: relative;
}

.logo-area a {
  display: inline-block;
}

.logo-area img,
.contact-area img {
  max-width: 100%;
  max-height: 70px;
  height: auto;
  display: block;
}

.contact-area {
  position: absolute;
  top: 12px;
  right: 0;
  text-align: right;
}

.header-contact {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.3;
}

.header-pink {
  background-color: #fdeef4;
}

/* --- ヘッダー：レスポンシブ --- */
@media screen and (max-width: 768px) {
  .logo-area img,
  .contact-area img {
    max-height: 60px;
  }
}

@media screen and (max-width: 480px) {
  .logo-area img,
  .contact-area img {
    max-height: 50px;
  }
}

/* =========================================================
   ナビバー
========================================================= */
.navbar {
  display: flex;
  justify-content: center;
  background-color: #f48fb1;
  padding: 0.6rem 1rem;
}

.navbar-nav {
  display: flex;
  width: 100%;
  justify-content: center;
}

.navbar-nav .nav-link {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffeb3b !important;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- PC・タブレット：ナビ項目を横幅いっぱいに広げる --- */
@media screen and (min-width: 577px) {
  .navbar {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .navbar-nav {
    justify-content: space-between;
    width: 100%;
  }

  .nav-item {
    flex: 1 1 auto;
    text-align: center;
  }

  .nav-link {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
  }
}

/* --- iPad Pro 11インチ（横向き）専用 --- */
@media screen and (min-width: 820px) and (max-width: 900px) {
  .navbar {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .navbar-nav {
    width: 100%;
    justify-content: space-between !important;
    padding-left: 0;
    padding-right: 0;
  }

  .nav-item {
    flex: 1 1 0 !important;
    text-align: center;
    margin: 0 !important;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 0.4rem 0.2rem;
    font-size: 0.9rem;
    white-space: nowrap;
  }
}

/* =========================================================
   メインビジュアル
========================================================= */
.main-visual,
.top-hero img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  margin: 0 auto;
}

.top-hero {
  width: 100vw;
  margin: 0 auto;
  overflow: hidden;
  padding-top: 0;
}

/* =========================================================
   セクション
========================================================= */
.section {
  margin: 20px auto;
  max-width: 960px;
  padding: 10px 15px;
  background-color: #fefefe;
}

.section h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  border-left: 5px solid #80cbc4;
  padding-left: 10px;
}

/* =========================================================
   カード
========================================================= */
.card {
  background-color: #fff;
  border-radius: 6px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  padding: 15px;
  margin: 0.5rem 0;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.card p {
  font-size: 0.9rem;
  color: #555;
}

.card-body {
  padding-top: 2px;
  padding-bottom: 4px;
}

.card-body ul {
  padding-left: 1.2rem;
  margin-bottom: 0;
}

.card-body ul li {
  margin: 0.2rem 0;
  font-size: 1rem;
  line-height: 1.7;
}

.card-body strong {
  color: #004d40;
}

.book-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-group {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

/* --- カード：レスポンシブ --- */
@media screen and (max-width: 768px) {
  .card {
    flex: 1 1 calc(50% - 20px);
  }
}

@media screen and (max-width: 480px) {
  .card {
    flex: 1 1 100%;
  }
}

/* =========================================================
   カルーセル（後半）
========================================================= */
.carousel-wrapper {
  margin: 20px auto;
  width: 100%;
  max-width: 960px;
}

.carousel-slide {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.carousel-inner img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}

/* --- キャプション（PC） --- */
.carousel-item {
  position: relative;
}

.carousel-caption {
  position: absolute !important;
  bottom: 20px;
  background-color: rgba(255, 255, 255, 0.6);
  padding: 12px;
  border-radius: 8px;
  color: #333;
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}

/* --- タイトルボタン --- */
.carousel-title a {
  display: inline-block;
  background-color: #005a9c;
  color: #fff !important;
  font-weight: bold;
  padding: 0.5em 1.2em;
  border-radius: 20px;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: background-color 0.3s ease;
}

.carousel-title a:hover {
  background-color: #007963;
}

/* --- インジケーター --- */
.carousel-indicators button {
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  background-color: rgba(0,0,0,0.5) !important;
  border: none !important;
}

.carousel-indicators .active {
  background-color: #fff !important;
}

.carousel-indicators {
  bottom: -10px;
  z-index: 2;
}

/* --- 矢印 --- */
.carousel-control-prev,
.carousel-control-next {
  width: 80px;
  height: 80px;
  top: 50%;
  transform: translateY(-50%);
}

.carousel-control-prev .bi,
.carousel-control-next .bi {
  color: #333 !important;
  font-size: 2.0rem !important;
}

  .carousel-control-prev {
    left: -20px;   /* ← 左へ広げる */
  }

  .carousel-control-next {
    right: -20px;  /* → 右へ広げる */
  }

.carousel-date {
  display: flex;
  justify-content: center;   /* ← 横方向を中央揃えにする */
  align-items: center;       /* ← 縦方向も中央揃え */
  gap: 6px;
  margin: 0;
  padding: 0;
  width: 100%;               /* ← 中央揃えを安定させる */
  text-align: center;        /* ← 念のため */
}

/* =========================================================
   スマホ：カルーセル最適化（行間・背景高さを詰める）
========================================================= */
@media screen and (max-width: 576px) {

  /* 半透明背景の高さを抑える */
  .carousel-caption {
    padding: 2px 4px !important;   /* ← かなり小さく */
    border-radius: 4px;
    max-width: 90%;
    line-height: 1.2;              /* ← 行間を詰める */
  }

  /* 日付（行間を詰める） */
  .carousel-caption .carousel-date {
    font-size: 0.7rem;
    line-height: 1.1;              /* ← 行間を詰める */
    margin: 0;                     /* ← 余白削除 */
  }

  /* NEWバッジ（上下余白を削除） */
  .carousel-caption .badge-new {
    margin: 0 !important;          /* ← 余白削除 */
  }

  /* タイトル（行間と余白を詰める） */
  .carousel-caption .carousel-title {
    margin: 0 !important;          /* ← 余白削除 */
    line-height: 1.2;              /* ← 行間を詰める */
  }

  /* タイトルのボタン（高さを抑える） */
  .carousel-caption .carousel-title a {
    padding: 0.2em 0.6em !important;  /* ← 高さを抑える */
    font-size: 0.65rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .carousel-control-prev {
    left: -25px;   /* ← 左へ広げる */
  }

  .carousel-control-next {
    right: -25px;  /* → 右へ広げる */
  }

}

/* =========================================================
   講座詳細
========================================================= */
.kouza-status {
  color: #d60000;
  font-weight: bold;
  font-size: 1.05rem;
}

.kouza-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 1px;
  margin-left: 20px;
}

.kouza-info-grid div {
  display: grid;
  grid-template-columns: 70px 1fr;
  column-gap: 8px;
  padding: 0;
}

.label {
  font-weight: bold;
  color: #333;
}

/* =========================================================
   バッジカラー
========================================================= */
.badge-event   { background-color: #f44336 !important; color: #fff !important; }
.badge-bousai  { background-color: #2196f3 !important; color: #fff !important; }
.badge-books   { background-color: #9c27b0 !important; color: #fff !important; }
.badge-culture { background-color: #ff9800 !important; color: #fff !important; }
.badge-notice  { background-color: #4caf50 !important; color: #fff !important; }
.badge-annual  { background-color: #ff7043 !important; color: #fff !important; }


/* =========================================================
   トップへ戻るボタン
========================================================= */
#page_top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  background: orange;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 999;
}

#page_top.show {
  opacity: 0.8;
  pointer-events: auto;
}

#page_top:hover {
  opacity: 1;
  transform: translateY(-3px);
}

/* =========================================================
   フッター
========================================================= */
footer {
  text-align: center;
  font-size: 0.85rem;
  color: #777;
  padding: 20px;
  background-color: #fdeef4;
  border-top: 1px solid #ccc;
}

footer .card {
  width: 70%;
  margin: 0 auto;
}

.footer-img {
  width: 100%;
  height: auto;
  display: block;
}

/* =========================================================
   見出しフォント統一
========================================================= */
h2.heading { font-size: 1.5rem; font-weight: 700; color: #004d40; margin-bottom: 1rem; }
h3.heading { font-size: 1.3rem; font-weight: 600; color: #00695c; margin-bottom: 1rem; }
h5.card-title { font-size: 1.2rem; font-weight: 600; color: #333; margin-bottom: 0.5rem; }

/* =========================================================
   公民館強調テキスト
========================================================= */
.opening-time { font-size: 1.3rem; color: #333; }
.holiday-info { font-size: 1.15rem; color: #333; }
.notice-text { font-size: 1rem; color: #005f48; font-weight: 500; }

/* =========================================================
   新着バッジ
========================================================= */
.badge-new {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #e53935;
  color: #fff;
  font-size: 0.7rem;
  padding: 0.3em 0.6em;
  border-radius: 12px;
  font-weight: bold;
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* =========================================================
   スマホ：共通レスポンシブ
========================================================= */
@media screen and (max-width: 768px) {
  .header-area { font-size: 85%; padding: 8px; }
}

@media screen and (max-width: 576px) {
  .col-6, .row .col-6 {
    max-width: 50%;
    flex: 0 0 50%;
  }
}

@media screen and (max-width: 480px) {
  h2.heading { font-size: 1.3rem; }
  h3.heading { font-size: 1.2rem; }
  h5.card-title { font-size: 1.1rem; }
  .navbar-nav .nav-link { font-size: 1rem; }
  footer .card { width: 100%; }
}

/* =========================================================
   スマホ専用表示切替
========================================================= */
@media (max-width: 576px) {
  .d-sm-none { display: block !important; }
  .d-sm-block { display: none !important; }
}

/* =========================================================
   強調文字（PC＋スマホアコーディオン）
========================================================= */
.card-body strong,
.accordion-body strong {
  color: #198754;
}

/* =========================================================
   スマホ：サークル一覧
========================================================= */
@media screen and (max-width: 576px) {
  #circleAccordion table {
    font-size: 0.85rem;
  }

  #circleAccordion th {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 4px 6px;
  }

  #circleAccordion td {
    white-space: normal;
    font-size: 0.85rem;
    padding: 4px 6px;
    line-height: 1.3;
  }

  #circleAccordion .accordion-button {
    font-size: 0.95rem;
    padding: 8px 10px;
  }
}

/* =========================================================
   サークル・更新年月日フォントサイズ
========================================================= */

#circle-title span {
  font-size: 0.8rem !important;   /* ← 好きなサイズに調整 */
}
