.main_visual_titleback {
    position: relative;
    z-index: 5;
    max-width: 435px;
    height: 131px;
    top: 114px;
    margin: auto;
    background-color: rgba(0, 2, 114, 0.774);
}

#school-events-summary {
  margin: 2rem auto;
  padding: 1rem;
  background: #f6f6f6;
  border-radius: 10px;
  max-width: 900px;
  text-align: center;
}
#school-events-summary h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.event-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.event-item {
  background-color: #ffeae6;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.95rem;
}
.event-item .month {
  font-weight: bold;
  margin-right: 0.3em;
}

/* 詳細カード（共通） */
#school-life .life-conts {
  margin-top: 3rem;
  margin-bottom: 3rem;
  font-size: 1rem;
  line-height: 2rem;
}
.life_flex {
  display: flex;
  align-items: stretch;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}
.life_flex.in-view {
  opacity: 1;
  transform: translateY(0);
}
.life_flex.reverse {
  /* flex-direction: row-reverse; 無効化済 */
}
.life_flex_left {
  overflow: hidden;
    width: 40%;
    height: 200px;
}
.life_flex_left img {
  width: 100%;
}
.life_flex_right {
  width: 60%;
  background-color: #FFF;
  padding: 10px 4% 10px 2%;
}

.life_flex_yasumi{
  width: 100%;
}

.life_flex_right h2 {
  text-align: left;
  margin-bottom: 1.2rem;
}
.life_flex_right h2 strong {
  font-size: 0.5em;
}
.life_flex_right p {
  text-align: left;
  line-height: 1.5;
  margin-top: 5%;
}
.other-life {
  background-color: #6e9fd5;
    color: #fff;
    padding: 2%;
    border-radius: 5px;
}
.other-image{
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}
.other-image img{
  width: 33%;
}

.term-tabs {
  text-align: center;
  margin: 2rem 0 3rem;
}
.tab-button {
  background: #fefefe;
  border: 2px solid #004294;
  padding: 0.7rem 1.5rem;
  margin: 0 0.5rem;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1rem;
  color: #004294;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.tab-button:hover {
  background-color: #6e9fd5;
  color: #fff;
}
.tab-button.active {
  background: #004294;
  color: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.term-content {
  display: none;
  opacity: 0;
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}
.term-content.active {
  display: block;
  position: relative;
  opacity: 1;
  z-index: 1;
}
.term-content.slide-in-left {
  transform: translateX(-100%);
  animation: slideLeft 0.5s forwards;
}
.term-content.slide-in-right {
  transform: translateX(100%);
  animation: slideRight 0.5s forwards;
}
.monthly-group{
  display:flex;
  margin: 20px 20px 40px;
  flex-direction: row-reverse;
  flex-wrap: wrap;
}
@keyframes slideLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.life_flex {
  display: flex;
  align-items: stretch;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
  border: 1px solid #004294;
  border-radius: 10px;
}
.life_flex.in-view {
  opacity: 1;
  transform: translateY(0);
}

#schoollife .info_all, #recruit .recruit_btn {
    margin: 5rem auto 5rem auto;
    color: var(--main_blue);
    border: solid 1px var(--main_blue);
    border-radius: 1rem;
    width: 15rem;
    background-color: #fff;
}
#schoollife .info_all a, #recruit .recruit_btn a {
    display: block;
    line-height: 2rem;
}

#schoollife .info_all a:after, #recruit .recruit_btn a::after {
    content: ">";
    position: relative;
}



/* PC：角丸切り替え */
@media screen and (min-width:861px) {
  /*.life_flex:not(.reverse) .life_flex_left img {
    border-radius: 10px;
  }*/
  .life_flex:not(.reverse) .life_flex_right {
    border-radius: 10px;
  }
  .life_flex:not(.reverse) .life_flex_yasumi {
        border-radius: 10px 10px 10px 10px;
    }
  .life_flex.reverse .life_flex_left img {
    border-radius: 0 10px 10px 0;
  }
  .life_flex.reverse .life_flex_right {
    border-radius: 10px 0 0 10px;
  }
}

/* スマホ：全て統一角丸 */
@media screen and (max-width:860px) {
  .event-summary {
    flex-direction: column;
    align-items: center;
  }
  .life_flex,
  .life_flex.reverse {
    flex-direction: column;
  }
  .life_flex_left {
    width: 100%;
    height: 200px;
    order: -1; /* 画像を上に配置 */
  }
  .life_flex_left img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
  }
  .life_flex_right,
  .life_flex.reverse .life_flex_right {
    width: 100%;
    border-radius: 10px 10px 10px 10px;
  }
  .monthly-group{
  margin: unset;
}
}

@media screen and (max-width: 750px) {
    .main_visual_titleback h1 {
        font-size: 26pt;
    }
}

@media (max-width: 542px) {
    .main_visual_titleback {
        position: relative;
        z-index: 5;
        width: 80%;
        height: 140px;
        top: 14%;
        background-color: rgba(0, 2, 114, 0.774);
    }
}