/* Navigation Styles */
.main-navigation {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 1440px;
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.main-navigation .container {
    width: 100%;
    max-width: 1440px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 0 20px;
}

/* Brand Logo */
.brand-logo {
    display: flex;
    align-items: center;
    width: 219px;
    height: 68px;
    gap: 10px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-image {
    width: 48px;
    height: 48px;
    aspect-ratio: 1/1;
    background: url('/wp-content/themes/Web-tuvanhosocapdo-attt/public/images/logo-hosocapdo-attt.png') no-repeat;
    background-size: contain;
    flex-shrink: 0;
}

.brand-text {
    color: var(--Foundation-black-Normal, #333);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    height: 100%;
    align-items: center;
    gap: 80px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    height: 39px;
    text-decoration: none;
    color: var(--Foundation-black-Normal, #333);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    border-radius: 8px;
}

/* Menu Item Specific Sizes */
.menu-item-quytrinh {
    width: 90px;
}

.menu-item-quydinh {
    width: 196px;
}

.menu-item-faq {
    width: 59px;
}

.nav-menu a:hover {
    color: #000;
    transform: translateY(-1px);
}

/* Active state for current page */
body.page-quy-trinh .menu-item-quytrinh,
body.page-quy-dinh .menu-item-quydinh,
body.page-faq .menu-item-faq {
    color: var(--Foundation-black-Normal, #333);
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

/* Logo active state for homepage */
body.home .brand-text {
    color: var(--Foundation-black-Normal, #333);
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

/* Header Search */
.header-search {
    display: flex;
    width: 300px;
    height: 40px;
    align-items: center;
    border-radius: 32px;
    background: #EBEBEB;
    position: relative;
}

.header-search form {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.search-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon path {
    fill: var(--Foundation-black-Normal, #333);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #333;
    padding: 0;
    min-width: 0;
}

.search-input::placeholder {
    color: #666;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin: 0.5rem 0;
}

.menu-toggle-icon {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    position: relative;
    transition: all 0.3s ease;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: #333;
    transition: all 0.3s ease;
}

.menu-toggle-icon::before {
    top: -8px;
}

.menu-toggle-icon::after {
    bottom: -8px;
}

.menu-toggle.active .menu-toggle-icon {
    background: transparent;
}

.menu-toggle.active .menu-toggle-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle.active .menu-toggle-icon::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Responsive for screens smaller than 1440px */
@media (max-width: 1440px) {
    .main-navigation {
        width: 100%;
        max-width: 100vw;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-navigation {
        height: auto;
        min-height: 68px;
    }
    
    .main-navigation .container {
        height: auto;
        min-height: 68px;
        flex-direction: column;
        gap: 10px;
    }

    .brand-logo {
        width: 180px;
        order: -2;
    }

    .brand-text {
        font-size: 14px;
    }

    .header-search {
        width: 250px;
        height: 36px;
        padding: 8px 12px;
        order: -1;
    }
    
    .header-search form {
        gap: 8px;
    }

    .menu-toggle {
        display: block;
        align-self: flex-start;
        order: 0;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        height: auto;
        gap: 10px;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        width: 100%;
        height: auto;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #eee;
        justify-content: flex-start;
    }
}
