/* ==============================
   トップページ共通
   ============================== */
html, body {
  scroll-behavior: smooth;
}

ul {
  list-style: none;
  padding-left: 0;
}

.top-page-section {
  max-width: 1100px;
  margin: 26px auto;
  padding: 0 18px;
}

.title1 {
  color: #004080;
  font-weight: bold;
}

@media screen and (max-width: 640px) {
  .title1 {
    font-size: 1.5em;
  }
}

/* PC/SP画像切り替え */
.pc { display: block; }
.sp { display: none; }

@media screen and (max-width: 640px) {
  .pc { display: none; }
  .sp { display: block; }
}

/* ==============================
   重要なお知らせ
   ============================== */
.important-news-box {
  max-width: 1100px;
  margin: 18px auto 22px;
  padding: 16px 20px;
  background: #f6fbff;
  border: 1px solid #cfe4f5;
  border-left: 8px solid #5fa8d3;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.important-news-title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 22px;
  color: #004080;
  margin: 0 0 10px;
  font-weight: bold;
}

.important-news-title i {
  color: #5fa8d3;
}

.important-news-list {
  margin: 0;
  padding: 0;
}

.important-news-item {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px dotted #cfe4f5;
  font-size: 16px;
  line-height: 1.6;
}

.important-news-item:last-child {
  border-bottom: none;
}

.important-news-date {
  flex: 0 0 auto;
  color: #666;
  font-weight: bold;
  font-size: 14px;
  background: #fff;
  border: 1px solid #cfe4f5;
  border-radius: 999px;
  padding: 2px 9px;
}

.important-news-body {
  flex: 1;
}

.important-news-link-title {
  display: inline-block;
  color: #004080;
  font-weight: bold;
  text-decoration: none;
  font-size: 17px;
  margin-bottom: 4px;
}

.important-news-link-title:hover {
  text-decoration: underline;
}

.important-news-excerpt {
  margin: 0;
  color: #333;
  font-size: 15px;
  line-height: 1.7;
}

.important-news-more {
  text-align: right;
  margin-top: 10px;
}

.important-news-more a {
  color: #004080;
  font-weight: bold;
  text-decoration: underline;
}

@media screen and (max-width: 640px) {
  .important-news-box {
    margin: 12px;
    padding: 14px;
  }
  .important-news-title {
    font-size: 19px;
  }
  .important-news-item {
    display: block;
    font-size: 15px;
  }
  .important-news-date {
    display: inline-block;
    margin-bottom: 4px;
  }
  .important-news-link-title {
    font-size: 16px;
  }
  .important-news-excerpt {
    font-size: 14px;
  }
}

/* ==============================
   よく利用されるメニュー
   ============================== */
.quick-menu {
  max-width: 1100px;
  margin: 16px auto 20px;
  padding: 0 18px;
}

.quick-menu-title {
  font-size: 24px;
  color: #004080;
  text-align: center;
  margin-bottom: 16px;
  font-weight: bold;
}

.quick-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.quick-menu-card {
  display: flex;
  min-height: 78px;
  padding: 10px 12px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  text-align: center;
  font-weight: bold;
  line-height: 1.45;
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
  transition: transform .08s ease, box-shadow .2s ease, opacity .2s ease;
}

.quick-menu-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(0,0,0,.12);
  opacity: .95;
}

.quick-menu-card i {
  font-size: 24px;
}

