/* Header styled after the official site (planigrupo.com.mx): white 80px bar,
   Raleway 11px uppercase links, bold for the active/hovered section and
   light grey dropdowns per section. */
.planigrupo-reference-header--investors {
    gap: 24px;
    height: auto;
    justify-content: center;
    min-height: 80px;
    padding: 8px 24px;
}

.planigrupo-reference-header--investors > a {
    flex: 0 0 auto;
}

.investor-header-nav {
    align-self: stretch;
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    max-width: 1040px;
    min-width: 0;
    position: static;
}

.investor-header-nav__primary {
    align-content: center;
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    justify-content: flex-start;
    list-style: none;
    margin: 0;
    padding: 0;
}

.investor-header-nav__item,
.investor-header-nav__dropdown li,
.investor-header-nav__mobile-submenu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.investor-header-nav__item {
    margin: 0 10px;
    position: relative;
}

.investor-header-nav__item-row {
    align-items: stretch;
    display: flex;
    height: 100%;
}

.investor-header-nav__button,
.investor-header-nav__submenu-toggle,
.investor-header-nav__dropdown button,
.investor-header-nav__mobile-submenu button {
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 0;
    cursor: pointer;
}

.investor-header-nav__button {
    color: #000;
    flex: 1 1 auto;
    font-family: Raleway, var(--font-family-elementia), sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 1px;
    line-height: normal;
    padding: 9px 0;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Reserve the bold width so hovering or selecting a section does not
   push its neighbours around. */
.investor-header-nav__button::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    height: 0;
    overflow: hidden;
    visibility: hidden;
}

.investor-header-nav__button:hover,
.investor-header-nav__button[aria-selected="true"],
.investor-header-nav__item.is-dropdown-open .investor-header-nav__button {
    color: #000;
    font-weight: 700;
}

.investor-header-nav__submenu-toggle,
.investor-header-nav__mobile-submenu {
    display: none;
}

.investor-header-nav__dropdown {
    background-color: #f1f1f1;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .2);
    display: none;
    left: 0;
    min-width: 160px;
    position: absolute;
    top: 100%;
    z-index: 1001;
}

.investor-header-nav__item.is-dropdown-open > .investor-header-nav__dropdown {
    display: block;
}

.investor-header-nav__item--align-right > .investor-header-nav__dropdown {
    left: auto;
    right: 0;
}

.investor-header-nav__dropdown ul,
.investor-header-nav__mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.investor-header-nav__dropdown button {
    color: #000;
    display: block;
    font-family: Raleway, var(--font-family-elementia), sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 1px;
    line-height: normal;
    padding: 12px 16px;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
    width: 100%;
}

.investor-header-nav__dropdown button:hover,
.investor-header-nav__dropdown button:focus-visible {
    background-color: #ddd;
}

