@charset "UTF-8";

/* リセット */
* {margin: 0; padding: 0;}
body {
  font-family: 'Noto Sans JP', "游ゴシック", YuGothic, "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "メイリオ", Meiryo, sans-serif;
  font-size: 16px;
  color: #333;
  line-height: 2;
  background: #fff;
}
img {max-width: 100%; height: auto; vertical-align: bottom;}
a {color: #333; text-decoration: none;}
a:hover {color: #dc3545;}

/* トップバー */
.top-bar {
  background: #dc3545;
  color: #fff;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
}
.top-bar__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ドロップダウン */
.has-dropdown {position: relative;}
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 200px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  list-style: none;
  z-index: 1000;
}
.has-dropdown:hover .dropdown {display: block;}
.dropdown a {
  display: block;
  padding: 10px 15px;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}
.dropdown a:hover {background: #f8f8f8; padding-left: 20px;}

/* メインビジュアル */
#mainimg {
  position: relative;
  width: 100%;
  height: 500px;
}
.mainslider {
  width: 100%;
  height: 100%;
}
.mainslider .swiper-slide {
  position: relative;
}
.mainslider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7);
  object-position: center 30%;
}
.slide-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  width: 90%;
  max-width: 900px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}
.swiper-slide-active .slide-text {
  opacity: 1;
}
.slide-text h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}
.slide-text p {
  font-size: 18px;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}
.swiper-pagination-bullet {
  background: #fff;
  opacity: 0.5;
}
.swiper-pagination-bullet-active {
  background: #dc3545;
  opacity: 1;
}
/* 特定スライド画像のフィルター無効 */
.no-filter {
  filter: none !important;
}

/* メインレイアウト */
#contents {
  max-width: 1400px;
  margin: 0 auto;
  padding: 50px 3%;
  display: flex;
  gap: 50px;
}
#main {
  flex: 1;
}
#sub {
  width: 280px;
  flex-shrink: 0;
}

/* セクション */
section {
  margin-bottom: 80px;
}
section h2 {
  font-size: 28px;
  font-weight: 700;
  padding: 0 0 20px;
  margin-bottom: 40px;
  border-bottom: 3px solid #dc3545;
}

/* 2カラムレイアウト(お知らせ・カレンダー) */
.two-column-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-bottom: 80px;
}

.two-column-item {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.two-column-item h2 {
  font-size: 24px;
  font-weight: 700;
  padding: 0 0 15px;
  margin-bottom: 25px;
  border-bottom: 3px solid #dc3545;
  flex-shrink: 0;
}

.two-column-item .info-list {
  background: #fafafa;
  padding: 20px;
  border-radius: 5px;
  height: 450px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.two-column-item .calendar-box {
  background: #fafafa;
  padding: 15px;
  margin-top: 0;
  height: 450px;
}

.two-column-item .calendar-box iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.news-more-container {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #ddd;
}

/* 入校希望の方へ - 8列グリッド */
#enrollment {
  margin-bottom: 80px;
}

#current-students {
  margin-bottom: 80px;
}

.enrollment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.enrollment-card {
  background: #fff;
  border: 2px solid #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: #333;
  transition: all 0.3s;
  display: block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: relative;
}

.enrollment-card:hover {
  border-color: #dc3545;
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(220, 53, 69, 0.15);
}

.enrollment-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  position: relative;
  object-position: center 65%; /* この行を追加 */
}

/* 画像の上に白いオーバーレイを追加 */
.enrollment-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  z-index: 1;
}

.enrollment-card__title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(220, 53, 69, 0.95);
  color: #fff;
  padding: 15px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  z-index: 2;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.enrollment-card__icon {
  display: none;
}

.enrollment-card h3 {
  display: none;
}

.enrollment-card p {
  display: none;
}

/* お知らせ */
.info-list {
  background: #fafafa;
  padding: 30px;
  border-radius: 5px;
}
.info-list dt {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px dotted #ccc;
  font-size: 14px;
}
.info-list dt .news-date {
  color: #999;
}
.info-list dt .news-cat {
  background: #dc3545;
  color: #fff;
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 12px;
}
.info-list dd {
  padding: 10px 0 20px;
  font-size: 14px;
  position: relative;
}
.info-loading {
  text-align: center;
  padding: 30px;
  color: #999;
}
.news-item-link {
  display: block;
  text-decoration: none;
  color: #333;
  transition: all 0.3s;
}
.news-item-link:hover {
  background: #f5f5f5;
}
.news-item-link:hover .news-text {
  color: #dc3545;
}
.news-arrow {
  color: #dc3545;
  font-weight: bold;
  margin-left: 10px;
  transition: all 0.3s;
}
.news-item-link:hover .news-arrow {
  margin-left: 15px;
}
.news-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  margin: 10px 0 15px 0;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: 0.3s;
}
.news-link:hover .news-image {
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}
.news-more-container {
  text-align: center;
  margin-top: 20px;
}
.news-more-btn {
  background: #fff;
  border: 2px solid #dc3545;
  color: #dc3545;
  padding: 12px 40px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
}
.news-more-btn:hover {
  background: #dc3545;
  color: #fff;
}