.quick-menu-card.fever { background: #4caf50; }
.quick-menu-card.checkup { background: #2f7d50; }
.quick-menu-card.diabetes { background: #009688; }
.quick-menu-card.vaccine { background: #f39c12; }

.quick-menu-main {
  font-size: 16px;
}

.quick-menu-sub {
  font-size: 12px;
  opacity: .95;
  font-weight: normal;
}

@media screen and (max-width: 900px) {
  .quick-menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 520px) {
  .quick-menu-grid {
    grid-template-columns: 1fr;
  }
  .quick-menu-card {
    min-height: 64px;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 10px 14px;
  }
}

/* ==============================
   お知らせ
   ============================== */
.green-border-box {
  max-width: 1100px;
  margin: 28px auto;
  padding: 20px;
  background: #fff;
  border: 2px solid #cfe8c9;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.boxgreen1,
.scrollable-box {
  border: none;
  background: none;
  box-shadow: none;
}

.scrollable-box {
  width: 100%;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
}

.top-news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.top-news-item {
  padding: 12px 0;
  border-bottom: 1px solid #e5e5e5;
}

.notification-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.department {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  line-height: 1.4;
}

.department.dept-受付 { background-color: #6b8fbd; }
.department.dept-内科 { background-color: #2f7d50; }
.department.dept-小児科 { background-color: #e8899b; }
.department.dept-休診のお知らせ { background-color: #d66a5c; }
.department.dept-重要なお知らせ { background-color: #d66a5c; }
.department.dept-糖尿病内科 { background-color: #009688; }
.department.dept-予防接種 { background-color: #f39c12; }
.department.dept-健診 { background-color: #4caf50; }
.department.dept-お知らせ,
.department.dept-その他 { background-color: #2196f3; }

.date {
  font-size: 15px;
  color: #666;
  background-color: #f0f0f0;
  padding: 5px 10px;
  border-radius: 5px;
}

.notification-title {
  font-size: 20px;
  margin: 4px 0 6px;
  line-height: 1.5;
  font-weight: bold;
  text-align: left;
}

.notification-title a {
  color: #004080;
  text-decoration: none;
}

.notification-title a:hover {
  text-decoration: underline;
}

.notification-excerpt {
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 6px;
  color: #333;
}

.notification-link {
  margin: 0;
  font-size: 15px;
}

.notification-link a {
  color: #004080;
  text-decoration: underline;
}

.news-more {
  text-align: right;
  margin-top: 10px;
}

.more-button {
  background-color: #004080;
  color: #ffffff;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 6px;
  font-size: 15px;
  display: inline-block;
  transition: background-color .3s ease, box-shadow .3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.more-button:hover {
  background-color: #5fa8d3;
  color: #ffffff;
  box-shadow: 0 4px 8px rgba(0,0,0,.15);
}

/* ==============================
   診療時間
   ============================== */
.schedule-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 50px;
  margin: 20px;
}

.section {
  width: 48%;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,.1);
  position: relative;
  border: 3px dashed #90c500;
  background-color: #f9f9f9;
}

.section-title {
  font-family: 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ Pro W3', Meiryo, メイリオ, sans-serif;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #004080;
}

.section-title i {
  font-size: 1.5em;
  margin-right: 10px;
}

.clinic-schedule {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.clinic-schedule th,
.clinic-schedule td {
  padding: 12px 15px;
  text-align: center;
  border: 1px solid #dddddd;
}

.clinic-schedule th {
  background-color: #f0f8ff;
  font-weight: bold;
}

.clinic-schedule td {
  font-size: 16px;
}

.internal-medicine {
  border-color: #4caf50;
  background-color: #e8f5e9;
}

.pediatrics {
  border-color: #ff8c66;
  background-color: #fff3e0;
}

.additional-info {
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.6;
}

.additional-info ul {
  padding-left: 20px;
  list-style-type: disc;
}

.additional-info li {
  margin-bottom: 10px;
}

.additional-info p {
  font-weight: bold;
  margin-bottom: 10px;
}

.additional-info .note {
  background-color: #fff8e1;
  border: 1px solid #ffd54f;
  border-left: 5px solid #ffa726;
  padding: 14px 18px;
  margin-top: 20px;
  font-size: 1em;
  color: #333;
  line-height: 1.6;
  border-radius: 6px;
  text-align: center;
  font-weight: 500;
}

.additional-info .note a {
  color: #1565c0;
  text-decoration: underline;
}

@media screen and (max-width: 768px) {
  .schedule-container {
    flex-direction: column;
    gap: 30px;
    margin: 10px;
  }
  .section {
    width: 100%;
    box-sizing: border-box;
  }
  .clinic-schedule th,
  .clinic-schedule td {
    padding: 8px 10px;
  }
  .clinic-schedule td {
    font-size: 14px;
  }
  .section-title {
    font-size: 20px;
  }
  .additional-info {
    font-size: 14px;
    line-height: 1.4;
  }
}

/* ==============================
   特徴・在宅医療
   ============================== */
.boxline1 {
  max-width: 1100px;
  margin: 28px auto;
  padding: 20px;
  background-color: #f8fbfd;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,.05);
  border: 2px solid #a3d5ff;
}

.boxline1 h2.title1 {
  font-size: 24px;
  color: #004080;
  border-bottom: 3px solid #5fa8d3;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.boxline1 ul {
  list-style: none;
  padding: 0;
}

.boxline1 ul li {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #ffffff;
  border-radius: 8px;
  position: relative;
  border-left: 4px solid #5fa8d3;
}

.boxline1 ul li h3 {
  font-size: 20px;
  color: #004080;
  margin-bottom: 10px;
  font-weight: bold;
}

.boxline1 ul li p {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

/* ==============================
   Googleカレンダー
   ============================== */
.schedule-section {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 50px;
  flex-wrap: nowrap;
}

.schedule-box {
  width: 50%;
  box-sizing: border-box;
}

.schedule-box iframe {
  width: 100%;
  height: 650px;
  border: 1px solid #777;
  border-radius: 10px;
}

@media screen and (max-width: 768px) {
  .schedule-section {
    flex-direction: column;
    gap: 30px;
  }
  .schedule-box {
    width: 100%;
  }
  .schedule-box iframe {
    height: 400px;
    max-width: 100%;
  }
}

/* ページトップ */
.pagetop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  z-index: 1000;
}

.pagetop a {
  display: block;
  width: 50px;
  height: 50px;
  background-color: #1A1AA6;
  color: #fff;
  text-align: center;
  line-height: 50px;
  font-size: 24px;
  border-radius: 50%;
  transition: background-color .3s ease;
}

.pagetop a:hover {
  background-color: #004080;
  text-decoration: none;
}

/* ==============================
   トップページ調整（style2.cssとの競合回避）
   ============================== */
.top-page-section,
.quick-menu,
.important-news-box,
.green-border-box,
.boxline1,
.schedule-section {
  box-sizing: border-box;
}

.quick-menu-card:focus,
.important-news-item a:focus,
.more-button:focus {
  outline: 3px solid #a3d5ff;
  outline-offset: 3px;
}

@media screen and (max-width: 520px) {
  .quick-menu-card i {
    flex: 0 0 34px;
    text-align: center;
  }
}
