/* 가이드 상세 공통 — 기존 guide.css를 덮어쓰는 최소 보완 규칙. 홈/메인에는 적용하지 않습니다. */
.guide-detail-page .guide-subnav {
  position: sticky;
  top: 70px; /* 공통 PC 헤더 높이 */
  z-index: 270; /* 공통 헤더(290)와 모바일 메뉴(310) 아래 */
  height: 48px;
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid #e5eaf2;
}
.guide-detail-page .guide-subnav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(100% - 48px, 1180px);
  height: 100%;
  margin: 0 auto;
}
.guide-detail-page .guide-subnav__home {
  flex-shrink: 0;
  color: #1161eb;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.guide-detail-page .guide-subnav__home:hover { color: #074bc9; }
.guide-detail-page .guide-subnav__current {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #6b7d97;
  font-size: 12px;
}
.guide-detail-page .guide-image-only { width: 100%; margin: 24px 0; }
.guide-detail-page .guide-image-only img { display: block; width: 100%; max-height: none; height: auto; }
.guide-detail-page .guide-section { scroll-margin-top: 155px; }
.guide-detail-page .toc { align-self: stretch; }
.guide-detail-page .toc__inner { top: 142px; }

/* 넓은 PC: 기존 좌측 목차 + 본문 사이에 우측 CTA 추가 */
@media (min-width: 1131px) {
  .guide-detail-page .article-layout {
    grid-template-columns: 165px minmax(0, 1fr) 215px;
    column-gap: 20px;
    justify-content: stretch;
  }
  .guide-detail-page .article-body { max-width: none; min-width: 0; padding-inline: 6px; }
}

/* 작은 PC: 목차를 상단 한 줄로, 본문 + CTA 두 열로 배치 */
@media (min-width: 900px) and (max-width: 1130px) {
  .guide-detail-page .article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 22px;
    align-items: start;
  }
  .guide-detail-page .toc { grid-column: 1 / -1; grid-row: 1; margin: 0; }
  .guide-detail-page .toc__inner { position: static; }
  .guide-detail-page .toc__inner a { display: inline-block; margin-right: 18px; }
  .guide-detail-page .article-body { grid-column: 1; grid-row: 2; padding-inline: 8px; max-width: none; }
  .guide-detail-page .guide-pc-cta { grid-column: 2; grid-row: 2; }
}