/* カレンダー・マップ */
.calendar-box,
.map-box {
  width: 100%;
  background: #fafafa;
  padding: 20px;
  margin-top: 20px;
}
.calendar-box iframe {
  width: 100%;
  height: 450px;
  border: none;
}
.map-box iframe {
  width: 100%;
  height: 400px;
  border: none;
}

/* サイドバー */
.submenu {
  background: #fafafa;
  padding: 20px;
  margin-bottom: 30px;
}
.submenu h2 {
  font-size: 20px;
  font-weight: 700;
  padding: 0 0 10px;
  margin-bottom: 15px;
  border-bottom: 2px solid #dc3545;
}
.submenu ul {
  list-style: none;
}
.submenu li {
  border-bottom: 1px dotted #ccc;
}
.submenu li:last-child {
  border-bottom: none;
}
.submenu a {
  display: block;
  padding: 12px 0 12px 20px;
  font-size: 16px;
  position: relative;
  line-height: 1.6;
}
.submenu a::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: #dc3545;
  font-size: 12px;
}
.submenu a:hover {
  padding-left: 25px;
}
.sidebar-banners {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar-banner {
  display: block;
  transition: all 0.3s;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.sidebar-banner:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.sidebar-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* 固定サイドボタン */
.fixed-buttons {
  position: fixed;
  top: 62%;
  right: 0;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fixed-btn {
  background: #5cb85c;
  color: #fff;
  padding: 15px 10px;
  width: 100px;
  text-align: center;
  text-decoration: none;
  border-radius: 8px 0 0 8px;
  box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.fixed-btn:hover {
  width: 110px;
  box-shadow: -4px 4px 15px rgba(0, 0, 0, 0.3);
}
.fixed-btn--reservation {
  background: linear-gradient(135deg, #5cb85c 0%, #4cae4c 100%);
}
.fixed-btn--document {
  background: linear-gradient(135deg, #5bc0de 0%, #46b8da 100%);
}
.fixed-btn__icon {
  font-size: 28px;
  display: block;
}
.fixed-btn__text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

/* トップへ戻る */
#totop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #dc3545;
  color: #fff;
  width: 50px;
  height: 50px;
  text-align: center;
  line-height: 50px;
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 100;
}
#totop.show {
  opacity: 1;
  visibility: visible;
}
#totop:hover {
  background: #c82333;
  transform: translateY(-3px);
}

/* レスポンシブ - タブレット */
@media (max-width: 1024px) {
  #contents {
    flex-direction: column;
    gap: 30px;
  }
  #sub {
    width: 100%;
  }
  .two-column-section {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .enrollment-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* レスポンシブ - スマホ */
@media (max-width: 767px) {
  .top-bar {
    font-size: 12px;
    padding: 8px 0;
  }
  .dropdown {
    position: static;
    display: none;
    box-shadow: none;
    background: #f5f5f5;
    margin-top: 5px;
  }
  .has-dropdown.active .dropdown {
    display: block;
  }
  .dropdown a {
    padding: 8px 15px;
  }
  .has-dropdown > a::after {
    content: " ▼";
    font-size: 10px;
  }
  #mainimg {
    height: 250px;
  }
  .slide-text h2 {
    font-size: 24px;
  }
  .slide-text p {
    font-size: 14px;
  }
  #contents {
    padding: 30px 4%;
  }
  .two-column-section {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 50px;
  }
  .two-column-item h2 {
    font-size: 20px;
  }
  .two-column-item .info-list {
    height: 400px;
    padding: 15px;
  }
  .two-column-item .calendar-box {
    height: 400px;
    padding: 10px;
  }
  section {
    margin-bottom: 50px;
  }
  section h2 {
    font-size: 22px;
    margin-bottom: 25px;
  }
  .enrollment-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .enrollment-card__image {
    height: 140px;
    object-position: center 65%; /* この行を追加 */
  }
  .enrollment-card__title {
    font-size: 14px;
    padding: 10px;
  }
  .submenu {
    padding: 15px;
  }
  .fixed-buttons {
    position: fixed;
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    transform: none;
    flex-direction: row;
    gap: 0;
    z-index: 1000;
  }
  .fixed-btn {
    flex: 1;
    width: auto;
    padding: 12px 10px;
    border-radius: 0;
    gap: 3px;
  }
  .fixed-btn:hover {
    width: auto;
  }
  .fixed-btn__icon {
    font-size: 24px;
  }
  .fixed-btn__text {
    font-size: 11px;
  }
  #totop {
    width: 45px;
    height: 45px;
    line-height: 45px;
    bottom: 80px;
    right: 20px;
  }
}