body.ems-mobile-menu-open {
    overflow: hidden;
}
.ems-mega-menu {
    position: relative;
    padding: 9px 0;
}
.ems-mega-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ems-right-block-inner.left .ems-link-text {
    border-left: 2px solid #FF0046;
}
.ems-mega-menu > ul.ems-main-menu {
    display: flex;
    gap: 40px;
    align-items: center;
}
.ems-mega-menu .ems-menu-item > a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    padding: 5px 0;
    font-size: 18px;
}


/* .ems-mega-dropdown {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    background-color: #00164a;
    display: none;
    padding: 40px 60px;
    z-index: 99;
} */
 /* .ems-mega-dropdown {
    display: none;
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    width: 100vw; 
    max-width: 100vw;
    background-color: #001445;
    padding: 40px 60px;
    z-index: 99;
    box-sizing: border-box;
} */
 .ems-mega-dropdown {
   
    position: absolute;
    left: 0;
    width: 100%; 
    background: #fff; 
    z-index: 99;
        display: none;
    
    /* width: 100vw;
       left: 50%;
       right: 50%;
       margin-left: -50vw;
       margin-right: -50vw; */
}

.ems-mega-content-inner {
   
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
}
ul.ems-submenu {
    padding: 0 !important;
}
.ems-menu-item.ems-open > .ems-mega-dropdown {
    display: flex;
    justify-content: space-between;
    gap: 50px;
}
.ems-mega-left {
    width: 50%;
}
.ems-mega-left li a {
    color: white;
}
.ems-mega-right {
    width: 50%;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}
.ems-mega-left ul.ems-submenu > li > a {
    display: block;
    padding: 15px 0;
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
    font-weight: 700;
}
.ems-mega-left ul.ems-submenu > li > a:hover {
    color: #ff0050;
}
.ems-mega-left ul.ems-submenu ul {
    padding-left: 20px;
    margin-top: 5px;
    border-left: 1px solid rgba(255,255,255,0.2);
}


.ems-right-block {
    /* flex: 1; */
    /* background: #001b57; */
    /* padding: 20px; */
    /* border-radius: 8px; */
    color: #fff;
}
.ems-right-block img {
    width: 100%;
    /* transition: transform 0.3s; */
    background: #fff;
    /* height: 270px; */
    aspect-ratio: 2 / 1.5;
    max-height: 270px;
    object-fit: cover;
}
span.ems-link-text {
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 90%;
    color: white;
    padding-left: 15px;
}
/* span.ems-link-text:first-child{
border-left: 2px solid #00F;
}
span.ems-link-text:last-of-type{
border-left: 2px solid #FF0046;
} */
 .ems-mega-right .ems-right-block:first-child .ems-link-text {
    border-left: 2px solid #00F;
}

.ems-mega-right .ems-right-block:last-child .ems-link-text {
    border-left: 2px solid #FF0046;
}

.ems-right-block-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

/* .ems-right-block img:hover {
    transform: scale(1.05);
} */


.ems-mobile-menu-toggle {
    display: none;
    width: 32px;
    height: 24px;
    position: relative;
    cursor: pointer;
    z-index: 10001;
}
.ems-mobile-menu-toggle span {
    position: absolute;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    left: 0;
    transition: all 0.3s ease;
}
.ems-mobile-menu-toggle span:nth-child(1) { top: 0; }
.ems-mobile-menu-toggle span:nth-child(2) { top: 10px; }
.ems-mobile-menu-toggle span:nth-child(3) { bottom: 0; }

.ems-mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 10px;
}
.ems-mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.ems-mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 10px;
}






/* HOBER */
/* Основният линк */
.ems-menu-item {
    position: relative; /* Важно: за да позиционираме линията спрямо линка */
    text-decoration: none; /* Махаме стандартната черта, ако има такава */
    display: inline-block; /* Препоръчително за правилно изчисляване на ширината */
    padding-bottom: 2px; /* Малко разстояние между текста и линията */
}

/* Линията (бордърът) */
.ems-menu-item::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px; /* Дебелина на бордъра */
    bottom: 0;
    left: 0;
    background-color: #FF0046; /* Цвят на бордъра - смени го с твоя */
    
    /* Анимацията */
    transform: scaleX(0); /* Начално състояние: ширина 0 */
    transform-origin: bottom left; /* Фиксираме началото в ляво */
    transition: transform 0.3s ease-in-out; /* Плавна анимация */
}

/* Състояние при Ховър */
.ems-menu-item:hover::after {
    transform: scaleX(1); /* Крайно състояние: пълна ширина */
}
/* END OF HOVER */


