/* =============================================
   "Find a Therapist" megamenu — primary nav.
   Scoped to .pt-megamenu so it doesn't touch
   other parts of the site. Brand palette:
   Navy #2F4156, Teal #567C8D, Sky Blue #C8D9E6,
   Beige #F5EFEB, White #FFFFFF.
   ============================================= */

/* Trigger <li> — visually fits in with the existing nav. */
.menu-item.pt-megamenu-trigger {
    position: relative;
}

.menu-item.pt-megamenu-trigger > a {
    cursor: pointer;
}

/* Hidden by default; revealed on hover/focus (desktop) or .is-open (mobile). */
.pt-megamenu {
    background: #FFFFFF;
    border: 1px solid #C8D9E6;
    border-radius: 12px;
    box-shadow: 0 18px 36px rgba(47, 65, 86, .12);
    color: #2F4156;
    display: none;
    left: 50%;
    transform: translateX(-50%);
    line-height: 1.6;
    margin-top: 8px;
    padding: 24px;
    position: absolute;
    top: 100%;
    width: min(960px, calc(100vw - 32px));
    z-index: 1200;
}

.pt-megamenu.is-open {
    display: block;
}

.pt-megamenu__inner {
    display: grid;
    gap: 28px;
    grid-template-columns: 280px 1fr;
    align-items: start;
}

.pt-megamenu__heading {
    color: #2F4156;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .06em;
    margin: 0 0 14px;
    text-transform: uppercase;
}

/* ---------- Search form column ---------- */
.pt-megamenu__form {
    display: grid;
    gap: 10px;
}

.pt-megamenu__field {
    display: block;
    position: relative;
}

.pt-megamenu__field--search {
    display: flex;
    align-items: stretch;
}

.pt-megamenu__select,
.pt-megamenu__input {
    background: #FFFFFF;
    border: 1px solid #C8D9E6;
    border-radius: 8px;
    color: #2F4156;
    font-size: 14px;
    height: 42px;
    line-height: 1.4;
    padding: 0 12px;
    width: 100%;
    box-sizing: border-box;
}

.pt-megamenu__input {
    border-radius: 8px 0 0 8px;
    border-right: 0;
}

.pt-megamenu__select:focus,
.pt-megamenu__input:focus {
    border-color: #567C8D;
    outline: none;
}

.pt-megamenu__submit {
    align-items: center;
    background: #567C8D;
    border: 1px solid #567C8D;
    border-radius: 0 8px 8px 0;
    color: #FFFFFF;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 600;
    gap: 6px;
    height: 42px;
    line-height: 1;
    padding: 0 16px;
    white-space: nowrap;
}

.pt-megamenu__submit:hover,
.pt-megamenu__submit:focus {
    background: #2F4156;
    border-color: #2F4156;
    color: #FFFFFF;
}

.pt-megamenu__pro {
    color: #567C8D;
    font-size: 13px;
    margin: 16px 0 0;
}

.pt-megamenu__pro-label {
    color: #2F4156;
    font-weight: 600;
    margin-right: 6px;
}

.pt-megamenu__pro a {
    color: #567C8D;
    text-decoration: none;
}

.pt-megamenu__pro a:hover,
.pt-megamenu__pro a:focus {
    color: #2F4156;
    text-decoration: underline;
}

/* ---------- Locations column ---------- */
.pt-megamenu__locations-col {
    border-left: 1px solid #C8D9E6;
    padding-left: 28px;
}

.pt-megamenu__regions {
    column-count: 4;
    column-gap: 28px;
}

.pt-megamenu__region {
    break-inside: avoid;
    margin-bottom: 18px;
    min-width: 0;
}

.pt-megamenu__region:last-child {
    margin-bottom: 0;
}

.pt-megamenu__region-heading {
    color: #2F4156;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.pt-megamenu__cities {
    display: grid;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pt-megamenu__cities li {
    margin: 0;
    padding: 0;
}

.pt-megamenu__cities a {
    color: #2F4156;
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.pt-megamenu__cities a:hover,
.pt-megamenu__cities a:focus {
    color: #567C8D;
}

/* ---------- Tablet (768–1199px) ---------- */
@media (max-width: 1199px) {
    .pt-megamenu {
        width: 720px;
    }

    .pt-megamenu__inner {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .pt-megamenu__locations-col {
        border-left: 0;
        border-top: 1px solid #C8D9E6;
        padding-left: 0;
        padding-top: 22px;
    }

    .pt-megamenu__regions {
        column-count: auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 24px;
    }

    .pt-megamenu__region {
        margin-bottom: 0;
    }
}

/* ---------- Mobile (<768px) — accordion inside mobile drawer ---------- */
@media (max-width: 767px) {
    .menu-item.pt-megamenu-trigger {
        position: static;
    }

    .pt-megamenu {
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        box-shadow: none;
        left: auto;
        transform: none;
        margin: 0;
        padding: 18px 16px;
        position: static;
        width: 100%;
        max-width: 100%;
    }

    .pt-megamenu__inner {
        gap: 18px;
    }

    .pt-megamenu__regions {
        column-count: auto;
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pt-megamenu__field--search {
        flex-direction: column;
    }

    .pt-megamenu__input {
        border-radius: 8px;
        border-right: 1px solid #C8D9E6;
        margin-bottom: 8px;
    }

    .pt-megamenu__submit {
        border-radius: 8px;
        width: 100%;
    }
}

/* ---------- Smart search dropdown ---------- */
.pt-megamenu__field--search {
    position: relative;
}

.pt-megamenu__location-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border: 1px solid #C8D9E6;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(47, 65, 86, .12);
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 280px;
    overflow-y: auto;
    z-index: 1210;
}

.pt-megamenu__location-suggestions li {
    color: #2F4156;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 12px;
}

.pt-megamenu__location-suggestions li:hover,
.pt-megamenu__location-suggestions li[aria-selected="true"] {
    background: #F5EFEB;
    color: #2F4156;
}

.pt-megamenu__location-suggestions .pt-megamenu__location-empty {
    color: #567C8D;
    cursor: default;
    font-style: italic;
}

.pt-megamenu__location-suggestions .pt-megamenu__location-empty:hover {
    background: transparent;
}

.pt-megamenu__location-suggestions li[data-pt-kind="keyword"] {
    align-items: baseline;
    border-top: 1px solid #C8D9E6;
    color: #2F4156;
    display: flex;
    gap: 8px;
}

.pt-megamenu__location-suggestions li[data-pt-kind="keyword"] .pt-megamenu__location-kind {
    color: #567C8D;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    flex: 0 0 auto;
}

.pt-megamenu__location-suggestions li[data-pt-kind="keyword"] .pt-megamenu__location-text {
    color: #2F4156;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
