/* ==========================================================================
   IPTC — Header / Navbar
   ========================================================================== */

.header-container {
    width: 100%;
    max-width: 1320px;
    margin-inline: auto;
    padding-inline: clamp(16px, 3vw, 24px);
}

/* ---- Barra superior ---- */
.header-top {
    background: #003d4d;
    color: #fff;
    font-size: 13px;
}

.header-top__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    gap: 12px;
}

.header-top__email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    min-width: 0;
}

.header-top__email:hover {
    color: #fff;
}

.header-top__email span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-top__tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-top__link {
    display: none;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.header-top__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.header-top__tool {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
}

.header-top__tool:hover {
    background: rgba(0, 0, 0, 0.38);
}

.header-top__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    font-size: 9px;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
    background: #03be62;
    color: #fff;
    border-radius: 999px;
}

/* ---- Header sticky ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
}

.site-header.is-scrolled {
    box-shadow: 0 2px 16px rgba(0, 61, 89, 0.08);
}

.header-main {
    background: #fff;
    border-bottom: 1px solid #e5ebf0;
}

.header-main__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 72px;
}

/* Logo */
.header-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.header-brand__logo {
    display: block;
    height: 44px;
    width: auto;
    max-width: min(200px, 38vw);
    object-fit: contain;
    object-position: left center;
}

/* Nav central */
.header-nav {
    display: none;
    flex: 1;
    min-width: 0;
    justify-content: center;
}

.header-nav__list {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 1px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-nav__item {
    position: relative;
    flex-shrink: 0;
}

.header-nav__link,
.header-nav__trigger {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 8px 10px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: #3d4f5f;
    text-decoration: none;
    white-space: nowrap;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.header-nav__link:hover,
.header-nav__trigger:hover,
.header-nav__item.is-active-group .header-nav__trigger {
    color: #0068b3;
    background: rgba(0, 104, 179, 0.07);
}

.header-nav__link.is-active {
    color: #0068b3;
    background: rgba(0, 104, 179, 0.1);
}

.header-nav__item.is-highlight > .header-nav__link {
    color: #03be62;
    font-weight: 700;
}

.header-nav__item.is-highlight > .header-nav__link:hover {
    color: #029a50;
    background: rgba(3, 190, 98, 0.08);
}

.header-nav__chevron {
    opacity: 0.55;
    flex-shrink: 0;
}

/* Dropdown */
.header-nav__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 240px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 40, 60, 0.12);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 60;
}

.header-nav__item.has-dropdown:hover .header-nav__dropdown,
.header-nav__item.has-dropdown.is-open .header-nav__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.header-nav__dropdown a {
    display: block;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    line-height: 1.35;
}

.header-nav__dropdown a:hover,
.header-nav__dropdown a.is-active {
    background: #f0f7fc;
    color: #0068b3;
}

.header-nav__dropdown a.is-active {
    font-weight: 600;
}

/* Ações */
.header-actions {
    display: none;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    padding-left: 12px;
    border-left: 1px solid #e5ebf0;
}

.header-actions__restrita {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    white-space: nowrap;
}

.header-actions__restrita:hover {
    color: #0068b3;
}

.header-actions__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    background: #0068b3;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 104, 179, 0.3);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.header-actions__cta:hover {
    color: #fff;
    background: #005a9e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 104, 179, 0.35);
}

.header-actions__cta--block {
    width: 100%;
}

/* Hamburger */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    margin-left: auto;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 8px;
}

.menu-toggle:hover {
    background: #f1f5f9;
}

.menu-toggle__bar {
    display: block;
    width: 20px;
    height: 2px;
    margin-inline: auto;
    background: #003d4d;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    visibility: hidden;
}

.mobile-menu.is-open {
    pointer-events: auto;
    visibility: visible;
}

.mobile-menu__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 40, 55, 0.45);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.mobile-menu.is-open .mobile-menu__overlay {
    opacity: 1;
}

.mobile-menu__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(300px, 86vw);
    height: 100%;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
}

.mobile-menu.is-open .mobile-menu__panel {
    transform: translateX(0);
}

.mobile-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #003d4d;
    color: #fff;
}

.mobile-menu__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
}

.mobile-menu__close {
    width: 36px;
    height: 36px;
    font-size: 26px;
    line-height: 1;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 6px;
}

.mobile-menu__close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu__section-label {
    margin: 0;
    padding: 14px 18px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
}

.mobile-menu__list {
    list-style: none;
    margin: 0;
    padding: 0 0 4px;
}

.mobile-menu__list a {
    display: block;
    padding: 11px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
}

.mobile-menu__list a:hover {
    background: #f8fafc;
    color: #0068b3;
}

.mobile-menu__highlight {
    color: #03be62 !important;
}

.mobile-menu__footer {
    padding: 16px 18px 24px;
    margin-top: 8px;
    border-top: 1px solid #e8eef3;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-menu__extra {
    font-weight: 600;
    color: #0068b3;
    text-decoration: none;
    font-size: 14px;
}

/* Painéis */
.header-panel {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 72px 16px 16px;
    pointer-events: none;
    visibility: hidden;
}

.header-panel.is-open {
    pointer-events: auto;
    visibility: visible;
}

.header-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 40, 55, 0.4);
}

.header-panel__box {
    position: relative;
    width: min(420px, 100%);
    padding: 22px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12);
}

.header-panel__title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #003d4d;
}

.header-panel__text {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 14px;
}

.search-panel {
    display: flex;
    gap: 8px;
}

.search-panel input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #dce3ed;
    border-radius: 8px;
    font: inherit;
}

/* ---- Desktop ---- */
@media (min-width: 768px) {
    .header-top__link {
        display: inline-flex;
    }
}

@media (min-width: 1100px) {
    .header-nav {
        display: flex;
    }

    .header-actions {
        display: flex;
    }

    .menu-toggle {
        display: none;
    }
}

/* Telas médias: nav compacto */
@media (min-width: 1100px) and (max-width: 1280px) {
    .header-nav__link,
    .header-nav__trigger {
        padding: 7px 7px;
        font-size: 12px;
    }

    .header-brand__logo {
        height: 40px;
        max-width: 170px;
    }

    .header-actions__cta {
        padding: 9px 16px;
        font-size: 13px;
    }

    .header-main__inner {
        gap: 8px;
    }
}

@media (max-width: 1099px) {
    .header-brand__logo {
        height: 40px;
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .header-top__email svg {
        flex-shrink: 0;
    }

    .header-top__email span {
        max-width: 140px;
    }
}
