/* ============================================================
   detail-shared.css
   파트너 상세·파트너 보드·프로그램 상세가 함께 로드하는 공용 소품.
   상세 페이지의 섹션 골격(dt-*)도 여기가 소유한다 — 컴포넌트 어휘(pp-*)만 partner-detail.css 몫이다.
   ============================================================ */

/* ============================================================
   상세 섹션 골격 (dt-*)
   dt-section > __body > [ __head > __lead > __title + __sub | __tools ] + __content
   섹션 하나 = 제목 하나 = 앵커 하나. 한 표면을 제목 둘이 나눠 쓰면 dt-group으로 묶는다.
   ============================================================ */

/* 세로 간격의 주인은 언제나 부모다 — .pp가 섹션 사이를, .dt-group이 소속 섹션 사이를,
   __body가 머리글↔내용을, __content가 내용 안쪽을 연다. 이 층에 간격용 padding/margin을
   더하면 리듬 주인이 둘이 된다. absolute는 진짜 겹침(사진 위 아이콘·장식)에만 쓴다. */

.dt-section__body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dt-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dt-section__lead {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dt-section__tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dt-section__content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dt-section__title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-main);
    word-break: keep-all;
}

.dt-section__sub {
    font-size: 13px;
    color: var(--text-desc);
}

