/* #region subnav base (from submenu.css v1) */
.header-top-custom {
    display: none;
}

.aw-subnav {
    font-family: Inter;
    font-size: 16px;
    line-height: 1.5;
    color: #181D27;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    z-index: 999;
    background: transparent;
    box-shadow: none;
    transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s, box-shadow 0.35s;
}

body.aw-subnav-active .aw-subnav,
.aw-subnav.aw-mobile-open {
    background: #fff;
    box-shadow: 0 6px 20px 3px rgba(116, 135, 255, 0.03), 0 3px 6px -6px rgba(10, 27, 137, 0.03);
}

.aw-subnav-container {
    max-width: 1310px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    height: 72px;
}

.aw-subnav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.aw-subnav-logo span {
    font-family: Inter SemiBold;
    font-size: 24px;
    color: #181D27;
    white-space: nowrap;
}

.aw-subnav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.aw-subnav-item {
    position: relative;
}

.aw-subnav-menu li.aw-subnav-item {
    font-family: Inter;
    font-size: 14px;
}

.aw-subnav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    font-family: Inter;
    font-size: 14px;
    color: #181D27;
    text-decoration: none;
    white-space: nowrap;
}

.aw-subnav-link:hover {
    color: #181D27;
}

a.aw-subnav-link:focus {
    color: #2563EB;
}

.aw-subnav-link-group {
    display: flex;
    align-items: center;
}

.aw-subnav-link-group .aw-subnav-link {
    padding-right: 4px;
}

.aw-dropdown-btn {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px 8px 0;
}

.aw-subnav-chevron {
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.aw-subnav-item.is-open .aw-subnav-chevron {
    transform: rotate(180deg);
}

/* Dropdown */
.aw-dropdown {
    position: absolute;
    top: 100%;
    left: -300px;
    padding-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    pointer-events: none;
    min-width: 860px;
}

.aw-subnav-item.is-open .aw-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.aw-dropdown-inner {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #EAECF0;
    background: linear-gradient(#FFF, #FFF) padding-box, linear-gradient(180deg, #F8FAFF 42.49%, #D9E6FF 109.34%) border-box;
    box-shadow: 0 8px 30px -6px rgba(116, 135, 255, 0.05), 0 8px 30px -4px rgba(10, 27, 137, 0.03);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 12px;
}

.aw-dropdown-col-title {
    font-family: Inter SemiBold;
    color: #252B37;
    text-transform: uppercase;
    letter-spacing: -0.2px;
    padding-left: 12px;
    padding-bottom: 4px;
}

.aw-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    color: #252B37;
    text-decoration: none;
    transition: background 0.18s ease;
    white-space: nowrap;
}

.aw-dropdown-item:hover {
    background: #DDEBFF;
    color: #2A3AD8;
}

/* Hide site main header when scrolled */
body.aw-subnav-active header.header {
    transform: translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile */
.aw-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
}

.aw-overlay.is-visible {
    display: block;
}

body.aw-menu-open {
    overflow: hidden;
}

.aw-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.aw-mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
}

.aw-mobile-menu.is-open {
    max-height: calc(100vh - 72px);
    overflow-y: auto;
}

.aw-mobile-menu-inner {
    padding: 8px 16px 16px;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #EAECF0;
}

.aw-mobile-link {
    display: block;
    padding: 12px;
    font-size: 15px;
    color: #181D27;
    text-decoration: none;
    border-radius: 8px;
}

.aw-mobile-link:hover {
    background: #F5F5F5;
}

.aw-mobile-accordion-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: Inter;
    font-size: 15px;
    color: #181D27;
    border-radius: 8px;
    text-align: left;
    text-decoration: none;
}

.aw-mobile-accordion-btn:hover {
    background: #F5F5F5;
}

.aw-mobile-accordion-btn .aw-subnav-chevron {
    flex-shrink: 0;
}

.aw-mobile-accordion.is-open .aw-subnav-chevron {
    transform: rotate(180deg);
}

.aw-mobile-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 8px;
}

.aw-mobile-accordion.is-open .aw-mobile-accordion-body {
    max-height: 800px;
}

.aw-mobile-group-title {
    font-family: Inter SemiBold;
    font-size: 11px;
    color: #717680;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px 4px;
}

