ol, ul {
    padding-left: 0!important;
}


.row {
    --bs-gutter-x:0;
    --bs-gutter-y:0;

}



.best-wrap {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.best-box {
    flex: 1;
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 1rem;
    min-width: 280px;
}
.best-box h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}
.best-box ol {
    list-style: none;
    padding: 0;
    margin: 0;
}
.best-box li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px dotted #ddd;
    font-size: 0.9rem;
}
.best-box li:last-child {
    border-bottom: none;
}
.rank-badge {
    display: inline-block;
    min-width: 20px;
    padding: 2px 6px;
    margin-right: 6px;
    color: white;
    font-weight: bold;
    text-align: center;
    border-radius: 2px;
    font-size: 0.75rem;
}
.rank-1 { background: #ffdf00; }
.rank-2 { background: rgb(147, 125, 0); }
.rank-3 { background: #4e4000; }
.rank-4, .rank-5, .rank-6, .rank-7, .rank-8, .rank-9, .rank-10 {
    background: #ccc;
    color: #333;
}
.best-box li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px dotted #ddd;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
}
.subject-area {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow: 1;
    min-width: 0;
}
.date {
    color: #666;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
    text-align: right;
}

/* ✅ 모바일 (767px 이하)에서도 한 줄 유지 */
@media (max-width: 767px) {
    .best-wrap {
        flex-direction: column;
    }
    .best-box {
        padding: 0.8rem;
    }
    .best-box li {
        font-size: 0.85rem;
        flex-wrap: nowrap;       /* ✅ 한 줄 강제 */
    }
    .subject-area {
        max-width: 100%;
    }
    .date {
        display: inline;         /* ✅ 줄바꿈 금지 */
        width: auto;
        margin-top: 0;
    }
}

.page__head {
    border-bottom : 2px #ff74e3 solid;
}

.page-title-l {
    color: #000000;
    font-size: 22px;
    font-weight: 600;
}

.pg_wrap {
    display: flex !important;
    justify-content: center !important;
    margin: 2rem auto !important;
    padding-bottom: 1rem !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
}

.pg_page,
.pg_current {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 32px !important;
    height: 32px !important;
    margin: 0 3px !important;
    background-color: #e5e5e5 !important;
    color: #555 !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    transition: all 0.2s ease-in-out !important;
    font-size: 14px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    border: none !important;
}

.pg_page:hover {
    background-color: #ff74e3 !important;
    color: #fff !important;
}

.pg_current {
    background-color: #ff74e3 !important;
    color: #fff !important;
    font-weight: bold !important;
}

h3 {
    font-weight: 700!important;
}

iframe {
    width: 100%;
    height: 600px;
}

@media (max-width: 767px) {
    iframe {
        width: 100%;
        height: 360px;

    }
}

.writer-info {
    border-bottom: 1px solid #ff74e3;

}

.board-basic-view .button-wrap {

    border: none;
}


@media (min-width: 768px) {
    .board-basic-view .view-title {
        font-size: 2rem !important;
    }
}


ul.list-column-1 {
    padding: 0 !important;
    margin: 0 !important;
}

ul.list-column-1 li {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

ul.list-column-1 img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
    border: 0 !important;
}

.top-banner-wrap {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    width: 100% !important;
}

.top-banner-wrap li {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

.top-banner-wrap img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    border: 0 !important;
}

/* 이미지 흰 여백 제거 */
.top-banner-wrap,
.top-banner-wrap li,
.top-banner-wrap li a,
.top-banner-wrap li img {
    margin-bottom:5px !important;
    padding: 0 !important;
    border: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    background: transparent !important;
}


.board-basic-view .contents-wrap {
    padding-top: 0.5rem !important;
}

.badge {
    background-color: #ff74e3 !important;
}


@media (max-width: 767px) {
    #header__nav {



        width: 70% !important;
        height: 100% !important;
    }
}

@media (max-width: 767px) {
    #header__row1 {
         padding: 0;
    }
}


@media (max-width: 767px) {
    #header__brand img {
        width: 60%;
        height: 60px;
    }
}


@media (max-width: 767px) {
    .only-mb {

        padding: 0 !important;
        margin-bottom: 5px !important;
    }
p {
    margin-bottom: 0 !important;
}

    #body {

padding: 0 !important;
}

    ul {

        margin-bottom: 0!important;
    }

}

