/* Cabeçalho modernizado inspirado no portal do Senado */
.alms-modern-header {
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 34, 58, 0.08);
    position: relative;
    z-index: 20;
}

.alms-utility-bar {
    width: 100%;
    background: linear-gradient(90deg, #0d4f87 0%, #0c6db0 100%);
}

.alms-utility-shell {
    min-height: 118px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 18px 0;
}

.alms-brand-links,
.alms-social-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.alms-brand-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.alms-brand-links a {
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid #d6e4f2;
    background: rgba(255, 255, 255, 0.9);
    color: #0d3b66;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.alms-brand-links a:hover,
.alms-brand-links a:focus {
    color: #1f6aa5;
    border-color: #b8d1e6;
    background: #ffffff;
    text-decoration: none;
}

.alms-brand-logo--utility {
    flex: 0 0 auto;
}

.alms-brand-logo--utility img {
    max-width: 250px;
}

.alms-utility-actions {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.alms-utility-button {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
}

.alms-utility-button:hover,
.alms-utility-button:focus {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

.alms-utility-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 16px;
    flex: 0 0 38px;
}

.alms-utility-text {
    font-size: 14px;
    line-height: 1.25;
    font-weight: 600;
}

.alms-brand-bar {
    background: linear-gradient(180deg, #f8fbff 0%, #eef5fb 100%);
    border-bottom: 1px solid #d6e4f2;
}

.alms-brand-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 22px 0;
}

.alms-brand-logo {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.alms-brand-logo a {
    display: inline-flex;
    align-items: center;
}

.alms-brand-logo img {
    max-width: 100%;
    height: auto;
}

.alms-brand-copy {
    color: #0d3b66;
}

.alms-brand-kicker {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1f6aa5;
    margin-bottom: 6px;
}

.alms-brand-copy h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 700;
}

.alms-brand-copy p {
    margin: 8px 0 0;
    font-size: 14px;
    color: #4f6478;
}

.alms-brand-tools {
    display: flex;
    flex: 0 1 520px;
    justify-content: flex-end;
}

.alms-social-panel,
.alms-search-panel {
    background: #ffffff;
    border: 1px solid #d9e6f2;
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 10px 24px rgba(12, 45, 78, 0.08);
}

.alms-panel-title,
.alms-search-label {
    display: block;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1f6aa5;
}

.alms-social-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.alms-social-list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #f1f7fd;
    border: 1px solid #d7e7f6;
    color: #0d3b66;
    transition: all 0.2s ease;
}

.alms-social-list a:hover,
.alms-social-list a:focus {
    background: #0d3b66;
    border-color: #0d3b66;
    color: #ffffff;
    transform: translateY(-1px);
    text-decoration: none;
}

.alms-social-list .fa,
.alms-social-list img {
    width: 18px;
    height: 18px;
}

.alms-search-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.alms-search-group .select2-container {
    flex: 1 1 auto;
    min-width: 0;
}

.alms-search-group .input-group-btn {
    display: flex;
}

.alms-search-group .select2-container .select2-selection--multiple {
    min-height: 44px;
    border: 1px solid #c9d9e8;
    border-radius: 10px 0 0 10px;
    padding: 6px 10px;
    background: #fbfdff;
}

.alms-search-group .btn {
    min-width: 54px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 10px 10px 0;
    background: linear-gradient(180deg, #1f6aa5 0%, #0d3b66 100%);
    border-color: #0d3b66;
    color: #ffffff;
    font-weight: 600;
}

.alms-search-group .btn:hover,
.alms-search-group .btn:focus {
    background: #0b3156;
    border-color: #0b3156;
    color: #ffffff;
}

.alms-main-navbar {
    margin-bottom: 0;
    border: 0;
    background: #ffffff;
    box-shadow: none;
    border-top: 1px solid #e3edf6;
}

.alms-main-navbar .container {
    position: relative;
}

.alms-main-navbar-container {
    min-height: 74px;
    display: flex;
    align-items: center;
}

.alms-main-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
}

.alms-search-panel--inline {
    flex: 1 1 460px;
    max-width: 540px;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.alms-search-panel--inline .alms-search-label,
.alms-social-panel--inline .alms-panel-title {
    margin-bottom: 0;
}

.alms-social-panel--inline {
    flex: 0 1 auto;
    margin-bottom: 0;
    margin-left: auto;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.alms-social-panel--inline .alms-social-list {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 8px;
}

.alms-search-panel--inline .select2-container .select2-selection--multiple {
    border-radius: 999px 0 0 999px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(12, 45, 78, 0.08);
}

.alms-search-panel--inline .btn {
    border-radius: 0 999px 999px 0;
    box-shadow: 0 6px 16px rgba(12, 45, 78, 0.08);
}

.alms-social-panel--inline .alms-social-list a {
    background: transparent;
    border-color: transparent;
}

.alms-social-panel--inline .alms-social-list a:hover,
.alms-social-panel--inline .alms-social-list a:focus {
    background: #eaf3fb;
    border-color: #d7e7f6;
    color: #0d3b66;
}

.alms-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border: 1px solid #c9d9e8;
    border-radius: 12px;
    background: #ffffff;
    color: #0d3b66;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.alms-menu-toggle:hover,
.alms-menu-toggle:focus {
    background: #f4f8fc;
    border-color: #1f6aa5;
    color: #1f6aa5;
    text-decoration: none;
}

.alms-menu-toggle .fa {
    font-size: 18px;
}

.alms-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(7, 23, 41, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1090;
}

.alms-side-menu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 0;
    z-index: 1100;
    pointer-events: none;
}

.alms-side-menu.is-open {
    width: 100vw;
    pointer-events: auto;
}

body.alms-menu-open .alms-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.alms-side-menu__panel {
    position: absolute;
    top: 0;
    height: 100%;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(8, 32, 58, 0.22);
    transition: transform 0.25s ease, opacity 0.25s ease;
    overflow-y: auto;
}

.alms-side-menu__primary {
    left: 0;
    width: 340px;
    transform: translateX(-100%);
}

.alms-side-menu__secondary {
    left: 340px;
    width: 320px;
    border-left: 1px solid #e3edf6;
    transform: translateX(calc(-100% - 24px));
    opacity: 0;
}

.alms-side-menu.is-open .alms-side-menu__primary {
    transform: translateX(0);
}

.alms-side-menu__secondary.is-open {
    transform: translateX(0);
    opacity: 1;
}

.alms-side-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 18px 16px;
    border-bottom: 1px solid #e7eff7;
}

.alms-side-menu__heading,
.alms-side-menu__title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1f6aa5;
}

.alms-side-menu__title {
    display: block;
    padding: 18px 20px 8px;
}

.alms-side-menu__close,
.alms-side-menu__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: #0d3b66;
    font-weight: 700;
}