.guide-detail-page .guide-pc-cta { display: block; min-width: 0; align-self: stretch; }
.guide-detail-page .guide-pc-cta__inner {
  position: sticky;
  top: 142px;
  padding: 16px 13px;
  border: 1px solid #dce8f8;
  border-radius: 12px;
  background: #fff;
}
.guide-detail-page .guide-pc-cta__heading {
  margin: 0 0 11px;
  font-size: 15px;
  font-weight: 850;
  color: #112e67;
}
.guide-detail-page .guide-pc-cta .eom-studio-dispatch {
  margin: 0 0 14px;
  padding: 11px 9px;
  border: 1px solid #dce9fa;
  border-radius: 9px;
  background: #f2f7ff;
}
.guide-detail-page .guide-pc-cta .eom-studio-dispatch__row {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
}
.guide-detail-page .guide-pc-cta .eom-studio-dispatch__title {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  color: #178257;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
}
.guide-detail-page .guide-pc-cta .eom-studio-dispatch__title strong { font-weight: 850; }
.guide-detail-page .guide-pc-cta .eom-studio-dispatch__icon {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: #21a675;
}
.guide-detail-page .guide-pc-cta .eom-studio-dispatch__countdown {
  display: block;
  color: #1161eb;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.guide-detail-page .guide-pc-cta .eom-studio-dispatch__countdown[hidden] { display: none; }
.guide-detail-page .guide-pc-cta .eom-studio-dispatch__detail {
  margin: 4px 0 0;
  color: #7d8da5;
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
}
.guide-detail-page .guide-pc-cta .eom-studio-dispatch.is-next .eom-studio-dispatch__title { color: #1161eb; }
.guide-detail-page .guide-pc-cta .eom-studio-dispatch.is-next .eom-studio-dispatch__icon { background: #1161eb; }
.guide-detail-page .guide-pc-cta .eom-studio-dispatch.is-urgent .eom-studio-dispatch__title,
.guide-detail-page .guide-pc-cta .eom-studio-dispatch.is-urgent .eom-studio-dispatch__countdown { color: #ed2458; }
.guide-detail-page .guide-pc-cta .eom-studio-dispatch.is-urgent .eom-studio-dispatch__icon { background: #ed2458; }
.guide-detail-page .guide-pc-cta__button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 8px;
  padding: 9px 8px;
  border-radius: 8px;
  border: 1px solid #1161eb;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  line-height: 1.4;
}
.guide-detail-page .guide-pc-cta__button--browse { background: #fff; border-color: #b9cbe5; color: #17386d; }
.guide-detail-page .guide-pc-cta__button--browse:hover { background: #f3f8ff; color: #1161eb; }
.guide-detail-page .guide-pc-cta__button--write,
.guide-detail-page .guide-pc-cta__button--write:hover { background: #1161eb; color: #fff; }
.guide-detail-page .guide-pc-cta__button--write:hover { background: #074bc9; }
.guide-detail-page .guide-pc-cta__button:focus-visible { outline: 3px solid #82b7ff; outline-offset: 2px; }

@media (max-width: 899px) {
  .guide-detail-page .guide-subnav { top: 60px; height: 42px; }
  .guide-detail-page .guide-subnav__inner { width: calc(100% - 32px); gap: 12px; }
  .guide-detail-page .guide-subnav__home { font-size: 12px; }
  .guide-detail-page .guide-subnav__current { font-size: 11px; }
  .guide-detail-page .guide-pc-cta { display: none; }
  .guide-detail-page .article-layout { display: block; }
  .guide-detail-page .article-body { width: 100%; }
  .guide-detail-page .guide-section { scroll-margin-top: 120px; }
}


/* 모바일 히어로: 대표 이미지 내부에 텍스트 오버레이 */
@media (max-width: 680px) {

    .guide-detail-page .article-hero {
        position: relative;
        display: block;
        isolation: isolate;
        overflow: hidden;
        min-height: 0;
        padding: 0;
        border-radius: 15px;
        background: #f5f8ff;
    }

    /* 기존 이미지는 4:3 비율 유지 */
    .guide-detail-page .article-hero__image {
        position: absolute;
        z-index: 0;
        top: 0;
        left: 0;
        width: 100%;
        max-width: none;
        height: auto;
        min-height: 0;
        aspect-ratio: 4 / 3;
        margin: 0;
        border-radius: 0;
    }

    .guide-detail-page .article-hero__image img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 0;
    }

    /* 이미지 아래쪽에서 밝은 배경으로 자연스럽게 전환 */

.guide-detail-page .article-hero::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(245, 248, 255, 0) 0%,
        rgba(245, 248, 255, 0) 35%,
        rgba(245, 248, 255, .35) 48%,
        rgba(245, 248, 255, .88) 63%,
        #f5f8ff 75%,
        #f5f8ff 100%
    );
}


    /* 이미지 위에 HTML 텍스트 배치 */
    .guide-detail-page .article-hero__text {
        position: relative;
        z-index: 2;
        width: 100%;
        margin: 0;
        padding: clamp(190px, 53vw, 310px) 20px 28px;
        background: transparent;
        border-radius: 0;
    }

    .guide-detail-page .article-hero .eyebrow {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .guide-detail-page .article-hero h1 {
        font-size: clamp(26px, 7.2vw, 31px);
        line-height: 1.3;
        margin: 8px 0 12px;
    }

    .guide-detail-page .article-hero .lead {
        font-size: 13px;
        line-height: 1.75;
        margin-bottom: 0;
    }
}


/* 함께 읽으면 좋은 가이드 - 이미지형 카드 */
.guide-detail-page .related-guides .link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.guide-detail-page .related-guides .guide-related-card {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    width: 100%;
    min-width: 0;
    aspect-ratio: 455 / 325;
    overflow: hidden;
    padding: 19px;
    border: 0;
    border-radius: 14px;
    background: #eaf0f8;
}

/* 썸네일 */
.guide-detail-page .guide-related-card__image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

/* 글씨 가독성을 위한 하단 그라데이션 */
.guide-detail-page .guide-related-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        to bottom,
        rgba(10, 25, 50, 0) 15%,
        rgba(10, 25, 50, .25) 45%,
        rgba(10, 25, 50, .85) 100%
    );
}

.guide-detail-page .guide-related-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    min-width: 0;
    width: 100%;
}

.guide-detail-page .guide-related-card__body small {
    color: #eaf2ff;
    font-size: 11px;
    font-weight: 750;
}

.guide-detail-page .guide-related-card__body strong {
    color: #fff;
    font-size: 16px;
    font-weight: 850;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.guide-detail-page .guide-related-card__body .arrow {
    margin-top: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 750;
}

/* PC 마우스 효과 */
@media (hover: hover) {
    .guide-detail-page .guide-related-card:hover
    .guide-related-card__image {
        transform: scale(1.035);
    }
}

/* 모바일 1열 */
@media (max-width: 680px) {
    .guide-detail-page .related-guides .link-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .guide-detail-page .related-guides .guide-related-card {
        padding: 20px;
        border-radius: 14px;
    }

    .guide-detail-page .guide-related-card__body strong {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .guide-detail-page .guide-related-card__image {
        transition: none;
    }
}

.guide-video-player {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 16px 0 8px;
    border: 0;
    border-radius: 12px;
    background: #111;
}
