/* Font definitions */
.nav-d493a330-wrapper {
    font-family: 'DM Sans', sans-serif;
    background: #ffffff;
    position: relative;
    display: flex;
    align-items: center;
    height: auto;
    min-height: 74px;
    max-width: 100%;
}

.nav-d493a330-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #3A4263;
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
}

.nav-d493a330-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: clamp(0.5rem, 2vw, 1.5rem);
    height: 100%;
    align-items: center;
    flex-wrap: wrap;
}

.nav-d493a330-item {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-d493a330-link {
    color: #3A4263;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-d493a330-link:hover,
.nav-d493a330-item.is-open .nav-d493a330-link {
    background: #EDE8DE;
    color: #1A2747;
}

.nav-d493a330-link .caret {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.nav-d493a330-item.is-open .caret {
    transform: rotate(180deg);
}

/* Mega Panel - Desktop */
.nav-d493a330-mega-panel {
    position: fixed;
    top: 100%;
    left: 0;
    width: 100vw;
    background: #ffffff;
    border-top: 3px solid #E84A56;
    box-shadow: 0 10px 30px rgba(26, 39, 71, 0.08);
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
}

/* Transitions */
.submenu-trans-none .nav-d493a330-mega-panel {
    transition: none;
}

.submenu-trans-fade .nav-d493a330-mega-panel {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.submenu-trans-fade-slide .nav-d493a330-mega-panel {
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.submenu-trans-fade-slide .nav-d493a330-item.is-open .nav-d493a330-mega-panel {
    transform: translateY(0);
}

.submenu-trans-scale .nav-d493a330-mega-panel {
    transform: scaleY(0);
    transform-origin: top;
    transition: all 0.3s ease;
}

.submenu-trans-scale .nav-d493a330-item.is-open .nav-d493a330-mega-panel {
    transform: scaleY(1);
}

@media (prefers-reduced-motion: reduce) {
    .nav-d493a330-mega-panel {
        transition: none !important;
        transform: none !important;
    }
}

.nav-d493a330-item.is-open .nav-d493a330-mega-panel {
    opacity: 1;
    visibility: visible;
}

.mega-panel-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 36px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 300px;
    gap: 40px;
}

.mega-col-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #767E96;
    margin: 0 0 20px 0;
    font-weight: 600;
}

.mega-col-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mega-link-card {
    display: flex;
    gap: 12px;
    text-decoration: none;
    align-items: flex-start;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.mega-link-card:hover {
    background: #F4F1EC;
}

.mega-link-icon {
    width: 32px;
    height: 32px;
    background: #F4F1EC;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1A2747;
    flex-shrink: 0;
}

.mega-link-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.mega-link-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mega-link-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #2C4276;
    transition: color 0.2s;
}

.mega-link-card:hover .mega-link-title {
    color: #E84A56;
}

.mega-link-desc {
    font-size: 12px;
    color: #767E96;
    line-height: 1.4;
}

/* Featured Card */
.mega-featured {
    background: #F4F1EC;
    border-radius: 12px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feat-tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #E84A56;
    font-weight: 700;
    margin-bottom: 12px;
}

.feat-title {
    font-size: 17px;
    font-style: italic;
    color: #1A2747;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.feat-sub {
    font-size: 12px;
    color: #767E96;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.feat-cta {
    font-size: 13.5px;
    font-weight: 700;
    color: #1A2747;
    text-decoration: none;
    margin-top: auto;
    transition: color 0.2s;
}

.feat-cta:hover {
    color: #E84A56;
}

.feat-placeholder {
    color: #767E96;
    font-style: italic;
    font-size: 14px;
    text-align: center;
    width: 100%;
    padding: 20px 0;
}

/* Fix for nested Elementor content inside Mega Menu */
.mega-featured .elementor {
    width: 100%;
}

/* Mobile Breakpoint - Increased to 1200px */
@media (max-width: 1200px) {
    .nav-d493a330-mobile-toggle {
        display: block;
    }

    .nav-d493a330-list {
        display: none;
        position: fixed; /* Ensures it is relative to the viewport, not its parent */
        top: calc(var(--e-global-typography-primary-line-height, 1) * 1em + 74px); /* Approx placement, script adjusts it */
        left: 0 !important; /* Force to left edge */
        right: 0 !important; /* Force to right edge */
        width: 100vw !important; /* Force full viewport width */
        margin-left: 0; 
        background: #ffffff;
        flex-direction: column;
        height: auto;
        max-height: 80vh;
        overflow-y: auto;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        z-index: 1000;
        gap: 0;
        box-sizing: border-box; /* Ensure padding doesn't push width out */
        transform: none !important; /* Prevent parent transforms from interfering */
    }

    .nav-d493a330-item {
        width: 100%;
        height: auto;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-d493a330-link {
        padding: 15px;
        border-radius: 0;
        border-bottom: 1px solid #f0f0f0;
        justify-content: space-between;
        white-space: normal; /* Allow text to wrap if necessary */
    }

    .nav-d493a330-mega-panel {
        position: static !important;
        opacity: 1;
        visibility: visible;
        transform: none !important;
        box-shadow: none;
        border: none;
        display: none; /* Handled by jQuery slideToggle */
        width: 100%; /* Changed from 100vw */
        box-sizing: border-box;
    }

    .mega-panel-inner {
        grid-template-columns: 1fr;
        padding: 20px 10px;
        gap: 30px;
        width: 100%;
        box-sizing: border-box;
    }
}
