/* =========================================
   ELEMENTOR WIDGET: LOGO SPLIT MENU
   ========================================= */
.olla-logo-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

.olm-left,
.olm-right {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 40px;
    /* Space between items */
}

/* Ensure dynamic menus (which might inject div/ul) behave correctly */
.olm-wp-menu ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 40px;
}

.olm-wp-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.olm-left {
    justify-content: flex-end;
    flex: 1;
    /* Center Logo: push against logo equally */
}

.olm-right {
    justify-content: flex-start;
    flex: 1;
    /* Center Logo: push against logo equally */
}

.olm-logo {
    margin: 0 50px;
    /* Space around logo */
    flex-shrink: 0;
}

.olm-logo img {
    display: block;
    margin-bottom: 0 !important;
    /* Override .size-full default margin */
}

.olm-item,
.olm-wp-menu li {
    position: relative;
    display: flex;
    /* Ensure badge positioning works relative to item if needed */
    align-items: center;
}

.olm-link,
.olm-wp-menu a {
    position: relative;
    /* Ensure bridge anchors to link, not wrapper */
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    display: block;
    line-height: 1;
    /* color set by control */
}

/* =========================================
   HIGHLIGHT STYLE (EID 26 ANIMATION)
   ========================================= */
.olm-highlight .olm-link {
    --eid-red: #ff2a2a;
    --eid-bg: rgba(255, 42, 42, 0.12);

    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 18px;
    border-radius: 999px;

    border: 1.5px solid var(--eid-red);
    background: var(--eid-bg);

    color: #fff !important;
    /* Force override local color controls if highlighted */
    font-weight: 700;
    letter-spacing: .3px;
    line-height: 1;

    box-shadow:
        0 0 0 3px rgba(255, 42, 42, .12),
        0 10px 25px rgba(255, 42, 42, .18);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        background .25s ease;

    /* Animations */
    animation:
        eidGlow 2.8s ease-in-out infinite;
}

/* Hover Effect */
.olm-highlight .olm-link:hover {
    transform: translateY(-2px) scale(1.03);
    background: rgba(255, 42, 42, .18);
    color: #fff !important;

    box-shadow:
        0 0 0 5px rgba(255, 42, 42, .22),
        0 16px 38px rgba(255, 42, 42, .35);
}

/* Badge Style (Pulsing "EID" Badge) */
/* Targeted either via direct .olm-badge or if user uses custom CSS class. 
   Here we style the .olm-badge inside a highlighted item. */
.olm-highlight .olm-badge {
    position: absolute;
    top: -12px;
    right: -10px;
    /* Adjusted for item container */

    padding: 4px 9px;
    border-radius: 999px;

    background: #ff2a2a;
    /* Hardcoded red to match style */
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .4px;

    box-shadow: 0 8px 18px rgba(255, 42, 42, .35);

    animation: eidBadgePulse 1.8s ease-in-out infinite;
    z-index: 2;
    line-height: 1;
}

/* Animations */
@keyframes eidGlow {

    0%,
    100% {
        box-shadow:
            0 0 0 3px rgba(255, 42, 42, .12),
            0 10px 25px rgba(255, 42, 42, .18);
    }

    50% {
        box-shadow:
            0 0 0 6px rgba(255, 42, 42, .22),
            0 14px 35px rgba(255, 42, 42, .35);
    }
}

@keyframes eidBadgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Current-menu-item highlight for WP Menu */
.olm-wp-menu .current-menu-item>a {
    font-weight: 700;
}

/* Default Badge (if not highlighted) */
.olm-badge {
    position: absolute;
    top: -15px;
    right: -25px;
    background: #000;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    white-space: nowrap;
}

/* Override default badge if inside highlight */
.olm-highlight .olm-badge {
    /* Reset default positioning if needed, but our specific selector above handles it */
}

