.wrap_header {
    position: sticky;
    top: 0;
    z-index: 1300;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.wrap_header_inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    box-sizing: border-box;
}

.wrap_header__hamburger {
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #111827;
    cursor: pointer;
    transition: background 0.15s;
}

.wrap_header__hamburger:hover {
    background: #f1f5f9;
}

.wrap_header__hamburger-close {
    display: none;
}

.wrap_header__hamburger[aria-expanded="true"] .wrap_header__hamburger-bars {
    display: none;
}

.wrap_header__hamburger[aria-expanded="true"] .wrap_header__hamburger-close {
    display: block;
}

.brand {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.brand a,
.brand a:visited,
.brand a:hover,
.brand a:active {
    color: inherit;
    text-decoration: none;
}

.brand span {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.wrap_header_nav {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 17px;
}

.wrap_header_nav a {
    text-decoration: none;
    color: #4b5563;
    padding: 6px 8px;
    border-radius: 999px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.wrap_header_nav a:hover {
    background-color: #e5e7eb;
    color: #111827;
}

.wrap_header_admin {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.header_name {
    color: #374151;
}

.header_btn {
    cursor: pointer;
    color: #374151;
}

.layout {
    display: flex;
    flex-direction: row;
    width: 100%;
    /* padding: 16px; */
    box-sizing: border-box;
    
}

.heeb__content {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    padding: 24px 24px 40px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .heeb__content {
        padding: 18px 16px 24px;
        border-radius: 12px;
    }
}

@media (max-width: 768px) {
    .layout{
        width: 100%;
        margin: 0;
        flex-direction: column;
    }
    .wrap_header_nav{
        font-size: 14px;
    }
}

@media (min-width: 1200px) {
    .wrap_header_inner {
        max-width: 1280px;
    }

    .layout {
        /* max-width: 1280px; */
        width: 100%;
        /* width: 90%; */
    }
}

/* datepicker css */
.ui-datepicker select.ui-datepicker-year {
    width: 40%;
}

.ui-datepicker select.ui-datepicker-month {
    width: 35%;
}

[data-menu] {
    cursor: pointer;
}
[data-menu] *{
    pointer-events: none;
}


.blog-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background-color: rgba(15, 23, 42, 0.04);
    color: #4b5563;
    font-size: 11px;
    text-decoration: none;
    transition: background-color 0.16s ease, color 0.16s ease,
                transform 0.12s ease;
}

.blog-tag:hover {
    background-color: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    transform: translateY(-1px);
}
main{
    flex:1;
}

/* ------------------------------------------------------------------
 * 블로그 레이아웃 · 사이드바 (전체 페이지 공통)
 * ------------------------------------------------------------------ */
.blog-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
    margin: 0 auto;
    padding: 24px 16px 40px;
    box-sizing: border-box;
}

.blog-layout__sidebar {
    position: sticky;
    top: 60px;
    align-self: flex-start;
    width: 100%;
    max-width: 260px;
}

.side-menu__mobile-toggle {
    display: none;
}

.side-menu__backdrop {
    display: none;
}

.side-menu__drawer-hd {
    display: none;
}

.blog-layout__main {
    flex: 1;
    min-width: 0;
    /* max-width: 720px; */
}

/* 블로그 사이드 메뉴 - 카드 톤 */
.side_menu_wrap {
    margin-top: 24px;
    width: 100%;
    max-width: 260px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    padding: 16px 14px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 system-ui, -apple-system, "맑은 고딕", sans-serif;
    color: #374151;
}

.side_menu_wrap > .side_primary_menu + .side_primary_menu {
    margin-top: 12px;
}

.side_menu_wrap .side_primary_menu {
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.side_menu_wrap .side_primary_menu.active {
    background: #ffffff;
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.12);
}

.side_primary_menu_item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 10px 12px;
    user-select: none;
}

.side_primary_menu_item span,
.side_primary_menu .menu_unchecked {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #475569;
}

.side_primary_menu.active .side_primary_menu_item span,
.side_primary_menu.active .side_primary_menu .menu_unchecked {
    color: #1d4ed8;
}

.side_primary_menu_item .arrow_icon {
    width: 16px;
    height: 16px;
    position: relative;
    flex-shrink: 0;
}

.side_primary_menu_item .arrow_icon::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(45deg);
    transform-origin: center;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.side_primary_menu.active .side_primary_menu_item .arrow_icon::before {
    transform: rotate(225deg) translateY(1px);
    border-color: #3b82f6;
}

.side_sub_menu {
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    padding: 6px 0 8px;
    background: transparent;
}

.side_sub_menu_item {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    margin: 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.side_sub_menu_item span {
    display: inline-flex;
    align-items: center;
}

.side_sub_menu_item span::before {
    content: "";
    display: none;
}

.side_primary_menu.active .side_sub_menu_item {
    color: #475569;
}

.side_sub_menu_item:hover {
    background: rgba(59, 130, 246, 0.06);
    color: #1d4ed8;
}

.side_primary_menu.active .side_sub_menu_item:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
}

@media (max-width: 768px) {
    .blog-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        padding: 16px 12px 28px;
    }

    .wrap_header__hamburger {
        display: inline-flex;
    }

    .layout .side_menu_wrap{
        max-width: none;
        width: min(420px, calc(100vw - 36px));
        height: auto;
        min-height: 100%;
        min-height: 100dvh;
    }

    .blog-layout__sidebar {
        position: fixed;
        inset: 0;
        z-index: 1200;
        width: 100%;
        max-width: none;
        height: 100%;
        height: 100dvh;
        min-height: 100%;
        min-height: 100dvh;
        margin: 0;
        pointer-events: none;
    }

    .blog-layout__sidebar.side-menu--open,
    .layout .blog-layout__sidebar.side-menu--open {
        pointer-events: auto;
    }

    .side-menu__backdrop {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 1;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        transition: opacity 0.22s ease;
        pointer-events: none;
    }

    .side-menu--open .side-menu__backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .side_menu_wrap {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 2;
        width: min(420px, calc(100vw - 36px));
        height: auto;
        min-height: 100%;
        min-height: 100dvh;
        max-height: none;
        max-width: none;
        margin: 0;
        border-radius: 0;
        border: none;
        padding: 20px 18px 32px;
        box-shadow: 8px 0 30px rgba(15, 23, 42, 0.12);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        box-sizing: border-box;
        pointer-events: none;
    }

    .side-menu--open .side_menu_wrap,
    .side-menu--open .layout .side_menu_wrap,
    .blog-layout__sidebar.side-menu--open .side_menu_wrap {
        display: block;
        transform: translateX(0);
        pointer-events: auto;
    }

    .side-menu__drawer-hd {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: -2px 0 8px;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    }

    .side-menu__drawer-title {
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #9ca3af;
    }

    .side-menu__drawer-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        border: none;
        border-radius: 8px;
        background: transparent;
        color: #9ca3af;
        cursor: pointer;
    }

    .side-menu__drawer-close:hover {
        background: #f8fafc;
        color: #111827;
    }

    body.side-menu-drawer-open {
        overflow: hidden;
    }

    .side_primary_menu_item {
        padding: 9px 10px;
    }

    .side_sub_menu_item {
        padding: 3px 10px;
    }

    .side-profile {
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .side-profile__info {
        align-items: center;
        text-align: center;
        width: 100%;
    }
}

