/* ---- footer.css ---- */
.footer{position: relative;
  color: #666;
  font-family: "Noto Sans JP", sans-serif;
  text-align: center;
  overflow: hidden;
  margin-top: 30px;}
.footer__background{position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block; 
  background-image: url("https://www.yasuda-ortho.com/wp-content/uploads/2024/12/FFA559.png") !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat; 
  opacity: 0.8;}
.footer__content{position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  flex-direction: column;
  align-items: center;
  gap: 40px;}
.footer__logo img{max-width: 200px;
  height: auto;
  margin-bottom: 20px;}
.footer__info-hours{display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  width: 100%;}
.footer__info{flex: 1;
  font-size: 16px;
  line-height: 1.8;
  text-align: left;
  margin-left: 80px;
  margin-top: 32px;
  margin-bottom: 40px;}
.footer__phone{font-size: 20px;
  margin-top: 10px;}
.footer__hours{flex: 1;
  text-align: left;}
.footer__hours table{width: 100%;
  border-collapse: collapse;
  font-size: 14px;}
.footer__hours th,.footer__hours td{border: 1px solid #666;
  padding: 10px;}
.footer__hours th{background-color: rgba(255, 255, 255, 0.2);
  font-weight: bold;}
.footer__hours-note{margin-top: 10px;
  font-size: 16px;
  margin-bottom: 20px;}
.footer__menu ul{display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0;
  list-style: none;
  margin: 40px;}
.footer__menu li a{color: #666;
  text-decoration: none;
  font-size: 15px;}
.footer__menu li a:hover{text-decoration: underline;}
.footer__map iframe{width: 100%;
  height: 400px; 
  border: none;
  margin-top: 30px;}
.footer__copyright{margin-top: 20px;
  font-size: 12px;
  opacity: 0.8;}
@media (max-width: 1024px){
.footer__info{flex: 1;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    margin-left: 10px;}
.footer__content{padding: 20px;
    gap: 20px;}
.footer__info-hours{flex-direction: column;
    gap: 20px;}
.footer__logo img{max-width: 150px;}
.footer__hours table,.footer__menu ul{font-size: 12px;}
.footer__map iframe{height: 250px;}
}
.sidebar{position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background-color: #333;
  display: flex;
  flex-direction: column;
  padding: 0;}