@media (max-width: 1024px) {
    .olla-logo-menu {
        flex-direction: column;
        gap: 20px;
    }

    .olm-logo {
        order: -1;
        /* Logo top on mobile/tablet */
        margin-bottom: 20px;
    }

    .olm-left,
    .olm-right {
        gap: 20px;
        justify-content: center;
        flex: auto;
        /* Reset flex on mobile */
    }

    .olm-highlight .olm-link {
        animation: none;
        padding: 8px 14px;
        font-size: 14px;
    }

    .olm-highlight .olm-badge {
        display: none;
        /* Hide badge on mobile per original CSS */
    }
}

@media (prefers-reduced-motion: reduce) {

    .olm-highlight .olm-link,
    .olm-highlight .olm-badge {
        animation: none !important;
    }
}

/* =========================================
   MEGA MENU DROPDOWN
   ========================================= */
/* =========================================
   MEGA MENU DROPDOWN
   ========================================= */

/* Parent Positioning Logic */
.olm-item {
    position: relative;
    /* Default */
}

/* Full Width Items: Break out of relative flow */
.olm-fw-item {
    position: static !important;
}

/* Relative Items: Keep flow (for center/left/right menus) */
.olm-rel-item {
    position: relative !important;
}

/* Ensure Wrapper is the Anchor for Static Items */
.olla-logo-menu {
    position: relative;
}


.olm-megamenu-dropdown {
    position: absolute;
    /* Dynamic Top Offset */
    top: calc(100% + var(--olm-mm-top, 0px));

    background: #fff;
    padding: 0;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.08), 0 10px 20px rgba(0, 0, 0, 0.04);

    /* Animation State */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    /* Prevent catching hovers when hidden */

    /* Smooth Transition: Delay visibility on Hide */
    transition:
        opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        visibility 0s linear 0.3s;

    z-index: 999;
    border-radius: 0;

    box-sizing: border-box;
    cursor: default;
    text-align: left;
}

/* --- Width Variations --- */

/* 1. Full Width (Static Breakout) */
.olm-mm-full_width {
    width: 100vw;

    /* Center in Window/Wrapper */
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;

    max-width: none;
    transform: translateY(15px);
    /* Start slightly down */
}

/* 2. Content Width (Fixed 1200px) */
.olm-mm-content_width {
    width: 1200px;
    max-width: 95vw;
}

/* 3. Custom Width */
.olm-mm-custom_width {
    width: var(--olm-mm-width, 600px);
    max-width: 95vw;
}

/* --- Positioning (For Content/Custom Width) --- */

/* Center */
.olm-mm-center {
    left: 50%;
    transform: translateX(-50%) translateY(15px);
}

/* Left */
.olm-mm-left {
    left: 0;
    transform: translateY(15px);
}

/* Right */
.olm-mm-right {
    right: 0;
    left: auto;
    transform: translateY(15px);
}


/* --- Hover Interactions --- */

/* Show Mega Menu */
.olm-item:hover .olm-megamenu-dropdown {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    /* Active when hovered */
    transition-delay: 0s;
    /* Instant Show */
}

/* Animate Up on Hover */
.olm-item:hover .olm-mm-full_width {
    transform: translateY(0);
}

.olm-item:hover .olm-mm-center {
    transform: translateX(-50%) translateY(0);
}

.olm-item:hover .olm-mm-left,
.olm-item:hover .olm-mm-right {
    transform: translateY(0);
}

/* Interaction Bridge (Only for items with Mega Menu) */
.olm-item.olm-has-megamenu>.olm-link::after {
    content: '';
    position: absolute;
    /* Bridge anchors to the LINK now */
    top: 100%;
    left: 0;
    width: 100%;
    /* 
       Height should cover the gap (--olm-mm-top). 
       Adding a small buffer (10px) to ensure mouse transition.
       If user wants STRICT hover, we reduce buffer. 
       User said: "Only when cursor on menu". 
       So we keep it minimal.
    */
    height: calc(var(--olm-mm-top, 0px) + 10px);
    background: transparent;
    z-index: 900;
    /* Debug: background: rgba(255,0,0,0.1); */
}

/* Mobile: Hide mega menu or handle differently */
@media (max-width: 1024px) {
    .olm-megamenu-dropdown {
        display: none;
    }
}