/* 아티스트 상세 (oncast 전용) — board/details/artist.blade.php 에서만 불러온다
   ⚠️ style.css 에 import 하지 않는다. 53개 사이트 공용 테마에 섞이지 않게
   ⚠️ 색은 사이트 설정(--c-primary / --c-point)을 따른다. 여기서 브랜드 색을 박지 않는다
   방향: 각진 모서리 · 다크 히어로 · 번호 붙은 2단 섹션 (레퍼런스의 흰 바탕·알약·우측 목차와 다르게) */

.ap {
    --ap-dark: #10213f;   /* 딥 네이비 — 브랜드 빨강과 대비. 사이트 point(검정)와 일부러 다르게 */
    --ap-red: var(--c-primary, #c8102e);
    --ap-line: var(--c-line, #e5e7eb);
    --ap-soft: #f4f3f1;
    --ap-r: 4px;

    position: relative;
}

/* 기본 문의 박스는 숨기고 모달만 쓴다 (열기 버튼은 이 화면이 따로 둔다) */
.ap .board-inq {
    display: none;
}

/* ── 공통 ─────────────────────────────────── */
.ap-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .22em;
    color: var(--ap-red);
}

.ap-eyebrow span {
    padding-left: 10px;
    border-left: 1px solid currentColor;
    letter-spacing: .04em;
}

.ap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 0 26px;
    border: 1px solid transparent;
    border-radius: var(--ap-r);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--tr), color var(--tr), border-color var(--tr);
}

.ap-btn--primary {
    background: var(--ap-red);
    color: #fff;
}

.ap-btn--primary:hover {
    filter: brightness(.92);
}

.ap-btn--light {
    background: #fff;
    color: var(--ap-red);
}

/* ── 히어로 ───────────────────────────────── */
.ap-hero {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);   /* 글 : 사진 = 4 : 6, 사진은 cover */
    border-radius: var(--ap-r);
    overflow: hidden;
    background: var(--ap-dark);
    color: #fff;
}

.ap-hero__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 56px 48px;
}

.ap-hero__name {
    margin: 0;
    font-size: 54px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #fff;
}

.ap-hero__en {
    margin: 10px 0 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--ap-red);
}

.ap-hero__summary {
    max-width: 520px;
    margin: 22px 0 0;
    font-size: 17px;
    line-height: 1.75;
    color: rgba(255, 255, 255, .78);
}

.ap-hero__btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.ap-facts {
    display: grid;
    grid-auto-flow: column;   /* 항목 수만큼 한 줄로 — 폭을 똑같이 나눠 줄바꿈하지 않는다 */
    grid-auto-columns: minmax(0, 1fr);
    margin: 40px 0 0;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.ap-facts div {
    min-width: 0;
    padding: 0 14px;
    border-left: 1px solid rgba(255, 255, 255, .14);
}

.ap-facts div:first-child {
    padding-left: 0;
    border-left: 0;
}

.ap-facts dt {
    font-size: 12px;
    white-space: nowrap;
    color: rgba(255, 255, 255, .5);
}

.ap-facts dd {
    margin: 4px 0 0;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;   /* 장르 두 개 등 길면 말줄임 */
}

.ap-hero__photo {
    position: relative;
    background: var(--ap-dark);
    aspect-ratio: 4 / 3;   /* 사진 칸 4:3 고정 — 4:3(1600×1200) 으로 올리면 잘림 없이 딱 맞는다 */
    align-self: stretch;   /* 글이 더 길면 칸도 따라 늘어난다 (빈 줄 없이) */
}

.ap-hero__photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;   /* 1:1 이 아닌 사진 — 세로는 얼굴(위) 기준 */
}

.ap-hero--wide .ap-hero__photo img {
    object-position: center;
}

/* 사진이 없으면 글이 전체 폭 */
.ap-hero--nophoto {
    grid-template-columns: minmax(0, 1fr);
}

/* ── 가로 탭 ──────────────────────────────── */
.ap-tabs {
    position: sticky;
    top: var(--ap-top, 0px);   /* 보이는 헤더 아랫변. 헤더가 사라지면 0 (js 가 갱신) */
    z-index: 20;
    display: flex;
    gap: 4px;
    margin: 0 0 8px;
    padding: 0;
    overflow-x: auto;
    border-bottom: 1px solid var(--ap-line);
    background: #fff;
    scrollbar-width: none;
}

