/* ==========================================================================
   SERVICES MEGA MENU DROPDOWN & NAVBAR BADGES
   Khớp 100% giao diện mẫu thực tế từ ảnh tham khảo của khách hàng
   ========================================================================== */

/* 1. Nav Item with Dropdown */
.nav-item.has-dropdown {
    position: relative;
    padding-top: 6px;
    padding-bottom: 6px;
}

.nav-item.has-dropdown > a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
    transition: color 0.2s ease;
}

.nav-item.has-dropdown:hover > a {
    color: #0080e1 !important;
}

.nav-item.has-dropdown .drop-arrow-icon {
    font-size: 0.72rem;
    transition: transform 0.25s ease;
    color: #64748b;
}

.nav-item.has-dropdown:hover .drop-arrow-icon {
    transform: rotate(180deg);
    color: #0080e1;
}

/* Blue Upward Pointer Triangle under "DỊCH VỤ" */
.dropdown-triangle-indicator {
    display: none;
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #0080e1;
    z-index: 1005;
}

.nav-item.has-dropdown:hover .dropdown-triangle-indicator {
    display: block;
}

/* Invisible Hover Bridge to prevent dropdown from closing */
.nav-item.has-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 22px;
    display: none;
}

.nav-item.has-dropdown:hover::after {
    display: block;
}

/* 2. Mega Menu Container */
.services-mega-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-38%);
    width: 820px;
    max-width: 95vw;
    background: #ffffff;
    border-top: 2px solid #0080e1;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    padding: 24px 28px;
    z-index: 1000;
    animation: megaDropdownSlide 0.22s ease-out forwards;
}

.nav-item.has-dropdown:hover .services-mega-dropdown {
    display: block;
}

@keyframes megaDropdownSlide {
    from {
        opacity: 0;
        transform: translateX(-38%) translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateX(-38%) translateY(0);
    }
}

/* 3. Dropdown Grid & Items (2 columns x 3 rows) */
.services-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 28px;
}

.service-drop-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    background: transparent;
    transition: background 0.2s ease, transform 0.2s ease;
}

.service-drop-card:hover {
    background: #f8fafc;
    transform: translateX(3px);
}

.service-drop-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
    font-size: 1.35rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
}

.service-drop-info {
    flex: 1;
}

.service-drop-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 4px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.service-drop-card:hover .service-drop-title {
    color: #0080e1;
}

.service-drop-desc {
    font-size: 0.83rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 4. Red HOT Badge for Tuyển Dụng */
.nav-badge-hot {
    display: inline-block;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 12px;
    margin-left: 4px;
    vertical-align: super;
    letter-spacing: 0.4px;
    line-height: 1.3;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

/* 5. Mobile & Tablet Responsive */
@media (max-width: 991px) {
    .dropdown-triangle-indicator {
        display: none !important;
    }
    .services-mega-dropdown {
        position: static;
        transform: none;
        width: 100%;
        max-width: 100%;
        box-shadow: none;
        border-top: 1px solid #e2e8f0;
        padding: 12px 6px;
        background: #f8fafc;
        border-radius: 6px;
        margin-top: 8px;
    }
    .services-dropdown-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .service-drop-icon {
        width: 42px;
        height: 42px;
        font-size: 1.15rem;
    }
    .service-drop-title {
        font-size: 0.92rem;
    }
}
