/* 공통 서브페이지 스타일 */
@import url('sub-common.css');

.footer-spacer {
  display: none;
}

/* ===== 스토리 리스트 ===== */
.story-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px 334px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* 스토리 아이템 */
.story-item {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  scroll-margin-top: 80px;
}

.story-item.layout-right {
  flex-direction: row;
}

.story-item.layout-left {
  flex-direction: row-reverse;
}

/* 말풍선 카드 */
.bubble-card {
  flex: 1;
  background: #fff;
  border-radius: 30px;
  padding: 50px 54px;
  position: relative;
}

/* 말풍선 꼬리 — layout-right: 우측 */
.layout-right .bubble-card::before {
  content: '';
  position: absolute;
  top: 60px;
  right: -27px;
  width: 37px;
  height: 45px;
  background: #fff;
  clip-path: polygon(0% 0%, 100% 0%, 0% 100%);
}

/* 말풍선 꼬리 — layout-left: 좌측 */
.layout-left .bubble-card::before {
  content: '';
  position: absolute;
  top: 60px;
  left: -27px;
  width: 37px;
  height: 45px;
  background: #fff;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%);
}

/* 태그 */
.story-tag {
  position: absolute;
  top: 30px;
  right: 40px;
  display: inline-block;
  font-size: 19.5px;
  font-weight: 700;
  line-height: 1.8;
  color: #fff;
  padding: 2px 20px;
  border-radius: 30px;
}

.story-tag.orange {
  background: #f39700;
}

.story-tag.green {
  background: #009f3a;
}

.story-tag.sky {
  background: #00b9ef;
}

.bubble-card .quote {
  font-size: 19.5px;
  font-weight: 700;
  line-height: 1.8;
  color: #005891;
  margin: 0 0 35px;
  padding-top: 36px;
}

.bubble-card .body-text {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.8;
  color: #000;
}

.bubble-card .body-text p {
  margin: 0 0 10px;
}

.bubble-card .body-text p:last-child {
  margin-bottom: 0;
}

/* 인물 영역 */
.story-person {
  flex: 0 0 180px;
  text-align: center;
  padding-top: 20px;
}

.story-person img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  background: #ddd;
}

.story-person .person-name {
  font-size: 19.5px;
  font-weight: 500;
  line-height: 1.5;
  margin-top: 20px;
  text-align: left;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* 앵커 하이라이트 */
.story-item:target .bubble-card {
  animation: highlightPulse 0.6s ease;
}

@keyframes highlightPulse {
  0% {
    box-shadow: 0 0 0 4px rgba(0, 88, 145, 0.3);
  }

  100% {
    box-shadow: none;
  }
}

/* ===== 반응형: 태블릿 ===== */
@media (max-width: 1024px) {
  .story-item {
    gap: 30px;
  }

  .bubble-card {
    padding: 40px 36px;
  }

  .bubble-card .quote {
    font-size: 17px;
  }

  .bubble-card .body-text {
    font-size: 16px;
  }

  .story-tag {
    font-size: 16px;
    top: 24px;
    right: 30px;
  }

  .story-person {
    flex: 0 0 150px;
  }

  .story-person img {
    width: 150px;
    height: 150px;
  }

  .story-person .person-name {
    font-size: 16px;
  }
}

/* ===== 반응형: 모바일 ===== */
@media (max-width: 768px) {

  /* 스토리 리스트 */
  .story-list {
    padding: 40px 16px 60px;
    gap: 30px;
  }

  /* 모바일: 세로 배치 */
  .story-item,
  .story-item.layout-right,
  .story-item.layout-left {
    flex-direction: column;
    gap: 20px;
  }

  /* 말풍선 꼬리: 모바일에서 하단 중앙 */
  .layout-right .bubble-card::before,
  .layout-left .bubble-card::before {
    top: auto;
    bottom: -20px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 30px;
    height: 25px;
    clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
  }

  .bubble-card {
    padding: 30px 24px;
    border-radius: 24px;
  }

  .story-tag {
    position: static;
    font-size: 14px;
    padding: 2px 14px;
    margin-bottom: 12px;
  }

  .bubble-card .quote {
    font-size: 16px;
    padding-top: 0;
    margin-bottom: 12px;
  }

  .bubble-card .body-text {
    font-size: 15px;
    line-height: 1.7;
  }

  /* 인물: 가로 중앙 */
  .story-person {
    flex: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
  }

  .story-person img {
    width: 120px;
    height: 120px;
  }

  .story-person .person-name {
    font-size: 15px;
    margin-top: 12px;
  }
}

/* ===== 반응형: 소형 모바일 ===== */
@media (max-width: 480px) {
  .bubble-card {
    padding: 24px 18px;
  }

  .bubble-card .quote {
    font-size: 15px;
  }

  .bubble-card .body-text {
    font-size: 14px;
  }

  .story-person img {
    width: 100px;
    height: 100px;
  }
}
