/**
 * Добавки към главното меню
 *
 * Два елемента, добавени през Външен вид → Менюта:
 *   .usit-menu-cta - бутонът „Запиши се"; на десктоп такъв вече стои в хедъра,
 *                    затова тук се показва само в мобилното меню
 *   езиковият превключвател на Polylang - той се вписва като един елемент, но
 *                    Polylang го заменя с по един `li.lang-item` на език и слага
 *                    `.current-lang` на текущия. Затова стиловете по-долу се
 *                    държат за `.lang-item`, а не за класа на елемента.
 */

/* ------------------------------------------------------------------
   Бутон „Запиши се" - само на телефон и таблет
   ------------------------------------------------------------------ */
.et_pb_menu .et-menu > li.usit-menu-cta,
#top-menu > li.usit-menu-cta,
.et-menu > li.usit-menu-cta {
    display: none;
}

@media (max-width: 980px) {
    .et_mobile_menu li.usit-menu-cta {
        margin: 14px 16px 6px;
        padding: 0;
        border: 0;
    }

    .et_mobile_menu li.usit-menu-cta > a,
    .et-db #et-boc .et-l .et_mobile_menu li.usit-menu-cta > a {
        display: block;
        padding: 14px 24px !important;
        background: #cd243f;
        color: #fff !important;
        border-radius: 8px;
        font-weight: 700;
        text-align: center;
        text-transform: uppercase;
        letter-spacing: .4px;
        transition: background .2s ease;
    }

    .et_mobile_menu li.usit-menu-cta > a:hover,
    .et_mobile_menu li.usit-menu-cta > a:focus {
        background: #124961;
        color: #fff !important;
    }
}

/* ------------------------------------------------------------------
   Езиков превключвател в горната лента
   ------------------------------------------------------------------
   Лентата е тънка, с телефон и икони в чист бял текст - затова и езиците
   са само типография, без кутийки: текущият е плътно бял, другият -
   приглушен, разделени с тънка черта.
   ------------------------------------------------------------------ */
.usit-lang-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.usit-lang-switcher .usit-lang {
    position: relative;
    padding: 4px 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    line-height: 1;
    color: rgba(255, 255, 255, .55) !important;
    background: none;
    transition: color .2s ease;
}

.usit-lang-switcher .usit-lang:hover,
.usit-lang-switcher .usit-lang:focus {
    color: #fff !important;
}

.usit-lang-switcher .usit-lang.is-current {
    color: #fff !important;
    font-weight: 700;
}

/* тънка черта между двата езика */
.usit-lang-switcher .usit-lang + .usit-lang {
    margin-left: 9px;
    padding-left: 10px;
}

.usit-lang-switcher .usit-lang + .usit-lang::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 11px;
    background: rgba(255, 255, 255, .3);
}

/* Името на езика стои за екранни четци, но не се вижда */
.usit-lang-switcher .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* На телефон лентата е тясна - малко въздух встрани и по-голяма зона за пръст */
@media (max-width: 980px) {
    .usit-lang-switcher .usit-lang {
        padding: 6px 0;
        font-size: 12px;
    }
}

/* ------------------------------------------------------------------
   Езиците в менюто: скрити - превключвателят е в горната лента
   ------------------------------------------------------------------ */
.et-menu > li.lang-item,
#top-menu > li.lang-item {
    display: none !important;
}

/* ------------------------------------------------------------------
   Превключвателят стои до социалните икони
   ------------------------------------------------------------------
   Колоната им е `display:flex; justify-content:flex-end` от Divi, но без
   вертикално подравняване - затова модулът се лепеше за горния ръб.
   ------------------------------------------------------------------ */
.molti-top-bar .et_pb_column:last-child {
    align-items: center;
}

/* Divi дава на модулите долен отстъп; в един ред той измества нещата */
.molti-top-bar .et_pb_column:last-child > .et_pb_module {
    margin-bottom: 0 !important;
}

/* въздух между езиците и иконите */
.molti-top-bar .et_pb_code:has(.usit-lang-switcher) {
    margin-right: 18px;
}

/* за браузъри без :has() - същият отстъп отвътре */
.molti-top-bar .usit-lang-switcher {
    margin-right: 18px;
}

.molti-top-bar .et_pb_code:has(.usit-lang-switcher) .usit-lang-switcher {
    margin-right: 0;
}

/* ------------------------------------------------------------------
   Социалните икони на телефон
   ------------------------------------------------------------------
   В горната лента се сбиват до номера, затова там се крият, а menu.js ги
   мести в дъното на мобилното меню. Скриването е с visibility, не с
   display:none - модулът трябва да остане мерим, за да може да се върне
   обратно при завъртане на телефона.
   ------------------------------------------------------------------ */
@media (max-width: 980px) {
    .molti-top-bar .et_pb_column:last-child > .et_pb_social_media_follow {
        display: none !important;
    }

    /* иконите, вече в менюто */
    .et_mobile_menu li.usit-menu-social,
    .et-db #et-boc .et-l .et_mobile_menu li.usit-menu-social {
        padding: 18px 16px 6px !important;
        border: 0 !important;
        text-align: center;
    }

    .et_mobile_menu li.usit-menu-social .et_pb_social_media_follow {
        margin: 0 !important;
        text-align: center !important;
    }

    .et_mobile_menu li.usit-menu-social .et_pb_social_media_follow li {
        display: inline-block !important;
        float: none !important;
        margin: 0 5px 0 !important;
        padding: 0 !important;
        width: auto !important;
        border: 0 !important;
    }

    /* в лентата иконите са бели върху червено; в менюто фонът е светъл */
    .et_mobile_menu li.usit-menu-social .et_pb_social_media_follow li a.icon {
        width: 38px !important;
        height: 38px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .et_mobile_menu li.usit-menu-social .et_pb_social_media_follow li a.icon:before {
        position: static !important;
        margin: 0 !important;
        line-height: 1 !important;
    }
}
