/* === Centralized Unified Mega Menu === */

/* Ensure parent nav can be a reference point if needed, or we position relative to body/header */
.amd-nav {
    position: relative;
    /* Make the container relative to the nav */
    display: flex;
    justify-content: center;
}

/* 
   THE OUTER WRAPPER (Blurry Backdrop) 
   - Acts as the "Outer Card" or "Backdrop Wrapper"
   - Light transparency (Green tint or White as requested).
   - Padding creates the "gap" between glass edge and inner card.
   - NO Border (as requested).
*/
.amd-mega-menu-container {
    position: absolute;
    top: 100%;
    /* Below the nav items */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 740px;
    /* Width = Inner Card (700) + Padding (20*2) approx */

    /* GLASS EFFECT (Background) */
    /* Brand Accent Tint (#53BFC3 -> 83, 191, 195) */
    background: rgba(83, 191, 195, 0.15);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);

    /* Layout */
    padding: 12px;
    /* Gap between glass and card */
    border-radius: 20px;
    /* Outer radius */

    /* Soft shadow for the floating effect */
    box-shadow: 0 20px 40px -4px rgba(0, 0, 0, 0.1);

    /* Visibility State */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* Prevent clicks when hidden */

    /* Smooth transitions for container appearance */
    transition: opacity 0.2s ease, visibility 0.2s, transform 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);

    z-index: 1000;
}

/* 
   THE INNER CARD (Solid White)
   - Actual menu content sits here.
   - Solid White background.
   - Rounded corners.
   - Box Shadow for depth relative to the glass.
*/
.amd-mega-menu-card {
    /* Inner Glass Effect */
    background: rgba(255, 255, 255, 1);
    /* Slightly transparent white */


    border-radius: 12px;
    padding: 24px;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.03),
        0 1px 2px rgba(0, 0, 0, 0.02);
    width: 100%;
    min-height: 200px;
    /* Prevent collapse during load/transition */
    position: relative;
    overflow: hidden;
    /* Ensure slide animations stay inside */
}

/* Active State */
.amd-mega-menu-container.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Content Container for Animations */
.amd-mega-menu-content {
    /* Ensures content takes up space */
    width: 100%;
}

/* Directional Animations for CONTENT */
/* Enter from Right (moving Left -> Right on nav) */
.amd-mega-menu-content.enter-from-right {
    animation: contentSlideInRight 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

/* Enter from Left (moving Right -> Left on nav) */
.amd-mega-menu-content.enter-from-left {
    animation: contentSlideInLeft 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes contentSlideInRight {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes contentSlideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Inner Layout (Existing styles adapted) */
.amd-mega-menu-inner {
    display: flex;
    justify-content: space-between;
    gap: 32px;
}

.amd-mega-column {
    flex: 1;
}

.amd-mega-title {
    color: var(--amd-s-text);
    font-size: 11px;
    /* Smaller, sharper uppercase label */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    opacity: 0.6;
}

.amd-mega-list,
.amd-mega-text-list {
    list-style: none !important;
    /* Force remove default dots */
    padding: 0;
    margin: 0;
}

.amd-mega-list li,
.amd-mega-text-list li {
    list-style: none !important;
    /* Double ensure no dots on items */
    margin-bottom: 4px;
}

/* Mega Link (Icon + Text) */
.amd-mega-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    /* Matching rounded feel */
    text-decoration: none;
    transition: all 0.2s ease;
}

.amd-mega-link:hover {
    background-color: rgba(0, 0, 0, 0.03);
    /* Subtle hover bg */
}

.amd-mega-link-title {
    display: block;
    font-weight: 600;
    color: var(--amd-s-heading);
    margin-bottom: 2px;
    font-size: 15px;
}

.amd-mega-link-desc {
    display: block;
    font-size: 13px;
    color: var(--amd-s-text);
    line-height: 1.4;
    opacity: 0.8;
}

/* New Logic for Lucide SVGs */
.amd-mega-icon-svg {
    min-width: 20px;
    min-height: 20px;
    margin-top: 2px;
    color: var(--amd-s-heading);
    transition: color 0.2s ease, transform 0.2s ease;
    opacity: 0.7;
}

.amd-mega-link:hover .amd-mega-icon-svg {
    /* Set icon color to the accent/brand color on hover */
    color: var(--amd-s-accent);
    opacity: 1;
    transform: scale(1.1);
    /* Slightly bolder pop */
}

.amd-mega-text-list a {
    display: block;
    padding: 8px 12px;
    font-size: 15px;
    color: var(--amd-s-heading);
    border-radius: 6px;
    transition: all 0.2s;
    text-decoration: none;
    font-weight: 500;
}

.amd-mega-text-list a:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.amd-label-small {
    font-size: 9px;
    text-transform: uppercase;
    background: var(--amd-s-accent);
    color: var(--amd-s-accented-text);
    padding: 3px 6px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: 700;
    vertical-align: middle;
    letter-spacing: 0.05em;
}