.dt-section__head--center {
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.dt-section__head--center .dt-section__lead {
    align-items: center;
    gap: 10px;
}

.dt-section__head--center .dt-section__title {
    font-size: 32px;
    font-weight: 600;
}

/* 2단 섹션 — 좌 리드 레일 / 우 내용. 머리글이 레일 자리라 가로 정렬을 버리고 세로로 선다 */
.dt-section__body--split {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

.dt-section__body--split > .dt-section__head {
    flex-direction: column;
    align-items: stretch;
}

.dt-section__body--split > .dt-section__head > .dt-section__lead {
    gap: 14px;
}

/* 표면은 섹션이 스스로 고른다 — --sheet(흰 판) / --band(흰 띠) / 규칙이 없는 --plain 중 하나를
   반드시 달고 온다. 클래스를 비운 섹션은 dt-group 소속이라는 뜻이다(표면을 그룹이 칠한다).

   흰 플로팅 표면 — 상세 페이지의 표면은 이 한 벌뿐이다.
   섹션은 --sheet가, 아이템 카드는 .pp-card가 같은 표면을 부른다(레벨만 다른 두 어휘). */
.pp-card,
.dt-section--sheet > .dt-section__body {
    background: #FFFFFF;
    border-radius: var(--pp-card-radius);
    box-shadow: var(--shadow-float);
}

.dt-section--sheet > .dt-section__body {
    padding: 25px 35px;
}

/* 흰 띠는 컨테이너를 뚫고 뷰포트 폭까지 번져야 하므로 배경만 의사요소로 깔고 본문 정렬은 건드리지 않는다
   (.pp의 overflow-x: clip이 스크롤바 폭만큼의 넘침을 잘라 준다) */
.dt-section--band {
    position: relative;
}

/* 한 띠를 제목 여럿이 나눠 쓰는 묶음 — 표면은 그룹이 칠하므로 소속 섹션은 표면 클래스를 달지 않는다 */
.dt-group--band {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 60px 0;
}

.dt-section--band::before,
.dt-group--band::before {
    content: '';
    position: absolute;
    inset: 0 calc(50% - 50vw);
    background: #FFFFFF;
    z-index: -1;
    box-shadow: 0 14px 28px -18px rgba(0, 0, 0, 0.18); /* 하단만 — 음수 spread가 블러보다 커서 좌우·상단으로는 새지 않는다 */
}

/* 띠 경계선에서 내용까지의 거리다 — 섹션 사이 간격이 아니라서 판 안쪽 여백(25)보다 크다 */
.dt-section--band > .dt-section__body {
    padding: 60px 0;
}

/* 클립 없는 캐러셀 — overflow 창을 없애 호버 그림자·링·확대가 어디서도 잘리지 않게 하고,
   창 밖 슬라이드는 투명 처리로 감춘다(JS가 watchSlidesProgress로 swiper-slide-visible를 찍는 것이 전제).
   거터: 슬라이드 좌우 패딩이 카드 간격을 만들므로 JS spaceBetween은 0이 전제고, 음수 마진은 그
   패딩만큼 되당겨 카드 시작선을 다른 섹션과 맞춘다. 간격을 JS가 만들어야 하는 캐러셀(세로 그리드 등)은
   --dt-carousel-gutter: 0으로 거터를 끈다.
   width 계산은 뒤에 로드되는 .pp .swiper의 100% 고정이 :not(.dt-carousel)로 비켜 줘야 산다(동률 특이도라 순서로 진다).
   슬라이드 안에 다른 캐러셀이 중첩될 수 있어(후기 카드 속 사진) 규칙은 전부 자식 결합자로만 내려간다. */
.swiper.dt-carousel {
    --dt-carousel-gutter: 10px;
    overflow: visible;
    width: calc(100% + var(--dt-carousel-gutter) * 2);
    margin: 0 calc(-1 * var(--dt-carousel-gutter));
}

.dt-carousel > .swiper-wrapper > .swiper-slide {
    height: auto; /* Swiper 기본 height:100%를 풀어 한 줄 슬라이드가 같은 높이로 늘어난다 */
    padding: 0 var(--dt-carousel-gutter);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--ease-default);
}

.dt-carousel > .swiper-wrapper > .swiper-slide-visible {
    opacity: 1;
    pointer-events: auto;
}

/* 떠오른 카드의 그림자·링이 이웃 슬라이드에 가려지지 않게 */
.dt-carousel > .swiper-wrapper > .swiper-slide:hover { z-index: 2; }

@media (max-width: 900px) {
    .dt-section__body--split {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .dt-section--sheet > .dt-section__body { padding: 20px; }
    .dt-section__head { flex-wrap: wrap; }
    .dt-section__tools { flex: 1 1 auto; justify-content: flex-end; }
    .dt-section--band > .dt-section__body { padding: 20px 0; }
    .dt-group--band { padding: 20px 0; }
    .dt-section__head--center .dt-section__title { font-size: 25px; }
}

/* ---- 더보기 버튼 ---- */
.more-button[hidden] {
    display: none;
}
.more-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 40px;
    background-color: #fff;
    border: 1px solid var(--gray-300);
    margin-top: 14px;
    border-radius: 8px;
    color: var(--text-sub);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.more-button:hover {
    background-color: var(--gray-50);
}
.more-button__icon { font-size: 10px; margin-left: 5px; }
body.theme-dark .more-button {
    background: var(--surface-1);
    border-color: var(--border-default);
    color: var(--text-sub);
}
body.theme-dark .more-button:hover {
    background: var(--surface-2);
}

/* ---- 빈 상태 ---- */
.detail-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 22px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
}
.detail-empty-state__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    font-size: 22px;
    color: var(--text-desc);
    margin-bottom: 14px;
}
.detail-empty-state__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 4px;
}
.detail-empty-state__desc {
    font-size: 13px;
    color: var(--text-desc);
    text-align: center;
    line-height: 1.5;
}
body.theme-dark .detail-empty-state {
    border-color: var(--border-default);
    background: var(--surface-glass);
}
body.theme-dark .detail-empty-state__icon {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

/* ── empty state compact — 모달 내 댓글 등 소영역용 ── */
.detail-empty-state--compact {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    padding: 20px 0;
    border: none;
    background: none;
}
.detail-empty-state--compact .detail-empty-state__icon {
    width: 32px;
    height: 32px;
    font-size: 14px;
    margin-bottom: 0;
    flex-shrink: 0;
}
.detail-empty-state--compact .detail-empty-state__title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 0;
}
body.theme-dark .detail-empty-state--compact {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
