/* =============================================================================
   Top Page Styles (SPH)
============================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
}

img {
  max-width: 100%;
  height: auto;
}

.top-main {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-x: hidden;
  position: relative;
  margin-top: 160px;
}

/* -----------------------------------------------------------------------------
   Section 1: 重要なお知らせ (Important Notice)
----------------------------------------------------------------------------- */

.top-important-news {
  background-color: #FFF;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin: 40px 160px 80px 160px;
}

.top-important-news-header {
  background-color: #F08F8F;
  color: #FFF;
  padding: 16px 24px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.top-important-news-body {
  padding: 24px;
}

.top-important-news-item {
  padding: 16px 0;
  border-bottom: 1px solid #F08F8F;
}

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

.top-important-news-date {
  color: #A7A7A7;
  font-size: 14px;
  margin-bottom: 8px;
}

.top-important-news-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
}

/* -----------------------------------------------------------------------------
   Section 2: お知らせ (News)
----------------------------------------------------------------------------- */

.top-news {
  padding: 0 160px 160px 160px;
}

.top-news-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}

.top-news-title {
  color: var(--sky-blue);
  font-size: 40px;
  font-weight: 700;
  margin: 0;
}

.top-news-more {
  color: var(--sky-blue) !important;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-news-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: nowrap;
  /* Disable wrapping */
  overflow-x: auto;
  /* Enable horizontal scroll */
  -webkit-overflow-scrolling: touch;
  /* Smooth scroll for iOS */
  scrollbar-width: none;
  /* Hide scrollbar for Firefox */
}

.top-news-tabs::-webkit-scrollbar {
  display: none;
  /* Hide scrollbar for Chrome/Safari */
}

.top-news-tab {
  padding: 8px 16px;
  border: 1px solid #FFF;
  border-bottom: none;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  color: #A7A7A7;
  font-weight: 600;
  cursor: pointer;
  background-color: #F9F9F9;
  transition: all 0.3s ease;
  flex-shrink: 0;
  /* Prevent shrinking when scrolling */
  white-space: nowrap;
  /* Prevent text wrapping */
}

.top-news-tab.active {
  background-color: var(--sky-blue);
  border-color: var(--sky-blue);
  color: #FFF;
}

.top-news-list {
  display: flex;
  flex-direction: column;
}

.top-news-item {
  display: block;
  padding: 24px 0 16px 0;
  border-bottom: 1px solid var(--sky-blue);
  text-decoration: none;
  color: inherit;
}

.top-news-item-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.top-news-label {
  padding: 4px 12px;
  background-color: var(--sky-blue);
  color: #FFF;
  font-size: 12px;
  font-weight: 700;
  border-radius: 2px;
}

.top-news-date {
  color: #A7A7A7;
  font-size: 14px;
}

.top-news-item-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
}

.top-news-more-sp {
  display: none;
}

/* -----------------------------------------------------------------------------
   Section 3: 目指す人物像 (Mission)
----------------------------------------------------------------------------- */

.top-mission {
  position: relative;
  padding: 100px 0;
  text-align: center;
  overflow: hidden;
}

/* [top-mission::before]内の[background-image]は[index.twig]側に直接定義 */
.top-mission::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 668px;
  height: 612px;
  /* background-image: url("/themes/SPH/images/top/mission-logo.svg"); */
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: 0;
}

.top-mission-inner {
  position: relative;
  z-index: 1;
}

.top-mission-title {
  color: var(--sky-blue);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 40px;
}

.top-mission-lead {
  color: var(--sky-blue);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.8;
  margin-bottom: 40px;
}

.top-mission-text {
  max-width: 800px;
  margin: 0 auto;
  line-height: 2;
}

.top-mission-image {
  position: absolute;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  width: 200px;
  z-index: 1;
}

.top-mission-image img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

/* Positioning arbitrary for demo - normally would need specific classes */
.top-mission-img1 {
  top: 10%;
  left: 5%;
}

.top-mission-img2 {
  top: 30%;
  left: 2%;
  width: 150px;
}

.top-mission-img2 img {
  height: 100%;
}

.top-mission-img3 {
  bottom: 10%;
  left: 5%;
}

.top-mission-img4 {
  top: 0%;
  right: 5%;
}

.top-mission-img5 {
  top: 25%;
  right: 2%;
  width: 230px;
  height: 300px;
}

