header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.left-box {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-box img {
    height: 80px;
    width: auto;
}

.header-container a {
    text-decoration: none;
}

.brand-name {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.header-container .brand-name:hover {
    text-decoration: none;
}

.title-box p {
    margin: 5px 0 0;
    color: #666;
}

.nav-bar ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-bar li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-bar li a:hover {
    color: #007bff;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: #333;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active,
.nav-dropdown.open .nav-dropdown-toggle {
    color: #007bff;
}

.nav-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.2s ease;
}

.nav-dropdown.open .nav-caret {
    transform: rotate(180deg);
}

.nav-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    z-index: 1001;
    display: none;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 4px;
    width: 330px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
    transform: translateX(-50%);
}

.nav-dropdown-menu a {
    padding: 9px 12px;
    border-radius: 8px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
    color: #0b63ce;
    background: #eff6ff;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    display: grid;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger-menu div {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 4px 0;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .nav-bar ul {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #fff;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        padding: 12px 16px;
    }

    .nav-bar ul.active {
        display: flex;
    }

    .nav-bar li {
        margin-bottom: 10px;
        text-align: center;
        width: 100%;
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-toggle {
        justify-content: center;
        width: 100%;
    }

    .nav-dropdown::after,
    .nav-caret {
        display: none;
    }

    .nav-dropdown-menu,
    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown.open .nav-dropdown-menu {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
        width: 100%;
        margin: 8px 0 4px;
        padding: 8px;
        border: 0;
        border-radius: 8px;
        background: #f8fafc;
        box-shadow: none;
        transform: none;
    }

    .nav-dropdown-menu a {
        padding: 8px 6px;
        text-align: center;
        white-space: normal;
    }

    .hamburger-menu {
        display: flex;
    }
}