.ap-tabs::-webkit-scrollbar {
    display: none;
}

.ap-tabs a {
    flex: none;
    padding: 18px 18px 16px;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    font-weight: 700;
    color: var(--c-text-mute);
    text-decoration: none;
    transition: color var(--tr), border-color var(--tr);
}

.ap-tabs a:hover,
.ap-tabs a.is-on {
    color: var(--c-text);
    border-bottom-color: var(--ap-red);
}

/* ── 섹션 — 왼쪽 번호 라벨 / 오른쪽 내용 ──── */
.ap-sec {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 40px;
    padding: 64px 0;
    border-bottom: 1px solid var(--ap-line);
    scroll-margin-top: 80px;   /* 탭 높이만큼 */
}

.ap-sec__label {
    align-self: start;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .18em;
    color: var(--c-text-mute);
}

.ap-sec__label span {
    display: block;
    margin-bottom: 6px;
    font-size: 40px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ap-red);
}

.ap-sec__title {
    margin: 0 0 26px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ap-intro {
    font-size: 17px;
    line-height: 1.95;
    color: var(--c-text-sub);
}

.ap-intro p:first-child::first-letter {
    float: left;
    margin: 6px 10px 0 0;
    font-size: 52px;
    font-weight: 900;
    line-height: .9;
    color: var(--ap-red);
}

/* ── 영상 — 메인 + 재생목록 ───────────────── */
.ap-player {
    display: grid;
    gap: 14px 20px;
}

.ap-player.has-list {
    grid-template-columns: minmax(0, 1fr) 260px;
}

.ap-player__main {
    display: block;
}

.ap-player .sec-video__thumb {
    border-radius: var(--ap-r);
    box-shadow: none;
}

.ap-player .sec-video__play {
    background: var(--ap-red);
}

.ap-player__now {
    grid-column: 1;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.ap-player__now:empty {
    display: none;
}

.ap-player__list {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.ap-player__list button {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    width: 100%;
    padding: 8px;
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-r);
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--tr), background var(--tr);
}

.ap-player__list button:hover {
    border-color: var(--c-text-mute);
}

.ap-player__list button.is-on {
    border-color: var(--ap-red);
    background: var(--ap-soft);
}

.ap-player__list img {
    width: 104px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 2px;
}

.ap-player__list span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

/* ── 커리어 — 세로 타임라인 ───────────────── */
.ap-timeline {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ap-timeline::before {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 86px;
    width: 2px;
    background: var(--ap-line);
}

.ap-timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 40px;
    padding: 12px 0;
}

.ap-timeline li::before {
    content: '';
    position: absolute;
    top: 19px;
    left: 82px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 3px var(--ap-red);
}

.ap-timeline__year {
    font-size: 18px;
    font-weight: 900;
    text-align: right;
    color: var(--c-text);
}

.ap-timeline__to {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--c-text-mute);
}

.ap-timeline__text {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    color: var(--c-text-sub);
}

.ap-timeline__src {
    margin-left: 6px;
    font-size: 12px;
    color: var(--c-text-mute);
    text-decoration: underline;
}

/* ── 섭외 FAQ — 1열 카드, 전부 펼침 ───────── */
.ap-faq {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.ap-faq__item {
    padding: 24px;
    border-left: 3px solid var(--ap-red);
    background: var(--ap-soft);
}

.ap-faq__q {
    display: flex;
    gap: 10px;
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.55;
}

.ap-faq__q b {
    flex: none;
    color: var(--ap-red);
}

.ap-faq__a {
    margin: 12px 0 0;
    padding-left: 22px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--c-text-sub);
}

/* ── 추천 행사 — 같은 크기 카드, 링크 없음 ─── */
.ap-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ap-tiles li {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 132px;
    padding: 22px;
    border-top: 3px solid var(--ap-red);
    background: var(--ap-soft);
}

.ap-tiles .icon {
    color: var(--ap-red);
}

.ap-tiles strong {
    font-size: 17px;
    font-weight: 800;
}