.top-mission-img5 img {
  height: 100%;
}

.top-mission-img6 {
  bottom: 10%;
  right: 10%;
}

/* -----------------------------------------------------------------------------
   Section 4: About SPH (大学とは)
----------------------------------------------------------------------------- */

.top-about {
  padding: 120px 24px;
  text-align: center;
}

.top-about-title {
  color: var(--sky-blue);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 24px;
}

.top-about-text {
  max-width: 900px;
  margin: 0 auto 24px;
  line-height: 1.8;
  font-size: 16px;
}

.top-about-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  margin-top: 56px;
}

.top-about-graphics {
  flex: 1;
  max-width: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: left;
}

.about-diagram {
  position: relative;
  width: 560px;
  height: 500px;
}

/* [diagram-circle]内の[background-image]は[index.twig]側に直接定義 */
.diagram-circle {
  position: absolute;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: transparent;
  cursor: pointer;
  transition: transform 0.3s ease;
}

/* 背景画像だけを ::before で管理して、文字と分離する */
.diagram-circle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.3s ease;
  z-index: 0;
}

.diagram-circle.active,
.diagram-circle:hover {
  transform: scale(1.15);
  z-index: 10;
}

.circle-top.active,
.circle-top:hover {
  transform: translateX(-50%) scale(1.15);
  z-index: 10;
}

.diagram-circle p {
  color: var(--sky-blue);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
  /* ::before の背景より上に持ってくる */
  position: relative;
  z-index: 1;
}

.circle-top {
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.circle-left {
  bottom: 0;
  left: 0;
  z-index: 1;
}

.circle-right {
  bottom: 0;
  right: 0;
  z-index: 1;
}

/* ここで背景画像「だけ」を回転させる */
.circle-left::before,
.circle-right::before {
  transform: rotate(70deg);
}

.top-about-features-container {
  position: relative;
  width: 400px;
  height: 480px;
}

.top-about-feature-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
  z-index: 1;
}

.top-about-feature-box.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.top-about-badge {
  position: absolute;
  top: -30px;
  left: -30px;
  width: 80px;
  height: 80px;
  background-color: var(--sky-blue);
  color: #FFF;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  z-index: 2;
}

.top-about-badge span {
  font-size: 14px;
}

.top-about-badge b {
  font-size: 24px;
}

.top-about-main-image {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.top-about-footer {
  margin-top: 60px;
}

.top-about-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 268px;
  background-color: var(--sky-blue);
  color: #FFF !important;
  padding: 16px;
  border-radius: 40px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.3s;
}

/* -----------------------------------------------------------------------------
   Section 5: 教育 (Education)
----------------------------------------------------------------------------- */

.top-education {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 100px 120px;
  position: relative;
  overflow: hidden;
}

.top-education-info {
  flex: 1;
}

.top-education-title {
  color: var(--dark-blue);
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 40px;
}

.top-education-text {
  line-height: 2;
  margin-bottom: 48px;
}

.top-education-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 56px;
  position: relative;
}

.top-education-list::before {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 30px;
  left: 8px;
  width: 1px;
  background-color: #CCC;
  z-index: 0;
}

.top-education-item {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #CCC;
  font-size: 28px;
  text-decoration: none;
  transition: all 0.3s;
}

.top-education-item.active {
  color: var(--dark-blue);
  font-weight: 600;
}

.top-education-item.active .top-education-marker {
  background-color: var(--dark-blue);
  border-color: var(--dark-blue);
}

.top-education-marker {
  width: 16px;
  height: 16px;
  border: 1px solid #CCC;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: #FFF;
  position: relative;
  z-index: 1;
}

.top-education-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #CCC;
}

.top-education-item.active .top-education-icon {
  color: var(--dark-blue);
}

.top-education-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.top-education-item-text {
  display: block;
  white-space: nowrap;
}

.top-education-item-text-sp {
  display: none;
}

.top-education-btn,
.top-education-btn-sp {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 268px;
  background-color: var(--sky-blue);
  color: #FFF !important;
  padding: 16px;
  border-radius: 40px;
  font-weight: 700;
  text-decoration: none;
}

.top-education-btn-sp {
  display: none;
}

.top-education-images {
  flex: 1;
  position: relative;
  padding: 40px 0;
}

