* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== フォント設定 ===== */
.noto-sans-jp- {
  font-family: 'Noto Sans JP', sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

.noto-serif- {
  font-family: 'Noto Serif', serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
  font-variation-settings: 'wdth' 100;
}

body {
  font-family: 'Noto Sans JP', 'Noto Serif', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #ffffff;
}

/* ===== ヘッダー ===== */
header {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.hospital-name {
  text-align: left;
  line-height: 1.2;
  color: #2c5aa0;
}

.corp-name {
  font-size: 16px;
  display: block;
}

.hospital-name a:link,
.hospital-name a:visited,
.hospital-title a:link,
.hospital-title a:visited {
  color: #2c5aa0;
  text-decoration: none;
}

.hospital-title {
  font-size: 24px;
  font-weight: bold;
  display: block;
  margin-top: -20px;
}

/* ナビゲーションメニュー */
.nav-menu {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.nav-menu a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.nav-menu a:hover {
  background-color: #87ceeb;
  color: white;
}

/* ハンバーガーメニュー（スマホ用） */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: #2c5aa0;
  margin: 3px 0;
  transition: 0.3s;
}

/* ===== メインコンテンツ ===== */
main {
  margin-top: 90px;
}

/* Heroセクション（スライドショー） */
.hero {
  height: 800px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(30deg, #87ceeb 0%, #b0e0e6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  text-align: center;
  color: white;
  z-index: 2;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: rgb(0, 0, 0) 7px 0 10px;
}

.hero p {
  font-size: 1.2rem;
  text-shadow: rgb(0, 0, 0) 7px 0 10px;
}

/* スライドショー用の背景画像 */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  background-size: cover;
  background-position: center;
}

.slide.active {
  opacity: 0.75;
}

.slide:nth-child(1) {
  background-image: url('../images/main01.jpg');
}

.slide:nth-child(2) {
  background-image: url('../images/main02.jpg');
}

.slide:nth-child(3) {
  background-image: url('../images/main03.jpg');
}

.slide:nth-child(4) {
  background-image: url('../images/main04.jpg');
}

/* ===== セクション共通スタイル ===== */
.section {
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 15px;
}

.section h2 {
  font-size: 2rem;
  color: #2c5aa0;
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
}

.section h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: #87ceeb;
  margin: 1rem auto;
}

/* ===== お知らせセクション ===== */
.news-list {
  background-color: white;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.news-item {
  display: flex;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
  align-items: flex-start;
  gap: 1rem;
  flex-direction: column;
}

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

.news-date {
  color: #87ceeb;
  font-weight: bold;
  min-width: 100px;
}

.news-content {
  flex: 1;
}

/* ===== 病院紹介セクション ===== */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text {
  background-color: #f8f9ff;
  padding: 2rem;
  border-radius: 10px;
  border-left: 5px solid #87ceeb;
}

.about-text h3 {
  color: #2c5aa0;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.about-text p {
  color: #666;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.about-image {
  border-radius: 10px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: flex;
}

/* ===== 診療科・診療時間セクション ===== */
.departments-simple {
  background-color: #f8f9ff;
  padding: 3rem 1rem;
  border-radius: 15px;
}

.dept-list {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  text-align: center;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.dept-list li {
  background-color: white;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  color: #2c5aa0;
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* ===== 病院詳細セクション ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.contact-item {
  background-color: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact-item h3 {
  color: #2c5aa0;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.contact-info {
  line-height: 2;
  color: #666;
}

.phone-number {
  font-size: 1.3rem;
  font-weight: bold;
  color: #2c5aa0;
  margin: 0.1rem 0 1rem;
}

/* ===== アクセスセクション ===== */
#access {
  background-color: #ffffff;
  border-radius: 15px;
  text-align: center;
  color: #2c5aa0;
  border-radius: 8px;
  padding: 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  /* box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); */
  line-height: 2;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.access-info {
  background-color: white;
  border-radius: 8px;
  padding: 1.5rem 2rem;
  font-size: 1rem;
  color: #2c5aa0;
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  line-height: 2;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.access-info a {
  color: #2c5aa0;
  font-weight: bold;
  text-decoration: underline;
}

.access-info a:hover {
  color: #87ceeb;
}

.map-container {
  height: 400px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: #f0f8ff;
}

/* ===== ギャラリーセクション ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-grid img:hover {
  transform: scale(1.05);
}

.gallery-grid img.zoomed {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.5);
  z-index: 1001;
  max-width: 1200px;
  max-height: 90vh;
  width: auto;
  height: auto;
}

.gallery-grid img.zoomed::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
}

/* ===== フッター ===== */
footer {
  background-color: #2c5aa0;
  color: white;
  padding: 4rem 1rem 1rem;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto 10px;
}

.footer-info {
  margin-bottom: 3rem;
}

.footer-info p {
  font-size: 15px;
}

.footer-content h5 {
  font-size: 10px;
}

.footer-title-small {
  font-size: 18px;
  font-weight: normal;
}

.footer-title-large {
  font-size: 30px;
  font-weight: bold;
}

.footer-info h3 {
  margin-bottom: 3rem;
}

/* ===== レスポンシブデザイン ===== */

/* PCでは改行なし */
.sp-only {
  display: none;
}

/* タブレット（768px以下） */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    margin-top: 1rem;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu a {
    padding: 1rem;
    border-bottom: 1px solid #eee;
  }

  .hamburger {
    display: flex;
    position: absolute;
    right: 1rem;
    top: 1.5rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .about {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 2rem 1rem;
  }

  .calendar-container iframe {
    height: 500px;
  }

  .calendar-image.zoomed {
    transform: translate(-50%, -50%) scale(1.1);
    max-width: 98vw;
    max-height: 98vh;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  /* スマホで改行 */
  .sp-only {
    display: inline;
  }
}

/* スマートフォン（480px以下） */
@media (max-width: 480px) {
  .hospital-name {
    font-size: 1.2rem;
  }

  .hero {
    height: 300px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  .dept-list {
    grid-template-columns: 1fr;
  }

  .calendar-container iframe {
    height: 400px;
  }

  .calendar-image.zoomed {
    transform: translate(-50%, -50%) scale(1);
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
}
