/* =========================================================
   스토리 목록(story.html) · 공지 하나 보기(story-view.html) 전용
   값은 rainbowgimpo.com /스토리/ 와 글 보기(/wake-up-and-smell-the-roses/)를
   크롬에서 직접 잰 계산값 (2026-11-26, 1920·1366·768·375 너비).
   공통(머리말·바닥글·글꼴·띠 배너·data-anim)은 base.css / main.js 몫.
   중단점(김포무지개와 같음): 1300 이하 / 999 이하 / 690 이하
   "(근사)" 표시는 명세·계산값이 없어 화면을 보고 맞춘 값.
   ========================================================= */

.page-story {
  --story-accent: var(--accent, #009fe3);
  --story-ease-zoom: cubic-bezier(.15, .75, .5, 1);   /* 목록 사진 확대 0.45s */
  --story-ease-rel: cubic-bezier(.2, 1, .22, 1);      /* 관련 글 사진 확대 0.7s */
  --story-ease-line: cubic-bezier(.25, 0, .4, 1);     /* 분류 밑줄 0.3s */
}

/* 폭: 공통 .container (base.css, 본문 1320 / 999 이하 88%) */

/* 스토리 첫 화면 막: 위가 어둡고 아래로 옅어지는 그라데이션, 투명도 0.3
   (효과_명세 1.1, story.html:269). 공통 배너의 단색 막을 덮어씀 */
.page-story .page-banner::after {
  background: linear-gradient(to bottom, #000 0%, rgba(255, 255, 255, .001) 75%);
  opacity: .3;
}

/* =========================================================
   1) 스토리 목록
   ========================================================= */
.page-story .story-list { padding: 90px 0; background: #fff; }

.page-story .story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;                           /* 김포무지개: 칸마다 안쪽 10px */
}

.page-story .story-card { position: relative; min-width: 0; }

.page-story .story-card__img {
  display: block;
  position: relative;
  overflow: hidden;
  height: 30vh;                        /* 김포무지개: 사진 칸 높이 30vh */
  cursor: pointer;
}
.page-story .story-card__img-inner {
  display: block;
  width: 100%;
  height: 100%;
  transition: opacity .45s var(--story-ease-zoom), transform .45s var(--story-ease-zoom);
}
.page-story .story-card__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  margin: 0;
}
/* 마우스 올림: 사진 1.1배 확대 (김포무지개 hover-effect="zoom") */
.page-story .story-card:hover .story-card__img-inner { transform: scale(1.1); }

.page-story .story-card__content { padding: 25px 0; }

.page-story .story-card__title {
  margin: 0;
  font-family: var(--f-eb);            /* 김포무지개: NanumSquareNeo-dEb, 600 */
  font-size: 30px;
  line-height: 39px;
  font-weight: 600;
  letter-spacing: -0.05px;
  color: #000;
}
.page-story .story-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color .3s;
}

.page-story .story-card__excerpt {
  max-width: 90%;
  margin: 10px 0 0;
  padding: 0;
  font-size: 18px;
  line-height: 28.8px;
  font-weight: 400;
  color: #000;
}

.page-story .story-empty {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 18px;
  line-height: 32px;
  color: #000;
  padding: 40px 0;
}

/* "Load More" 단추 (김포무지개 load-more, 검정, 둥근 단추) */
.page-story .story-more-wrap { text-align: center; margin: 60px 0 0; }
.page-story .story-more-wrap[hidden] { display: none; }
.page-story .story-more {
  display: inline-block;
  position: relative;
  padding: 10px 40px;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: 50px;
  background-color: transparent;
  color: #000;
  font-size: 18px;
  line-height: 28px;
  text-decoration: none;
  transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}
.page-story .story-more:hover,
.page-story .story-more:focus-visible {
  background-color: #000;
  border-color: transparent;
  color: #fff;
}

/* =========================================================
   2) 공지 하나 보기
   ========================================================= */