.ap-tiles span {
    font-size: 14px;
    line-height: 1.6;
    color: var(--c-text-sub);
}

/* ── 문의 띠 ──────────────────────────────── */
.ap-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 64px 0 0;
    padding: 40px 48px;
    border-radius: var(--ap-r);
    background: var(--ap-red);
    color: #fff;
}

.ap-cta__title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ap-cta__desc {
    margin: 8px 0 0;
    font-size: 15px;
    color: rgba(255, 255, 255, .82);
}

.ap-cta .ap-btn {
    flex: none;
}

/* ── 비슷한 아티스트 ──────────────────────── */
.ap-similar {
    margin-top: 80px;
}

.ap-similar__title {
    margin: 0 0 24px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ap-similar__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ap-similar__list a {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;   /* 정사각 + 큰 라운드 (3:4 → 4:3 → 1:1) */
    border-radius: 20px;
    overflow: hidden;
    background: var(--ap-dark);
    color: #fff;
    text-decoration: none;
}

.ap-similar__list img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;   /* 가로 칸이라 세로 사진은 위아래가 잘린다 — 얼굴 쪽 기준 */
    transition: transform .5s ease;
}

.ap-similar__list a::after {
    content: '';
    position: absolute;
    inset: 40% 0 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, .78));
}

.ap-similar__list span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    z-index: 1;
    font-size: 17px;
    font-weight: 800;
}

.ap-similar__list a:hover img {
    transform: scale(1.05);
}

/* ── 모바일 하단 고정 문의 ────────────────── */
.ap-dock {
    display: none;
}

/* ── 반응형 ───────────────────────────────── */
@media (max-width: 1024px) {
    .ap-hero {
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    }

    .ap-hero--nophoto {
        grid-template-columns: minmax(0, 1fr);
    }

    .ap-hero__text {
        padding: 44px 40px;
    }

    .ap-hero__name {
        font-size: 42px;
    }

    .ap-sec {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        padding: 48px 0;
    }

    .ap-sec__label {
        position: static;
        display: flex;
        align-items: baseline;
        gap: 10px;
    }

    .ap-sec__label span {
        display: inline;
        margin: 0;
        font-size: 24px;
    }

    .ap-player.has-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .ap-player__list {
        grid-column: 1;
        grid-row: auto;
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .ap-player__list li {
        flex: 0 0 220px;
    }
}

@media (max-width: 768px) {
    .ap-hero,
    .ap-hero--wide {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    /* 모바일은 사진이 먼저 — PC 와 같은 4:3 */
    .ap-hero__photo {
        order: -1;
    }

    .ap-hero__text {
        padding: 8px 22px 32px;
    }

    .ap-hero__name {
        font-size: 34px;
    }

    .ap-hero__en {
        font-size: 16px;
    }

    .ap-hero__summary {
        font-size: 15px;
    }

    .ap-hero__btns .ap-btn {
        flex: 1;
    }

    .ap-facts {
        margin-top: 28px;
    }

    .ap-facts div {
        padding: 0 10px;
    }

    .ap-facts dd {
        font-size: 15px;
    }

    .ap-sec__title {
        font-size: 22px;
    }

    .ap-intro {
        font-size: 16px;
    }

    .ap-timeline::before {
        left: 58px;
    }

    .ap-timeline li {
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 30px;
    }

    .ap-timeline li::before {
        left: 54px;
    }

    .ap-timeline__year {
        font-size: 15px;
    }

    .ap-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ap-tiles li {
        min-height: 0;
        padding: 18px;
    }

    .ap-cta {
        flex-direction: column;
        align-items: stretch;
        padding: 30px 24px;
    }

    .ap-cta__title {
        font-size: 20px;
    }

    .ap-similar__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ap-dock {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        display: block;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
    }

    .ap-dock .ap-btn {
        width: 100%;
    }

    /* 사이트 플로팅 버튼(전화 등)을 고정 문의 버튼 위로 올린다 */
    body:has(.ap-dock) .site-float {
        bottom: 84px;
    }

    /* 고정 버튼에 마지막 내용이 가리지 않게 */
    .ap {
        padding-bottom: 72px;
    }
}
