/* =============================================================================
   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;
  /* gap: 80px; */
  width: 100%;
  overflow-x: hidden;
  position: relative;
}

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

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

/* [top-mission::before]内の[background-image]は[index_top.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;
  z-index: -1;
}

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

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

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

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

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

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

/* -----------------------------------------------------------------------------
   Section 2: Who We Are Section (English Only)
----------------------------------------------------------------------------- */

.top-who-we-are {
  padding: 60px 100px;
  position: relative;
  background-color: #FFF;
  overflow: hidden;
}

.top-who-we-are-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "image title"
    "image text"
    "image buttons";
  column-gap: 80px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.top-who-we-are-title {
  grid-area: title;
  color: var(--dark-blue);
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 24px;
  align-self: end;
}

.top-who-we-are-text {
  grid-area: text;
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 32px;
}

.top-who-we-are-image-box {
  grid-area: image;
  border-radius: 60px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.top-who-we-are-image-box img {
  width: 100%;
  height: auto;
  display: block;
}

.top-who-we-are-buttons {
  grid-area: buttons;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-self: start;
}

.top-who-we-are-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--dark-blue);
  color: #FFF !important;
  padding: 14px 28px;
  border-radius: 40px;
  font-weight: 700;
  text-decoration: none;
  width: calc(50% - 10px);
  min-width: 0;
  font-size: 18px;
  transition: all 0.3s;
}

.top-who-we-are-btn:hover {
  opacity: 0.8;
}

.top-who-we-are-btn .btn-arrow {
  width: 32px;
  height: 32px;
  background-color: #FFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.top-who-we-are-btn .btn-arrow img {
  width: 32px;
  height: auto;
}

/* [top-who-we-are-decoration]内の[background-image]は[index_top.twig]側に直接定義 */
.top-who-we-are-decoration {
  position: absolute;
  top: -50px;
  right: -100px;
  width: 280px;
  height: 280px;
  /* background-image: url("/themes/SPH/images/circle.svg"); */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 1;
  pointer-events: none;
  opacity: 0.8;
}

/* -----------------------------------------------------------------------------
   Section 3: Movie Section (English Only)
----------------------------------------------------------------------------- */

.top-movie {
  padding: 60px 0 160px;
  position: relative;
  background-color: #FFF;
  overflow: hidden;
}

.top-movie-inner {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  padding: 0 40px;
}

.top-movie-video-frame {
  border: 4px solid var(--dark-blue);
  padding: 16px;
  background-color: #FFF;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.top-movie-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background-color: #000;
}

.top-movie-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

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

.movie-dec-1 {
  top: 20px;
  left: 12%;
  width: 120px;
  height: 120px;
}

.movie-dec-3 {
  bottom: 0px;
  right: 5%;
  width: 320px;
  height: 320px;
}

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

.top-teachers {
  background-color: #F3F7F9;
  padding: 100px 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;
  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: 48px;
  line-height: 1.4;
}

.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 5: Research (English Only)
----------------------------------------------------------------------------- */

.top-research {
  padding: 60px 100px;
  position: relative;
  background-color: #FFF;
  overflow: hidden;
}

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

.top-research-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 80px;
  position: relative;
  z-index: 2;
}

.top-research-image-box {
  flex: 1;
  border-radius: 60px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.top-research-image-box img {
  width: 100%;
  height: auto;
  display: block;
}

.top-research-content {
  flex: 1;
}

.top-research-title {
  color: var(--sky-blue);
  font-size: 72px;
  font-weight: 600;
  margin-bottom: 40px;
  text-align: center;
}

.top-research-text {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 48px;
}

.top-research-buttons {
  display: flex;
  gap: 20px;
}

.top-research-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--sky-blue);
  color: #FFF !important;
  padding: 14px 20px;
  border-radius: 40px;
  font-weight: 700;
  text-decoration: none;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}

.top-research-btn .btn-arrow {
  width: 28px;
  height: 28px;
  background-color: #FFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.top-research-btn .btn-arrow img {
  width: 28px;
  height: 28px;
}

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

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

.dec-bottom-left {
  bottom: -60px;
  left: -60px;
  width: 220px;
  height: 220px;
}

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

@media (max-width: 1200px) {

  /* Section 2 */
  .top-who-we-are {
    padding: 80px 40px;
  }

  .top-who-we-are-inner {
    gap: 40px;
  }

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

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

  .top-research-inner {
    gap: 40px;
  }

  .top-research-title {
    font-size: 56px;
  }
}

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

@media (max-width: 1023px) {

  /* Section 1 */
  .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 2 */
  .top-who-we-are {
    padding: 80px 40px;
  }

  .top-who-we-are-inner {
    column-gap: 40px;
    grid-template-areas:
      "image title"
      "image text"
      "buttons buttons";
  }

  .top-who-we-are-title {
    font-size: 36px;
  }

  .top-who-we-are-buttons {
    margin-top: 40px;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
  }

  .top-who-we-are-btn {
    width: calc(33.33% - 14px);
    font-size: 14px;
    padding: 14px 15px;
  }

  /* Section 3 */
  .movie-dec-1 {
    left: 2%;
  }

  .movie-dec-3 {
    right: -2%;
  }

  /* Section 4 */
  .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 5 */
  .top-research-buttons {
    flex-direction: column;
  }

  .top-research-btn {
    width: 100%;
  }

  .dec-top-right {
    top: -80px;
  }

  .dec-bottom-left {
    bottom: -30px;
    left: -10px;
  }
}

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

@media (max-width: 767px) {

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

  /* Section 1 */
  .top-mission {
    padding: 0 24px;
  }

  /* Section 2 */
  .top-who-we-are {
    padding: 60px 24px;
  }

  .top-who-we-are-inner {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .top-who-we-are-title {
    grid-area: auto;
    font-size: 32px;
    order: 1;
    margin-bottom: 24px;
    text-align: center;
    width: 100%;
  }

  .top-who-we-are-text {
    grid-area: auto;
    order: 2;
    margin-bottom: 32px;
    width: 100%;
  }

  .top-who-we-are-image-box {
    grid-area: auto;
    order: 3;
    max-width: 100%;
    margin: 0 auto 32px;
    width: 100%;
    border-radius: 40px;
  }

  .top-who-we-are-buttons {
    grid-area: auto;
    order: 4;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 12px;
  }

  .top-who-we-are-btn {
    width: 100%;
    font-size: 16px;
    padding: 14px 20px;
  }

  .top-who-we-are-decoration {
    right: -10px;
    width: 150px;
    height: 150px;
  }

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

  .top-movie-video-frame {
    border-width: 4px;
    padding: 8px;
  }

  .movie-dec-1 {
    width: 100px;
    height: 100px;
    left: 0%;
  }

  .movie-dec-3 {
    width: 180px;
    height: 180px;
    bottom: 80px;
    right: 0%;
  }

  /* Section 4 */
  .top-teachers {
    padding: 64px 24px;
  }

  /* Section 5 */
  .top-research {
    padding: 60px 24px;
  }

  .top-research-inner {
    flex-direction: column-reverse;
    text-align: center;
  }

  .top-research-image-box {
    max-width: 600px;
    border-radius: 40px;
    margin-top: 40px;
  }

  .top-research-title {
    font-size: 40px;
  }

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

  .dec-top-right {
    top: -80px;
    right: -50px;
    width: 180px;
    height: 180px;
  }

  .dec-bottom-left {
    display: none;
  }
}

@media print {
  .top-mission {
    margin-top: 200px;
  }

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

  .top-who-we-are {
    margin-top: 400px;
  }

  .top-research {
    margin-top: 300px;
  }
}