@media (max-width: 1024px) {
   
    .ems-mobile-menu-toggle {
        display: block;
    }

    .ems-mega-content-inner {
    flex-direction: column;
    width: 100% !important;
}

.ems-right-block img {
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

   
    .ems-mega-menu > ul.ems-main-menu {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 60px;
        left: 0;
        /* width: 100%; */
        width: 100vw;
        background: #00164a;
        z-index: 9998;
        padding: 20px 25px;
        gap: 10px;
        height: calc(100vh - 60px);
        overflow-y: auto;
        transition: all 0.3s ease;
    }

    
    .ems-main-menu.ems-mobile-visible {
        display: flex !important;
        animation: emsSlideIn 0.3s ease forwards;
    }

    @keyframes emsSlideIn {
        from { opacity: 0; transform: translateY(-20px); }
        to { opacity: 1; transform: translateY(0); }
    }

   
    .ems-main-menu a {
        color: #fff;
        font-size: 18px;
        text-decoration: none;
        padding: 10px 0;
        display: block;
        /* border-bottom: 1px solid rgba(255,255,255,0.1); */
    }

    
    .ems-mega-dropdown {
        display: none !important;
        transform: unset;
    }

   
    .ems-mobile-layer {
        position: fixed;
        left: 100%;
        top: 0;
        width: 100%;
        height: 100%;
        background: #00164a;
        color: #fff;
        z-index: 9999;
        overflow-y: auto;
        transition: left 0.3s ease;
        padding: 25px;
    }
    body.admin-bar .ems-mobile-layer {
    top: 46px;
    height: calc(100% - 46px);
}
body.admin-bar .ems-main-menu.ems-mobile-visible{
top: 46px;
height: calc(100% - 46px);
        padding-top: 50px;
}
    .ems-mobile-layer.active {
        left: 0;
    }
    .ems-mobile-back {
        font-weight: 600;
        margin-bottom: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 18px;
                left: -10px;
        position: relative;
    }

    .ems-mobile-layer .ems-mega-left ul.ems-submenu > li > a {
        padding: 12px 0;
        display: block;
        color: #fff;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    ul.ems-main-menu {
        align-items: flex-start;
    }

    li.ems-menu-item {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
         display: flex;
        align-items: center;
    }
    li.ems-menu-item a{
        width: 100%;
    }
    li.ems-menu-item svg {
        transform: rotate(-90deg);
    }
    .ems-mega-left li{
        width: 100%;
        list-style: none;
    }
    .ems-mega-left .ems-submenu{
        padding: 0;
    }
    .ems-mega-left {
        width: 100%;
    }
    .ems-mega-right {
    width: 100% !important;
    /* width: 50%; */
    flex-direction: column;
    margin-top: 50px;
}
.ems-extra-button-wrapper {
    display: flex !important;
    width: 100%;
    margin-top: 40px;
}
li.ems-extra-button {
    width: 100%;
}
li.ems-extra-button a {
    padding: 15px 20px;
    align-self: stretch;
    background: #FF0046;
    text-align: center;
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    line-height: 100%;
    width: 100%;
}
li.ems-social-button svg {
    width: 32px;
    height: 32px;
     fill: white;
}



.ems-social-buttons-wrapper {
    display: flex !important;
    gap: 15px;
    margin-top: 40px;
    flex-direction: column;
    align-items: center;
}
.ems-social-buttons-list {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}
.ems-social-buttons-wrapper span {
    color: white;
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 90%;
}




}

.ems-mobile-layer .ems-mega-dropdown {
    display: block !important;
    position: static !important;
    width: 100%;
    padding: 0;
    background: transparent;
}






@media (max-width: 1024px) {
    

    .ems-mobile-layer * {
        box-sizing: border-box !important;
    }

    
    .ems-mobile-layer {
        position: fixed;
        left: 100%;
        top: 0;
        width: 100vw;
        height: 100vh;
        background: #00164a;
        z-index: 9999;
        overflow-y: auto;
        overflow-x: hidden; 
        padding: 20px; 
        transition: left 0.3s ease;
    }

    body.admin-bar .ems-mobile-layer {
        top: 46px;
        height: calc(100vh - 46px);
    }

    .ems-mobile-layer.active {
        left: 0;
        height: 100dvh !important;
    }

   
    .ems-mobile-layer .ems-mega-dropdown {
        display: block !important;
        position: static !important;
        width: 100% !important;
        height: auto !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

   
    .ems-mobile-layer .ems-mega-content-inner {
        display: flex !important;
        flex-direction: column !important;
        
        
        width: 100% !important; 
        min-width: 0 !important;
        max-width: 100% !important;
        
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        left: auto !important;
        right: auto !important;
    }

   
    .ems-mobile-layer .ems-mega-left {
        width: 100% !important;
        display: block !important;
    }

    
    .ems-mobile-layer .ems-mega-right {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important; 
        max-width: 100% !important;
        margin-top: 30px !important;
        gap: 20px !important;
        padding: 0 !important;
    }

   
    .ems-mobile-layer .ems-right-block {
        width: 100% !important;
        display: block !important;
        margin: 0 !important;
    }

    
    .ems-mobile-layer .ems-right-block img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: cover; 
        display: block;
    }

    
    .ems-right-block-inner {
        width: 100% !important;
        box-sizing: border-box !important;
        display: flex;
        justify-content: space-between;
        margin-bottom: 10px;
    }

   
    .ems-mobile-menu-toggle { display: block; }
    .ems-mega-menu > ul.ems-main-menu { display: none; }
    .ems-mobile-back { 
        font-weight: 600; margin-bottom: 20px; cursor: pointer; 
        display: flex; align-items: center; gap: 6px; font-size: 18px; 
    }
    
  
    .ems-extra-button-wrapper, 
    .ems-social-buttons-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    li.ems-extra-button a {
        box-sizing: border-box;
        width: 100%;
        display: block;
    }
}