/* Mega-menu dropdowns (Product, Resources). Wider than a standard
   Bootstrap dropdown, with a left-hand tab list and right-hand content
   pane. Uses Bootstrap 5's pill/tab-pane JS inside the dropdown —
   data-bs-auto-close="outside" on the toggle keeps the dropdown open
   while switching tabs inside it. */

.site-navbar .container {
    position: relative;
}

.mega-dropdown {
    position: static;
}

.mega-dropdown .dropdown-menu {
    /* Visibility is now controlled by JS toggling the .mega-open class
       (see script at the bottom of this file), not pure :hover — CSS
       alone can't guarantee only one panel is open at a time, since
       two independent :hover fades can overlap mid-transition when
       moving quickly between triggers. Closing is INSTANT (0s
       transition, below) so there's never a window where two panels
       render simultaneously; opening still fades in smoothly. */
    display: block;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: min(1140px, 92vw);
    margin: 0;
    padding: 28px;
    border: none;
    border-radius: var(--ce-radius-md);
    box-shadow: var(--ce-shadow-sm);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0s, visibility 0s;
}

.mega-dropdown.mega-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.15s ease, visibility 0.15s;
}

.mega-menu-tabs .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--ce-color-navy);
    font-weight: var(--ce-font-weight-semibold);
    padding: 12px 14px;
    border-radius: var(--ce-radius-sm);
    margin-bottom: 4px;
}

.mega-menu-tabs .nav-link i {
    color: #9aa3b5;
    font-size: 0.9rem;
}

.mega-menu-tabs .nav-link.active {
    background: #eef2ff;
    color: var(--ce-color-primary);
}

.mega-menu-tabs .nav-link.active i {
    color: var(--ce-color-primary);
}

.mega-menu-checklist {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.mega-menu-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #4b5567;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.mega-menu-checklist i {
    color: var(--ce-color-primary);
    margin-top: 3px;
    flex-shrink: 0;
}

.mega-menu-cta {
    color: var(--ce-color-primary);
    font-weight: var(--ce-font-weight-semibold);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mega-dropdown .tab-pane > p.fw-bold {
    max-width: 400px;
}

.mega-menu-image-card {
    max-width: 340px;
}

.mega-menu-image-card .mega-menu-image-wrap {
    position: relative;
}

.mega-menu-image-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: var(--ce-radius-sm);
    margin-bottom: 12px;
}

/* Announcements uses an illustration, not a photo — object-fit:cover
   was cropping it (it doesn't share the photos' landscape aspect
   ratio). "contain" shows the full image, letterboxed on a neutral
   background instead of cropped. */
#tabAnnouncements .mega-menu-image-card img {
    object-fit: contain;
    background: #f5f8ff;
}

.mega-menu-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(15, 28, 63, 0.65);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.15s ease;
}

.mega-menu-play:hover {
    background: rgba(15, 28, 63, 0.85);
    color: #fff;
}

.mega-menu-image-card p {
    font-size: 0.85rem;
    color: #4b5567;
    margin-bottom: 8px;
}

.mega-menu-image-card a {
    color: var(--ce-color-navy);
    font-weight: var(--ce-font-weight-semibold);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

@media (max-width: 991px) {
    .mega-dropdown .dropdown-menu {
        width: 100%;
        box-shadow: none;
    }
}