.sidebar-item{display: flex;
  flex-direction: column; 
  align-items: center;
  color: white;
  text-decoration: none;
  font-size: 16px; 
  background-color: transparent; 
  padding: 15px; 
  transition:
    background 0.3s ease,
    color 0.3s ease; 
  border-bottom: 1px solid #555;}
.sidebar-item:last-child{border-bottom: none;}
.sidebar-item img{width: 32px; 
  height: 32px;
  margin-bottom: 8px;}
.sidebar-item:hover{background-color: #444;
  color: #964e73;}
@media screen and (max-width: 1024px){
.sidebar{flex-direction: row;
    justify-content: space-around;
    bottom: 0;
    right: 0;
    left: 0;
    top: auto;
    transform: none;
    background-color: #333;
    padding: 0; 
    border-top: 1px solid #555;}
.sidebar-item{flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 14px; 
    padding: 10px;
    border-bottom: none;}
.sidebar-item img{width: 28px; 
    height: 28px;
    margin: 0 0 5px;}
.sidebar-item:hover{color: #964e73;}
}
html{scroll-behavior: smooth;}
.pagetop{height: 50px;
  width: 50px;
  position: fixed;
  right: 30px;
  bottom: 120px; 
  background: #fff;
  border: solid 2px #964e73;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;}
.pagetop__arrow{height: 10px;
  width: 10px;
  border-top: 3px solid #964e73;
  border-right: 3px solid #964e73;
  transform: translateY(20%) rotate(-45deg);}
.chat-toggle-button{position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(
    45deg,
    #7a57d1,
    #ad88f0
  ); 
  color: #fff;
  padding: 14px 20px;
  border-radius: 35px; 
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 6px 15px rgba(122, 87, 209, 0.4); 
  z-index: 1000;
  transition: all 0.2s ease;}
.chat-box{position: fixed;
  bottom: 80px;
  right: 20px;
  width: 380px; 
  max-height: 550px; 
  background: #fff;
  border-radius: 16px; 
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 999;
  overflow: hidden;}
.chat-box.active{opacity: 1;
  pointer-events: auto;
  animation: fadeInUpZoom 0.5s ease forwards;
  height: 550px; 
  z-index: 1000;}
@keyframes fadeInUpZoom{
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.chat-header{background: linear-gradient(90deg, #5a3f8e, #7a57d1); 
  color: #fff;
  padding: 15px 16px;
  font-weight: bold;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  flex-shrink: 0;}
.chat-header span{flex-grow: 1;
  text-align: center;
  font-size: 16px;}
.chat-header::before{content: "🦷";
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  background-color: #ad88f0; 
  border-radius: 50%;
  margin-right: 10px;
  font-size: 18px;
  color: #fff;
  order: 1;}
.chat-header button{order: 2;
  background: transparent;
  color: #fff;
  font-size: 18px;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background 0.3s;}
.chat-header button:hover{background: rgba(255, 255, 255, 0.15);}
.chat-body{flex: 1;
  overflow-y: auto;
  padding: 15px;
  font-size: 14px;
  background: #fcfaff; 
  scroll-behavior: smooth;}
.bot-message{background: #fff;
  padding: 12px 18px;
  border-radius: 20px;
  border-top-left-radius: 5px;
  max-width: 80%;
  margin-bottom: 15px;
  margin-left: 50px; 
  position: relative;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  line-height: 1.6;
  color: #333;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  text-align: left;}
.bot-message::before{content: "🧑‍⚕️";
  position: absolute;
  top: -5px;
  left: -50px;
  width: 40px;
  height: 40px;
  background-color: #7a57d1; 
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  color: #fff;}
.chat-body a{color: #7a57d1; 
  font-weight: bold;
  text-decoration: underline;
  transition: all 0.3s ease;
  display: inline;}
.chat-body a:hover{color: #5a3f8e;
  background-color: #f0f0f5;
  padding: 2px 4px;
  border-radius: 4px;
  text-decoration: none;}
.bot-message a[href^="http"],.bot-message a[href^="tel"]{display: block;
  margin: 8px 0;
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;

  background: #ad88f0; 
  color: #fff !important;
  box-shadow: 0 3px 8px rgba(122, 87, 209, 0.3);

  width: 100%;
  box-sizing: border-box;
  position: relative;
  padding-left: 35px;
  text-decoration: none;}
.bot-message a[href^="http"]::before{content: "💻"; 
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #fff;}
.bot-message a[href^="tel"]::before{content: "📞";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #fff;}
.chat-input{display: flex;
  padding: 10px;
  background: #fff;
  border-top: 1px solid #ddd;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  flex-shrink: 0;
  z-index: 9999;}
.chat-input input{flex: 1;
  border: 1px solid #ddd;
  padding: 12px 15px;
  font-size: 16px;
  border-radius: 25px;
  margin: 0 5px 0 0;}
.chat-input button{border: none;
  background: linear-gradient(135deg, #7a57d1 0%, #ad88f0 100%);
  color: white;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 25px;
  margin-left: 5px;
  font-weight: bold;}
.chat-body table{width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  background-color: #fff;
  border: 1px solid #ccc;}
.chat-body th{background-color: #d28fb0;
  color: white;
  padding: 8px;
  border: 1px solid #ccc;
  text-align: center;}
.chat-body td{padding: 8px;
  border: 1px solid #ccc;
  text-align: center;}
@media screen and (max-width: 1024px){
.chat-box{width: 100% !important;
    max-height: 100vh !important;
    left: 0 !important;
    bottom: 0 !important;
    border-radius: 0 !important;}
.chat-box.active{bottom: 0 !important;
    height: 100vh !important;
    top: 0 !important;}
.bot-message{margin-left: 50px !important;}
.bot-message::before{left: -40px !important;}
.chat-header{border-radius: 0 !important;}
.chat-input{z-index: 500 !important;
    border-radius: 0 !important;}
}
@media screen and (max-width: 1024px){
.chat-toggle-button{position: fixed;
    right: 20px;
    bottom: 80px;
    right: 0px;
    background: linear-gradient(45deg, #7a57d1, #ad88f0);
    color: #fff;
    padding: 14px 20px;
    border-radius: 35px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 6px 15px rgba(122, 87, 209, 0.4);
    z-index: 1000;}
}
.footer__banner{margin: 20px auto 0; 
  max-width: 520px; 
  width: 100%;}
.footer__banner-link{display: block;
  transition: opacity 0.2s ease;}
.footer__banner-link:hover{opacity: 0.85;}
.footer__banner img{width: 100%;
  height: auto;
  display: block;}
@media (max-width: 1024px){
.footer__banner{padding: 0 16px;
    max-width: 90%;}
}

/* アンカー着地を固定ヘッダーの下に */
html{scroll-padding-top:122px;}
@media (max-width: 1024px){html{scroll-padding-top:69px;}}
