.wrap {
  width: auto;
  height: 160px;
  background: var(--white);
  color: var(--text-color);
}
#header, #footer {
  line-height: 1;
}
.about, .global_nav, .footer_wrapper, .footer_list, footer.nav_item, .other_nav {
  max-width: 1120px;
}
.footer_wrapper, .footer_list, .about, .global_nav, .other_nav {
margin: 0 auto;
}
.header_container {
  width: 100%;
  background: var(--white);
  position: fixed;
  top: 50px;
  left: 0;
  z-index: 105;
  transition: top 0.3s ease-in-out;
}
.sp_header_container {
  width: 100%;
  position: fixed;
  top: 50px;
  background: var(--white);
  z-index: 500;
  transition: transform 0.3s ease, opacity 0.3s; /* 滑らかに */
}
/* スクロールで上へ */
.header_container.hide,
.sp_header_container.hide{
    top:0px;
}
/* 病院情報部分 */
.about {
  height: 100px;
  display: flex;
  justify-content: space-between;
  padding: 20px 20px 10px 20px;
}

/* ロゴ */
.logo_wrapper {
  width: 100%;
}
h1 {
  font-size: 2rem;
  margin: 10px 0;
}
img.logo {
  width: 22px;
  margin-right: 6px;
}

/* 文字変更ボタン */
.font_size_btn {
  position: fixed;
  top: 0; /* 右下に配置する場合の例 */
  left: 0;
  width: 100%;
  transition: transform 0.3s ease, opacity 0.3s; /* 滑らかに */
  background-color: var(--main-color);
  color: var(--white);
  padding: 10px;
  text-align: center;
  z-index: 1000;
}
.bl_sizeBtn, .sp_bl_sizeBtn {
  width: 32px;
  height: 32px;
  background-color: var(--white);
  color: var(--text-color);
  text-align: center;
  margin-left: 10px;
  transition: opacity 0.3s; /* 切り替わりを滑らかにする */
}
/* hideクラスがついた時 */
.font_size_btn.hide {
  transform: translateY(-100px); /* 下に追い出す（上ならマイナス） */
  opacity: 0; /* ついでに透明にすると綺麗 */
  pointer-events: none; /* 消えている間はクリックできないように */
}

/* 選択中のスタイル */
.bl_sizeBtn.is_active, 
.sp_bl_sizeBtn.is_active {
  opacity: 0.7;
}
#fz_sm {
  font-size: 16px;
}
#fz_md {
  font-size: 20px;
}
#fz_lg {
  font-size: 24px;
}

/* 所在地 */
.hp_info p {
  text-align: right;
}
.tel {
  font-size: 2rem;
  display: inline-block;
}
.fa-phone:before {
  content: "\f095";
  color: var(--white);
  background-color: var(--main-color);
  padding: 4px;
  margin-right: 10px;
  font-size: 80%;
  vertical-align: 3px;
}
.address {
  margin-top: 6px;
}
.fa-location-dot {
  content: "\f3c5";
  margin-right: 7px;
  color: var(--main-color);
  font-size: 1.2rem;
}

/* ヘッダー内メニュー */
.nav_list {
  width: 100%;
  background: var(--main-color);
}
.nav_item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  color: var(--white);
  width: 100%;
  text-align: center;
}
.nav_item li {
  padding: 14px;
}
.header_flex {
  display: flex;
  width: 100%;
  justify-content: flex-end;
}

/*TB開閉メニュー*/
.Label {		/*タイトル*/
    display: none;
    width: 100%;
    background: rgba(var(--main-color-rgb), 0.2); 
    color: var(--main-color);
    height: 40px;
    font-weight: bold;
    text-align: center;
    align-content: center;
    padding-right: 20px;
  }
  .Label::after {	
    content: "▼";
    margin: 0 0 0 10px;
    -webkit-transform: rotate(0deg);
    position: absolute;
    transform: rotate(0deg);
    top: 12px;
  }
  .toggle:checked + .Label::after {
	  transform: rotate(-180deg);
    top: 14px;
  }
  .Label, .nav_list {
	  -webkit-backface-visibility: hidden;
	  backface-visibility: hidden;
	  transform: translateZ(0);
	  transition: all 0.3s;
  }
  .toggle:checked + .Label + .nav_list {	/*開閉時*/
	height: fit-content;
	padding: 0;
	transition: all .3s;
  }