/* ------------------------------------------------------------------
 * 사이드바 위젯
 * ------------------------------------------------------------------ */

.side-profile {
    padding: 14px 0 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    margin-bottom: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.side-profile__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.side-profile__info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
}

.side-profile__name {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
}

.side-profile__role {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.side-profile__bio {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #6b7280;
}

.side-widget {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.side-widget__title {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9ca3af;
    padding: 0 2px;
}

.side-widget__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.side-recent {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.side-recent__item {
    border-radius: 8px;
    transition: background 0.15s ease;
}

.side-recent__item:hover {
    background: rgba(59, 130, 246, 0.05);
}

.side-recent__link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    text-decoration: none;
}

.side-recent__title {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}

.side-recent__item:hover .side-recent__title {
    color: #1d4ed8;
}

.side-recent__date {
    font-size: 11px;
    color: #9ca3af;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.side-nav__item {
    display: block;
    padding: 7px 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}

.side-nav__item:link,
.side-nav__item:visited {
    color: #374151;
}

.side-nav__item:hover {
    background: rgba(59, 130, 246, 0.06);
    color: #1d4ed8;
}

.side-nav__item--active,
.side-nav__item--active:link,
.side-nav__item--active:visited {
    background: rgba(59, 130, 246, 0.10);
    color: #1d4ed8;
    font-weight: 600;
}

.side-nav__item--active:hover {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}

/* 자식 카테고리 활성 시 부모 soft-active */
.side-nav__item--soft-active,
.side-nav__item--soft-active:link,
.side-nav__item--soft-active:visited {
    color: #1d4ed8;
    font-weight: 600;
    background: transparent;
}

.side-nav__item--soft-active:hover {
    background: rgba(59, 130, 246, 0.06);
    color: #1d4ed8;
}

/* ── 사이드바 검색 폼 ─────────────────────────── */
.side-search {
    display: flex;
    gap: .35rem;
}
.side-search__input {
    flex: 1;
    padding: .55rem .8rem;
    font-size: .875rem;
    border: 1.5px solid #d1d5db;
    border-radius: .55rem;
    background: #f9fafb;
    color: #111827;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    min-width: 0;
}
.side-search__input::placeholder { color: #9ca3af; }
.side-search__input:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.side-search__btn {
    padding: .55rem .75rem;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: .55rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s;
}
.side-search__btn:hover { background: #2563eb; }
.side-search__btn svg { width: 16px; height: 16px; }

/* ── 사이드 카테고리 아코디언 ────────────────────────── */
.side-nav__group {
    display: flex;
    flex-direction: column;
}

.side-nav__group-hd {
    display: flex;
    align-items: center;
}

.side-nav__parent {
    flex: 1;
    min-width: 0;
}

.side-nav__toggle {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    border-radius: 6px;
    padding: 0;
    transition: background 0.15s;
}

.side-nav__toggle:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #6b7280;
}

.side-nav__toggle svg {
    transition: transform 0.2s ease;
}

.side-nav__toggle--open svg {
    transform: rotate(90deg);
}

.side-nav__children {
    display: none;
    flex-direction: column;
    gap: 1px;
    margin: 2px 0 4px 10px;
    padding-left: 8px;
    border-left: 2px solid #e5e7eb;
}

.side-nav__children--open {
    display: flex;
}

.side-nav__child {
    font-size: 12px;
    font-weight: 400;
    padding: 5px 8px;
}

.side-nav__child:link,
.side-nav__child:visited {
    color: #6b7280;
}

.side-nav__child:hover {
    background: rgba(59, 130, 246, 0.06);
    color: #1d4ed8;
}

.side-nav__child.side-nav__item--active,
.side-nav__child.side-nav__item--active:link,
.side-nav__child.side-nav__item--active:visited {
    background: rgba(59, 130, 246, 0.10);
    color: #1d4ed8;
    font-weight: 500;
}