.alms-side-menu__close {
    width: 40px;
    height: 40px;
    justify-content: center;
    border-radius: 999px;
}

.alms-side-menu__close:hover,
.alms-side-menu__close:focus,
.alms-side-menu__back:hover,
.alms-side-menu__back:focus {
    background: #f1f7fd;
    color: #1f6aa5;
}

.alms-side-menu__list {
    list-style: none;
    margin: 0;
    padding: 10px 0 20px;
}

.alms-side-menu__item {
    margin: 0;
}

.alms-side-menu__link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border: 0;
    background: transparent;
    color: #163a5f;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.alms-side-menu__link:hover,
.alms-side-menu__link:focus,
.alms-side-menu__item.is-active > .alms-side-menu__link {
    background: #f4f8fc;
    color: #0d3b66;
    border-left-color: #1f6aa5;
    text-decoration: none;
}

.alms-side-menu__sublist .alms-side-menu__link {
    font-weight: 500;
}

body.alms-menu-open {
    overflow: hidden;
}

@media (max-width: 991px) {
    .alms-brand-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .alms-brand-copy h1 {
        font-size: 24px;
    }

    .alms-brand-tools {
        flex: 1 1 auto;
        justify-content: flex-start;
    }

    .alms-brand-links {
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .alms-utility-shell {
        min-height: auto;
        flex-direction: column;
        align-items: stretch;
        padding: 16px 0;
    }

    .alms-brand-logo--utility {
        justify-content: center;
    }

    .alms-utility-actions {
        grid-template-columns: 1fr;
    }

    .alms-brand-grid {
        padding: 18px 0;
    }

    .alms-brand-logo {
        flex-direction: column;
        text-align: center;
    }

    .alms-brand-tools,
    .alms-brand-links {
        justify-content: center;
    }

    .alms-brand-copy p {
        margin-bottom: 0;
    }

    .alms-social-list {
        justify-content: center;
    }

    .alms-main-navbar-container {
        min-height: 64px;
    }

    .alms-main-actions {
        flex-wrap: wrap;
        gap: 14px;
    }

    .alms-search-panel--inline {
        order: 2;
        flex: 1 1 100%;
        max-width: none;
        margin: 0;
    }

    .alms-social-panel--inline {
        order: 3;
        flex: 1 1 100%;
        margin-left: 0;
    }

    .alms-menu-toggle {
        order: 1;
        justify-content: center;
    }

    .alms-side-menu__primary {
        width: min(88vw, 320px);
    }

    .alms-side-menu__secondary {
        left: 0;
        width: min(88vw, 320px);
        transform: translateX(-100%);
        border-left: 0;
    }

    .alms-side-menu__secondary.is-open {
        transform: translateX(0);
    }
}

@media (max-width: 767px) {
    .alms-social-panel--inline .alms-social-list {
        flex-wrap: wrap;
        justify-content: center;
    }
}