/* [top-education-images::before]内の[background-image]は[index.twig]側に直接定義 */
.top-education-images::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 20px;
  width: 275px;
  height: 275px;
  /* background-image: url("/themes/SPH/images/circle.svg"); */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 0;
}

/* [top-education-images::after]内の[background-image]は[index.twig]側に直接定義 */
.top-education-images::after {
  content: "";
  position: absolute;
  bottom: -60px;
  right: -40px;
  width: 120px;
  height: 120px;
  /* background-image: url("/themes/SPH/images/circle.svg"); */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 0;
}

.top-education-main-img {
  width: 80%;
  border-radius: 40px;
  margin-left: auto;
  display: block;
  position: relative;
  z-index: 1;
}

.top-education-sub-img {
  position: absolute;
  bottom: -40px;
  left: 0;
  width: 250px;
  border-radius: 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

/* -----------------------------------------------------------------------------
   Section 6: 教員一覧 (Teachers)
----------------------------------------------------------------------------- */

.top-teachers {
  background-color: #F3F7F9;
  padding: 80px 100px;
}

.top-teachers-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
}

.top-teachers-left {
  flex: 0 0 240px;
}

.top-teachers-title {
  color: var(--sky-blue);
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 40px;
}

.top-teachers-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 268px;
  background-color: var(--sky-blue);
  color: #FFF !important;
  padding: 16px;
  border-radius: 40px;
  font-weight: 700;
  text-decoration: none;
}

.top-teachers-list {
  flex: 1;
  overflow: hidden;
  padding: 10px 0;
}

.top-teachers-track {
  display: flex;
  gap: 16px;
  width: max-content;
}

.top-teachers-item {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.top-teachers-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.top-teachers-position {
  font-size: 11px;
  color: #A7A7A7;
  margin-bottom: 12px;
  line-height: 1.4;
}

.top-teachers-tags {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}

.top-teachers-tag {
  background-color: var(--sky-blue);
  color: #FFF;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 2px;
  width: fit-content;
}

.top-teachers-img-box {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto;
}

.top-teachers-img-box img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* [top-teachers-img-box::after]内の[background-image]は[index.twig]側に直接定義 */
.top-teachers-img-box::after {
  content: "";
  position: absolute;
  top: -40px;
  left: -40px;
  right: -40px;
  bottom: -40px;
  /* background-image: url("/themes/SPH/images/circle-skyblue.svg"); */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
}

/* -----------------------------------------------------------------------------
   Section 7: 入試情報 (Admission)
----------------------------------------------------------------------------- */

.top-admission {
  padding: 100px 24px;
  position: relative;
  overflow: hidden;
}

.top-admission-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  text-align: center;
}

.top-admission-title {
  color: var(--sky-blue);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 32px;
}

.top-admission-lead {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 60px;
}

.top-admission-cards {
  display: flex;
  gap: 32px;
  margin-bottom: 60px;
}

.top-admission-card {
  flex: 1;
  text-decoration: none;
  transition: transform 0.3s;
}

.top-admission-card-img-box {
  position: relative;
  width: 100%;
  border-radius: 40px;
  overflow: hidden;
  margin-bottom: 16px;
}

.top-admission-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-admission-card-arrow {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-admission-card-title {
  color: var(--sky-blue);
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  letter-spacing: 0.96px;
}

.top-admission-footer {
  display: flex;
  justify-content: center;
}

.top-admission-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 268px;
  background-color: var(--sky-blue);
  color: #FFF !important;
  padding: 16px;
  border-radius: 40px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.3s;
}

/* Background Decoration */
/* [top-admission-circle]内の[background-image]は[index.twig]側に直接定義 */
.top-admission-circle {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  /* background-image: url("/themes/SPH/images/circle-skyblue.svg"); */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.circle-top-right {
  top: -100px;
  right: -100px;
  width: 318px;
  height: 318px;
}

.circle-top-right::before,
.circle-top-right::after {
  display: none;
}

.circle-bottom-left {
  bottom: -10px;
  left: -40px;
  width: 153px;
  height: 153px;
}

.circle-bottom-left::before {
  display: none;
}

/* -----------------------------------------------------------------------------
   Section 8: 研究 (Research)
----------------------------------------------------------------------------- */

.top-research {
  padding: 120px 100px;
  position: relative;
  background-color: #EDF0F5;
}

/* [top-research::before]内の[background-image]は[index.twig]側に直接定義 */
.top-research::before {
  content: "";
  position: absolute;
  top: 0px;
  /* Adjust to better overlap the card */
  right: 5%;
  /* Position relative to section to avoid clipping */
  width: 200px;
  height: 200px;
  /* background-image: url("/themes/SPH/images/circle.svg"); */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 10;
  /* Frontmost layer */
  pointer-events: none;
}

.top-research-card {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  background-color: #FFF;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  position: relative;
}

.top-research-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 60px 0;
  align-items: center;
  justify-content: center;
}

