/* Separate language links from the theme's social-icon link styles. */
#ct-header-wrap .ct-header-language-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-inline-end: 15px;
}
#ct-header-wrap .ct-language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    flex-shrink: 0;
    color: inherit;
}
#ct-header-wrap .ct-header-language-mobile { display: none; }
#ct-header-wrap .ct-language-dropdown { position: relative; }
#ct-header-wrap .ct-language-dropdown summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 39px;
    padding: 5px 10px;
    cursor: pointer;
    list-style: none;
    font-size: 13px;
    line-height: 1.4;
}
#ct-header-wrap .ct-language-dropdown summary::-webkit-details-marker { display: none; }
#ct-header-wrap .ct-language-dropdown summary::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-inline-start: 5px;
    border-inline-end: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
}
#ct-header-wrap .ct-language-dropdown[open] summary::after { transform: rotate(225deg); }
#ct-header-wrap .ct-language-dropdown img {
    display: inline-block;
    flex-shrink: 0;
    width: 18px;
    height: 12px;
    object-fit: contain;
}
#ct-header-wrap .ct-language-list {
    position: absolute;
    inset-inline-end: 0;
    top: 100%;
    z-index: 1100;
    min-width: 160px;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    background: #fff;
    color: #222;
    border: 1px solid #e9e9e9;
    border-radius: 4px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .12);
}
#ct-header-wrap .ct-language-list li { margin: 0; padding: 0; }
#ct-header-wrap .ct-language-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: #222;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
}
#ct-header-wrap .ct-language-list a:hover,
#ct-header-wrap .ct-language-list a:focus,
#ct-header-wrap .ct-language-list .current-lang a { background: #f3f5f7; }
#ct-header-wrap .ct-language-dropdown summary:focus-visible,
#ct-header-wrap .ct-language-list a:focus-visible { outline: 2px solid #218bc3; outline-offset: 2px; }
/* Keep WPML's original dark-topbar text readable in layout 1. */
#ct-header-wrap.ct-header-layout1 .ct-language-switcher .wpml-ls-item > a,
#ct-header-wrap .ct-header-language-mobile .ct-language-switcher .wpml-ls-item > a { color: #222; }
@media (max-width: 1199px) {
    #ct-header-wrap .ct-header-language-mobile {
        display: flex;
        justify-content: center;
        padding: 12px 15px;
    }
    #ct-header-wrap .ct-header-language-mobile .ct-language-list {
        position: static;
        margin-top: 5px;
    }
}

#ct-header-wrap .ct-language-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #218bc3;
    font-size: 28px;
    line-height: 1;
}

/* Show this copy only in the fixed desktop navigation. */
#ct-header-wrap .ct-header-language-sticky { display: none; }
@media (min-width: 1200px) {
    #ct-header-wrap #ct-header.h-fixed .ct-header-language-sticky {
        display: flex;
        align-items: center;
        margin-inline-start: 16px;
    }
    #ct-header-wrap #ct-header.h-fixed .ct-header-language-sticky .wpml-ls-item > a {
        color: #222;
    }
}

/* Reserve room for the added language selector in layout 1's fixed row. */
@media (min-width: 1200px) {
    #ct-header-wrap.ct-header-layout1 #ct-header.h-fixed > .container > .row {
        flex-wrap: nowrap;
    }
    #ct-header-wrap.ct-header-layout1 #ct-header.h-fixed .ct-header-branding {
        flex: 0 0 auto;
        margin: 0 10px;
    }
    #ct-header-wrap.ct-header-layout1 #ct-header.h-fixed .ct-header-branding img {
        max-width: 180px;
    }
    #ct-header-wrap.ct-header-layout1 #ct-header.h-fixed .ct-header-navigation {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0 8px;
        justify-content: flex-end;
    }
    #ct-header-wrap.ct-header-layout1 #ct-header.h-fixed .ct-main-navigation {
        min-width: 0;
    }
    #ct-header-wrap.ct-header-layout1 #ct-header.h-fixed .ct-main-menu {
        display: flex;
        flex-wrap: nowrap;
        white-space: nowrap;
    }
    #ct-header-wrap.ct-header-layout1 #ct-header.h-fixed .ct-main-menu > li {
        float: none;
        margin: 0 6px;
    }
    #ct-header-wrap.ct-header-layout1 #ct-header.h-fixed .ct-main-menu > li > a {
        padding: 0 3px;
        font-size: 15px;
    }
    #ct-header-wrap.ct-header-layout1 #ct-header.h-fixed .ct-header-meta {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        margin-inline-start: 10px;
    }
    #ct-header-wrap.ct-header-layout1 #ct-header.h-fixed .ct-header-language-sticky {
        margin-inline-start: 10px;
    }
    #ct-header-wrap.ct-header-layout1 #ct-header.h-fixed .ct-language-switcher {
        gap: 8px;
    }
    #ct-header-wrap.ct-header-layout1 #ct-header.h-fixed .ct-language-icon {
        font-size: 24px;
    }
    #ct-header-wrap.ct-header-layout1 #ct-header.h-fixed .ct-header-button {
        flex: 0 0 auto;
        padding: 0 8px;
    }
    #ct-header-wrap.ct-header-layout1 #ct-header.h-fixed .ct-header-button.style1 .btn {
        padding: 0 18px;
        white-space: nowrap;
    }
}
