/* -------------------------- */
/* 重要なお知らせ（Important Info） */

.important-news-section {
  max-width: 75rem;
  margin: 1.5rem auto;
  padding: 0 1.25rem;
}

.important-news-card {
  background-color: #fff;
  color: #333;
  border: 2px solid #f5c6cb; 
  border-radius: 0.75rem;
  padding: 1.5rem 2rem;
  box-shadow: 0 4px 15px rgba(184, 42, 55, 0.05);
}

/* ヘッダー部分 */
.important-news-header {
  margin-bottom: 1.25rem;
  border-bottom: 1px dashed #f5c6cb;
  padding-bottom: 0.75rem;
}

.important-news-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.25rem;
  font-weight: bold;
  color: #842029;
  background-color: inherit;
  margin: 0;
}

/* アイコンサークル */
.icon-circle.red-tint {
  background-color: #f8d7da; 
  color: #842029;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(184, 42, 55, 0.1);
}

.icon-circle.red-tint i {
  color: #b02a37; 
  background-color: inherit;
}

/* リスト部分 */
.important-news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.important-news-item {
  border-bottom: 1px solid #f8f9fa;
}

.important-news-item:last-child {
  border-bottom: none;
}

.important-news-link {
  display: flex;
  align-items: center;
  padding: 1rem 0.5rem;
  text-decoration: none;
  color: #333;
  background-color: #fff;
  transition: all 0.2s;
  border-radius: 4px;
}

.important-news-link:hover {
  background-color: #fcf8f8;
  color: #b02a37;
}

.notice-date {
  font-size: 0.875rem;
  font-weight: bold;
  color: #6F6F6F;
  background-color: inherit;
  width: 100px;
  flex-shrink: 0;
}

.notice-text {
  flex: 1;
  font-weight: bold;
  line-height: 1.4;
  margin-right: 1rem;
}

/* 右側の矢印アイコン */
.important-news-link i {
  color: #ddd;
  background-color: inherit;
  font-size: 1rem;
  transition: all 0.2s;
}

.important-news-link:hover i {
  transform: translateX(3px);
  background-color: inherit;
  color: #b02a37;
}

/* お知らせ一覧ボタン */
.notice-footer {
  margin-top: 1.5rem;
  text-align: center;
}

.btn-all-notices {
  display: inline-block;
  padding: 0.6rem 2.5rem;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 50px;
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: bold;
  transition: all 0.2s;
}

.btn-all-notices:hover {
  background-color: #f8f9fa;
  border-color: #ccc;
  color: #333;
}

/* -------------------------- */
/* 図書館からのお知らせ（タブUI） */

.library-news-tabs-section {
  max-width: 75rem;
  margin: 2.5rem auto;
  padding: 0 1.25rem;
}

.news-tabs-header {
  margin-bottom: 1.25rem;
}

.news-tabs-main-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  background-color: #fff;
}

/* タブリストの装飾 */
.news-tab-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  border-bottom: 3px solid #005aad; 
}

.news-tab-item {
  flex: 1;
  margin-right: 4px;
}

.news-tab-item:last-child {
  margin-right: 0;
}

.news-tab-btn {
  width: 100%;
  padding: 0.75rem 0.5rem;
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  font-size: 1rem;
  font-weight: bold;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 4rem;
  line-height: 1.3;
}

.news-tab-btn.is-active {
  background-color: #005aad;
  color: #fff;
  border-color: #005aad;
}

.news-tab-btn:hover:not(.is-active) {
  background-color: #e9ecef;
  color: inherit;
}

/* パネルエリアの装飾 */
.panel-group {
  background-color: #fff;
  color: #333;
  border: 1px solid #ddd;
  border-top: none;
  padding: 1.5rem;
  border-radius: 0 0 8px 8px;
}

/* パネルの表示・非表示制御 */
.panel {
  display: none;
}