@media (max-width: 979px) {
    .aw-subnav {
        top: 0 !important;
        transform: translateY(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s, box-shadow 0.35s;
    }

    body.aw-subnav-active .aw-subnav,
    .aw-subnav.aw-mobile-open {
        transform: translateY(0);
    }

    .aw-subnav-menu {
        display: none;
    }

    .aw-menu-btn {
        display: flex;
    }
}

/* #endregion */

/* #region subnav v2 - dropdown theo Figma 3453:91456: tabs ngang trên + agent grid 2 cột */

.aw-subnav .aw-subnav-trigger {
    background: none;
    border: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

/* Dropdown v2 panel: stack dọc tabs trên, list dưới */
.aw-dropdown .aw-dropdown-v2 {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px 24px 32px;
    width: 760px;
    max-width: 90vw;
}

/* Tabs ngang phía trên */
.aw-dd-tabs {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid #E9EAEB;
}

.aw-dd-tab {
    font-family: Inter SemiBold;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: -0.2px;
    color: #535862;
    text-decoration: none;
    padding: 0 4px 12px;
    position: relative;
    transition: color 0.18s ease;
}

.aw-dd-tab:hover {
    color: #2662FF;
}

.aw-dd-tab.active {
    color: #2662FF;
}

/* Bar dưới tab active */
.aw-dd-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 9999px;
    background: #2662FF;
}

/* Panel agent list desktop: grid 2 cột, chỉ ≥980px */
@media (min-width: 980px) {
    .aw-dd-panel {
        display: none;
    }

    .aw-dd-panel.active {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

/* Agent item: align start, avatar trên cùng */
.aw-dd-agent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.18s ease;
}

.aw-dd-agent:hover {
    background: #F2F7FF;
}

.aw-dd-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aw-dd-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.aw-dd-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Title row: name + arrow cùng hàng */
.aw-dd-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.aw-dd-name {
    font-family: Inter SemiBold;
    font-size: 14px;
    line-height: 18px;
    letter-spacing: -0.2px;
    color: #181D27;
    transition: color 0.18s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aw-dd-desc {
    font-family: Inter;
    font-size: 14px;
    line-height: 18px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Arrow nằm cùng title, ẩn mặc định */
.aw-dd-arrow {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.aw-dd-agent:hover .aw-dd-name {
    color: #2662FF;
}

.aw-dd-agent:hover .aw-dd-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile: dropdown in dropdown (nested accordion) */
.aw-dd-nested {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 0 !important;
}

.aw-dd-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: none;
    border: none;
    text-align: left;
}

.aw-dd-row:hover {
    background: #F5F5F5;
}

.aw-dd-link {
    flex: 1;
    font-family: Inter SemiBold;
    font-size: 15px;
    color: #181D27;
    text-decoration: none;
}

.aw-dd-sub-btn {
    padding-left: 16px;
}

.aw-dd-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.aw-dd-sub-accordion {
    position: relative;
}

.aw-dd-sub-accordion .aw-mobile-accordion-body {
    padding-left: 0 !important;
}

/* Mobile panel: ẩn mặc định, hiện khi accordion cha is-open (không phụ thuộc .active) */
.aw-dd-sub-accordion .aw-dd-panel {
    display: none;
}

.aw-dd-sub-accordion.is-open > .aw-mobile-accordion-body > .aw-dd-panel {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 12px 8px 28px;
}

.aw-dd-sub-accordion .aw-dd-agent {
    padding: 8px 12px;
    border-radius: 10px;
}

.aw-dd-sub-accordion.is-open > .aw-dd-row .aw-dd-link {
    color: #2662FF;
}

@media (max-width: 979px) {
    .aw-dropdown .aw-dropdown-v2 {
        width: 100%;
        padding: 16px;
        gap: 16px;
    }
}

/* #endregion */

/* #region subnav v2 - Báo giá dropdown (list 3 items, Figma 2907:50325) */

.aw-pricing-dropdown-item.has-dropdown > .aw-dropdown {
    left: auto;
    right: 0;
    min-width: 0;
}

.aw-pricing-dropdown .aw-pricing-dropdown-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    width: 260px;
    max-width: 90vw;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #F8FAFF;
    background: linear-gradient(#FFF, #FFF) padding-box, linear-gradient(180deg, #F8FAFF 42.49%, #D9E6FF 109.34%) border-box;
    box-shadow: 0 8px 30px -6px rgba(116, 135, 255, 0.05), 0 8px 30px -4px rgba(10, 27, 137, 0.03);
}

.aw-pricing-dropdown .aw-pricing-dropdown-link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fff;
    font-family: Inter Medium;
    font-size: 14px;
    line-height: 18px;
    letter-spacing: -0.2px;
    color: #252B37;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease;
}

.aw-pricing-dropdown .aw-pricing-dropdown-link:hover {
    background: #F2F7FF;
    color: #2662FF;
}

@media (max-width: 979px) {
    .aw-pricing-dropdown .aw-pricing-dropdown-inner {
        width: 100%;
        padding: 4px 12px 8px 28px;
        border: none;
        background: none;
        box-shadow: none;
    }

    .aw-pricing-dropdown-link.aw-mobile-link {
        padding: 12px;
        background: none;
        border-radius: 8px;
    }
}

/* #endregion */

