.research-institute section {
  padding-top: 120px;
  padding-bottom: 140px;

  @media screen and (max-width: 1279px) {
    padding-top: 100px;
    padding-bottom: 120px;
  }

  @media screen and (max-width: 767px) {
    padding-top: 80px;
    padding-bottom: 100px;
  }
}

.research-intro-title {
  color: var(--gray-700);
}

.research-institute .pc {
  display: block;
}

.research-institute .mobile {
  display: none;
}

@media screen and (max-width: 767px) {
  .research-institute .pc {
    display: none;
  }

  .research-institute .mobile {
    display: block;
  }
}

.research-institute .highlight {
  color: var(--blue-500);
}

.research-institute .section1 .title {
  display: flex;
  align-items: center;
  justify-content: start;

  @media screen and (max-width: 767px) {
    flex-direction: column;
  }
}

.research-institute .section1 .content {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin-top: 52px;
  gap: 32px;

  @media screen and (max-width: 1279px) {
    display: flex;
    flex-direction: column;
  }
}

.research-institute .section1 .content .banner {
  grid-column: span 5 / span 5;
  flex-shrink: 0;
  border-radius: 4px; /* Optional: if you want rounded corners */
  aspect-ratio: 640 / 427;
}

.research-institute .section1 .content .banner img {
  flex-shrink: 0;
  overflow: hidden; /* Hide the overflow when image scales */
  border-radius: 4px; /* Optional: if you want rounded corners */
}

.research-institute .section1 .content .text {
  padding: 20px 0;
  grid-column: span 7 / span 7;
  flex-shrink: 0;
  color: var(--gray-700);
}

.research-institute .section2 {
  display: flex;
  flex-direction: column;
}

.research-institute .section2 .title {
  margin-top: 16px;
}

.research-institute .section2 .profile-list {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 32px;
  margin-top: 52px;

  @media screen and (max-width: 1279px) {
    gap: 24px;
  }

  @media screen and (max-width: 767px) {
    gap: 8px;
  }
}

.research-institute .section2 .profile-box {
  border-radius: 4px;
  border: 1px solid var(--gray-200);
  background: var(--gray-000);
  padding: 24px;
  display: flex;
  height: auto;
  grid-column: span 6 / span 6;
  gap: 32px;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;

  @media screen and (max-width: 1279px) {
    grid-column: span 12 / span 12;
  }

  @media screen and (max-width: 767px) {
    padding: 12px;
  }
}

/* Profile image wrapper to handle overflow */
.research-institute .section2 .profile-box .image-wrapper {
  overflow: hidden;
  border-radius: 4px;
  flex-shrink: 0;
  width: 175px;
  height: 219px;

  @media screen and (max-width: 767px) {
    width: 116px;
    height: 154px;
  }
}

/* Profile image styles */
.research-institute .section2 .profile-box .image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.research-institute .section2 .profile-box:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-1);
}

.research-institute .section2 .name {
  /* title-1-b */
  font-weight: 700;
  font-size: 24px;
  line-height: 36px;
}

@media screen and (max-width: 1279px) {
  .research-institute .section2 .name {
    /* title-1-b */
    font-weight: 700;
    font-size: 22px;
    line-height: 34px;
  }
}

@media screen and (max-width: 767px) {
  .research-institute .section2 .name {
    /* body-1-b */
    font-weight: 700;
    font-size: 16px;
    line-height: 28px;
  }
}

/* Scale profile image on hover */
.research-institute .section2 .profile-box:hover .image-wrapper img {
  transform: scale(1.05);
}

.research-institute .section2 .profile-box .position {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;

  /* body-18px */
  font-weight: 350;
  font-size: 18px;
  line-height: 30px;
}

@media screen and (max-width: 1279px) {
  .research-institute .section2 .profile-box .position {
    /* body-18px */
    font-weight: 350;
    font-size: 16px;
    line-height: 28px;
  }
}

@media screen and (max-width: 767px) {
  .research-institute .section2 .profile-box .position {
    /* caption */
    font-weight: 300;
    font-size: 14px;
    line-height: 20px;
  }
}

.research-institute .section2 .profile-box .open-modal {
  margin-left: auto;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  align-self: center;

  @media screen and (max-width: 767px) {
    display: none;
  }
}