.panel.is-show {
  display: block;
  animation: tabFadeIn 0.4s ease;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -------------------------- */
/* インクルードファイル内の共通リスト装飾 */

.el_news_group {
  list-style: none;
  padding: 0;
  margin: 0;
}

.el_news_item {
  border-bottom: 1px solid #eee;
}

.el_news_item:last-child {
  border-bottom: none;
}

.el_news_content {
  display: block;
  padding: 1.25rem 0.75rem;
  text-decoration: none;
  color: #333;
  background-color: #fff;
  transition: background-color 0.2s;
}

.el_news_content:hover {
  background-color: #f0f7ff;
  color: inherit;
}

.subject-area {
  line-height: 1.5;
  font-weight: normal;
}

/* -------------------------- */
/* レスポンシブ対応（横スクロール型への変更） */

@media (max-width: 768px) {
  .news-tab-list {
    flex-wrap: nowrap;
    overflow-x: auto;  
    -webkit-overflow-scrolling: touch;
    border-bottom: 2px solid #005aad;
    padding: 0 5px; 
    scrollbar-width: none; 
  }

  .news-tab-list::-webkit-scrollbar {
    display: none;
  }

  .news-tab-item {
    flex: 0 0 auto; 
    width: auto;
    margin-right: 5px;
  }

  .news-tab-btn {
    border-radius: 6px 6px 0 0;
    font-size: 0.95rem;
    min-height: 3.2rem;
    padding: 0 1.25rem; 
    white-space: nowrap; 
  }

  .news-tab-btn.is-active {
    border-bottom: none; 
  }

  .panel-group {
    margin-top: 0;
    border-top: none;
    padding: 1.25rem 1rem;
    border-radius: 0 0 8px 8px;
  }
}

/* -------------------------- */
/* 本日の開館状況（Library Status） */

.library-status-section {
  max-width: 75rem; 
  margin: 1.5rem auto;
  padding: 0 1.25rem; 
}

.el_library_list {
  background-color: #f0f7ff; 
  color: #333;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: inset 0 2px 10px rgba(0, 90, 173, 0.05);
  width: 100%;
  box-sizing: border-box;
}


.library_list_com {
  text-align: center;
  margin-bottom: 2rem;
}

.schedule-ttl {
  font-size: 1.3rem;
  font-weight: bold;
  color: #005aad;
  background-color: #f0f7ff;
  margin-bottom: 0.5rem;
}

.ttl-date {
  font-size: 1.4rem; 
  color: #333;
  background-color: #f0f7ff;
  margin: 0;
}

.ttl-date span {
  font-weight: bold;
  padding: 0 2px;
}

/* グリッドレイアウト */
.lib-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.lib-list a {
  text-decoration: none;
  display: block;
}

.lib-item {
  background-color: #fff;
  color: #333;
  border-radius: 0.75rem;
  padding: 1.5rem 1rem;
  text-align: center;
  height: 100%;
  min-height: 12.75rem; 
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  box-sizing: border-box;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.lib-list a:hover .lib-item {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 90, 173, 0.1);
  border-color: #ADDAFB;
}

.lib-name {
  font-size: 1.15rem;
  font-weight: bold;
  color: #333;
  background-color: #fff;
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}

/* 開館・閉館のステータス */
.lib-info-open {
  font-size: 1.3rem;
  font-weight: bold;
  margin: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.lib-info-open .status-open {
  color: #005aad;
  background-color: #fff;
}

.lib-info-open .status-close {
  color: #b02a37;
  background-color: #fff;
}

.status-self { 
  color: #00873c;
  font-size: 1.05rem;
  background-color: #fff;
}

.lib-info {
  font-size: 0.95rem;
  color: #666;
  background-color: #fff;
  margin: 0;
  min-height: 1.2em; 
}

.library_list_footer {
  text-align: right;
  margin-top: 1.5rem;
}

.btn-calendar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  background-color: #fff;
  border: 1.5px solid var(--primary-blue);
  border-radius: 50px;
  color: var(--primary-blue);
  font-weight: bold;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 90, 173, 0.1);
}

.btn-calendar:hover {
  background-color: var(--primary-blue);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 90, 173, 0.2);
}

.btn-calendar i {
  font-size: 1.1rem;
}


/* -------------------------- */
/* レスポンシブ対応 */

@media (max-width: 768px) {
  .news-tab-list {
    flex-wrap: nowrap; 
    overflow-x: visible; 
    display: flex;
    width: 100%;
  }

  .news-tab-item {
    flex: 1; 
    margin-right: 2px;
    min-width: 0;
  }

  .news-tab-btn {
    border-radius: 6px 6px 0 0;
    font-size: 0.85rem;
    min-height: 3.5rem;
    padding: 0.5rem 2px;
    white-space: normal;
    line-height: 1.2;
    word-break: break-all;
  }

  .news-tab-btn.is-active {
    border-bottom: none;
  }

  .panel-group {
    padding: 1.25rem 1rem;
  }

  .panel-group {
    margin-top: 0;
    border-top: none;
    padding: 1.25rem 1rem;
    border-radius: 0 0 8px 8px;
  }

  /* 開館状況のスマホ対応 */
  .library-status-section {
    padding: 0 1.25rem;
  }
  .el_library_list {
    padding: 2rem 1rem;
  }
  .lib-list {
    grid-template-columns: repeat(2, 1fr); 
    gap: 0.75rem;
  }
  .lib-item {
    min-height: 10rem;
    padding: 1.25rem 0.75rem;
  }
  .lib-name {
    font-size: 1rem;
  }
  .lib-info-open {
    font-size: 1.15rem;
  }
  .ttl-date {
    font-size: 1.2rem;
  }
  .library_list_footer {
    text-align: center;
    margin-top: 1.25rem;
  }
  .btn-calendar {
    width: 90%;
    justify-content: center;
    font-size: 0.95rem;
  }
}