.top-research-title {
  color: var(--dark-blue);
  font-size: 40px;
  font-weight: 700;
  margin: 0 0 32px;
}

.top-research-text {
  line-height: 1.8;
  margin: 0 0 40px;
  text-align: center;
}

.top-research-image {
  flex: 1;
  position: relative;
}

.top-research-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-research-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 268px;
  background-color: var(--dark-blue);
  color: #FFF !important;
  padding: 16px;
  border-radius: 40px;
  font-weight: 700;
  text-decoration: none;
}

/* -----------------------------------------------------------------------------
   Section 9: 地域産官学連携 (Cooperation)
----------------------------------------------------------------------------- */

.top-coop {
  padding: 80px 24px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.top-coop-title {
  color: var(--sky-blue);
  font-size: 40px;
  font-weight: 700;
  text-align: start;
  margin: 0 0 32px 32px;
}

.top-coop-lead {
  text-align: start;
  line-height: 1.8;
  font-size: 16px;
  margin-bottom: 56px;
  margin-left: 32px;
}

.top-coop-content {
  display: flex;
  gap: 80px;
}

.top-coop-card {
  flex: 1;
  min-width: 0;
  /* はみ出し防止 */
  border-radius: 40px;
  padding: 0 0 40px 0;
  /* Remove top padding, keep bottom */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid #DDD;
  overflow: hidden;
  /* Ensure header color respects border-radius */
}

.top-coop-card-blue {
  border-color: var(--dark-blue);
}

.top-coop-card-skyblue {
  border-color: var(--sky-blue);
}

.top-coop-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 32px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: 1.28px;
  padding: 40px 0px 24px 0px;
  margin-bottom: 0;
}

.top-coop-header img {
  border-radius: 50%;
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.top-coop-card-blue .top-coop-header {
  background-color: var(--dark-blue);
  color: #FFF;
}

.top-coop-card-explanation-blue {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark-blue);
}

.top-coop-card-skyblue .top-coop-header {
  background-color: var(--sky-blue);
  color: #FFF;
}

.top-coop-card-explanation-skyblue {
  font-size: 16px;
  font-weight: 700;
  color: var(--sky-blue);
}

.top-coop-card img.main-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  margin-bottom: 32px;
}

