/*
 * Phone layout fixes for the course-page template (R2).
 * Loaded last in layouts/regular.blade.php and pages/index.blade.php.
 * Applies only below 576px wide, so tablet and desktop are unchanged.
 */

@media (max-width: 575.98px) {
    body { overflow-x: hidden; }
    @supports (overflow: clip) { body { overflow-x: clip; } }

    /* Course page hero: side margins, readable text, full-width buttons */
    .hero { padding-left: 20px; padding-right: 20px; }
    .hero h1 { font-size: 30px !important; line-height: 1.2 !important; }
    .hero p.leading-10 { font-size: 17px !important; line-height: 1.6 !important; }
    .hero p.leading-10 br { display: none; }
    .hero .mb-24 { margin-bottom: 48px !important; }
    .hero a { display: block; width: 100%; }
    .hero a > button, .hero a > span {
        width: 100% !important; height: auto !important; min-height: 52px;
        padding: 12px 16px !important; font-size: 17px !important; line-height: 1.3;
    }
    .hero a[href*="wa.me"] > button, .hero a[href*="wa.me"] > span { font-size: 15px !important; }

    /* Big headings on the regular-programme form and other template pages */
    h1.text-5xl { font-size: 34px !important; line-height: 1.15 !important; }
    .text-4xl { font-size: 28px !important; line-height: 1.2 !important; }

    /* Forms: 16px text stops iPhone zooming, comfortable tap height, full-width submit */
    form input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
    form select, form textarea { font-size: 16px !important; min-height: 48px; }
    form button[type=submit] { width: 100%; min-height: 52px; font-size: 17px; border-radius: 10px; }
}


@media (max-width: 575.98px) {
    /* Every link-button in page content is full width inside the margins */
    .flex.justify-center > a, .flex.justify-center.lg\:block > a { display: block; width: 100%; padding: 0 20px; }
    a > button.w-\[229px\], a > span.w-\[229px\] { width: 100% !important; min-height: 52px; font-size: 16px !important; }
}

/* R3: phones and tablets */
@media (max-width: 991.98px) {
    /* Testimonial quotes were 16px text squeezed to a 16px line height */
    p.leading-4 { line-height: 1.6 !important; font-size: 16px; }

    /* Footer links: bigger tap targets */
    ul.text-sm.font-thin a { display: inline-block; padding: 8px 0; font-size: 16px; }
    ul.text-sm.font-thin li { margin-bottom: 0 !important; }
}
