/* 수상작 갤러리 전용 CSS - sg-ag prefix */
.sg-ag-wrap,
.sg-ag-wrap * { box-sizing: border-box; }

#sgAwardGallery {
    --sg-ag-main: #e84451;
    --sg-ag-minister: #ab8203;
    --sg-ag-superintendent: #c1bfb9;
}

.sg-ag-wrap {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 20px 70px;
    color: #222;
    font-family: inherit;
}

.sg-ag-head {
    margin-bottom: 24px;
    text-align: left;
}

.sg-ag-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin: 0 0 12px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--sg-ag-main);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sg-ag-head h2 {
    margin: 0;
    color: #151515;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.sg-ag-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 38px;
    text-align: center;
}

.sg-ag-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    min-height: 42px;
    padding: 0 20px;
    border: 1px solid rgba(232, 68, 81, .38);
    border-radius: 999px;
    background: #fff;
    color: var(--sg-ag-main);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.04em;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.sg-ag-tab:hover,
.sg-ag-tab.is-active {
    border-color: var(--sg-ag-main);
    background: var(--sg-ag-main);
    color: #fff;
}

.sg-ag-panel[hidden] { display: none !important; }

.sg-ag-section {
    padding: 0 0 44px;
    margin: 0 0 44px;
    
}

.sg-ag-section:last-child {
    margin-bottom: 0;
}

.sg-ag-section h335 {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 24px;
    color: #111;
    font-size: 0;
    line-height: 1;
}

.sg-ag-section h335::after {
    content: "";
    display: block;
    flex: 1;
    height: 1px;
    background: var(--sg-ag-main);
}

.sg-ag-section h335 span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
font-family: 'YeogiOttaeJalnan';
    border-radius: 999px;

    color: var(--sg-ag-main);
    font-size: 20px;
    
    letter-spacing: -0.05em;
}

.sg-ag-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 26px;
}

.sg-ag-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    border: 1px solid #e8e8e8;
    border-radius: 22px;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s ease;
}

.sg-ag-card:hover,
.sg-ag-card:focus {
    border-color: var(--sg-ag-main);
    outline: none;
}

.sg-ag-thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f5f5f5;
}

.sg-ag-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sg-ag-award {
    position: absolute;
    z-index: 2;
    left: 14px;
    top: 14px;
    max-width: calc(100% - 28px);
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--sg-ag-main);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.sg-ag-award.sg-ag-award-minister {
    background: var(--sg-ag-minister);
}

.sg-ag-award.sg-ag-award-superintendent {
    background: var(--sg-ag-superintendent);
}

.sg-ag-thumb-text {
    padding: 58px 24px 30px;
    background: #fafafa;
}

.sg-ag-writing {
    width: 100%;
    text-align: center;
}

.sg-ag-writing em {
    display: block;
    margin-bottom: 12px;
    color: var(--sg-ag-main);
    font-size: 18px;
    font-style: normal;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.sg-ag-writing strong {
    display: block;
    color: #191919;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.34;
    letter-spacing: -0.06em;
    word-break: keep-all;
}

.sg-ag-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 18px 20px;
}

.sg-ag-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 54px;
    margin: 0 0 16px;
    color: #222;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: -0.05em;
    word-break: keep-all;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sg-ag-title span {
    color: var(--sg-ag-main);
    font-weight: 900;
}

.sg-ag-more {
    display: inline-flex;
    margin-top: auto;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--sg-ag-main);
    border-radius: 14px;
    background: #fff;
    color: var(--sg-ag-main);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.04em;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.sg-ag-more::after {
    content: "›";
    margin-left: 8px;
    font-size: 23px;
    line-height: 1;
}

.sg-ag-card:hover .sg-ag-more,
.sg-ag-more:hover,
.sg-ag-more:focus {
    border-color: var(--sg-ag-main);
    background: var(--sg-ag-main);
    color: #fff;
}

.sg-ag-empty {
    padding: 44px 20px;
    border: 1px dashed #d8d8d8;
    border-radius: 18px;
    background: #fafafa;
    color: #777;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.sg-ag-layer {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 34px;
}

.sg-ag-layer.is-open { display: flex; }

.sg-ag-dim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .72);
}

.sg-ag-layerbox {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: min(1040px, 100%);
    max-height: calc(100vh - 68px);
    border-radius: 22px;
    background: #fff;
}

.sg-ag-close {
    position: absolute;
    z-index: 3;
    right: 14px;
    top: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
}

.sg-ag-layerhead {
    padding: 24px 70px 18px 26px;
    border-bottom: 1px solid #ececec;
}

.sg-ag-layerhead em {
    display: block;
    margin-bottom: 7px;
    color: var(--sg-ag-main);
    font-size: 15px;
    font-style: normal;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.sg-ag-layerhead strong {
    display: block;
    color: #111;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.34;
    letter-spacing: -0.05em;
    word-break: keep-all;
}

.sg-ag-layerbody {
    overflow: auto;
    height: min(72vh, 760px);
    min-height: 420px;
    padding: 18px;
    background: #f6f6f6;
    text-align: center;
}

.sg-ag-layerbody img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
    background: #fff;
}

.sg-ag-layerbody iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 620px;
    border: 0;
    border-radius: 12px;
    background: #fff;
}

html.sg-ag-no-scroll,
html.sg-ag-no-scroll body {
    overflow: hidden;
}

@media (max-width: 900px) {
    .sg-ag-wrap { padding: 34px 16px 56px; }
    .sg-ag-head h2 { font-size: 29px; }
    .sg-ag-tabs { gap: 8px; margin-bottom: 30px; }
    .sg-ag-tab { min-height: 40px; padding: 0 18px; font-size: 15px; }
    .sg-ag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
    .sg-ag-section h3 span { min-height: 36px; font-size: 17px; }
    .sg-ag-writing strong { font-size: 21px; }
}

@media (max-width: 600px) {
    .sg-ag-wrap { padding: 28px 14px 48px; }
    .sg-ag-head { margin-bottom: 18px; }
    .sg-ag-kicker { min-height: 30px; padding: 0 13px; font-size: 14px; }
    .sg-ag-head h2 { font-size: 25px; }
    .sg-ag-tabs { justify-content: center; gap: 7px; }
    .sg-ag-tab { min-height: 38px; padding: 0 15px; font-size: 14px; }
    .sg-ag-grid { grid-template-columns: 1fr; gap: 16px; }
    .sg-ag-section { padding-bottom: 34px; margin-bottom: 34px; }
    .sg-ag-section h3 { gap: 12px; margin-bottom: 18px; }
    .sg-ag-award { left: 11px; top: 11px; font-size: 13px; }
    .sg-ag-info { padding: 16px; }
    .sg-ag-title { min-height: auto; font-size: 17px; }
    .sg-ag-layer { padding: 12px; }
    .sg-ag-layerbox { max-height: calc(100vh - 24px); border-radius: 16px; }
    .sg-ag-close { right: 10px; top: 10px; width: 38px; height: 38px; font-size: 27px; }
    .sg-ag-layerhead { padding: 20px 60px 15px 18px; }
    .sg-ag-layerhead strong { font-size: 19px; }
    .sg-ag-layerbody { height: 72vh; min-height: 320px; padding: 10px; }
    .sg-ag-layerbody iframe { min-height: 560px; }
}