.sp_header_container, .sp_global_nav {
  display: none;
}
.sp_header_container, .sp_logo_wrapper p, .sp_hp_info p, .sp_address p {
  text-align: center;
}
.sp_font_size_btn {
  background: rgba(var(--main-color-rgb), 0.3); 
  align-content: center;
}
.sp_bl_sizeBtn {
  background-color:var(--white);
} 
.sp_about {
  width: 100%;
  padding: 10px 20px;
}
.sp_logo_wrapper h1 {
  font-size: 1.5rem;
}
.sp_hp_info {
  width: 100%;
}
.sp_flex {
  display: flex;
}
.sp_tel {
  display: block;
  background-color:var(--main-color);
  height: 40px;
  align-content: center;
  color: var(--white);
}
.sp_tel p {
  line-height: 1.8;
  margin: 0;
}
.sp_address {
  padding: 9px 0;
  text-align: center;
}
.toggle,label,.sp_toggle {
	display: none;
}

/* 診療時間表 */
table {
  border-collapse: collapse;
}
#time_table {
  max-width: 546px;
}
.first_view #time_table {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 100%;
}
table.time_list {
  width: 100%;
}
.time_list tr {
  border-bottom: var(--main-color) 1px solid;
}
.time_list thead {
  background: var(--main-color);
  color: var(--white);
  font-size: clamp(0.875rem, 1.5vw, 1rem);
}
.time_list th, .time_list td {
  padding: clamp(4px, 2vw, 8px);
  align-content: center;
  text-align: center;
  font-weight: normal;
  border-right: none;
  height: 46px;
}
th.time-col {
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  border-bottom: var(--main-color) 1px solid;
}
.time_list tbody {
  background: var(--white);
  color: var(--text-color);
} 
.time_list tbody th {
  color: var(--text-color);
}
.time_list tbody:last-child th {
  height: 41px;
}
.time_list tbody td {
  color: var(--main-color);
}
.saturday_schedule {
  color: rgba(var(--main-color-rgb), 0.5);
}
.clinic_closed{
  color: rgba(var(--gray-rgb), 0.5);
}
th.th_text  {
  font-size: 0.875rem;
  text-align: justify;
}

/* ニュース */
.news_list {
  padding: 20px 20px 40px 20px;
  overflow-y: scroll;
  scrollbar-width: auto;
  height: 344px;
  padding-right: 10px;
  border: var(--light-gray) 2px solid;
}
/* スクロールバー全体 */
.news_list::-webkit-scrollbar {
  width: 12px;            /* 垂直スクロールバーの幅 */
}
/* スクロールバーのつまみ（ドラッグ部分） */
.news_list::-webkit-scrollbar-thumb {
  background: var(--scroll-color);    /* 色 */
  border-radius: 0;       /* 丸み */
  border: 1px solid #fff; /* 外枠との間にスペースを作る */
}
.news_title {
  font-weight: bold;
}
time {
  padding-right: 20px;
}
.news_item {
  padding: 10px;
  margin-bottom: 10px;
}
.news_item span {
  color: var(--red);
}
/* ニュースここまで*/

/* フッター */
footer {
  padding-bottom: 100px;
  background-color: var(--white);
}
.footer_container {
  background: rgba(var(--main-color-rgb), 0.1);
}
.footer_wrapper {
  display: flex;
  justify-content: space-between;
  padding: 100px 20px;
  gap: 40px;
}
footer .logo_wrapper, footer .hp_info {
  line-height: 1.5;
}
.footer_hospital_name {
  text-align: justify;
  font-size: 2rem;
}
.footer_list {
  margin-top: 20px;
}
footer .hp_info {
  margin: 10px 0 20px 0;
  display: inline-block;
}
.footer_map .map_btn {
  padding: 16px 40px;
  background: var(--main-color);
}
.footer_list li {
  color: var(--main-color);
}
.medical_policy, .footer_list a, .other_nav a, .map_btn {
  text-decoration: underline;
}
.footer_map iframe{
  width: 100%;
  max-width: 546px;
  height: 320px;
  margin-bottom: 40px;
}
.footer_list .global_nav {
  padding: 10px 0;
}
.other_nav {
  display: flex;
  justify-content: space-evenly;
  max-width: 780px;
  color: var(--main-color);
  padding: 40px 20px;
}
.copyright {
  background: var(--main-color);
  color: var(--white);
  height: 30px;
  align-content: center;
  padding: 0 20px;
}

