/* 1440px 미만에서는 고정폭 대신 유동폭 */
@media (max-width: 1440px) {
    .wrap {
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .fest-gnb > .fest-gnb-list {
        gap: 20px;
    }

    .fest-gnb-main {
        font-size: 17px;
    }

    .fest-mascot {
        right: 4%;
        width: 260px;
    }

    /* 공지·갤러리는 슬라이더(Swiper breakpoints)에서 처리 */
    .fest-program-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fest-map-layout {
        gap: 35px;
    }

    /* 전체메뉴 : 4단 → 2단 (태블릿에서 컬럼이 좁아 제목이 깨지는 문제) */
    .fest-allmenu-inner {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 30px;
    }

    .fest-allmenu-group {
        padding-right: 20px;
    }

    /* 2단 배치에서는 오른쪽 열의 우측 세로줄 제거 */
    .fest-allmenu-group:last-child {
        border-right: 0;
    }

    .fest-allmenu-group:nth-child(2n) {
        border-right: 0;
    }

    /* 2단이 되면서 메뉴가 아래까지 차므로 마스코트 장식은 숨김 (메뉴 위를 덮음) */
    .fest-allmenu::after {
        display: none;
    }

    /* 태블릿: 히어로가 과도하게 높아지지 않도록 */
    .fest-hero {
        height: 720px;
    }

    .fest-hero-copy h2 {
        font-size: 58px;
    }

    .fest-section-head h3 {
        font-size: 38px;
    }

    .gallery-image-slot {
        height: 200px;
    }
}

@media (max-width: 720px) {
    #fest-hd {
        height: 72px;
    }

    .fest-hd-inner {
        padding: 0 18px;
    }

    /* 높이만 줄이면 가로(184px)가 그대로라 로고가 눌림 → 비율 유지 */
    .fest-logo img {
        width: auto;
        height: 34px;
    }

    .fest-gnb {
        display: none;
    }

    .fest-menu-btn {
        margin-left: auto;
    }

    .fest-allmenu-top {
        height: 72px;
    }

    .fest-allmenu-logo img {
        width: 130px;
    }

    .fest-allmenu::after {
        display: none; /* 대형 워터마크 숨김 */
    }

    /* 모바일: 아코디언 */
    .fest-allmenu-inner {
        grid-template-columns: 1fr;
        align-content: start;
        padding: 8px 0 30px;
    }

    .fest-allmenu-group {
        padding: 0;
        border: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .14);
        opacity: 1;
        transform: none;
    }

    .fest-allmenu-num,
    .fest-allmenu-en {
        display: none; /* 컴팩트하게 숫자·영문 숨김 */
    }

    .fest-allmenu-title {
        position: relative;
        padding: 20px 44px 20px 0;
        cursor: pointer;
    }

    .fest-allmenu-name {
        padding-bottom: 0;
        font-size: 19px;
    }

    .fest-allmenu-name::after {
        display: none; /* 밑줄 제거 */
    }

    /* 쉐브론(화살표) */
    .fest-allmenu-title::after {
        position: absolute;
        top: 50%;
        right: 6px;
        width: 11px;
        height: 11px;
        border-right: 2px solid var(--gold);
        border-bottom: 2px solid var(--gold);
        content: '';
        transform: translateY(-60%) rotate(45deg);
        transition: transform .25s;
    }

    .fest-allmenu-group.open .fest-allmenu-title::after {
        transform: translateY(-40%) rotate(225deg);
    }

    .fest-allmenu-sub {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
    }

    .fest-allmenu-group.open .fest-allmenu-sub {
        max-height: 360px;
        padding-bottom: 12px;
    }

    .fest-allmenu-sub a {
        padding: 9px 0 9px 14px;
        font-size: 15px;
    }

    /* 아코디언에서 컬럼 구분선(세로줄) 완전 제거 — 마지막 그룹에 남던 우측 줄 */
    .fest-allmenu-group,
    .fest-allmenu-group:last-child {
        border-left: 0 !important;
        border-right: 0 !important;
    }

    /* 하단 : 구분선을 메뉴와 같은 좌우 여백에 맞추고 상하 간격 확보
       (.wrap 의 padding 이 덮어써서 상하 여백이 0 이 되던 문제 포함) */
    .fest-allmenu-foot.wrap {
        position: relative;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 24px 20px 30px;
        border-top: 0;
    }

    .fest-allmenu-foot.wrap::before {
        position: absolute;
        top: 0;
        right: 20px;
        left: 20px;
        height: 1px;
        background: rgba(255, 255, 255, .12);
        content: '';
    }

    /* 서브페이지 (미니멀) */
    .fest-sub-visual {
        padding: 130px 0 60px;
    }

    .fsv-title {
        font-size: 30px;
    }

    .fest-subtabs a {
        padding: 15px 8px;
        font-size: 14px;
    }

    .fest-sub-head {
        padding: 34px 0 28px;
    }

    .fest-sub-title {
        font-size: 24px;
    }

    .fest-sub-main {
        padding: 0 0 70px;
    }

    .fest-hero {
        height: 590px;
    }

    .fest-hero-copy {
        top: 42%;
        max-width: calc(100% - 40px);
        transform: translate(-50%, -20%);
    }

    .fest-hero-copy p,
    .fest-hero-copy div {
        font-size: 16px;
    }

    .fest-hero-copy h2 {
        font-size: 37px;
    }

    .fest-mascot {
        right: 20px;
        bottom: 55px;
        width: 210px;
    }

    .fest-programs {
        padding: 34px 0 55px;
    }

    .wrap {
        padding: 0 20px;
    }

    .fest-program-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .card-copy {
        bottom: 16px;
        left: 16px;
    }

    .card-copy strong {
        font-size: 17px;
    }

    .fest-map {
        padding: 55px 0;
    }

    .fest-map-layout {
        display: block;
    }

    .fest-map-copy {
        margin-bottom: 30px;
    }

    .fest-map-copy h3 {
        font-size: 29px;
    }

    .fest-notice {
        padding: 55px 0;
    }

    .fest-section-head {
        margin-bottom: 32px;
    }

    .fest-section-head h3 {
        font-size: 28px;
        margin-bottom: 16px;
    }

    .fest-section-head p {
        font-size: 15px;
    }

    /* 공지 카드 */
    .fest-notice-card {
        min-height: 0;
        padding: 26px 22px;
    }

    .fest-notice-card strong {
        font-size: 17px;
    }

    /* 갤러리 카드 */
    .gallery-image-slot {
        height: 200px;
    }

    .fest-gallery-card strong {
        height: calc(3.1em + 30px);   /* 2줄 + 상하 패딩 */
        padding: 15px;
        font-size: 17px;
    }

    /* 푸터 : 정보 아래로 SNS 배치 */
    #fest-ft {
        padding: 46px 0;
    }

    .fest-ft-top {
        display: block;
    }

    .fest-ft-info .bar {
        margin: 0 10px;
    }

    .fest-sns {
        margin-top: 22px;
    }

    .fest-ft-inner small {
        margin-top: 22px;
        padding-top: 22px;
    }
}

