header {
    position: fixed;
    z-index: 999;
    width: 100%;
    top: 0;
    left: 0;
}
header nav {
    position: relative;
    background-color: rgba(0, 0, 0, 0.4);
    transition: background-color 0.4s ease;
    overflow: hidden;
}
header nav:hover {background-color: #ffffff;}
header nav .container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2em 0;
}
header nav .logo {
    position: absolute;
    left: 0;
    top: 25px;
    cursor: pointer;
    background: url(/resource/images/main/yidologo_white.png) no-repeat 0 0;
    background-size: 100%;
    opacity: 0.9;
    width: 225px;
    height: 50px;
}
header .gnb {
    display: flex;
    justify-content: center;
    width: 100%;
}
header .gnb > ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 100px;
}
header .gnb > ul > li {
    width: 160px;
    text-align: center;
}
header .gnb > ul > li > a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.4s ease;
}
header nav:hover .gnb > ul > li > a {color: #111111;}
header nav:hover .logo {
    background: url(/resource/images/main/yidologo.png) no-repeat 0 0;
    background-size: 100%;
    width: 225px;
    height: 50px;
}

/* 메가메뉴 패널 */
.mega-menu {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.4s ease;
}
header nav:hover .mega-menu {
    max-height: 550px;
    opacity: 1;
}
.mega-menu-inner {
    display: flex;
    justify-content: center;
    gap: 100px;
    padding: 30px 0 40px;
    border-top: 1px solid #eee;
}
.mega-col {
    width: 160px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: center;
}
.mega-col a {
    color: #2c2c2c;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s ease;
}
.mega-col a:hover {
    color: #000;
    font-weight: 600;
}

/* 햄버거 버튼 */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    right: 20px;
    z-index: 10;
}
.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}
.menu-toggle.active span:nth-child(1) {transform: translateY(7px) rotate(45deg);}
.menu-toggle.active span:nth-child(2) {opacity: 0;}
.menu-toggle.active span:nth-child(3) {transform: translateY(-7px) rotate(-45deg);}
.mega-title {display: none;}

/* ===== 모바일 화면 ===== */
@media (max-width: 768px) {
    header nav {background-color: rgba(0, 0, 0, 0.9) !important;}
    header .gnb {display: none;}
    header nav .logo {
        left: 17px;
        top: 21px;
        background: url(/resource/images/main/yidologo_white.png) no-repeat 0 0 !important;
        background-size: 100% !important;
        width: 165px !important;
        height: 30px !important;
    }
    .menu-toggle {display: flex;}
    header nav:hover .mega-menu {
        max-height: 0;
    }
    .mega-menu {
        max-height: 0;
        opacity: 1;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }
    .mega-menu.active,
    header nav:hover .mega-menu.active {
        max-height: 1000px;
    }
    .mega-menu-inner {
        flex-direction: column;
        gap: 0;
        padding: 0 30px 25px;
        border-top: none;
    }
    .mega-col {
        width: 100%;
        text-align: left;
        gap: 0;
    }
    .mega-title {
        display: block;
        font-weight: 700;
        font-size: 15px;
        margin-bottom: 10px;
        color: #111;
    }
    .mega-col a {
        color: #ffffff;
        padding: 15px 10px;
        font-size: 16px;
        border-bottom: 1px solid rgb(255, 255, 255, 0.5);
    }
    .mega-col a:hover {
        color: #ffffff;
        font-weight: normal;
    }
}
.sidebar {
    width: 100%;
    z-index: 9;
    position: relative;
    top: 0;
    display: inline-block;
    border-bottom: 1px solid #1c2656;
    background: rgb(55, 65, 113);
}
.sidebar .tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}
.sidebar .tabs li {
    list-style: none;
}
.sidebar a {
    color: #ffffff;
    padding: 15px;
    display: block;
    text-decoration: none;
    text-align: center;
    position: relative;
    z-index: 1;
    transition: all 0.4s;
}
.sidebar a.active, .sidebar a:hover {
    background-color: #0f1636;
}
footer {
    padding: 3em 0;
    font-size: 14px;
    background-color: #0c0e18;
}
footer h2, footer p, footer a {
    color: #999999 !important;
    text-decoration: none;
}