/* 상단 부품(top.php): 타이틀, 메뉴, 검색 팝업 - 블랙 스타일 */
/* 타이틀 섹션 */
.Title_Header {
    position: relative;
}
.Title_Img {
    display: flex;
    flex-direction: column;
    width:100%;
    height: var(--title-height, 33vw);
    border-bottom: 1px solid #333;
}
.Title_Line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 19.2px;
    height: 90px;
    padding-left: 23.04px;
}
.Title_Menu_Toggle_Button {
    display: none;
}
.Title_Line_Items {
    display: flex;
    align-items: center;
    gap: 19.2px;
    width: 100%;
}
.Title_Line_Left {
    display: flex;
    align-items: center;
}
.Title_Logo {
    font-size: 28.8px;
    color: #fff;
    transition: color 0.25s ease;
}
.Title_Logo:hover {
    color: #ffcc00;
    transition: color 0.25s ease;
}
.Title_Sub {
    background: #333;
    color: #fff;
    font-size: 11px;
    padding: 2px 15.36px;
    margin: 2px 0px 0px 20px;
    border-bottom: 1px solid #555;
    transition: background-color 0.25s, color 0.25s ease;
}
.Title_Sub:hover {
    background: #555;
    color: #ffcc00;
    transition: background-color 0.25s, color 0.25s ease;
}
.Title_Sub.active {
    background: #666;
    color: #ffcc00;
}
.Title_Sub img {
    height:38.4px;
}
.Title_Line_Right {
    
}
.NLOG_Home {
    background: #222;
    color: #fff;
    padding: 9.6px 19.2px;
    margin-right: 10px;
    border: 1px solid #555;
    transition: background-color 0.25s ease;
}
.NLOG_Home:hover {
    background: #333;
    color: #ffcc00;
    transition: background-color 0.25s ease;
}
.Login_In {
    background: #cc3333;
    color: #fff;
    padding: 9.6px 19.2px;
    border: 1px solid #bb2222;
    transition: background-color 0.25s ease;
}
.Login_Out {
    background: #3366cc;
    color: #fff;
    padding: 9.6px 19.2px;
    border: 1px solid #2255bb;
    transition: background-color 0.25s ease;
}
.Login_In:hover {
    background: #dd4444;
    transition: background-color 0.25s ease;
}
.Login_Out:hover {
    background: #4477dd;
    transition: background-color 0.25s ease;
}
.Title_Desc {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    margin-top: 90px;
    padding: 57.6px;
    font-size: var(--title-font-size);
    background: linear-gradient(135deg, rgba(0,0,0,0.3), rgba(0,0,0,0.5));
}

/* 메뉴 섹션 */
/* .Top 이 헤더 높이만큼만 감싸 sticky 범위를 제한하므로 레이아웃에서 제외 */
.Top {
    display: contents;
}
.Menu {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 100;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}
.Menu_Toggle_Button {
    display: none;
}
.Menu_Items {
    display: contents;
}
.Menu_Block {
    flex: 3;
    padding: 19.2px;
    background-color: #1a1a1a;
    color: #fff;
    border-left: 1px solid #333;
    cursor: default;
    text-align: center;
    transition: background-color 0.25s ease, color 0.25s ease;
}
.Menu_Block[onclick] {
    cursor: pointer;
}
.Menu_Block:has(.Menu_Sub) {
    cursor: default;
}
.Menu_Block:hover,
.Menu_Block.active {
    background-color: #333;
    color: #ffcc00;
}

/* 메뉴 버튼 글자: 평소에는 숨기고 펼침 메뉴(1000px 이하)에서만 보인다 */
.Menu_Text {
    display: none;
}

/* 메뉴 서브 항목 스타일 */
.Menu_Block {
    position: relative;
}
.Menu_Sub {
    position: absolute;
    top: 100%;
    left: -1px;
    right: 0;
    z-index: 100;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    background-color: #1a1a1a;
    border-left: 1px solid #333;
    border-right: 1px solid #333;
    transition: max-height 0.25s ease, opacity 0.25s ease;
}
.Menu_Block:hover .Menu_Sub {
    max-height: 576px;
    opacity: 1;
    border-bottom: 1px solid #333;
}
.Menu_Sub_Item {
    padding: 15.36px 19.2px;
    color: #ccc;
    border-top: 1px solid #333;
    cursor: default;
    transition: background-color 0.25s ease, color 0.25s ease;
}
.Menu_Sub_Item[onclick] {
    cursor: pointer;
}
.Menu_Sub_Item:hover,
.Menu_Sub_Item.active {
    background-color: #333;
    color: #ffcc00;
}

