/*
 * Phone layout fixes for the main template (R1).
 * Loaded last in layouts/main.blade.php. Applies only below 576px wide,
 * so tablet and desktop layouts are unchanged.
 */
@media (max-width: 575.98px) {

    /* No sideways scrolling */
    body { overflow-x: hidden; }
    @supports (overflow: clip) { body { overflow-x: clip; } }

    /* Same side margins on every page */
    .site-wrapper-reveal .container,
    .site-wrapper-reveal .container-fluid { padding-left: 20px; padding-right: 20px; }

    /* Heading sizes for phones */
    .site-wrapper-reveal h1 { font-size: 34px; line-height: 1.15; overflow-wrap: break-word; }
    .site-wrapper-reveal h2 { font-size: 28px; line-height: 1.2; }
    .site-wrapper-reveal h3 { font-size: 26px; line-height: 1.2; }
    .s-s-head { font-size: 34px !important; line-height: 1.15; }

    /* Buttons: full width inside the page margins */
    .site-wrapper-reveal .ht-btn,
    .site-wrapper-reveal a.btn,
    .site-wrapper-reveal button.btn:not(.btn-link):not(.close),
    .site-wrapper-reveal a > span.btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100% !important;
        max-width: 100%;
        min-height: 52px;
        margin-left: 0 !important;
        margin-right: 0 !important;
        font-size: 17px;
        border-radius: 10px;
    }
    /* The application pop-up keeps its own Next/Previous buttons */
    .site-wrapper-reveal .modal button.btn { width: auto !important; min-height: 48px; }

    /* /apply hero: stack Apply Now and Learn More with a gap */
    .s-s-pa > .row { margin: 0 0 28px; gap: 12px; }
    .s-s-pa > .row > * { flex: 0 0 100%; max-width: 100%; padding: 0 !important; margin: 0 !important; }
    .s-s-pa > .row > a { display: block; width: 100%; }
    .s-s-pa > .row > a > .btn { margin: 0 !important; width: 100%; }

    /* /apply contact strip: less empty space, long email fits */
    .s-s-row { padding: 48px 0 !important; }
    .single-contact-list .row > .col-3 { flex: 0 0 56px; max-width: 56px; }
    .single-contact-list .row > .col-9 { flex: 1 1 0; max-width: none; }
    .single-contact-list .text { overflow-wrap: anywhere; font-size: 16px; }

    /* Home hero box sits inside the margins */
    .about-banner-wrap .row { margin-left: 0; margin-right: 0; }
    .main-banner { top: 0 !important; margin: 96px 0 24px; padding: 28px 20px !important; border-radius: 12px; }
    .main-banner h1 { font-size: 30px; }

    /* Hero intro and enquiry box use the full width (numbers stay on two lines) */
    .about-banner-content p[style*="width: 70%"] { width: 100% !important; padding: 20px 0 !important; }
    .about-banner-content p[style*="background: white"] {
        width: 100% !important;
        padding: 10px 12px !important;
        font-size: 14px;
        line-height: 1.6;
    }

    /* Desktop-sized gaps between sections */
    .site-wrapper-reveal .section-space--ptb_100,
    .site-wrapper-reveal .section-space--ptb_120 { padding-top: 56px !important; padding-bottom: 56px !important; }
    .site-wrapper-reveal .section-space--pt_100,
    .site-wrapper-reveal .section-space--pt_120 { padding-top: 56px !important; }
    .site-wrapper-reveal .section-space--pb_100,
    .site-wrapper-reveal .section-space--pb_120 { padding-bottom: 56px !important; }
}

/* R3: the video play button's pulse ring grew past the screen edge and let the page scroll sideways */
.single-popup-wrap, .video-popup { overflow: hidden; }

@media (max-width: 991.98px) {
    /* /bootcamp "Tech Stack" pictures (inline max-width 300px) were wider than their column on tablets */
    .ht-problem-solution img { max-width: 100% !important; height: auto; }
}

@media (max-width: 575.98px) {
    /* FAQ questions: keep the arrow clear of long question text */
    .site-wrapper-reveal .card-header h5 > button { padding-right: 44px !important; }
}

/* T-17: the full desktop menu now shows from 992px (was 1200px); keep each item on one line */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navigation-menu > ul > li { margin: 0 11px; }
    .navigation-menu > ul > li > a { white-space: nowrap; font-size: 15px; }
}