.investor-header-nav__utilities {
    display: flex;
    flex: 0 0 170px;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.investor-header-nav__utilities .top-header {
    align-self: flex-end;
}

.investor-header-nav__sr-only {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.investor-header-nav button:focus-visible,
.planigrupo-reference-header--investors .header__bars:focus-visible {
    outline: 3px solid #d7282f;
    outline-offset: 2px;
}

[id^="investor-section-"] {
    scroll-margin-top: 26px;
}

/* Header search: live results panel, styled after planigrupo.com.mx. */
.investor-search__panel {
    background-color: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .2);
    max-height: min(420px, 70vh);
    overflow-y: auto;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 340px;
    z-index: 1003;
}

.investor-search__panel[hidden] {
    display: none;
}

.investor-search__count {
    border-bottom: 1px solid #e6e4e1;
    color: #333;
    font-family: Raleway, var(--font-family-elementia), sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0;
    padding: 14px 16px;
    text-transform: uppercase;
}

.investor-search__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.investor-search__option {
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
}

.investor-search__option[aria-selected="true"],
.investor-search__option:hover {
    background-color: #f1f1f1;
}

.investor-search__context {
    color: #777;
    font-family: Raleway, var(--font-family-elementia), sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.investor-search__title {
    color: #333;
    font-family: Raleway, var(--font-family-elementia), sans-serif;
    font-size: 13px;
    line-height: 1.35;
}

.investor-search__title mark {
    background: none;
    padding: 0;
    color: #000;
    font-weight: 700;
}

.investor-search__option[data-external] .investor-search__title::after {
    content: " \2197";
    color: #777;
}

@media (max-width: 1320px) {
    .planigrupo-reference-header--investors {
        gap: 10px;
        padding-inline: 16px;
    }

    .investor-header-nav__item {
        margin: 0 7px;
    }

    .investor-header-nav__utilities {
        flex-basis: 150px;
    }
}

@media (max-width: 1000px) {
    .planigrupo-reference-header--investors {
        height: 80px;
        justify-content: space-between;
        padding: 0 20px;
    }

    .planigrupo-reference-header--investors > a {
        margin-left: auto;
    }

    .investor-header-nav {
        background-color: #fff;
        box-shadow: 0 12px 24px rgba(84, 88, 89, .18);
        display: none;
        left: 0;
        max-height: calc(100vh - 80px);
        max-width: none;
        overflow-y: auto;
        position: absolute;
        right: 0;
        top: 80px;
        z-index: 1002;
    }

    .investor-header-nav.is-mobile-open {
        display: block;
    }

    .investor-header-nav__primary {
        display: block;
        padding: 8px 0 18px;
    }

    .investor-header-nav__item {
        border-bottom: 1px solid #e6e4e1;
        margin: 0;
    }

    .investor-header-nav__item-row {
        min-height: 48px;
    }

    .investor-header-nav__button {
        font-size: 12px;
        min-height: 48px;
        padding: 12px 20px;
        text-align: left;
        white-space: normal;
    }

    .investor-header-nav__submenu-toggle {
        align-items: center;
        display: flex;
        flex: 0 0 52px;
        justify-content: center;
    }

    .investor-header-nav__submenu-toggle > span[aria-hidden="true"]::before,
    .investor-header-nav__submenu-toggle > span[aria-hidden="true"]::after {
        background-color: #545859;
        content: "";
        display: block;
        height: 2px;
        position: absolute;
        transform: translate(-50%, -50%);
        transition: transform .2s ease;
        width: 12px;
    }

    .investor-header-nav__submenu-toggle > span[aria-hidden="true"]::after {
        transform: translate(-50%, -50%) rotate(90deg);
    }

    .investor-header-nav__submenu-toggle[aria-expanded="true"] > span[aria-hidden="true"]::after {
        transform: translate(-50%, -50%) rotate(0);
    }

    .investor-header-nav__mobile-submenu {
        background-color: #f4f2ef;
        display: block;
        padding: 6px 20px 10px 34px;
    }

    .investor-header-nav__mobile-submenu[hidden] {
        display: none;
    }

    .investor-header-nav__mobile-submenu button {
        color: #545859;
        display: block;
        font-family: Raleway, sans-serif;
        font-size: 12px;
        line-height: 1.4;
        padding: 9px 0;
        text-align: left;
        width: 100%;
    }

    .investor-header-nav__mobile-submenu button:hover {
        color: #000;
        font-weight: 700;
    }

    .investor-header-nav__dropdown {
        display: none !important;
    }

    .investor-header-nav__utilities {
        flex: 0 0 auto;
    }

    .investor-header-nav__utilities .header__search {
        display: none;
    }

    [id^="investor-section-"] {
        scroll-margin-top: 18px;
    }
}

@media (max-width: 600px) {
    .planigrupo-reference-header--investors {
        padding-inline: 12px;
    }

    .investor-header-nav__utilities {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .investor-header-nav *,
    .investor-header-nav *::before,
    .investor-header-nav *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
