/* 서브페이지 공용 */

:root {
    --sub-black: #231815;
    --sub-white: #ffffff;
    --sub-red: #e33131;
    --sub-blue: #22559e;
    --sub-yellow: #f8f400;
    --sub-charcoal: #4a4a45;
    --sub-cyan: #64d5ee;
    --sub-lime: #dfff00;
    --sub-mint: #75e5c1;
    --sub-gray: #555555;
    --sub-muted: #666c76;
    --sub-line: rgba(17, 17, 17, 0.14);
    --sub-cream: #f8f5e9;
    --sub-red-soft: #fff0ed;
    --sub-blue-soft: #edf4ff;
    --sub-yellow-soft: #fff8df;
    --sub-container-max: 1320px;
    --sub-container-pad: 15px;
    --sub-hero-space: clamp(24px, 4vw, 40px);
    --sub-section-after-hero: calc(var(--sub-hero-space) * 130 / 55);
    /* 서브 히어로 마지막 요소(구분선 또는 리드 문구)와 본문 첫 콘텐츠 사이 간격 — 모든 서브페이지 공통. */
    --sub-hero-gap: 40px;
    --sub-section-block: 160px;
    --sub-section-block-end: 180px;
    --sub-section-tight: 48px;
    --sub-title-size: 48px;
    --sub-mini-title-size: 32px;
    --sub-lead-size: 24px;
    --sub-body-size: 17px;
}

.page-container,
.sub-hero {
    width: 100%;
    max-width: var(--sub-container-max);
    margin-inline: auto;
    padding-inline: var(--sub-container-pad);
    box-sizing: border-box;
}

/* =========================================================
    SUB HERO 공통
========================================================= */

.page-about,
.page-forum,
.page-program,
.page-speakers,
.page-forum-venue,
.page-forum-exhibition,
.page-contact,
.page-archive-forum,
.page-archive-board,
.page-archive-cooperation,
.page-research,
.page-notice,
.page-network-meeting,
.page-archive-network,
.page-support-project {
    color: var(--sub-black);
    background: var(--sub-white);
    word-break: keep-all;
}

.page-about img,
.page-forum img {
    display: block;
    width: 100%;
}

.sub-hero {
    background: var(--sub-white);
}

.sub-pad--hero {
    padding-block: 100px calc(var(--sub-hero-space) * 50 / 55);
}

/* 제목 영역↔본문 간격은 히어로 하단 padding이 아니라 마지막 요소의 margin(--sub-hero-gap) 하나로만 정한다.
   본문 첫 섹션은 위쪽 padding/margin을 따로 두지 않는다 — 페이지마다 간격이 달라지던 원인. */
.sub-hero.sub-pad--hero {
    padding-bottom: 0;
}

.sub-hero > .sub-hero__copy:last-child > :last-child {
    margin-bottom: var(--sub-hero-gap);
}

/* 구분선 아래는 리드 문구가 이어져도 본문과 같은 40px — about/forum(구분선 → 본문 40px)과 같은 리듬. */
.sub-hero .sub-hero__rule {
    margin-bottom: var(--sub-hero-gap);
}

.sub-pad--after-hero {
    padding-top: 0;
    padding-bottom: var(--sub-section-after-hero);
}

.sub-pad--bottom {
    padding-bottom: var(--sub-section-block);
}

.sub-pad--end {
    padding-top: var(--sub-section-block);
    padding-bottom: var(--sub-section-block-end);
}

.sub-hero__copy {
    display: grid;
}

.sub-hero h1 {
    margin: 0;
    font-size: 42px;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.055em;
}

.sub-hero__subtitle {
    margin-top: 8px;
    color: var(--sub-blue);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.12;
}

.sub-hero__rule {
    width: 100px;
    height: 3px;
    margin: var(--sub-hero-space) 0 calc(var(--sub-hero-space) * 28 / 55);
    border: 0;
    background: var(--sub-blue);
}

/* 서브타이틀이 없는 히어로(주로 영문 페이지)도 구분선·본문 시작 위치가 다른 페이지와 같도록
   빠진 서브타이틀 한 줄(margin-top 8px + 22px × line-height 1.12)만큼 구분선 위 여백을 늘린다. */
.sub-hero h1 + .sub-hero__rule {
    margin-top: calc(var(--sub-hero-space) + 8px + 22px * 1.12);
}

/* 리드 문구 (선택 사항, $subHero['description']가 있을 때만 렌더링 — 구분선 아래,
   현재 사이트 언어에 맞는 한 줄만 노출). about의 `.section-speakers__forum-desc`,
   forum의 `.forum-intro__lead`와 같은 리드 문단 톤(크기/굵기)으로 맞춘다. */
