/* 공개 서브페이지 공통 틀. HTML 순서와 CSS Grid로 배치하므로 리사이즈 때 메뉴를 옮기지 않는다. */
#kbf-section-shell {
    --section-body-space: 56px;
    --section-blue: #172d53;
    --section-width: 1000px;
    --sidebar-width: 250px;
    --column-gap: 50px;
    width: var(--section-width);
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "heading" "body";
    color: var(--section-blue);
    font-family: KbfPretendard, Pretendard, sans-serif;
}
#kbf-section-shell.with-sidebar {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    grid-template-areas: "sidebar heading" "sidebar body";
    grid-template-rows: auto 1fr;
    column-gap: var(--column-gap);
}
#kbf-section-shell > .greeting-head {
    grid-area: heading; position: relative; isolation: isolate; display: grid;
    align-content: center; width: 100%; max-width: none; gap: 14px; min-height: 170px; padding: 16px 110px 16px 0;
    box-sizing: border-box; margin: 0; background: none;
}
#kbf-section-shell > .greeting-head::before {
    content: ""; position: absolute; z-index: -1; inset-block: 0;
    background: #f6f7fa url('../images/kbf-section-curves.svg') center / max(1600px,100vw) auto no-repeat;
    pointer-events: none;
}
#kbf-section-shell { clip-path: inset(0 calc((100vw - 100%) / -2)); }
#kbf-section-shell > .greeting-head::before { inset-inline: calc((100vw - var(--section-width)) / -2 - 400px) calc((100vw - var(--section-width)) / -2); }
#kbf-section-shell .greeting-head h1 { margin: 0; font: 700 clamp(34px,3.2vw,48px)/1.25 KbfPretendard,Pretendard,sans-serif; }
#kbf-section-shell .greeting-head nav { margin: 0; font-size: 15px; line-height: 1.5; }
#kbf-section-shell .greeting-head nav span { margin-inline: 6px; }
#kbf-section-shell .greeting-tools button { color: #215877; }
#kbf-section-shell > nav[data-kbf-section-nav] {
    grid-area: sidebar; align-self: start; position: relative; inset: auto; z-index: 2;
    width: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: white;
}
#kbf-section-shell .kbf-chrome-section-inner { width: 100%; display: block; height: auto; min-height: 0; margin: 0; padding: 0; }
#kbf-section-shell .kbf-chrome-section-label {
    display: flex; flex-direction: column-reverse; align-items: center; justify-content: center;
    width: 100%; max-width: none; gap: 14px; min-height: 170px; box-sizing: border-box; padding: 16px;
    position: relative; isolation: isolate; overflow: hidden;
    background: #172d53;
    color: white; border-radius: 0;
}
/* 제목은 고정하고 BD 곡선만 독립적으로 움직인다. */
#kbf-section-shell .kbf-chrome-section-label::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: url('../images/kbf-section-curves.svg') 48% center / auto 105% no-repeat;
    opacity: .13;
}
#kbf-section-shell .kbf-chrome-section-label strong { font-size: clamp(32px,2.8vw,42px); line-height: 1.25; }
#kbf-section-shell .kbf-chrome-section-label span { font-size: 11px; letter-spacing: 2.6px; }
#kbf-section-shell .kbf-chrome-section-links { display: block; width: 100%; padding: 0; border: 1px solid #d7dbe0; box-sizing: border-box; overflow: visible; }
#kbf-section-shell .kbf-chrome-section-link {
    display: flex; align-items: center; box-sizing: border-box; min-height: 60px; width: 100%;
    padding: 12px 17px; margin: 0; border: 0; border-radius: 0; border-bottom: 1px solid #d7dbe0;
    background: white; color: #314459; font: 400 18px/1.5 KbfPretendard,Pretendard,sans-serif;
}
#kbf-section-shell .kbf-chrome-section-link:last-child { border-bottom: 0; }
#kbf-section-shell .kbf-chrome-section-link[aria-current] { background: #eaf3f9; color: #17568b; box-shadow: inset 4px 0 #17568b; }
#kbf-section-shell .kbf-section-body { box-sizing: border-box; grid-area: body; min-width: 0; padding-block: var(--section-body-space) 0; }
#kbf-section-shell #container, #kbf-section-shell #container > .wrap, #kbf-section-shell #container > .wrap > .content_wrap {
    box-sizing: border-box; width: 100% !important; min-width: 0; max-width: 100% !important;
    margin-inline: 0 !important; padding-inline: 0 !important;
}
#kbf-section-shell #container > .wrap { display: block !important; }
/* Shared leading edge for direct content and the older container/wrap markup. */
@layer kbf-content-frame {
    @media screen {
        #kbf-section-shell { padding-block-end: var(--section-body-space) !important; }
        .kbf-section-body > :nth-last-child(1 of :not(script, style, link, template, [hidden])),
        .kbf-section-body :where(.content_wrap, .entry, .viewForm1, .greeting-letter, article) > :nth-last-child(1 of :not(script, style, link, template, [hidden])) {
            margin-block-end: 0 !important;
        }
        .kbf-section-body #container > .wrap,
        .kbf-section-body #container > .wrap > .content_wrap,
        .kbf-section-body > .container-tb,
        .kbf-section-body .content_wrap > .entry:last-of-type,
        .kbf-section-body .viewForm1 > .btnArea-center:last-of-type {
            padding-block-end: 0 !important;
            margin-block-end: 0 !important;
        }
        .kbf-section-body > :first-child,
        .kbf-section-body :where(article, .content_wrap, .entry, .section-search) > :first-child {
            margin-block-start: 0 !important;
        }
        .kbf-section-body #container > .wrap,
        .kbf-section-body #container > .wrap > .content_wrap {
            margin-block-start: 0 !important;
            padding-block-start: 0 !important;
        }
    }
}
@media(min-width:1281px) { #kbf-section-shell { --section-width: 1240px; } }
@media(min-width:1601px) { #kbf-section-shell { --section-width: 1600px; --sidebar-width: 300px; --column-gap: 100px; } }
@media(max-width:1100px) {
    #kbf-section-shell { --section-width: 100vw; --section-body-space: 32px; }
    #kbf-section-shell, #kbf-section-shell.with-sidebar {
        width: 100%; grid-template-columns: minmax(0,1fr); grid-template-areas: "heading" "sidebar" "body"; gap: 0;
    }
    #kbf-section-shell > .greeting-head { min-height: 132px; padding: 20px 104px 20px 18px; }
    #kbf-section-shell .greeting-tools { right: 12px; }
    #kbf-section-shell > nav[data-kbf-section-nav] { width: 100%; margin-inline: 0; }
    #kbf-section-shell .kbf-section-body { width: 94%; margin-inline: auto; }
    #kbf-section-shell .kbf-chrome-section-label { display: none; }
    #kbf-section-shell .kbf-chrome-section-link { min-height: 48px; }
}
@media print {
    #kbf-section-shell, #kbf-section-shell.with-sidebar { display: block; width: 100%; clip-path: none; }
    #kbf-section-shell > nav, #kbf-section-shell .greeting-tools, #kbf-section-shell .greeting-head nav,
    #kbf-section-shell .greeting-head::before { display: none !important; }
    #kbf-section-shell > .greeting-head { min-height: 0; padding: 0; }
}

.greeting-head .greeting-tools:not([hidden]) { display:flex;align-items:center;gap:10px;position:absolute;right:0;top:50%;transform:translateY(-50%); }
.greeting-tools button { display:grid;place-items:center;width:45px;height:45px;border-radius:50%;border:1px solid #94b2a8;background:white;color:var(--jade);cursor:pointer; }
.greeting-tools svg { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round; }
.greeting-tools [role=status] { position:absolute;right:0;top:100%;white-space:nowrap;font-size:13px; }
.greeting-head nav { line-height:20px; }

@media(min-width:1101px) {
  .greeting-side-group { border-bottom:1px solid #d7dbe0; }
  .greeting-side-group summary { position:relative;list-style:none;padding:19px 34px 19px 17px;font:400 18px/26px KbfPretendard,Pretendard,sans-serif;cursor:pointer; }
  .greeting-side-group summary::-webkit-details-marker { display:none; }
  .greeting-side-group summary:after { content:'+';position:absolute;right:20px;color:#85919b; }
  .greeting-side-group[open] summary { background:#f7f9fa;border-bottom:1px solid #24658d;color:#215877; }
  .greeting-side-group[open] summary:after { content:'−'; }
  #kbf-section-shell .greeting-side-group a.kbf-chrome-section-link {
    min-height:29px!important;padding:4px 17px!important;border:0!important;box-shadow:none!important;background:white!important;
    font:400 17px/24px KbfPretendard,Pretendard,sans-serif!important;
  }
  .greeting-side-group a:before { content:'◆';font-size:6px;margin-right:9px;color:#87939d; }
  .greeting-side-group a:first-of-type { margin-top:9px!important; }
  .greeting-side-group a:last-child { margin-bottom:9px!important; }
}


/* 배경 너비와 화면 너비가 같아도 이동하도록 실제 거리로 지정한다. */
@media screen and (prefers-reduced-motion:no-preference) {
    #kbf-section-shell > .greeting-head::before {
        --curve-travel:32px;
        background-size:max(1664px, calc(100vw + 64px)) auto;
        animation:kbf-section-flow 10s ease-in-out infinite alternate;
    }
    #kbf-section-shell .kbf-chrome-section-label::before {
        animation: kbf-sidebar-curves 13s ease-in-out infinite alternate-reverse;
    }
    @keyframes kbf-sidebar-curves {
        from { background-position-x: calc(48% - 12px); }
        to   { background-position-x: calc(48% + 12px); }
    }
    @keyframes kbf-section-flow {
        from {background-position-x:calc(50% - var(--curve-travel));}
        to {background-position-x:calc(50% + var(--curve-travel));}
    }
    @media(max-width:1100px){#kbf-section-shell > .greeting-head::before {--curve-travel:10px;}}
}
#kbf-section-shell .kbf-chrome-section-label strong, #kbf-section-shell .kbf-chrome-section-label span { color: white; }

/* 모바일 하위 메뉴의 펼침 상태와 선택 항목. */
@media screen and (max-width:1100px){
 body.kbf-public-v2 nav[data-kbf-section-nav]:has(.kbf-section-toggle:not([hidden])){position:relative!important;inset:auto!important;overflow:visible!important;z-index:850}
 body.kbf-public-v2 nav[data-kbf-section-nav] .kbf-chrome-section-inner:has(.kbf-section-toggle:not([hidden])){display:block!important;position:relative;width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;overflow:visible!important}
 nav[data-kbf-section-nav] .kbf-chrome-section-inner:has(.kbf-section-toggle:not([hidden]))>.kbf-chrome-section-label{display:none!important}
 body.kbf-public-v2 #container>.wrap:has(>.content_wrap>.greeting-head){padding-top:0!important}
 .kbf-section-toggle:not([hidden]){display:flex;align-items:center;gap:10px;width:100%;padding:0 20px;min-height:48px;border:0;border-bottom:1px solid #d9e1eb;background:#f4f7fa;color:#172d53;text-align:left;font:inherit}
 .kbf-section-toggle::after{content:"";margin-left:auto;width:8px;height:8px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
 .kbf-section-toggle[aria-expanded=true]::after{transform:rotate(225deg)}
 
 #kbf-section-shell .kbf-section-toggle:not([hidden])+#kbf-section-choices {
    position:absolute!important; inset:100% 0 auto!important; display:block!important;
    box-sizing:border-box; width:100%; max-height:55vh; overflow:auto!important;
    margin:0!important; padding:0 20px; background:white; border:0;
    border-bottom:1px solid #aab4c2; border-radius:0; box-shadow:none;
 }
 #kbf-section-shell #kbf-section-choices>a.kbf-chrome-section-link {
    display:flex!important; align-items:center; justify-content:flex-start!important; float:none!important;
    box-sizing:border-box; width:100%!important; max-width:none!important; min-height:46px;
    margin:0!important; padding:10px 0!important; text-align:left!important;
    background:white; border:0!important; border-radius:0; box-shadow:none;
    color:#344153; font-size:16px; font-weight:400;
 }
 #kbf-section-shell #kbf-section-choices>a.kbf-chrome-section-link+a.kbf-chrome-section-link { border-top:1px solid #edf0f3!important; }
 #kbf-section-shell #kbf-section-choices>a.kbf-chrome-section-link[aria-current=page] {
    background:white; color:#172d53; font-weight:600; text-decoration:underline;
    text-decoration-thickness:1.5px; text-underline-offset:5px;
 }
 #kbf-section-shell #kbf-section-choices>a::before,
 #kbf-section-shell #kbf-section-choices>a::after { display:none!important; }
}

@media screen and (max-width:1100px) {
    #kbf-section-shell .kbf-section-toggle[aria-expanded=false]:not([hidden])+#kbf-section-choices {
        visibility:hidden; pointer-events:none; clip-path:inset(0 0 100%);
    }
    #kbf-section-shell .kbf-section-toggle[aria-expanded=true]+#kbf-section-choices { visibility:visible; clip-path:inset(0); }
}
@media screen and (max-width:1100px) and (prefers-reduced-motion:no-preference) {
    #kbf-section-shell .kbf-section-toggle:not([hidden])+#kbf-section-choices { transition:clip-path 220ms ease, visibility 220ms; }
}
@media screen and (prefers-reduced-motion:no-preference) {
    #kbf-section-shell details:not(.ranking-awards)::details-content {
        interpolate-size:allow-keywords; overflow:clip; block-size:0;
        transition:block-size 220ms ease, content-visibility 220ms allow-discrete;
    }
    #kbf-section-shell details:not(.ranking-awards)[open]::details-content { block-size:auto; }
}
