/* =========================================================
   CABEÇALHO ACM TRACKER
   Barra de informações (horários) + barra principal (logo, menu, CTA)
   ========================================================= */

.acm-header {
    --tk-primary: var(--color-primary, #2957A4);
    --tk-secondary: var(--color-secondary, #D2D3D5);
    --tk-ink: #0b1a33;
    --tk-text: #26344d;
    --tk-topbar-h: 40px;
    position: sticky;
    z-index: 999;
    top: calc(var(--tk-topbar-h) * -1);
    width: 100%;
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.acm-header *,
.acm-header *::before,
.acm-header *::after {
    box-sizing: border-box;
}

.acm-header-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Barra superior (horários / contato) ---------- */

.acm-topbar {
    height: var(--tk-topbar-h);
    background: var(--color-primary, #2957A4);
    color: rgba(255, 255, 255, 0.9);
    font-size: 12.5px;
}

.acm-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 20px;
}

.acm-topbar-hours,
.acm-topbar-side,
.acm-topbar-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.acm-topbar-side {
    gap: 22px;
}

.acm-topbar-link {
    color: inherit;
    text-decoration: none;
    transition: color 160ms ease;
}

.acm-topbar-link:hover {
    color: #ffffff;
}

.acm-topbar-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acm-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.acm-status::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    content: "";
}

.acm-status.is-open::before {
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
    animation: acm-pulse 2s infinite;
}

.acm-status.is-closed::before {
    background: #f87171;
}

@keyframes acm-pulse {
    70% {
        box-shadow: 0 0 0 7px rgba(52, 211, 153, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
    }
}

.acm-social-list {
    display: flex;
    align-items: center;
    gap: 6px;
}

.acm-social-link {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease;
}

.acm-social-link:hover {
    background: var(--tk-primary);
    color: #ffffff;
}

/* ---------- Barra principal ---------- */

.acm-header-main {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(12px);
}

.acm-header-main-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 84px;
    gap: 28px;
}

.acm-logo {
    display: inline-flex;
    flex: none;
    align-items: center;
    text-decoration: none;
}

.acm-logo img {
    display: block;
    width: auto;
    max-width: 240px;
    height: 76px;
    object-fit: contain;
}

.acm-main-nav {
    flex: 1;
    min-width: 0;
}

.acm-nav-panel {
    display: flex;
    align-items: center;
    justify-content: center;
}

.acm-nav-list {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 4px;
}

.acm-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--tk-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: color 160ms ease, background 160ms ease;
}

.acm-nav-link:hover {
    background: #eef3fb;
    color: var(--tk-primary);
}

.acm-nav-link.is-active {
    color: var(--tk-primary);
}

.acm-nav-link.is-active::after {
    position: absolute;
    right: 14px;
    bottom: 2px;
    left: 14px;
    height: 2px;
    border-radius: 2px;
    background: var(--tk-primary);
    content: "";
}

.acm-cta {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 999px;
    background: var(--tk-primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(41, 87, 164, 0.28);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.acm-cta:hover {
    color: #ffffff;
    filter: brightness(1.1);
    box-shadow: 0 12px 26px rgba(41, 87, 164, 0.36);
    transform: translateY(-1px);
}

.acm-cta--panel,
.acm-mobile-toggle {
    display: none;
}

/* ---------- Dropdowns ---------- */

.acm-has-dropdown {
    position: relative;
}

.acm-caret {
    display: inline-block;
    margin-left: 7px;
    border-top: 5px solid currentColor;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    transition: transform 180ms ease;
}

.acm-has-dropdown.is-open > .acm-nav-link .acm-caret {
    transform: rotate(180deg);
}

.acm-dropdown {
    display: none;
    margin: 0;
    padding: 8px;
    list-style: none;
}

.acm-dropdown a {
    display: block;
    padding: 11px 14px;
    border-radius: 9px;
    color: var(--tk-text);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.acm-dropdown a:hover,
.acm-dropdown a:focus-visible {
    background: #eef3fb;
    color: var(--tk-primary);
}

@media (min-width: 992px) {
    .acm-dropdown {
        position: absolute;
        z-index: 50;
        top: calc(100% + 6px);
        left: 0;
        min-width: 220px;
        border: 1px solid #e5e9f2;
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 18px 40px rgba(11, 26, 51, 0.16);
    }

    /* ponte para o hover não "cair" no espaço entre item e menu */
    .acm-has-dropdown::after {
        position: absolute;
        right: 0;
        bottom: -8px;
        left: 0;
        height: 8px;
        content: "";
    }

    .acm-has-dropdown:hover > .acm-dropdown,
    .acm-has-dropdown:focus-within > .acm-dropdown,
    .acm-has-dropdown.is-open > .acm-dropdown {
        display: block;
    }
}

@media (min-width: 992px) and (max-width: 1180px) {
    .acm-topbar-link span {
        display: none;
    }

    .acm-cta--desktop {
        padding: 12px 16px;
    }
}

/* ---------- Mobile ---------- */

@media (max-width: 991px) {
    .acm-header {
        --tk-topbar-h: 0px;
        top: 0;
    }

    .acm-topbar {
        height: auto;
        padding: 7px 0;
    }

    .acm-topbar-side,
    .acm-topbar-text {
        display: none;
    }

    .acm-header-container {
        padding: 0 18px;
    }

    .acm-header-main-inner {
        min-height: 70px;
    }

    .acm-logo img {
        height: 62px;
    }

    .acm-cta--desktop {
        display: none;
    }

    .acm-mobile-toggle {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid #dfe5ef;
        border-radius: 12px;
        background: #ffffff;
        color: var(--tk-ink);
        cursor: pointer;
    }

    .acm-mobile-icon-close,
    .is-menu-open .acm-mobile-icon-open {
        display: none;
    }

    .is-menu-open .acm-mobile-icon-close {
        display: inline-block;
    }

    .acm-main-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex: none;
    }

    .acm-nav-panel {
        display: none;
        align-items: stretch;
        flex-direction: column;
        max-height: calc(100vh - 120px);
        padding: 14px 18px 22px;
        overflow-y: auto;
        border-top: 1px solid #e5e9f2;
        background: #ffffff;
        box-shadow: 0 24px 40px rgba(11, 26, 51, 0.18);
        gap: 14px;
    }

    .is-menu-open .acm-nav-panel {
        display: flex;
    }

    .acm-nav-list {
        align-items: stretch;
        flex-direction: column;
        gap: 2px;
    }

    .acm-nav-link {
        width: 100%;
        padding: 15px 14px;
        font-size: 15px;
    }

    .acm-nav-link.is-active::after {
        display: none;
    }

    .acm-nav-link.is-active {
        background: #eef3fb;
    }

    .acm-has-dropdown.is-open > .acm-dropdown {
        display: block;
        margin: 2px 0 6px 14px;
        padding: 4px 0 4px 12px;
        border-left: 2px solid #dfe5ef;
    }

    .acm-nav-link[data-acm-dropdown-toggle] {
        justify-content: space-between;
    }

    .acm-cta--panel {
        display: flex;
        width: 100%;
        padding: 16px;
    }
}

/* Telas intermediárias: compacta o menu para não sobrepor logo/CTA */
@media (min-width: 992px) and (max-width: 1239px) {
    .acm-header-main-inner {
        gap: 14px;
    }

    .acm-logo img {
        max-width: 170px;
        height: 58px;
    }

    .acm-nav-link {
        padding: 10px 9px;
        font-size: 13px;
    }

    .acm-cta--desktop {
        padding: 11px 14px;
        font-size: 13px;
    }
}