.Search_Modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.Search_Box {
    width: 576px;
    height: 167.04px;
    background-color: #222;
    color: #fff;
    padding: 28.8px;
    border-radius: 4px;
    border: 1px solid #444;
}
.Search_Title {
    display: flex;
    justify-content: space-between;
    margin-bottom: 19.2px;
    color: #fff;
}
.Search_Title i {
    cursor: pointer;
    transition: color 0.25s ease;
}
.Search_Title i:hover {
    color: #ffcc00;
}
.Search_Box input {
    background-color: #333 !important;
    color: #fff !important;
    border-color: #555 !important;
}
.Search_Box input::placeholder {
    color: #999;
}
.Search_Box button {
    background-color: #333 !important;
    color: #fff !important;
    border-color: #555 !important;
    transition: background-color 0.25s ease, color 0.25s ease;
}
.Search_Box button:hover {
    background-color: #444 !important;
    color: #ffcc00 !important;
}
.Side_Menu_Button {
    display: flex;
    flex: 0 0 28px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border: 0;
    border-left: 1px solid #333;
    background: #222;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 16px;
    transition: background-color 0.25s ease, color 0.25s ease;
}
.Side_Menu_Button:hover {
    background: #333;
    color: #ffcc00;
}
.Side_Menu_Button:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid #ffcc00;
    outline-offset: -2px;
}