#body {
    padding: 0;
}


ul {

    margin-bottom: 7px;
}


.search-form {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid #ff74e3;
    border-radius: 6px;
    padding: 6px 12px;
    transition: box-shadow 0.3s ease;
}

.search-bar:hover {
    box-shadow: 0 0 6px #ff74e3;
}

.search-label {
    color: #ff74e3;
    font-weight: 500;
    font-size: 14px;
}

.search-bar input[type="text"] {
    border: none;
    outline: none;
    padding: 6px 8px;
    min-width: 200px;
    font-size: 14px;
    background-color: transparent;
    color: #333;
}

.search-bar input::placeholder {
    color: #aaa;
}

.search-bar input:focus {
    background-color: #f9fff9;
}

.search-bar button {
    background-color: #ff74e3;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-bar button:hover {
    background-color: #ff74e3;
}

.search-bar i {
    color: white;
    font-size: 16px;
}


/* ============================================
   팝업 (PC)
   ============================================ */
#hd_pop .hd_pops {
    position: fixed !important;
    top: 200px !important;
    right: 10px !important;
    left: auto !important;
    max-width: calc(100% - 20px) !important;   /* 화면 밖으로 못 나가게 */
    border: 1px solid #dee2e6;
    background: #fff;
    box-sizing: border-box;
}

/* ============================================
   팝업 (모바일 575.98px 이하)
   - 오른쪽 빈 공간(가로 오버플로) 해결 핵심
   ============================================ */
@media (max-width: 575.98px) {
    #hd_pop .hd_pops {
        top: 180px !important;
        left: auto !important;
        right: 10px !important;
        width: auto !important;
        max-width: calc(100% - 20px) !important;   /* ← none → 이걸로 변경 (핵심) */
    }
    #hd_pop .hd_pops_con {
        width: 100% !important;
        max-width: 100% !important;                /* 안쪽 콘텐츠도 함께 제한 */
        height: auto !important;
    }
    #hd_pop .hd_pops_con img {
        width: 100% !important;                    /* 이미지 화면에 맞게 축소 */
        height: auto !important;
    }
}


/* ============================================
   모바일 레이아웃 안전망
   ============================================ */
@media (max-width: 575.98px) {
    body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden;            /* 혹시 모를 가로 스크롤 차단 */
    }
}

#hd_pop {
    width: auto !important;
    max-width: 100% !important;
}


@media (max-width: 767px) {
    #hd_pop #hd_pops_1.lock-mobile {
        height: 250px !important;
        width: 250px !important;
    }
}



/* =========================================================
   그누보드 하드코딩 PC / 모바일 메뉴 전용 CSS
   테마 컬러: #ec95d6
   배경: 화이트 계열
   사용 위치: head.php의 #header-nav 메뉴 구조
   ========================================================= */


/* =========================================================
   PC / 모바일 메뉴 분리 표시
   ========================================================= */

#header-nav .pc-menu-only {
    display: block;
}

#header-nav .mobile-menu-only {
    display: none;
}

@media (max-width: 769px) {
    #header-nav .pc-menu-only {
        display: none !important;
    }

    #header-nav .mobile-menu-only {
        display: block !important;
        padding-top: 0;
    }
}


/* =========================================================
   메뉴 컨테이너
   ========================================================= */

#header-nav {
    max-width: 1250px;
    width: 100%;
    margin: 0 auto;
    padding: 5px 5px;
    background: #f8f9fa;
    box-sizing: border-box;
}


/* =========================================================
   메뉴 줄 공통
   PC 기본 7칸
   모바일 3칸
   ========================================================= */

#header-nav .nav-row {
    list-style: none;
    margin: 1px;
    padding: 0;
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    text-align: center;
}

#header-nav .nav-row:last-child {
    margin-bottom: 0;
}

#header-nav .nav-row > li {
    position: relative;
    min-width: 0;
}


/* 모바일 3칸 */
@media (max-width: 769px) {
    #header-nav {
        padding: 0 4px 4px 4px;
    }

    #header-nav .nav-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2px;
        padding: 0;
        margin-bottom: 6px;
    }

    #header-nav li.slot-empty {
        display: none;
    }

    #header-nav .nav-link.depth1 {
        height: 46px;
        font-size: 13px;
        padding: 0 5px;
    }
}