@media (max-width: 430px) {
    .fest-program-grid {
        grid-template-columns: 1fr;
    }

    .gallery-image-slot {
        height: 210px;
    }

    .fest-mascot {
        display: none;
    }

    .fest-hero-copy h2 {
        font-size: 31px;
    }

    .fest-notice-card {
        padding: 22px 18px;
    }

    .fest-ft-info .bar {
        display: none;      /* 좁은 화면에서는 구분선 대신 줄바꿈 */
    }

    .fest-ft-info p {
        font-size: 14px;
    }

    .fest-ft-inner small {
        font-size: 13px;
    }
}

/* =========================================================
   서브 콘텐츠 · 게시판 반응형
   ========================================================= */
@media (max-width: 1024px) {
    /* 조직도 보드: 좁아지면 가로 스크롤 */
    .ocb { min-width: 940px; }
    .ocb-dept, .ocb-mini { width: 138px; }
}

@media (max-width: 720px) {
    /* 서브 비주얼 (배경영상) */
    .fest-sub-visual.has-video { padding: 120px 0 54px; }

    /* 서브탭: 가로 스크롤 */
    .fest-subtabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .fest-subtabs a { flex: 0 0 auto; white-space: nowrap; }

    /* 조직도: 가로 스크롤 안내 여백 */
    .ocb { min-width: 900px; }
    .ocb-council { gap: 10px; }
    .ocb-box { min-width: 0; flex: 1 1 100%; }

    /* 게시판 반응형은 각 스킨 style.css 에서 처리 (스킨 CSS가 가장 나중에 로드됨) */
}

@media (max-width: 360px) {
    .wrap { padding: 0 14px; }

    /* 전체메뉴 하단 구분선도 좁아진 좌우 여백에 맞춤 */
    .fest-allmenu-foot.wrap { padding-right: 14px; padding-left: 14px; }
    .fest-allmenu-foot.wrap::before { right: 14px; left: 14px; }

    .fest-hero-copy h2 { font-size: 27px; }

    .fest-notice-card { padding: 20px 16px; }

    .fest-notice-card strong { font-size: 16px; }

    .fest-gallery-card strong { font-size: 16px; padding: 13px; }

    /* 서브 콘텐츠 */
    .fp-lead h4 { font-size: 19px; }

    .fest-tl-tabs a { flex: 1 1 100%; }
}