/* topへ戻るボタン */
#page_top {
  width: 60px;
  height: 60px;
  z-index: 105;
  position: fixed;
  right: 0;
  bottom: 130px;
  padding: 8px;
  line-height: 1.3;
  background: var(--main-color);
  color: var(--white);
  text-align: center;
  align-content: center;
  cursor: pointer;
  font-size: 0.875rem;
}
#page_top span {
  text-decoration: overline;
}
#page_top:hover {
  opacity: 0.7;
}
#page_top a {
  display: block;
}

/* 表示状態になったとき（例：クラスを追加） */
#page_top.show {
  opacity: 1;
  transform: translateY(0);
}


/* レスポンシブ */

/* ヘッダー　レスポンシブ */
@media screen and (max-width: 1199px) {
  #header {
    max-width: 1199px;
    transition: transform 0.3s ease;
  }
  .Label {
    display: block;
  }
  .toggle:checked + .Label + .nav_list {
    padding: 20px;
  }
  .header_flex {
    display: block;
    width: auto;
  }
  .nav_list {
    height: 0;
    overflow: hidden;
  }
  .nav_item {
    justify-content: center;
  }
  .nav_item li {
    margin: 0 10px;
  }
  .logo_wrapper {
    width: auto;
  }

/* フッター　レスポンシブ  */
  .other_nav {
    padding: 30px 20px 80px 20px;
    }
  .footer_wrapper {
    display: block;
    max-width: 560px;
    text-align: center;
  }
  footer .hp_info, footer .logo_wrapper p {
    text-align: center;
  }
  .footer_map {
    margin-top: 40px;
  }
  .footer_container {
  padding-bottom: 80px;
  }

/* 診療時間表　レスポンシブ */
  #time_table {
    display: block;
  }
}
@media screen and (max-width: 910px) {
  footer {
    padding-bottom: 140px;
  }
  #page_top {
    bottom: 200px;
  }
}
@media screen and (max-width: 749px) {
  #header.hide {
    transform: translateY(-52px);
  }
  .header_container, .footer_list .sp_nav_item {
    display: none;
  }
  .sp_header_container, .global_nav {
    display: block;
  }
  .Label {
    width: 100%;
    height: 40px;
  }
  .nav_list {
    height: 0;
    overflow: hidden;
    position: absolute;
    top: 100%;
    left: 0;
  }
  .nav_item {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, auto));
  }
  .nav_item li {
    padding: 14px;
    text-align: justify;
  }
  .first_view #time_table {
    top: 440px;
    right: inherit;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 20px;
  }
  .footer_wrapper {
    padding: 80px 20px;
  }
  .footer_list {
    padding: 0;
  }
  .footer_list .global_nav {
    padding: 20px;
  }
  .footer_item {
    margin-bottom: 40px;
  }
  .footer_hospital_name {
    font-size: 1.5rem;
  }
  .time_list th, .time_list td {
    height: 40px;
    width: auto;
  }
  .time_list thead {
    height: 27px;
  }
  #footer .time_table {
    margin: 0;
  }
  .footer_map {
    width: 100%;
  }
  .news_list {
    height: 500px;
    padding: 10px 10px 40px 10px;
  }
  .other_nav {
    padding: 20px 10px 80px 10px;
    display: block;
    text-align: center;
  }
  .other_nav a {
    display: block;
  }
  .privacy_policy {
    margin-bottom: 40px;
  }
  .menu_toggle {
    height: 40px;
  }
}
@media screen and (max-width: 720px) {
  footer {
    padding-bottom: 70px;
  }
  #page_top {
    bottom: 16vh;
  }
}
@media screen and (max-width: 340px) {
.sp_flex {
    display: flex;
    flex-wrap: wrap-reverse;
  }
}