/* -------------------------- */
/* 基本フォント設定（アクセシビリティ配慮版） */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 100%; 
  transition: font-size 0.2s ease-out;
}

:root {
  --primary-blue: #005aad;
  --light-blue: #a0d8ef;
  --card-bg: #f5f5f5; 
  --content-width: 75rem; 
}

html.font-size-l { font-size: 115%; } 
html.font-size-s { font-size: 85%; } 

body {
  font-family: 
    "Helvetica Neue", 
    "Helvetica", 
    "Arial", 
    "Hiragino Sans", 
    "Hiragino Kaku Gothic ProN",
    "BIZ UDPGothic",
    "Meiryo", 
    sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  margin: 0;
}

.section-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  box-sizing: border-box;
}

/* -------------------------- */
/* header */

.site-header {
  width: 100%;
  padding: 0.5rem 0 1rem 0;
  background-image: url('/library/img/common/header_bg-80.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #333;
  background-color: #fff; 
  min-height: 50px; 
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.header-container {
  max-width: var(--content-width);
  width: 100%;
  margin: 0 auto; 
  padding: 0 1.25rem 0.5rem 1.25rem; 
  box-sizing: border-box;
  display: flex;
  justify-content: space-between; 
  align-items: flex-end;
}

/* ブランディング */
.header-branding {
  display: flex;
  align-items: flex-end;
  gap: 0;
  margin-top: 0.5rem;
}

.logo-link {
  display: block;
  line-height: 0;
}

.complex-logo {
  display: block;
  height: auto;
  width: 7.5rem; 
}

.library-title-area {
  margin: 0.75rem 0.9375rem;
  padding-left: 0.9375rem;
  border-left: 1px solid #444;
  line-height: 1;
}

.library-home-link {
  text-decoration: none;
  color: #333;
  background-color: transparent;
  display: block;
}

.library-title {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 0.02em;
  color: #7756A6;
  background-color: transparent;
}

/* -------------------------- */
/* 右側：ユーティリティ（文字サイズ・アクセス） */

.header-utilities {
  display: flex;
  align-items: center; 
  gap: 0.75rem;
  padding-bottom: 2px;
}

/* 共通の高さとボックスモデルを適用するための設定 */
.font-size-selector,
.access-link {
  box-sizing: border-box;
  height: 2.75rem; 
  display: flex;
  align-items: center;
}

.font-size-selector {
  color: #333;
  background-color: #f8f9fa;
  border: 1px solid #d0d0d0;
  border-radius: 3.125rem;
  padding: 0 0.75rem; 
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.utility-label {
  font-size: 0.875rem;
  font-weight: bold;
  margin-right: 5px; 
  color: #555;
  background-color: inherit;
  white-space: nowrap;
}

.font-btn-group {
  display: flex;
  gap: 0;
  position: relative;
  color: inherit;
  background: #eee;
  border-radius: 1.25rem;
  padding: 2px;
  align-items: center;
}

.font-btn-indicator {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 2rem; 
  height: 2rem;
  color: inherit;
  background-color: #a0d8ef;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.font-btn {
  position: relative;
  z-index: 1;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: color 0.3s ease;
  padding: 0;
}

/* 選択されたボタンのテキスト色：黒のまま */
.font-btn.is-active {
  color: #333;
  background-color: transparent;
}

/* インジケーターの移動距離（ボタン幅 2rem 分） */
.font-btn-group:has(#btn-font-l.is-active) .font-btn-indicator {
  transform: translateX(0);
}

.font-btn-group:has(#btn-font-m.is-active) .font-btn-indicator {
  transform: translateX(2rem);
}

.font-btn-group:has(#btn-font-s.is-active) .font-btn-indicator {
  transform: translateX(4rem);
}

/* 交通・アクセスボタン */
.access-link {
  justify-content: center;
  background-color: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 3.125rem;
  padding: 0 1.25rem; 
  font-size: 0.875rem;
  font-weight: bold;
  text-decoration: none;
  color: #333;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.2s;
  white-space: nowrap;
}

.access-link:hover {
  color: inherit;
  background-color: #f8f8f8;
  border-color: #999;
}

/* フォーカス時の視認性向上 */
.logo-link:focus,
.library-home-link:focus,
.font-btn:focus,
.access-link:focus {
  outline: 3px solid #005aad;
  outline-offset: 2px;
}

/* -------------------------- */
/* nav.inc*/

.global-nav {
  width: 100%;
  padding: 1.5rem 0;
  color: inherit;
  background-color: transparent;
}

.nav-list {
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  list-style: none;
  display: flex;
  justify-content: space-around;
  gap: 1rem;
}

.nav-item {
  flex: 1;
  max-width: 12.5rem; 
}

.nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 3.5rem;
  background-color: #fff;
  border: 2px solid #005aad; 
  border-radius: 0.75rem; 
  text-decoration: none;
  color: #333;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  transition: all 0.2s ease-in-out;
  text-align: center;
}

.nav-button:hover {
  color: inherit;
  background-color: #f0f7ff;
  transform: translateY(-2px); 
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.nav-button:active {
  transform: translateY(0);
}

/* -------------------------- */
/* アクセシビリティ：フォーカス時の視認性向上 */

.logo-link:focus,
.library-home-link:focus,
.font-btn:focus,
.access-link:focus,
.nav-button:focus {
  outline: 3px solid #005aad;
  outline-offset: 2px;
}

/* -------------------------- */
/* Footer Styles */

.site-footer {
  width: 100%;
  margin-top: 4rem;
  color: #333;
  background-color: #fff;
}

.footer-bg-container {
  position: relative;
  width: 100%;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.footer-custom-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.footer-content {
  position: relative;
  z-index: 2;
  max-width: var(--content-width);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* 連絡先・お問い合わせを横並びにするためのラッパー */
.footer-contact-area {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  width: 100%;
  margin-top: 1rem;
}

/* 所在地・連絡先 */
.footer-info {
  text-align: left;
  color: #333;
  background-color: inherit;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(255,255,255,0.9); 
}

.footer-contact-list {
  display: grid;
  grid-template-columns: max-content max-content; 
  column-gap: 3rem; 
  row-gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact-list li {
  display: flex;
  justify-content: flex-start;
  gap: 1.5rem;
  font-size: 0.75rem;
  border-bottom: 1px dashed #ccc;
  padding: 0.2rem 0;
  min-width: 16rem;
}

.footer-contact-list span {
  width: 7rem;
  display: inline-block;
}

.footer-contact-list a {
  color: #005aad;
  background-color: inherit;
  text-decoration: none;
  font-family: "BIZ UDPGothic", sans-serif;
  letter-spacing: 0.02em;
}

/* 施設ボタンリスト */
.facility-list {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.facility-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 11rem;
  height: 3rem;
  background-color: #fff;
  border: 1px solid #333;
  border-radius: 50px;
  text-decoration: none;
  color: #333;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  overflow: hidden; 
  z-index: 1;
}

.facility-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 8px; 
  height: 100%;
  z-index: -1; 
  transition: all 0.3s ease;
}

.btn-library::before { background-color: #81D4FA; color: inherit;}
.btn-library:hover { border-color: #81D4FA; color: inherit;}

.btn-park::before { background-color: #f6d465; color: inherit;}
.btn-park:hover { border-color: #f6d465; color: inherit;}

.btn-sweets::before { background-color: #f1a7b9; color: inherit;}
.btn-sweets:hover { border-color: #f1a7b9; color: inherit;}

.facility-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.12);
  color: #000;
  background-color: #fff;
}

.facility-btn:hover::before {
  width: 100%;
  opacity: 0.15; 
}

.footer-inquiry {
  display: flex;
  align-items: center;
  padding-left: 3rem;
  border-left: 1px solid #ccc;
}

.inquiry-link-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #333;
  background-color: transparent;
  text-decoration: none;
  transition: all 0.2s ease;
}

.inquiry-link-button i {
  font-size: 2rem;
  color: #444;
  background-color: transparent;
  transition: color 0.2s ease;
}

/* テキスト部分の設定 */
.inquiry-text {
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 0.05em; 
}

/* ホバー時のアクション */
.inquiry-link-button:hover {
  opacity: 0.7;
  color: var(--primary-blue);
  background-color: transparent;
}

.inquiry-link-button:hover i {
  color: var(--primary-blue);
  background-color: transparent;
  transform: translateY(-2px);
}

/* コピーライトエリア*/
.footer-copyright {
  background-color: #444;
  color: #fff;
  padding: 0.75rem 0;
  text-align: center;
  font-size: 0.75rem;
}

.nav-wrapper {
  display: none; 
}

.menu-toggle {
  display: none; 
}


    /* ページトップへ戻るボタン */
  .page-top-btn {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 3.2rem;
    height: 3.2rem;
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid #005aad;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #005aad;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 500;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .page-top-btn.is-show {
    opacity: 1;
    visibility: visible;
  }

  .page-top-btn:active {
    transform: scale(0.9);
    color: inherit;
    background-color: #f0f7ff;
  }