.research-institute .section3 {
  background-color: rgba(249, 249, 251, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.research-institute .section3 .title {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pc-slider {
  display: block;
}

.mobile-slider {
  display: none;
}

@media (max-width: 1279px) {
  .pc-slider {
    display: none;
  }

  .mobile-slider {
    margin-top: 12px;
    display: block;
  }
}

#certification-slider-container {
  margin-top: 24px;
  position: relative;
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.certification-slide {
  display: none;
  box-sizing: border-box;
}

.certification-slide.active {
  display: block;
}

.certification-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.certification-title {
  color: var(--gray-700);
  text-align: center;
  margin-top: 12px;
}

.certification-image-container {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  aspect-ratio: 371/528;
  margin: 0 auto;

  /* 모바일 화면(767px 이하) 크기 고정 - 이 숫자를 수정하세요 */
  @media screen and (max-width: 767px) {
    width: 150px;
  }

  /* 태블릿 화면 (768px ~ 1279px) 크기 고정 - 이 숫자를 수정하세요 */
  @media screen and (min-width: 768px) and (max-width: 1279px) {
    width: 150px; /* 태블릿에서 원하는 크기로 숫자 변경 */
  }

  /* PC 화면(1280px 이상) 크기 고정 - 이 숫자를 수정하세요 */
  @media screen and (min-width: 1280px) {
    width: 400px;
  }
}

.certification-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sliders {
  display: flex;
  justify-content: flex-end; /* PC에서는 오른쪽 정렬 */

  @media screen and (max-width: 1279px) {
    justify-content: center;
    width: 100%;
  }
}

.research-institute .section4 .text-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
}

.research-institute .text-group .pc {
  display: block;
}

.research-institute .text-group .tablet {
  display: none;
}

.research-institute .text-group .mobile {
  display: none;
}

@media screen and (max-width: 1279px) {
  .research-institute .text-group .pc {
    display: none;
  }

  .research-institute .text-group .tablet {
    display: block;
  }
}

@media screen and (max-width: 767px) {
  .research-institute .text-group .pc {
    display: none;
  }

  .research-institute .text-group .tablet {
    display: none;
  }

  .research-institute .text-group .mobile {
    display: block;
  }
}

.text-center {
  text-align: center;
}

.research-institute .partner-title {
  color: var(--gray-700);
}

.research-institute .section4 .slide-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 20px 0;
}

.research-institute .section4 .slide {
  width: 193px;
  height: 69px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 40px;
}

.research-institute .section4 .slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* 슬라이드는 DB 에서 동적으로 채워지므로 개수와 무관하게 내용 폭을 따른다 */
.research-institute .section4 .slide-track {
  display: flex;
  width: max-content;
}

/* Slide container styles */
.research-institute .section4 .slide-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 20px 0;
}

/* Gradient overlay styles */
.research-institute .section4 .gradient-overlay {
  position: absolute;
  top: 0;
  width: 20%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.research-institute .section4 .gradient-overlay.left {
  left: 0;
  background: linear-gradient(to right, white, rgba(255, 255, 255, 0));
}

.research-institute .section4 .gradient-overlay.right {
  right: 0;
  background: linear-gradient(to left, white, rgba(255, 255, 255, 0));
}

.research-institute .section4 .slide {
  width: 193px;
  height: 69px;
  display: flex;
  align-items: center;
  justify-content: center;

  @media screen and (max-width: 1279px) {
    width: 146px;
    height: 52px;
  }

  @media screen and (max-width: 767px) {
    width: 130px;
    height: 46px;
  }
}

.research-institute .section4 .slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Left to right animation for slide1 (8 slides) */
/* 애니메이션은 research-institute.js 가 로고를 채운 뒤 붙이는 is-ready 에서만 건다 */
.research-institute .section4 .slide-container.slide1 .slide-track {
  transform: translateX(-50%);
}
.research-institute .section4 .slide-container.slide1 .slide-track.is-ready {
  animation: scrolling1 20s linear infinite;
}

/* Right to left animation for slide2 (7 slides) */
.research-institute .section4 .slide-container.slide2 .slide-track.is-ready {
  animation: scrolling2 20s linear infinite reverse;
}

/* 트랙에 같은 세트가 두 번 들어 있으므로 -50% 가 정확히 한 세트 */
@keyframes scrolling1 {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes scrolling2 {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

.research-institute .section4 .description {
  color: var(--gray-600);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.research-institute .section5 .title.header-3 {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 60px;
}

.research-institute .section5 #map {
  height: 860px;
  margin-left: calc(-50vw + 50%);
  position: relative;
  left: 0;
  right: 0;
}

@media screen and (max-width: 1279px) {
  .research-institute .section5 #map {
    height: 420px;
  }
}

@media screen and (max-width: 767px) {
  .research-institute .section5 #map {
    height: 350px;
  }
}

.research-institute #map {
  position: relative;
  height: 860px;
}

.research-institute .map-info {
  width: 400px;
  position: absolute;
  top: 58px;
  left: 88px;
  display: flex;
  flex-direction: column;
  padding: 40px 30px;
  gap: 10px;
  border-radius: 4px;
  background: var(--white);
  z-index: 3;
  box-shadow: var(--shadow-2);
}

/* Desktop info (visible over 1023px) */
.research-institute .map-info.desktop-info {
  display: block;
}

/* Mobile info (hidden over 1023px) */
.research-institute .map-info.mobile-info {
  display: none;
  width: 100%;
  position: static;
  border-radius: 0;
  box-shadow: none;
  padding: 24px 16px;
}

@media screen and (max-width: 1279px) {
  /* Hide desktop info */
  .research-institute .map-info.desktop-info {
    display: none;
  }

  /* Show mobile info */
  .research-institute .map-info.mobile-info {
    display: block;
  }
}

.research-institute .map-info .title {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-bottom: 16px;
}

.research-institute .transportation-group {
  display: flex;
  flex-direction: column;
  padding-top: 32px;
  gap: 32px;
}

.research-institute .map-info .description {
  color: var(--gray-700);
  padding-bottom: 32px;
  border-bottom: 1px solid var(--gray-200);
}

.research-institute .map-info .title img {
  width: 24px;
  height: 24px;
}

.research-institute .map-info .transportation {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.research-institute .transportation-subtitle {
  color: var(--black);
}

.research-institute .map-info .transportation ul {
  padding-left: 8px;
  margin: 0;
}

.research-institute .map-info .transportation li {
  position: relative;
  padding: 0 0 0 16px;
  list-style: none;
  color: var(--gray-700);
}

.research-institute .map-info .transportation li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 6px;
  line-height: 1;
  font-size: 16px;
}

.research-institute .map-info .transportation-title {
  display: flex;
  gap: 4px;
  align-items: center;
}