/* =============================================
   Elementor Custom Navigation Menu - CSS
   ============================================= */

/* ---- NAVBAR BASE ---- */
.ecn-navbar {
    width: 100%;
    background-color: #1a1a2e;
    position: relative;
    z-index: 9999;
    box-sizing: border-box;
}

.ecn-navbar.ecn-sticky {
    position: sticky;
    top: 0;
    z-index: 99999;
}

.ecn-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    gap: 20px;
    flex-wrap: nowrap;
    box-sizing: border-box;
    width: 100%;
}

/* ---- LOGO ---- */
.ecn-logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.ecn-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
}

.ecn-logo img {
    height: auto;
    max-height: 60px;
    display: block;
    object-fit: contain;
}

/* ---- DESKTOP NAV LINKS ---- */
.ecn-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    flex: 1;
    justify-content: flex-end;
}

.ecn-nav-links > li {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.ecn-nav-links > li > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
}

.ecn-arrow {
    font-size: 0.6em;
    transition: transform 0.25s ease;
    display: inline-block;
    margin-left: 3px;
}

.ecn-has-dropdown:hover .ecn-arrow,
.ecn-has-dropdown.ecn-open .ecn-arrow {
    transform: rotate(180deg);
}

/* ---- DROPDOWN ---- */
.ecn-dropdown {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    background-color: #1a1a2e;
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 9999;

    /* Animation */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none;
}

/* Hover trigger */
.ecn-navbar[data-trigger="hover"] .ecn-has-dropdown:hover > .ecn-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Click trigger */
.ecn-has-dropdown.ecn-open > .ecn-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.ecn-dropdown li {
    display: block;
}

.ecn-dropdown a {
    display: block;
    padding: 10px 18px;
    text-decoration: none;
    color: #ffffff;
    font-size: 0.9rem;
    transition: color 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
}

.ecn-dropdown a:hover {
    background-color: rgba(255,255,255,0.08);
    color: #ffd700;
}

/* ---- BURGER BUTTON ---- */
.ecn-burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-sizing: content-box;
}

.ecn-burger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #ffffff;
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* Burger → X animation */
.ecn-burger.ecn-active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.ecn-burger.ecn-active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.ecn-burger.ecn-active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ---- MOBILE MENU — BASE ---- */
.ecn-mobile-menu {
    display: none;
    overflow: hidden;
    background-color: #1a1a2e;
    width: 100%;
    box-sizing: border-box;
}

/* --- SLIDE DOWN (default) --- */
.ecn-mobile-menu[data-open-type="slide-down"],
.ecn-mobile-menu:not([data-open-type]) {
    max-height: 0;
    transition: max-height var(--ecn-anim, 0.35s) cubic-bezier(0.4,0,0.2,1);
}
.ecn-mobile-menu[data-open-type="slide-down"].ecn-open,
.ecn-mobile-menu:not([data-open-type]).ecn-open {
    display: block;
    max-height: 1200px;
}

/* --- FADE --- */
.ecn-mobile-menu[data-open-type="fade"] {
    opacity: 0;
    transition: opacity var(--ecn-anim, 0.35s) ease;
}
.ecn-mobile-menu[data-open-type="fade"].ecn-open {
    display: block;
    opacity: 1;
}

/* --- SLIDE FROM RIGHT --- */
.ecn-mobile-menu[data-open-type="slide-left"] {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 280px;
    transform: translateX(100%);
    transition: transform var(--ecn-anim, 0.35s) cubic-bezier(0.4,0,0.2,1);
    z-index: 99998;
    overflow-y: auto;
}
.ecn-mobile-menu[data-open-type="slide-left"].ecn-open {
    display: block;
    transform: translateX(0);
}

/* --- SLIDE FROM LEFT --- */
.ecn-mobile-menu[data-open-type="slide-right"] {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    transform: translateX(-100%);
    transition: transform var(--ecn-anim, 0.35s) cubic-bezier(0.4,0,0.2,1);
    z-index: 99998;
    overflow-y: auto;
}
.ecn-mobile-menu[data-open-type="slide-right"].ecn-open {
    display: block;
    transform: translateX(0);
}

/* --- OVERLAY --- */
.ecn-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 99997;
    transition: opacity 0.3s ease;
    opacity: 0;
}
.ecn-mobile-overlay.ecn-open {
    display: block;
    opacity: 1;
}

/* ---- MOBILE LIST ---- */
.ecn-mobile-links {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.ecn-mobile-links > li {
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.ecn-mobile-links > li:last-child {
    border-bottom: none;
}

.ecn-mobile-links > li > a {
    display: block;
    padding: 14px 24px;
    text-decoration: none;
    color: #ffffff;
    font-size: 1rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    box-sizing: border-box;
}

.ecn-mobile-links > li > a:hover {
    background-color: rgba(255,255,255,0.07);
    color: #ffd700;
}

/* Mobile toggle button (for items with submenu) */
.ecn-mobile-item-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 24px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease, color 0.2s ease;
    box-sizing: border-box;
}

.ecn-mobile-item-toggle:hover {
    background-color: rgba(255,255,255,0.07);
}

.ecn-mobile-item-toggle .ecn-arrow {
    transition: transform 0.25s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.ecn-mobile-has-sub.ecn-open .ecn-mobile-item-toggle .ecn-arrow {
    transform: rotate(180deg);
}

/* Mobile Submenu */
.ecn-mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: rgba(0,0,0,0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.ecn-mobile-has-sub.ecn-open .ecn-mobile-submenu {
    max-height: 600px;
}

.ecn-mobile-submenu li {
    display: block;
}

.ecn-mobile-submenu li a {
    display: block;
    padding: 11px 24px 11px 38px;
    text-decoration: none;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-top: 1px solid rgba(255,255,255,0.05);
    box-sizing: border-box;
}

.ecn-mobile-submenu li a:hover {
    color: #ffd700;
    background-color: rgba(255,255,255,0.05);
}

/* ---- Elementor Editor notice ---- */
.elementor-editor-active .ecn-burger {
    display: flex !important;
    opacity: 0.4;
    pointer-events: none;
}