.sub-hero__desc {
    margin-top: 0;
    font-family: var(--font-sans, "Pretendard", sans-serif);
    font-size: var(--sub-lead-size);
    font-weight: 600;
    line-height: 1.8;
    letter-spacing: -0.015em;
    color: var(--sub-black);
    max-width: 640px;
    word-break: keep-all;
}

/* 배너 이미지 (선택 사항, $subHero['image']가 있을 때만 리드 문구 아래 전체 폭으로 노출) */
.sub-hero__banner {
    margin-top: var(--sub-hero-space);
    width: 100%;
    aspect-ratio: 21 / 9;
    border-radius: 24px;
    overflow: hidden;
}

.sub-hero__banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 700px) {
    .sub-hero__banner {
        aspect-ratio: 16 / 10;
        border-radius: 16px;
    }
}

/* =========================================================
    SECTION HEADING (좌측 세로 일직선 정렬 표준)
========================================================= */

.section-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    margin-bottom: 48px;
    padding: 0;
}

.section-heading__eyebrow,
.content-eyebrow {
    color: var(--sub-red);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.section-heading__eyebrow {
    margin: 0 0 12px 0;
    padding: 0;
    text-align: left;
    line-height: 1.2;
}

.section-heading h2 {
    margin: 0;
    padding: 0;
    font-size: clamp(38px, 4.2vw, 68px);
    line-height: 1.1;
    letter-spacing: -0.05em;
    color: var(--sub-black);
    text-align: left;
}

.section-heading__english {
    margin: 10px 0 0 0;
    padding: 0;
    font-size: clamp(18px, 1.8vw, 26px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--sub-black);
    text-align: left;
    line-height: 1.35;
    overflow-wrap: break-word;
    word-break: normal;
}

/* =========================================================
    아카이브 "전체보기" 버튼 (archive-forum 등
    개요 페이지에서 게시판 목록으로 이동하는 링크)
========================================================= */

.archive-forum-section__more {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.archive-forum-section__more .btn-archive-pill {
    border-radius: 7px;
}

.btn-archive-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    background: linear-gradient(135deg, var(--sub-red) 0%, #d01e1e 100%);
    border: 1px solid var(--sub-red);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 16px rgba(227, 49, 49, 0.22);
    min-height: 44px;
}

.btn-archive-pill:hover {
    background: linear-gradient(135deg, #d01e1e 0%, #b81616 100%);
    border-color: #b81616;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(227, 49, 49, 0.38);
}

.btn-archive-pill i {
    font-size: 15px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.btn-archive-pill:hover i {
    transform: translateY(3px);
}

/* 아카이브 목록/상세 여러 세그먼트(archive-forum, archive-forum-list, archive-forum-item 등)가
   공유해 공용 사전으로 옮긴 웹사이트 링크 버튼. */
.btn-archive-website {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border: 1.5px solid var(--sub-red);
    color: var(--sub-red);
    background-color: transparent;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.05em;
    border-radius: 50px;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 44px;
    width: fit-content;
}

.btn-archive-website:hover {
    background-color: var(--sub-red);
    border-color: var(--sub-red);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(227, 49, 49, 0.25);
}

.btn-archive-website i {
    font-size: 15px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.btn-archive-website:hover i {
    transform: translate(3px, -3px);
}

/* =========================================================
    RESPONSIVE
    Mobile S ≤575 / Mobile L 576~ / Tablet P 768~ /
    Tablet L 992~ / Desktop 1200~ / Desktop L 1440~
========================================================= */

/* PC(1320px 이상, 컨테이너 최대폭과 동일)에서는 콘텐츠 폭이 정확히
   1320px이 되도록 좌우 여백을 제거하고, 그보다 좁은 화면(태블릿/모바일)에서만
   15px 여백으로 화면 끝에 붙지 않게 한다. */
@media (min-width: 1320px) {
    :root {
        --sub-container-pad: 0px;
    }
}

/* 태블릿 (~1320px) */
@media (max-width: 1320px) {
    .section-heading__row {
        flex-direction: column;
        gap: 20px;
    }

    :root {
        --sub-section-block: 90px;
        --sub-section-block-end: 100px;
        --sub-title-size: 32px;
        --sub-mini-title-size: 23px;
        --sub-lead-size: 18px;
    }

    .sub-hero h1 {
        font-size: 36px;
    }
}

/* 모바일 (~500px) */
@media (max-width: 500px) {
    .sub-pad--bottom {
        padding-bottom: var(--sub-section-tight);
    }

    .sub-pad--end {
        padding-top: var(--sub-section-tight);
    }

    /* 태블릿(36px)에서 한 단계 더 줄인다 — 100px 상단 여백도 같이 좁힌다. */
    .sub-pad--hero {
        padding-top: 60px;
    }

    .sub-hero h1 {
        font-size: 28px;
    }
}