/* =========================================================
   빈칸 슬롯
   PC 마지막 줄 칸 맞춤용
   모바일에서는 위 media에서 숨김
   ========================================================= */

#header-nav li.slot-empty {
    pointer-events: none;
}

#header-nav li.slot-empty::after {
    content: '';
    display: block;
    height: 50px;
    border-radius: 14px;
    background: #fff3fb;
    border: 1px dashed rgba(236, 149, 214, .35);
    opacity: .65;
}


/* =========================================================
   1차 메뉴 타일
   ========================================================= */

#header-nav .nav-link.depth1 {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 50px;
    padding: 0 10px;
    border-radius: 15px;

    background:
            linear-gradient(180deg, #f0a6dc 0%, #ec95d6 100%);
    border: 1px solid #e481ca;

    color: #ffffff !important;
    font-weight: 800;
    letter-spacing: .1px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;

    box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, .45),
            0 4px 10px rgba(236, 149, 214, .22);

    position: relative;
    transition:
            transform .18s ease,
            box-shadow .18s ease,
            background .18s ease,
            color .18s ease,
            border-color .18s ease;
}


/* 1차 메뉴 상단 은은한 광택 */
#header-nav .nav-link.depth1::before {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    top: 7px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .65);
    opacity: .8;
    pointer-events: none;
}


/* Hover / Active */
#header-nav .nav-link.depth1:hover,
#header-nav li.active > .nav-link.depth1 {
    transform: translateY(-2px);
    border-color: #dc65bf;
    color: #ffffff !important;

    background:
            linear-gradient(180deg, #f5b7e6 0%, #e878cb 100%);

    box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, .55),
            0 8px 18px rgba(236, 149, 214, .38),
            0 0 0 2px rgba(236, 149, 214, .18);
}

#header-nav .nav-link.depth1:active {
    transform: translateY(0);
    box-shadow:
            inset 0 3px 8px rgba(180, 70, 150, .25),
            0 2px 6px rgba(236, 149, 214, .22);
}


/* =========================================================
   2차 메뉴
   ========================================================= */

#header-nav .sub-menu-wrap {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    min-width: 100%;

    background: #ffffff;
    border: 1px solid rgba(236, 149, 214, .45);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(190, 90, 165, .22);

    z-index: 50;
    display: none;
    overflow: hidden;
}

#header-nav li.sub-menu:hover .sub-menu-wrap {
    display: block;
}

#header-nav .sub-nav {
    list-style: none;
    margin: 0;
    padding: 6px;
}

#header-nav .sub-nav li {
    width: 100%;
}

#header-nav .sub-nav .nav-link.depth2 {
    display: block;
    color: #bf4fa7 !important;
    padding: .7rem .8rem;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    border-radius: 10px;
    transition:
            background .18s ease,
            color .18s ease,
            transform .18s ease;
}

#header-nav .sub-nav .nav-link.depth2:hover {
    background: #fff0fa;
    color: #e26bc4 !important;
    transform: translateX(2px);
}


/* =========================================================
   모바일 숨김 클래스
   PHP에서 모바일 메뉴 배열 생성 전에 제외하는 방식이면
   실제로는 거의 필요 없지만, 안전장치로 유지
   ========================================================= */

@media (max-width: 769px) {
    #header-nav .m-hide {
        display: none !important;
    }
}


/* =========================================================
   옵션 색상 클래스
   li에 accent-blue, accent-violet 등 추가해서 사용 가능
   기본 테마와 어울리는 파스텔 계열
   ========================================================= */

#header-nav li.accent-blue .nav-link.depth1::before {
    background: linear-gradient(90deg, #a6d8ff, #7dbfff);
}

#header-nav li.accent-violet .nav-link.depth1::before {
    background: linear-gradient(90deg, #d9b8ff, #b58dff);
}

#header-nav li.accent-amber .nav-link.depth1::before {
    background: linear-gradient(90deg, #ffe08a, #ffc85c);
}

#header-nav li.accent-green .nav-link.depth1::before {
    background: linear-gradient(90deg, #9deec2, #62d99a);
}

#header-nav li.accent-red .nav-link.depth1::before {
    background: linear-gradient(90deg, #ff9eb3, #ff6f92);
}