.top-bar-custom {
    background: #fff;
    max-height: 44px;
    overflow: hidden;
    transition: max-height .3s ease, opacity .3s ease;
}

.top-bar-custom.topbar-hidden {
    max-height: 0;
    opacity: 0;
}

.top-bar-inner {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    padding: 8px 0;
}

.top-bar-phone {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #7C2983;
    font-size: 14px;
    text-decoration: none;
}

.top-bar-lang {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-lang .lang-item img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

@media (max-width: 991px) {
    .top-bar-inner {
        gap: 12px;
        padding: 6px 0;
    }
    .top-bar-lang .lang-item img {
        width: 24px;
        height: 24px;
    }
}

@media (min-width: 992px) {
    .top-bar-custom .container {
        max-width: 960px !important;
        margin: 0 auto !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

@media (min-width: 1200px) {
    .top-bar-custom .container {
        max-width: 1150px !important;
    }
}
/* Language selector: flag + EN / ES label */
.top-bar-lang { gap: 14px; }
.top-bar-lang .lang-item { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; transition: opacity .2s ease; }
.top-bar-lang .lang-item img { opacity: .75; transition: opacity .2s ease; }
.top-bar-lang .lang-item.is-active img, .top-bar-lang .lang-item:hover img, .top-bar-lang .lang-item:focus-visible img { opacity: 1; }
.top-bar-lang .lang-item:hover, .top-bar-lang .lang-item:focus-visible { opacity: 1; }
.top-bar-lang .lang-item.is-active { opacity: 1; }
.top-bar-lang .lang-item.is-active .lang-code { border-bottom: 2px solid #14D7CD; }
.top-bar-lang .lang-code { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: #7C2983; line-height: 1.2; border-bottom: 2px solid transparent; }

/* Audience quick links (participants / sponsors & CROs / physicians) */
.top-bar-audience { display: flex; align-items: center; gap: 22px; margin-right: auto; }
.top-bar-audience a { font-size: 13px; font-weight: 500; letter-spacing: .02em; color: #5a1d61; text-decoration: none; padding: 2px 0; border-bottom: 2px solid transparent; transition: border-color .2s ease, color .2s ease; }
.top-bar-audience a:hover, .top-bar-audience a:focus-visible { color: #7C2983; border-bottom-color: #14D7CD; }
@media (max-width: 767px) { .top-bar-audience { display: none; } }
@media (min-width: 768px) and (max-width: 991px) { .top-bar-audience { gap: 14px; } .top-bar-audience a { font-size: 12px; } }

/* Keyboard accessibility */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 10000; background: #7C2983; color: #fff; padding: 10px 16px; border-radius: 0 0 10px 10px; font-weight: 600; text-decoration: none; transition: top .15s ease; }
.skip-link:focus { top: 0; color: #fff; outline: 3px solid #14D7CD; }
:focus-visible { outline: 3px solid #14D7CD; outline-offset: 2px; }
#main-content:focus { outline: none; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
