/*
 * UltraLife Academy: phone fixes for the public pages (home, courses, course
 * details, blog, about, contact, FAQ ...). Loaded last by layout.blade.php and
 * layout_inner_page.blade.php. Desktop is unchanged; every rule is inside a
 * phone/tablet media query. See UltraLife/shared/ultra-pwa/README.md part B.
 */

@media (max-width: 767.98px) {
    /* 16px side padding (README B.4). The theme's 30px row gutters were
       wider than the 12px container padding, pushing rows 3px off-screen. */
    .container,
    .container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Inner-page banner: was a 450px+ picture with no heading on phones. */
    .td_page_heading {
        min-height: 0;
        padding: 104px 0 28px;
    }
    .td_page_heading .ul-page-title {
        display: block;
        margin: 0;
        font-size: 28px;
        line-height: 1.2;
        color: #fff;
        text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
    }
    .td_page_heading [class^="td_page_heading_shape"] {
        display: none;
    }

    /* Home "about" pictures: the desktop collage (220px offsets) left two
       small images floating in a 500px gap. Show them side by side. */
    .td_image_box.td_style_3 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin: 0;
        padding-bottom: 0;
    }
    .td_image_box.td_style_3 .td_image_box_img_1,
    .td_image_box.td_style_3 .td_image_box_img_2 {
        position: static;
        height: auto;
        padding: 0 !important;
        display: block;
    }
    .td_image_box.td_style_3 img {
        width: 100%;
        aspect-ratio: 3 / 4;
        object-fit: cover;
    }

    /* Home category circles: 250px each, one per row. Two per row instead. */
    .row:has(> [class*="col"] > .td_iconbox.td_style_2) > [class*="col"] {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .td_iconbox.td_style_2 .td_iconbox_in,
    .td_iconbox.td_style_2 .td_iconbox_link {
        width: 100%;
        max-width: 160px;
        height: auto;
        aspect-ratio: 1;
        margin: 0 auto;
        padding: 18px 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .td_iconbox.td_style_2 .td_iconbox_link {
        left: 50%;
        transform: translateX(-50%);
    }
    .td_iconbox.td_style_2 .td_iconbox_icon img,
    .td_iconbox.td_style_2 .td_iconbox_icon svg {
        max-width: 48px;
        max-height: 48px;
    }
    .td_iconbox.td_style_2 .td_iconbox_title {
        font-size: 14px;
        margin-bottom: 4px !important;
    }
    .td_iconbox.td_style_2 .td_iconbox_subtitle {
        font-size: 12px;
    }

}

@media (min-width: 768px) {
    .td_page_heading .ul-page-title {
        display: none; /* desktop banner stays picture-only, as before */
    }
}