.top-coop-circles {
  display: flex;
  gap: 20px;
  margin-top: 32px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.top-coop-card-skyblue .top-coop-circles {
  gap: 20px;
}

.top-coop-circle {
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1.4;
  padding: 10px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border: none;
}

/* [top-coop-circle]内の[background-image]は[index.twig]側に直接定義 */
.top-coop-card-blue .top-coop-circle {
  /* background-image: url("/themes/SPH/images/circle.svg"); */
  color: var(--dark-blue);
}

/* [top-coop-circle]内の[background-image]は[index.twig]側に直接定義 */
.top-coop-card-skyblue .top-coop-circle {
  /* background-image: url("/themes/SPH/images/circle-skyblue-2.svg"); */
  color: var(--sky-blue);
  width: 140px;
  height: 140px;
}

.top-coop-btn-blue {
  background-color: var(--dark-blue);
  color: #FFF !important;
  padding: 16px;
  width: 257px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-coop-btn-skyblue {
  background-color: var(--sky-blue);
  color: #FFF !important;
  padding: 16px;
  width: 332px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* -----------------------------------------------------------------------------
   Section 10: キャリアモデル (Career Model)
----------------------------------------------------------------------------- */

.top-career {
  background-color: var(--dark-blue);
  padding: 100px 120px;
  text-align: center;
}

.top-career-title {
  color: #FFF;
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 60px;
}

.top-career-list {
  max-width: 1400px;
  margin: 0 auto 60px;
}

.top-career-track {
  display: flex;
  gap: 40px;
  width: 100%;
}

.top-career-item {
  flex: 1;
  background-color: transparent;
  padding: 0;
  color: #FFF;
  text-align: left;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.top-career-img-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}

.top-career-img {
  width: 100%;
  aspect-ratio: 270 / 350;
  object-fit: cover;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.top-career-arrow {
  position: absolute;
  bottom: 26px;
  right: 6%;
  width: 32px;
  height: 32px;
  background-color: #FFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.top-career-arrow img {
  width: 32px;
  height: auto;
}

.top-career-label {
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 4px 8px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  width: fit-content;
  letter-spacing: 0.56px;
  line-height: 20px;
}

.top-career-text {
  line-height: 24px;
  letter-spacing: 0.64px;
  margin-bottom: 8px;
}

.top-career-meta {
  line-height: 24px;
  letter-spacing: 0.64px;
}

.top-career-btn {
  display: inline-flex;
  justify-content: space-between;
  width: 340px;
  background-color: #FFF;
  color: #0B318F !important;
  padding: 16px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 700;
  align-items: center;
}

/* -----------------------------------------------------------------------------
   Section 11: バナーリンク (Banners)
----------------------------------------------------------------------------- */

.top-banners {
  padding: 64px 120px;
  margin-bottom: 0;
}

.top-banners-inner {
  display: flex;
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.top-banner-item {
  flex: 1;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  line-height: 0;
}


.top-banner-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* -----------------------------------------------------------------------------
   Section 12: Contact Cards
----------------------------------------------------------------------------- */

.top-contact-cards {
  display: flex;
  gap: 32px;
  padding: 40px;
}

.top-contact-card {
  flex: 1;
  background-color: #F6F9FB;
  border-radius: 64px;
  padding: 64px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.top-contact-card-title {
  color: #2D99D3;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
  margin-top: 32px;
  letter-spacing: 0.05em;
}

.top-contact-card-text {
  line-height: 1.6;
  margin-bottom: 40px;
}

.top-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background-color: #2D99D3;
  color: #FFF !important;
  padding: 18px 40px;
  border-radius: 40px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 280px;
}


.top-contact-btn img {
  width: 28px !important;
  height: auto !important;
  filter: brightness(0) invert(1);
}

/* =============================================================================
   @media
============================================================================= */

@media (max-width: 1440px) {
  .top-education-item-text {
    font-size: 24px;
  }
}

@media (min-width: 1201px) {
  .top-coop {
    padding: 120px;
  }
}

@media (max-width: 1200px) {

  /* Section 1 */
  .top-important-news {
    margin: 160px 40px 64px 40px;
  }

  /* Section 2 */
  .top-news {
    padding: 0 40px 64px 40px;
  }

  /* Section 5 */
  .top-education {
    padding: 80px 40px;
  }

  /* Section 6 */
  .top-teachers {
    padding: 60px 40px;
  }

  /* Section 9 */
  .top-coop-title,
  .top-coop-lead {
    margin-left: 0;
  }

  .top-coop-content {
    gap: 40px;
  }

  .top-coop-card img.main-img {
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
  }

  /* Section 10 */
  .top-career {
    padding: 80px 40px;
  }

  /* Section 11 */
  .top-banners {
    padding: 64px 40px 0 40px;
  }
}

/* =============================================================================
   @media：TB
============================================================================= */

@media (max-width: 1023px) {

  .top-education-title {
    font-size: 32px;
  }

  .top-education-item-text {
    display: none;
  }

  .top-education-item-text-sp {
    display: block;
    font-size: 16px;
  }

  /* Section 3 */
  .top-mission {
    padding: 60px 0;
  }

  .top-mission::before {
    width: 300px;
    height: 275px;
  }

  .top-mission-images-slider {
    overflow: hidden;
    padding: 40px 0;
    margin-top: 40px;
    width: 100%;
    position: relative;
  }

  .top-mission-images-track {
    display: flex;
    gap: 16px;
    width: max-content;
    padding-left: 24px;
  }

  .top-mission-image {
    position: static !important;
    flex: 0 0 240px;
    width: 240px !important;
    height: 160px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .top-mission-image img {
    height: 100% !important;
  }

  /* Section 4 */
  .top-about {
    padding: 80px 40px;
    background-color: #F6F9FB;
    display: grid;
    grid-template-areas:
      "title title"
      "text graph"
      "feats feats"
      "footer footer";
    grid-template-columns: 1fr 380px;
    /* 固定幅で図解を制限し、残りをすべてテキストに */
    align-items: center;
    text-align: left;
  }

  .top-about>.top-about-text {
    grid-area: text;
    margin: 0;
    max-width: none;
    padding-right: 0;
    /* 余白をゼロにしてテキスト幅を最大化 */
    font-size: 15px;
    line-height: 1.8;
  }

  .top-about-title {
    grid-area: title;
    text-align: center;
    margin-bottom: 40px;
  }

  .top-about-content {
    display: contents;
  }

  .top-about-graphics {
    grid-area: graph;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  .about-diagram {
    width: 560px;
    height: 500px;
    transform: scale(0.55);
    transform-origin: right center;
    margin: -80px 0;
    flex-shrink: 0;
  }

  .top-about-features-container {
    grid-area: feats;
    display: flex;
    flex-direction: row;
    gap: 24px;
    width: 100%;
    height: auto;
    position: static;
    margin-top: 60px;
  }

  .top-about-feature-box {
    position: relative !important;
    opacity: 1 !important;
    visibility: visible !important;
    flex: 1;
  }

  .top-about-badge {
    top: -15px;
    left: -15px;
    width: 70px;
    height: 70px;
  }

  .top-about-badge b {
    font-size: 20px;
  }

  .top-about-footer {
    grid-area: footer;
    margin-top: 60px;
    text-align: center;
  }

  /* Section 6 */
  .top-teachers {
    padding: 80px 40px;
  }

  .top-teachers-content {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .top-teachers-left {
    display: contents;
  }

  .top-teachers-title {
    order: 1;
    text-align: center;
    margin-bottom: 0;
    font-size: 32px;
  }

  .top-teachers-list {
    order: 2;
    width: 100%;
    margin-left: -40px;
    margin-right: -40px;
    padding-left: 40px;
    padding-right: 40px;
  }

  .top-teachers-btn {
    order: 3;
    margin: 0 auto;
  }

  /* Section 8 */
  .top-research {
    padding: 64px !important;
  }

  .top-research-info {
    padding: 56px 24px;
  }

  /* Section 9 */
  .top-coop-title {
    text-align: center;
  }

  .top-coop-circles {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Section 10 */
  .top-career-list {
    overflow: hidden;
    padding: 0;
    margin: 0 -40px 60px;
  }

  .top-career-track {
    display: flex;
    gap: 24px;
    width: max-content;
    padding: 0 40px;
  }

  .top-career-item {
    flex: 0 0 280px;
    max-width: 280px;
  }

  /* Section 11 */
  .top-banners-inner {
    flex-direction: column;
    gap: 24px;
  }

  .top-banner-item {
    height: 200px;
  }

  /* Section 12 */
  .top-contact-cards {
    flex-direction: column;
    padding: 80px 64px;
  }
}

@media (max-width: 1014px) {

  /* Section 7 */
  .top-admission-cards {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 24px;
    padding-bottom: 32px;
    /* create bleed effect */
    width: calc(100% + 48px);
    margin-left: -24px;
    margin-right: -24px;
    padding-left: 24px;
    padding-right: 24px;
    /* smooth scroll */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .top-admission-cards::-webkit-scrollbar {
    display: none;
  }

  .top-admission-card {
    flex: 0 0 280px;
    max-width: 280px;
    transform: none !important;
  }


  .top-admission-card-arrow {
    bottom: 12px;
    right: 8px;
    width: 48px;
    height: 48px;
  }

  .top-admission-card-arrow img {
    width: 48px;
    height: auto;
  }
}

@media (max-width: 948px) {

  /* Section 4 */
  .top-about-content {
    flex-direction: column;
  }

  /* Section 5 */
  .top-education {
    flex-direction: column;
    gap: 80px;
  }

  /* Section 9 */
  .top-coop {
    padding: 60px 24px;
  }

  .top-coop-content {
    flex-direction: column;
    gap: 32px;
  }

  .top-coop-circles {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* =============================================================================
   @media：SP
============================================================================= */

@media (max-width: 767px) {

  /* Top Page Styles (SPH) */
  .top-main {
    gap: 40px;
  }

  /* Section 1 */
  .top-important-news {
    margin: 140px 24px 0 24px;
  }

  /* Section 2 */
  .top-news {
    padding: 0 20px;
  }

  .top-news-title {
    text-align: center;
    width: 100%;
  }

  .top-news-more {
    display: none;
  }

  .top-news-more-sp {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: var(--sky-blue) !important;
    text-decoration: none;
    font-weight: 700;
    margin-top: 24px;
    width: 100%;
    text-align: right;
  }

  /* Section 3 */
  .top-mission {
    padding: 0 48px;
  }

  .top-mission-text {
    text-align: left;
  }

  /* Section 4 */
  .top-about {
    display: flex;
    flex-direction: column;
    padding: 60px 24px;
  }

  .top-about-graphics {
    justify-content: center;
    margin-bottom: 20px;
  }

  .about-diagram {
    transform-origin: center center;
    margin: -50px 0;
  }

  .top-about-features-container {
    display: grid;
    grid-template-columns: 100%;
    width: 100%;
    height: auto;
    margin-top: 40px;
  }

  .top-about-feature-box {
    grid-row: 1;
    grid-column: 1;
    position: relative !important;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.5s ease, visibility 0.5s;
  }

  .top-about-feature-box.active {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 2;
  }

  .top-about-footer {
    margin-top: 24px;
  }

  /* Section 5 */
  .top-education {
    padding: 50px 20px;
    gap: 0px;
  }

  .top-education-title {
    text-align: center;
  }

  .top-education-images::before,
  .top-education-images::after {
    display: none;
  }

  .top-education-footer {
    margin-top: 60px;
  }

  .top-education-btn {
    display: none;
  }

  .top-education-btn-sp {
    display: inline-flex;
  }

  .top-education-list {
    margin-bottom: 0px;
  }

  /* Section 6 */
  .top-teachers {
    padding: 40px 20px;
  }

  /* Section 7 */
  .top-admission {
    padding: 30px 24px;
  }

  .top-admission-lead {
    text-align: left;
  }

  .top-admission-cards {
    flex-direction: column;
    padding-bottom: initial;
  }

  .top-admission-card {
    max-width: initial;
  }

  .top-admission-circle {
    display: none;
  }

  /* Section 8 */
  .top-research::before {
    display: none;
  }

  .top-research-card {
    flex-direction: column;
  }

  .top-research {
    padding: 64px 24px !important;
  }

  /* Section 9 */
  .top-coop {
    padding: 30px 24px;
  }

  /* Section 10 */
  .top-career {
    padding: 60px 20px;
  }

  .top-career-btn {
    width: 320px;
  }

  /* Section 11 */
  .top-banners {
    padding: 0 24px;
  }

  /* Section 12 */
  .top-contact-cards {
    flex-direction: column;
    padding: 40px 24px;
    gap: 24px;
  }

  .top-contact-card {
    padding: 48px 32px;
    border-radius: 40px;
  }

  .top-contact-card-title {
    font-size: 20px;
  }

  .top-contact-btn {
    min-width: 100%;
    font-size: 16px;
  }

  .top-coop-btn-skyblue {
    width: 257px;
  }

  .top-coop-card:nth-child(2) .top-coop-header span {
    font-size: 0;
  }

  .top-coop-card:nth-child(2) .top-coop-header span::after {
    content: "自治体の方へ";
    font-size: 24px;
  }

  .top-coop-header {
    font-size: 24px;
  }
}

@media print {

  .top-admission-cards {
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: row;
  }

  .top-about-content {
    display: flex !important;
    flex-direction: row !important;
    gap: 0 !important;
  }

  .top-about-graphics {
    margin-bottom: 0px !important;
  }

  .top-research-card {
    flex-direction: row !important;
  }

  .top-coop-content {
    flex-direction: row !important;
  }

  .top-news {
    margin-top: 240px;
  }

  .top-mission {
    margin-top: 800px;
  }

  .top-about {
    margin-top: 800px;
  }

  .top-education {
    margin-top: 400px;
  }

  .top-teachers {
    margin-top: 400px;
  }

  .top-coop {
    margin-top: 1000px;
  }

  .top-career {
    margin-top: 400px;
  }

  .top-contact-cards {
    margin-bottom: 400px;
  }

  .top-mission::before {
    display: none;
  }
}