/* 글쓴이 동그라미 (김포무지개: 기본 회색 얼굴 그림) */
.page-story .story-avatar {
  display: inline-block;
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, #fff 0 19%, transparent 20%),
    radial-gradient(ellipse 42% 30% at 50% 92%, #fff 0 98%, transparent 100%),
    #c9c9c9;
  overflow: hidden;
}
.page-story .story-avatar--sm  { width: 38px; height: 38px; }
.page-story .story-avatar--bio { width: 80px; height: 80px; }   /* (근사) */

/* ---------- 전체 화면 머리 ---------- */
.page-story .view-hero {
  position: relative;
  height: 100vh;
  min-height: 500px;
  overflow: hidden;
  background-color: #333;
  color: #fff;
}
.page-story .view-hero__img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;        /* 김포무지개: animate-in "fade-in" (근사 시간) */
}
.page-story .view-hero.is-loaded .view-hero__img { opacity: 1; }
.page-story .view-hero__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.page-story .view-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .35);      /* (근사) 김포무지개 bg-overlay */
}
.page-story .view-hero__inner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  width: 100%;
  max-width: 1180px;
  padding: 0 90px;
  text-align: center;
}
.page-story .view-hero__cats { margin: 0 0 15px; font-size: 0; }
.page-story .story-pill {
  display: inline-block;
  margin: 0 3px 6px;
  padding: 6px 10px;
  border-radius: 100px;
  background-color: var(--story-accent);
  color: #fff;
  font-size: 18px;
  line-height: 18px;
  font-weight: 700;
  text-decoration: none;
}
.page-story .view-hero__title {
  max-width: 1000px;
  margin: 0 auto;
  font-family: var(--f-eb);            /* 김포무지개: NanumSquareNeo-dEb, 700 */
  font-size: 77px;
  line-height: 77px;
  font-weight: 700;
  color: #fff;
  word-break: keep-all;
}
.page-story .view-hero__author {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 25px;
}
.page-story .view-hero__author .story-avatar { margin-bottom: 15px; }
.page-story .view-hero__author-name {
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
  color: #fff;
}
.page-story .view-hero__date {
  font-size: 12px;
  line-height: 24px;
  color: rgba(255, 255, 255, .8);
}
.page-story .view-hero__down {
  position: absolute;
  left: 50%;
  bottom: 30px;
  width: 40px;
  height: 79px;
  margin-left: -20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

/* ---------- 본문 ---------- */
.page-story .view-content { padding: 80px 0 0; background: #fff; }
.page-story .view-content__inner {
  box-sizing: border-box;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 90px;
}
.page-story .view-body { color: #000; font-size: 18px; line-height: 32px; }
.page-story .view-body p {
  margin: 0;
  padding: 0 0 27px;
  font-size: 18px;
  line-height: 32px;
  white-space: pre-line;               /* 시트에 적은 줄바꿈 그대로 */
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.page-story .view-body h3 {
  margin: 10px 0 0;
  padding: 0 0 20px;
  font-size: 30px;
  line-height: 38px;
  font-weight: 600;
  color: #000;
  white-space: pre-line;
  word-break: keep-all;
}
.page-story .view-body ul { margin: 0 0 27px; padding: 0 0 0 30px; }
.page-story .view-body li { font-size: 18px; line-height: 32px; white-space: pre-line; }
.page-story .view-body hr {
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, .1);
  margin: 10px 0 37px;
}

/* 본문 아래 분류 알약 (김포무지개: 회색 테두리 알약) */
.page-story .view-tags { padding: 12px 0 2px; font-size: 0; }   /* 김포무지개: 분류 줄 높이 58px */
.page-story .view-tags:empty { display: none; }
.page-story .story-tag {
  display: inline-block;
  margin: 0 10px 10px 0;
  padding: 6px 20px;
  border: 2px solid rgba(0, 0, 0, .1);
  border-radius: 100px;
  color: #888;
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  transition: border-color .2s, color .2s;
}
.page-story .story-tag:hover { border-color: rgba(0, 0, 0, .3); color: #000; }

/* 글쓴이 줄 (김포무지개: 동그라미 + 밑줄 이름) */
.page-story .view-bio {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 60px;                    /* 김포무지개: 분류 줄 끝 → 글쓴이 줄 60px, 줄 높이 110px */
  padding: 30px 0 0;
}
.page-story .view-bio__name {
  min-width: 0;
  overflow-wrap: anywhere;             /* 375 너비에서 긴 이름이 넘치지 않게 */
  margin: 0;
  font-size: 22px;                     /* (근사) */
  line-height: 30px;
  font-weight: 700;
  color: #000;
}
.page-story .view-bio__name span { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 다음 글 띠 ---------- */
.page-story .view-next {
  position: relative;
  display: block;
  height: 318px;
  margin-top: 104px;
  overflow: hidden;
  background-color: #333;
  color: #fff;
  text-decoration: none;
}
.page-story .view-next[hidden] { display: none; }
.page-story .view-next__img { position: absolute; inset: 0; }
.page-story .view-next__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s cubic-bezier(.05, .2, .1, 1), opacity .3s;
}
.page-story .view-next__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .3);
  transition: background-color .3s;    /* (근사) */
}
.page-story .view-next:hover .view-next__overlay { background: rgba(0, 0, 0, .62); }
.page-story .view-next__text {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 90px;
  text-align: center;
}
.page-story .view-next__label {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
}
.page-story .view-next__title {
  position: relative;
  display: inline-block;
  font-size: 30px;
  line-height: 39px;
  font-weight: 600;
  word-break: keep-all;
  transition: transform .4s cubic-bezier(.05, .2, .1, 1);
}
/* 마우스 올림: 제목 오른쪽에 화살표가 그어지며 제목이 왼쪽으로 조금 비킴 */
.page-story .view-next__arrow {
  position: absolute;
  left: 100%;
  top: 50%;
  width: 45px;
  height: 14px;
  margin: -7px 0 0 18px;
  opacity: 0;
  transition: opacity .3s;
}
.page-story .view-next__line {
  position: absolute;
  left: 0;
  top: 6px;
  width: 45px;
  height: 2px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s cubic-bezier(.05, .2, .1, 1);
}
.page-story .view-next__line::after {
  content: '';
  position: absolute;
  right: 0;
  top: -4px;
  width: 9px;
  height: 9px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(45deg);
  transform-origin: center;
  box-sizing: border-box;
}
.page-story .view-next:hover .view-next__title { transform: translateX(-31px); }
.page-story .view-next:hover .view-next__arrow { opacity: 1; }
.page-story .view-next:hover .view-next__line { transform: scaleX(1); }

/* ---------- You May Also Like ---------- */
.page-story .view-related { background: #f4f4f4; padding: 0 0 100px; }   /* 배경 색 (근사) */
.page-story .view-related[hidden] { display: none; }
.page-story .view-related__heading {
  margin: 0 0 20px;
  padding: 60px 0 45px;                /* 김포무지개: 제목 칸 높이 144px */
  font-size: 30px;
  line-height: 39px;
  font-weight: 600;
  color: #000;
}
.page-story .view-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 3%;
  row-gap: 30px;
}
.page-story .story-rel { min-width: 0; }
.page-story .story-rel__link {
  position: relative;
  display: block;
  height: 100%;
  box-sizing: border-box;
  padding-bottom: 80px;
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .14);
  color: #000;
  text-decoration: none;
}
.page-story .story-rel__img { display: block; overflow: hidden; aspect-ratio: 600 / 403; }
.page-story .story-rel__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  backface-visibility: hidden;
  transition: all .7s var(--story-ease-rel);
}
.page-story .story-rel__link:hover .story-rel__img img { transform: scale(1.07); }
.page-story .story-rel__cat {
  display: block;
  position: relative;
  z-index: 2;
  padding: 20px 30px 0;
  font-size: 14px;
  line-height: 19px;
}
.page-story .story-rel__cat > span { position: relative; display: inline-block; }
.page-story .story-rel__cat > span::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: var(--story-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--story-ease-line);
}
.page-story .story-rel__link:hover .story-rel__cat > span::before { transform: scaleX(1); }
.page-story .story-rel__text { display: block; padding: 10px 30px 30px; }
.page-story .story-rel__title {
  display: block;
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
  word-break: keep-all;
}
.page-story .story-rel__grav {
  position: absolute;
  left: 30px;
  bottom: 30px;
  display: flex;
  align-items: center;
}
.page-story .story-rel__grav .story-avatar { margin-right: 13px; }
.page-story .story-rel__author { display: block; font-size: 14px; line-height: 20px; }
.page-story .story-rel__date { display: block; font-size: 13px; line-height: 18px; color: #000; }

/* =========================================================
   중단점
   ========================================================= */
/* 글 보기 큰 제목: 1300~1500 69.3px, 1000~1300 65.45px (김포무지개 테마 값) */
@media (min-width: 1300px) and (max-width: 1500px) {
  .page-story .view-hero__title { font-size: 69.3px; line-height: 69.3px; }
  .page-story .view-next { height: 300px; }
}
@media (min-width: 1000px) and (max-width: 1299px) {
  .page-story .view-hero__title { font-size: 65.45px; line-height: 65.45px; }
  .page-story .view-next { height: 300px; }
}

@media (max-width: 999px) {
  .page-story .view-content__inner { padding: 0 6%; }
  .page-story .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-story .story-card__title { font-size: 22.5px; line-height: 29.25px; }

  .page-story .view-hero__inner { padding: 0 6%; }
  .page-story .view-hero__title { font-size: 43.4px; line-height: 53.9px; }
  .page-story .view-next { height: 225px; }
  .page-story .view-next__text { padding: 0 6%; }
  .page-story .view-next__title { font-size: 22.5px; line-height: 29.25px; }
  .page-story .view-related__heading { font-size: 22.5px; line-height: 29.25px; }
  .page-story .view-related__grid { grid-template-columns: 1fr; }
}

@media (max-width: 690px) {
  .page-story .story-grid { grid-template-columns: 1fr; }
  .page-story .story-card:hover .story-card__img-inner { transform: none; }   /* 명세 5.5: 690 이하 확대 없음 */
  .page-story .story-card__title { font-size: 21px; line-height: 27.3px; }
  .page-story .story-card__excerpt { font-size: 14px; line-height: 22.4px; }

  .page-story .view-hero__title { font-size: 27.9px; line-height: 34.65px; }
  .page-story .view-hero__down { width: 24px; height: 47px; margin-left: -12px; }
  .page-story .view-next { height: 250px; }
  .page-story .view-next__title { font-size: 21px; line-height: 27.3px; }
  .page-story .view-related__heading { font-size: 21px; line-height: 27.3px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-story .story-card__img-inner,
  .page-story .story-rel__img img,
  .page-story .view-next__title,
  .page-story .view-next__line { transition: none; }
}
