/* Base Reset */
.limud-header-wrapper * {
    box-sizing: border-box;
}

.limud-header-wrapper ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.limud-header-wrapper a {
    text-decoration: none;
    color: inherit;
}

/* PC Header Styles */
.limud-pc-header {
    display: block;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: relative;
    /* For Mega BG positioning */
}

.limud-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Bar */
.limud-top-bar {
    background: var(--limud-bg-1);
    padding: 10px 0;
    font-size: 12px;
    text-align: right;
}

.limud-top-menu {
    display: inline-block;
}

.limud-top-menu li {
    display: inline-block;
    margin-left: 15px;
    position: relative;
}

.limud-top-menu li:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -10px;
    color: #ccc;
}

/* Main Bar */
.limud-main-bar {
    padding: 20px 0;
    background: var(--limud-bg-2);
    position: relative;
    z-index: 1001;
    /* Above BG */
    transition: all 0.3s ease;
}

.limud-main-bar.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    /* Shrink slightly */
}

.limud-main-bar .limud-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.limud-logo img {
    max-height: 40px;
    /* Adjust as needed */
    vertical-align: middle;
}

/* Main Nav */
.limud-nav {
    flex-grow: 1;
    text-align: center;
}

.limud-main-menu {
    display: inline-flex;
    gap: 60px;
}

.limud-main-menu>li {
    position: relative;
    /* Align sub-menu to this item */
}

.limud-main-menu>li>a {
    font-family: 'Pretendard', sans-serif;
    font-size: var(--limud-main-font-size);
    font-weight: var(--limud-main-font-weight);
    letter-spacing: -0.02em;
    color: #333;
    padding: 10px 0;
    display: block;
}

.limud-main-menu>li:hover>a {
    color: #ff5a00;
    /* Point Color */
}

/* Sub Menu (Mega Style) */
.limud-main-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    /* Center under parent */
    width: max-content;
    /* Fit content */
    min-width: 100px;
    text-align: center;
    padding: 40px 0 20px;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1002;
}

.limud-nav.menu-visible .sub-menu {
    display: block;
    /* Show as block for vertical list */
    opacity: 1;
    visibility: visible;
}

.limud-main-menu .sub-menu li {
    display: block;
    /* Vertical list */
    margin-bottom: 10px;
}

.limud-main-menu .sub-menu a {
    font-size: var(--limud-sub-font-size);
    font-weight: var(--limud-sub-font-weight);
    letter-spacing: -0.02em;
    color: #555;
    padding: 5px 0;
    display: block;
}

.limud-main-menu .sub-menu a:hover {
    color: #ff5a00;
    text-decoration: underline;
}

/* Dropdown / Mega Menu (Full Drop Style) */
.limud-mega-bg {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--limud-bg-3);
    /* Use Section 3 BG Color */
    border-bottom: 1px solid #eee;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    z-index: 900;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.limud-mega-bg.sticky {
    position: fixed;
    top: 61px;
    /* Height of sticky main bar (approx) */
    z-index: 1000;
}

.limud-icons {
    display: flex;
    gap: 20px;
    /* Increased spacing */
    align-items: center;
}

.limud-icons a {
    font-size: 20px;
    color: #333;
}

/* Mobile Header Styles */
.limud-mobile-header {
    display: none;
    /* Hidden on PC */
    background: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.limud-mobile-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.limud-mobile-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.limud-mobile-btn {
    border: 1px solid #333;
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 13px;
    font-weight: 600;
}

.limud-hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.limud-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
}

/* Mobile Drawer */
.limud-mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    /* Hidden by default */
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.limud-mobile-drawer.open {
    right: 0;
}

.limud-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.limud-drawer-close {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
}

.limud-drawer-top-links {
    background: #f8f8f8;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.limud-drawer-top-links ul {
    display: flex;
    gap: 15px;
}

.limud-drawer-top-links li {
    color: #666;
}

.limud-drawer-content {
    flex-grow: 1;
    display: flex;
    overflow: hidden;
}

/* Sidebar (Left) */
.limud-drawer-sidebar {
    width: 35%;
    background: #333;
    color: #fff;
    overflow-y: auto;
}

.limud-sidebar-item {
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid #444;
    font-size: 14px;
}

.limud-sidebar-item.active {
    background: #fff;
    color: #333;
    font-weight: bold;
}

/* Main Content (Right) */
.limud-drawer-main {
    width: 65%;
    background: #fff;
    padding: 20px;
    overflow-y: auto;
}

.limud-menu-pane {
    display: none;
}

.limud-menu-pane.active {
    display: block;
}

.limud-menu-pane h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    display: inline-block;
}

.limud-menu-pane ul li {
    margin-bottom: 12px;
}

.limud-menu-pane ul li a {
    font-size: 14px;
    color: #555;
}

/* Responsive Breakpoint */
@media (max-width: 768px) {
    .limud-pc-header {
        display: none;
    }

    .limud-mobile-header {
        display: block;
    }
}

/* Search Modal */
.limud-search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.limud-search-modal.open {
    display: block;
}

.limud-search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.limud-search-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 40px;
    width: 90%;
    max-width: 600px;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.limud-search-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #999;
}

.limud-search-box .search-form {
    display: flex;
    border-bottom: 2px solid #333;
}

.limud-search-box .search-field {
    flex-grow: 1;
    border: none;
    font-size: 20px;
    padding: 10px;
}

.limud-search-box .search-field:focus {
    outline: none;
}

.limud-search-box .search-submit {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}