/* ════════════════════════════════════════════
   SHARED: mobile-mega-grid link styles
   Used by both .mobile-about-mega and .work-here-mobile
   ════════════════════════════════════════════ */

.mobile-mega-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-top: 0.75rem !important;
    padding-right: 0 !important;
}

.mobile-mega-grid p {
    margin-top: 0.5em !important;
    margin-bottom: 0 !important;
    min-width: 0 !important;
    white-space: normal !important;
}

.mobile-mega-grid p a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-decoration: none !important;
    white-space: normal !important;
    font-size: var(--global-kb-font-size-md, 1.25rem) !important;
    font-style: normal !important;
    transition: opacity 0.15s ease !important;
}

.mobile-mega-grid p a:hover,
.mobile-mega-grid p a:focus-visible {
    opacity: 0.5 !important;
}

.mobile-mega-grid p a::after {
    display: none !important;
}

/* Ensure all mobile accordion menu links can wrap */
.mobile-about-mega a,
.programs-mobile a {
    white-space: normal !important;
}

/* Work Here mobile links */
.work-here-mobile a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    font-size: var(--global-kb-font-size-md, 1.25rem) !important;
    font-style: normal !important;
    letter-spacing: -0.17px !important;
    transition: opacity 0.15s ease !important;
}


/* ════════════════════════════════════════════
   ABOUT — mobile mega menu
   ════════════════════════════════════════════ */

/* Neutralise alignfull's 100vw width inside the mobile accordion */
.mobile-about-mega.alignfull,
.work-here-mobile.alignfull,
.programs-mobile.alignfull {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Override palette8 row background inside the mobile drawer */
.mobile-about-mega.has-theme-palette8-background-color,
.work-here-mobile.has-theme-palette8-background-color,
.programs-mobile.has-theme-palette8-background-color {
    background-color: transparent !important;
}

/* Remove default left padding on nested mobile nav lists */
.mobile-navigation ul ul {
    padding-left: 0 !important;
}

/* Restore button margins overridden by the broad #mobile-drawer #mobile-menu > li * reset */
#mobile-drawer #mobile-menu .kb-buttons-wrap,
#mobile-drawer #mobile-menu .wp-block-kadence-advancedbtn,
#mobile-drawer #mobile-menu .kb-btn-wrap {
    margin-top: inherit !important;
    margin-bottom: inherit !important;
}

#mobile-drawer #mobile-menu .work-here-mobile .kb-section-has-overlay .kb-buttons-wrap {
    margin-top: 0.75rem !important;
}

#mobile-drawer #mobile-menu .mobile-about-mega .kb-buttons-wrap,
#mobile-drawer #mobile-menu .mobile-about-mega .wp-block-kadence-advancedbtn {
    margin-top: 1.25rem !important;
}

#mobile-drawer #mobile-menu .work-here-mobile .kb-buttons-wrap,
#mobile-drawer #mobile-menu .work-here-mobile .wp-block-kadence-advancedbtn {
    margin-top: 1rem !important;
}

/* Force mobile-sized card padding inside drawer at all viewport sizes (prevents large desktop padding on tablet) */
.mobile-about-mega .wp-block-kadence-column > .kt-inside-inner-col,
.work-here-mobile .wp-block-kadence-column > .kt-inside-inner-col,
.programs-mobile .wp-block-kadence-column > .kt-inside-inner-col {
    padding-top: var(--global-kb-spacing-xs, 1rem) !important;
    padding-right: var(--global-kb-spacing-xs, 1rem) !important;
    padding-bottom: var(--global-kb-spacing-xs, 1rem) !important;
    padding-left: var(--global-kb-spacing-xs, 1rem) !important;
}

/* Allow border-radius on cards to show */
.mobile-about-mega .kt-inside-inner-col {
    overflow: visible !important;
}

/* Full width — remove content-edge padding and force single-column stack */
.mobile-about-mega .kt-row-column-wrap,
.work-here-mobile .kt-row-column-wrap,
.programs-mobile .kt-row-column-wrap {
    padding-left: 0 !important;
    padding-right: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
}

.mobile-about-mega .kb-buttons-wrap,
.mobile-about-mega .wp-block-kadence-advancedbtn {
    margin-top: 1.25rem !important;
}

.mobile-about-mega .kt-button {
    font-size: 0.8rem !important;
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}


/* ════════════════════════════════════════════
   WORK HERE — mobile mega menu
   ════════════════════════════════════════════ */

/* Allow border-radius on cards to show */
.work-here-mobile .kt-inside-inner-col {
    overflow: visible !important;
}

.work-here-mobile .kb-buttons-wrap,
.work-here-mobile .wp-block-kadence-advancedbtn {
    margin-top: 1rem !important;
}

.work-here-mobile .kt-button {
    font-size: 0.8rem !important;
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

/* Explore card: push button away from description text */
.work-here-mobile .kb-btn-custom-colors-0 {
    margin-top: 0.75rem !important;
}

/* "Our Medical Community" label — scoped to links grid only, not the image card */
.work-here-mobile .mobile-mega-grid .wp-block-kadence-advancedheading {
    font-size: 1.1rem !important;
    text-align: left !important;
    margin-top: 0 !important;
    margin-bottom: 0.15rem !important;
}

/* Sub-links (Our Hospital, Our Clinics) — smaller than main links, restore link colour */
.work-here-mobile .mobile-mega-grid .wp-block-kadence-advancedheading a {
    display: block !important;
    font-size: 0.85rem !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    letter-spacing: -0.17px !important;
    text-decoration: none !important;
    color: var(--global-palette2, inherit) !important;
    transition: opacity 0.15s ease !important;
}

.work-here-mobile .mobile-mega-grid .wp-block-kadence-advancedheading a:hover,
.work-here-mobile .mobile-mega-grid .wp-block-kadence-advancedheading a:focus-visible {
    opacity: 0.5 !important;
}

/* Explore the Region card — ensure heading and description stay white */
.work-here-mobile .kb-section-has-overlay .wp-block-kadence-advancedheading,
.work-here-mobile .kb-section-has-overlay p {
    color: #ffffff !important;
}

/* Button spacing on the image card — override Kadence's mobile margin:0 */
.work-here-mobile .kb-section-has-overlay .kb-buttons-wrap {
    margin-top: 0.75rem !important;
}


/* ════════════════════════════════════════════
   PROGRAMS — mobile mega menu
   ════════════════════════════════════════════ */

/* Allow border-radius on cards to show — Programs has no button */
.programs-mobile .kt-inside-inner-col {
    overflow: visible !important;
}