@media (max-width: 1500px) {
    .Title_Header {
        display: flex;
        flex-direction: column;
    }

    .Title_Line {
        position: static;
        order: 0;
        width: 100%;
        height: auto;
        min-height: 64px;
        padding: 12px 24px;
        background: #1a1a1a;
        border-bottom: 1px solid #333;
    }

    .Title_Line_Items {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .Title_Line_Right {
        margin: 0 0 0 auto !important;
    }

    .Title_Img {
        order: 1;
    }

    .Title_Desc {
        margin-top: 0;
    }
}

@media (max-width: 1200px) {
    .Menu_Admin_Settings {
        display: none;
    }
}

@media (max-width: 1000px) {
    .Title_Img {
        height: max(260px, var(--title-height, 33vw));
        min-height: 260px;
    }

    .Title_Line {
        height: auto;
        min-height: 64px;
        flex: 0 0 auto;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 8px 12px;
        padding: 12px 16px;
        background: #1a1a1a;
        border-bottom: 1px solid #333;
    }

    .Title_Line_Left {
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 12px;
    }

    .Title_Logo {
        font-size: 24px;
    }

    .Title_Sub {
        margin: 0;
        padding: 5px 8px;
    }

    .Title_Line_Right {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        margin: 0 !important;
    }

    .NLOG_Home,
    .Login_In,
    .Login_Out {
        padding: 8px 10px;
    }

    .Title_Desc {
        flex: 1 0 auto;
        height: auto;
        min-height: 160px;
        padding: 32px 20px;
        font-size: clamp(20px, var(--title-font-size), 52px);
    }

    .Title_Desc span {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .Menu {
        flex-wrap: wrap;
        background: #1a1a1a;
        border-bottom: 1px solid #333;
    }

    .Menu_Toggle_Button {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        justify-content: space-between;
        padding: 14px 18px;
        border: 0;
        border-left: 1px solid #444;
        background: #1a1a1a;
        color: #fff;
        cursor: pointer;
        font: inherit;
        font-weight: 600;
        font-size: 15px;
        text-align: left;
        transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
        gap: 12px;
    }

    .Menu_Toggle_Button:hover,
    .Menu_Expanded .Menu_Toggle_Button {
        background: #2a2a2a;
        color: #ffcc00;
        border-left-color: #ffcc00;
    }

    .Menu_Toggle_Button:focus-visible {
        position: relative;
        z-index: 1;
        outline: 2px solid #ffcc00;
        outline-offset: -2px;
    }

    .Menu_Toggle_Button i {
        transition: transform 0.2s ease;
        font-size: 14px;
        flex-shrink: 0;
    }

    .Menu_Expanded .Menu_Toggle_Button i {
        transform: rotate(180deg);
    }

    .Menu_Items {
        display: none;
        flex: 0 0 100%;
        flex-direction: column;
        width: 100%;
        background: #1a1a1a;
    }

    .Menu_Expanded .Menu_Items {
        display: flex;
        max-height: calc(100vh - 60px);
        overflow-x: hidden;
        overflow-y: auto;
    }

    .Menu_Block {
        flex: 0 0 auto !important;
        width: 100%;
        padding: 14px 18px;
        border-left: 0;
        border-top: 1px solid #333;
        text-align: left;
        white-space: normal;
        font-size: 14px;
        font-weight: 500;
        color: #ccc;
        transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
    }

    .Menu_Block:last-child {
        border-bottom: 1px solid #333;
    }

    .Menu_Items .Menu_Block {
        padding-left: 18px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .Menu_Items .Menu_Block[onclick] {
        cursor: pointer;
    }

    .Menu_Items .Menu_Block:not([onclick]):has(.Menu_Sub) {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .Menu_Items .Menu_Text {
        display: inline;
        margin-left: 8px;
    }

    .Menu_Items .Menu_Sub {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        max-height: 0;
        border: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.25s ease, opacity 0.25s ease;
    }

    .Menu_Items .Menu_Block:has(.Menu_Sub) {
        cursor: pointer;
    }

    .Menu_Items .Menu_Block:has(.Menu_Sub)::after {
        content: '▼';
        font-size: 11px;
        color: #fff;
        margin-left: auto;
        transition: transform 0.2s ease, color 0.2s ease;
        flex-shrink: 0;
    }

    .Menu_Items .Menu_Block.Menu_Sub_Open:has(.Menu_Sub)::after {
        transform: rotate(180deg);
        color: #ffcc00;
    }

    .Menu_Items .Menu_Block:hover .Menu_Sub {
        max-height: 0;
        border-bottom: 0;
        opacity: 0;
    }

    .Menu_Items .Menu_Block.Menu_Sub_Open .Menu_Sub {
        max-height: 576px;
        border-bottom: 0;
        opacity: 1;
    }

    .Menu_Items .Menu_Block.Menu_Sub_Open .Menu_Sub:last-child {
        border-bottom: 0px;
    }
    
    .Menu_Items .Menu_Sub {
        margin: 8px 0 0 0;
        background: #0d0d0d;
        border-left: 3px solid #ffcc00;
        padding-left: 0;
    }

    .Menu_Items .Menu_Sub_Item {
        padding: 10px 18px 10px 24px;
        font-size: 13px;
        color: #999;
        border-top: 0;
        border: 0;
        cursor: pointer;
        transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
    }

    .Menu_Items .Menu_Sub_Item:hover {
        background-color: #2a2a2a;
        color: #ffcc00;
        padding-left: 28px;
    }

    .Menu_Items .Menu_Sub_Item.active {
        background-color: #333;
        color: #ffcc00;
        padding-left: 28px;
        font-weight: 600;
    }

    .Search_Box {
        width: calc(100vw - 32px);
        height: auto;
        max-height: calc(100vh - 32px);
        overflow-y: auto;
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .Title_Line {
        padding: 10px 12px;
    }

    .Title_Line_Left,
    .Title_Line_Right {
        width: 100%;
    }

    .Title_Line_Right {
        justify-content: flex-end;
    }

    .Title_Logo {
        font-size: 22px;
    }

    .Title_Sub {
        font-size: 12px;
    }

    .Title_Desc {
        min-height: 145px;
        padding: 24px 16px;
    }

    .Search_Box {
        padding: 20px;
    }
}

@media (max-width: 800px) {
    .Title_Line {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        flex-wrap: nowrap;
        flex: 0 0 auto;
        height: auto;
        min-height: 0;
        gap: 0;
        padding: 0;
        background: #1a1a1a;
        border-bottom: 1px solid #333;
    }

    .Title_Menu_Toggle_Button {
        display: flex;
        box-sizing: border-box;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 48px;
        padding: 12px 16px;
        border: 0;
        background: #1a1a1a;
        color: #fff;
        cursor: pointer;
        font: inherit;
        text-align: left;
        transition: background-color 0.25s ease, color 0.25s ease;
    }

    .Title_Menu_Toggle_Button:hover,
    .Title_Menu_Expanded .Title_Menu_Toggle_Button {
        background: #333;
        color: #ffcc00;
    }

    .Title_Menu_Toggle_Button:focus-visible {
        outline: 2px solid #ffcc00;
        outline-offset: -2px;
    }

    .Title_Menu_Toggle_Button i {
        transition: transform 0.2s ease;
    }

    .Title_Menu_Expanded .Title_Menu_Toggle_Button i {
        transform: rotate(180deg);
    }

    .Title_Line_Items {
        display: none;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        flex: 0 0 auto;
        height: auto;
        gap: 0;
        width: 100%;
        background: #1a1a1a;
    }

    .Title_Menu_Expanded .Title_Line_Items {
        display: flex;
    }

    .Title_Line_Left,
    .Title_Line_Right {
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        flex: 0 0 auto;
        gap: 0;
        width: 100%;
        margin: 0 !important;
        border-top: 1px solid #333;
    }

    .Title_Logo,
    .Title_Sub,
    .NLOG_Home,
    .Login_In,
    .Login_Out {
        display: block;
        width: 100%;
        margin: 0;
        padding: 10px 16px;
        text-align: left;
    }
}

/* 스크롤 리빌 효과 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.reveal {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1500px) {
    .Title_Header {
        display: flex;
        flex-direction: column;
    }

    .Title_Line {
        position: static;
        order: 0;
        width: 100%;
        height: auto;
        min-height: 64px;
        padding: 12px 24px;
        background: #1a1a1a;
        border-bottom: 1px solid #333;
    }

    .Title_Line_Items {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .Title_Line_Right {
        margin: 0 0 0 auto !important;
    }

    .Title_Img {
        order: 1;
    }

    .Title_Desc {
        margin-top: 0;
    }
}

@media (max-width: 1200px) {
    .Menu_Admin_Settings {
        display: none;
    }
}

@media (max-width: 1000px) {
    .Title_Img {
        height: max(260px, var(--title-height, 33vw));
        min-height: 260px;
    }

    .Title_Line {
        height: auto;
        min-height: 64px;
        flex: 0 0 auto;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 8px 12px;
        padding: 12px 16px;
    }

    .Title_Line_Left {
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 12px;
    }

    .Title_Logo {
        font-size: 24px;
    }

    .Title_Sub {
        margin: 0;
        padding: 5px 8px;
    }

    .Title_Line_Right {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        margin: 0 !important;
    }

    .NLOG_Home,
    .Login_In,
    .Login_Out {
        padding: 8px 10px;
    }

    .Title_Desc {
        flex: 1 0 auto;
        height: auto;
        min-height: 160px;
        padding: 32px 20px;
        font-size: clamp(20px, var(--title-font-size), 52px);
    }

    .Title_Desc span {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .Menu {
        flex-wrap: wrap;
    }

    .Menu_Toggle_Button {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        border: 0;
        border-left: 1px solid #333;
        background: #1a1a1a;
        color: #fff;
        cursor: pointer;
        font: inherit;
        text-align: left;
    }

    .Menu_Toggle_Button:hover,
    .Menu_Expanded .Menu_Toggle_Button {
        background: #333;
        color: #ffcc00;
    }

    .Menu_Toggle_Button:focus-visible {
        position: relative;
        z-index: 1;
        outline: 2px solid #0c29aa;
        outline-offset: -2px;
    }

    .Menu_Toggle_Button i {
        transition: transform 0.2s ease;
    }

    .Menu_Expanded .Menu_Toggle_Button i {
        transform: rotate(180deg);
    }

    .Menu_Items {
        display: none;
        flex: 0 0 100%;
        flex-direction: column;
        width: 100%;
    }

    .Menu_Expanded .Menu_Items {
        display: flex;
        max-height: calc(100vh - 60px); /* 목록이 화면보다 길면 메뉴 안에서 스크롤 (60px = 메뉴 버튼 줄 높이 추정값) */
        overflow-x: hidden;
        overflow-y: auto;
    }

    .Menu_Block {
        flex: 0 0 auto !important;
        width: 100%;
        padding: 12px;
        border-left: 0;
        border-top: 1px solid #333;
        text-align: left;
        white-space: normal;
    }

    .Menu_Items .Menu_Text {
        display: inline;
        margin-left: 8px;
    }

    .Menu_Items .Menu_Sub {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        max-height: 0;
        border: 0;
        opacity: 0;
    }

    /* 펼침 메뉴 상태: 마우스 오버로 열리지 않고, 클릭으로 붙는 Menu_Sub_Open 일 때만 연다 */
    .Menu_Items .Menu_Block:has(.Menu_Sub) {
        cursor: pointer;
    }

    .Menu_Items .Menu_Block:hover .Menu_Sub {
        max-height: 0;
        border-bottom: 0;
        opacity: 0;
    }

    .Menu_Items .Menu_Block.Menu_Sub_Open .Menu_Sub {
        max-height: 576px;
        border-bottom: 1px solid #333;
        opacity: 1;
    }

    .Menu_Items .Menu_Block.Menu_Sub_Open .Menu_Sub:last-child {
        border-bottom: 0px;
    }
    
    .Menu_Items .Menu_Sub {
        margin: 12px -12px -12px;
    }

    .Menu_Items .Menu_Sub_Item {
        padding: 12px 12px 12px 24px;
    }

    .Search_Box {
        width: calc(100vw - 32px);
        height: auto;
        max-height: calc(100vh - 32px);
        overflow-y: auto;
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .Title_Line {
        padding: 10px 12px;
    }

    .Title_Line_Left,
    .Title_Line_Right {
        width: 100%;
    }

    .Title_Line_Right {
        justify-content: flex-end;
    }

    .Title_Logo {
        font-size: 22px;
    }

    .Title_Sub {
        font-size: 12px;
    }

    .Title_Desc {
        min-height: 145px;
        padding: 24px 16px;
    }

    .Search_Box {
        padding: 20px;
    }
}

@media (max-width: 800px) {
    .Title_Line {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        flex-wrap: nowrap;
        flex: 0 0 auto;
        height: auto;
        min-height: 0;
        gap: 0;
        padding: 0;
    }

    .Title_Menu_Toggle_Button {
        display: flex;
        box-sizing: border-box;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 48px;
        padding: 12px 16px;
        border: 0;
        background: #1a1a1a;
        color: #fff;
        cursor: pointer;
        font: inherit;
        text-align: left;
    }

    .Title_Menu_Toggle_Button:hover,
    .Title_Menu_Expanded .Title_Menu_Toggle_Button {
        background: #333;
        color: #ffcc00;
    }

    .Title_Menu_Toggle_Button:focus-visible {
        outline: 2px solid #ffcc00;
        outline-offset: -2px;
    }

    .Title_Menu_Toggle_Button i {
        transition: transform 0.2s ease;
    }

    .Title_Menu_Expanded .Title_Menu_Toggle_Button i {
        transform: rotate(180deg);
    }

    .Title_Line_Items {
        display: none;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        flex: 0 0 auto;
        height: auto;
        gap: 0;
        width: 100%;
    }

    .Title_Menu_Expanded .Title_Line_Items {
        display: flex;
    }

    .Title_Line_Left,
    .Title_Line_Right {
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        flex: 0 0 auto;
        gap: 0;
        width: 100%;
        margin: 0 !important;
        border-top: 1px solid #333;
    }

    .Title_Logo,
    .Title_Sub,
    .NLOG_Home,
    .Login_In,
    .Login_Out {
        display: block;
        width: 100%;
        margin: 0;
        padding: 10px 16px;
        text-align: left;
    }
}

/* 스크롤 리빌 효과 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.reveal {
    opacity: 1;
    transform: translateY(0);
}