/* Atheneum responsive adjustments. Desktop above 1024px is unchanged. */
@media (max-width: 1024px) {
    /* 1. Questions: restore a vertical layout and a usable booking button. */
    body.home .sc_action_simple {
        top: 0 !important;
        margin-top: 24px !important;
        margin-bottom: 24px !important;
    }
    body.home .sc_action_simple .sc_action_item,
    body.home .sc_action_simple .sc_action_item_inner {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 16px;
        min-width: 0;
        box-sizing: border-box;
    }
    body.home .sc_action_simple .sc_action_item_title,
    body.home .sc_action_simple .sc_action_item_description,
    body.home .sc_action_simple .sc_action_item_link {
        float: none !important;
        width: 100% !important;
        max-width: 100%;
        margin: 0 !important;
        align-self: auto !important;
        text-align: center;
        box-sizing: border-box;
    }
    body.home .sc_action_simple .sc_action_item_title {
        font-size: clamp(24px, 3.5vw, 32px);
        line-height: 1.25;
    }
    body.home .sc_action_simple .sc_action_item_link {
        display: flex !important;
        justify-content: center;
        align-items: center;
        min-height: 48px;
        padding: 14px 18px !important;
        white-space: normal;
        font-size: 16px;
        line-height: 1.35;
    }
    body.home .sc_action_simple .sc_action_item_image {
        float: none;
        margin: 0 auto;
    }

    /* 2. Header: outrank the generated global logo height on small screens. */
    body .top_panel .sc_layouts_row .sc_layouts_logo img,
    body .top_panel .sc_layouts_row .custom-logo-link img {
        max-height: 50px !important;
        width: auto;
        height: auto;
        max-width: 100%;
    }
    body .top_panel .vc_custom_1511275251562 {
        padding: 8px 16px !important;
    }
    body .top_panel .sc_layouts_menu_mobile_button a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        box-sizing: border-box;
    }
    body .menu_mobile.menu_mobile_fullscreen .menu_mobile_inner {
        display: block;
        box-sizing: border-box;
        overflow-y: auto;
        max-height: 100vh;
        max-height: 100dvh;
        padding: 68px 24px 24px;
    }
    body .menu_mobile.menu_mobile_fullscreen .menu_mobile_close {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
    }
    body .menu_mobile.menu_mobile_fullscreen .sc_layouts_logo {
        position: static;
        display: block;
        margin: 0 auto !important;
        text-align: center;
    }
    body .menu_mobile.menu_mobile_fullscreen .menu_mobile_nav_area {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        margin: 24px 0 0 !important;
    }

    /* 3. Contact headings and the portrait/form must occupy normal flow. */
    body.home .ath-home-contact-row {
        margin-top: 24px !important;
    }
    body.home .ath-home-contact-row .sc_item_title,
    body.home .ath-home-contact-row .sc_item_subtitle {
        position: static !important;
        top: auto !important;
        transform: none !important;
        z-index: auto !important;
    }
    body.page-id-296 .atheneum-contact-specialists {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 32px;
        padding: 32px 16px;
    }
    body.page-id-296 .atheneum-contact-specialists > .vc_column_container {
        float: none;
        width: 100% !important;
        max-width: 680px;
        min-width: 0;
        box-sizing: border-box;
    }
    body.page-id-296 .atheneum-contact-specialists .atheneum-contact-portrait {
        width: 100%;
        max-width: 100%;
        margin: 0;
        transform: none;
    }
    body.page-id-296 .atheneum-contact-form,
    body.page-id-296 .atheneum-contact-form .wpcf7,
    body.page-id-296 .atheneum-contact-form form {
        position: static;
        transform: none;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    body.page-id-296 .wpcf7 input:not([type="checkbox"]):not([type="radio"]),
    body.page-id-296 .wpcf7 textarea,
    body.page-id-296 .wpcf7 select {
        max-width: 100%;
        box-sizing: border-box;
        font-size: 16px;
    }

    /* 4. Banner spacing: remove stacked desktop spacer margins. */
    body.home .vc_custom_1511789219505,
    body.home .vc_custom_1511789298427,
    body.home .vc_custom_1511798107983,
    body.home .vc_custom_1511798141880 {
        height: 24px !important;
        min-height: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    body.home .vc_custom_1511788981747 .sc_item_title,
    body.home .vc_custom_1511798001268 .sc_item_title {
        font-size: clamp(28px, 4.5vw, 42px);
        line-height: 1.2 !important;
        white-space: normal !important;
        overflow-wrap: break-word;
    }
    body.home .vc_custom_1511798001268 .ath-prenatal-line,
    body.home .vc_custom_1511798001268 .sc_item_title i {
        white-space: normal !important;
    }
    body.home sr7-module[data-alias="slider-1"] #SR7_1_1-1-1 {
        width: calc(100vw - 40px) !important;
        max-width: 700px !important;
        white-space: normal !important;
        overflow-wrap: break-word;
        text-align: center !important;
        font-size: clamp(24px, 4.5vw, 36px) !important;
        line-height: 1.2 !important;
    }

    /* 5. Booking: remove the desktop negative offset, preserve Amelia logic. */
    html body.page-id-57824 .page_content_wrap {
        padding-top: 24px !important;
    }
    html body.page-id-57824 #atheneum-booking-intro {
        margin-top: 0 !important;
        margin-bottom: 24px !important;
        padding: 0 16px;
        box-sizing: border-box;
    }
    html body.page-id-57824 [id^="amelia-container"],
    html body.page-id-57824 .am-fs__wrapper {
        min-width: 0;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    html body.page-id-57824 .am-select-dropdown:has(.am-oit__data-label-name) .el-scrollbar__wrap,
    html body.page-id-57824 .el-select-dropdown__wrap:has(.am-oit__data-label-name),
    html body.page-id-57824 .am-select-dropdown__wrap:has(.am-oit__data-label-name),
    html body.page-id-57824 .am-select-dropdown .el-scrollbar__wrap,
    html body.page-id-57824 .el-select-dropdown__wrap,
    html body.page-id-57824 .am-select-dropdown__wrap {
        max-height: min(360px, 55vh) !important;
    }
    html body.page-id-57824 .am-select-dropdown,
    html body.page-id-57824 .am-select-popper {
        max-width: calc(100vw - 24px);
        box-sizing: border-box;
    }
}
