/* =====================================================
   PHONE AND TABLET FIXES (loaded last, on every page)
===================================================== */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Safety net: nothing inside the page may make it wider than the screen.
   "clip" (not "hidden") so sticky elements keep working. */
#main-content {
    overflow-x: clip;
}

@media (max-width: 1100px) {
    :is(.cm-faq-section, .cm-blog-section) :is(*, *::before, *::after) {
        box-sizing: border-box;
    }
}

/* SHARED HOSTING HERO: text first, no empty space around the picture */

@media (max-width: 860px) {
    .cmsh-hero-visual {
        order: 0;
        justify-content: center;
        min-height: 0;
    }

    .cmsh-hero-visual img {
        width: 100%;
        transform: none;
    }
}

/* HOME: product cards. The mock-ups sit below the text instead of over it. */

@media (max-width: 700px) {
    .products-section .products-header h2 {
        font-size: clamp(27px, 8vw, 34px);
        letter-spacing: -1px;
        text-wrap: balance;
    }

    .products-section .products-header h2 br {
        display: none;
    }

    .products-section .product-card-large {
        min-height: 0;
        padding-bottom: 0;
    }

    .products-section :is(.hosting-dashboard, .wordpress-dashboard) {
        position: relative;
        right: auto;
        bottom: auto;
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        margin: 28px 0 -24px;
    }

    .products-section .wordpress-dashboard {
        margin-bottom: 0;
    }

    /* HOME: "Real Human Support" card */

    .why-cloudmate .why-support-card {
        min-height: 470px;
    }

    .why-cloudmate .why-support-content > p {
        max-width: none;
    }

    .why-cloudmate .why-support-content .why-check-list li {
        max-width: 46vw;
        font-size: 13px;
    }

    .why-cloudmate .why-support-visual {
        width: 42%;
        height: 50%;
    }
}

/* READABLE TEXT AND EASIER TAPPING */

@media (max-width: 600px) {
    .cm-footer a {
        font-size: 13px;
    }

    .cm-faq-section .cm-faq-question {
        font-size: 14px;
    }

    .cm-faq-section {
        padding: 60px 0;
    }

    .cm-blog-section :is(.cm-article-date, .cm-latest-header a) {
        font-size: 11px;
    }

    .cm-blog-section .cm-article-info h4 {
        font-size: 13px;
    }

    .why-cloudmate :is(.why-header p, .why-feature-card p, .why-check-list li),
    .why-cloudmate .why-support-content > p {
        font-size: 14px;
    }

    .products-section .product-content > p {
        font-size: 14px;
    }

    .products-section .product-features li {
        font-size: 13px;
    }

    .cmsh-page .cmsh-plan-description,
    .pricing-section .pricing-feature,
    .pricing-section .pricing-card p {
        font-size: 14px;
    }

    .cm-hero .cm-domain-input,
    .cm-hero input[type="text"] {
        font-size: 16px; /* below 16px iPhones zoom in when the field is tapped */
    }

    .cm-hero input::placeholder {
        font-size: 14px;
    }
}

/* Cards between phone and desktop size (tablets, and phones in desktop mode):
   leave room so the pictures don't cover the text. */

@media (min-width: 701px) and (max-width: 1100px) {
    .products-section .product-card.product-card-large {
        grid-column: 1 / -1;
        min-height: 400px;
    }

    .products-section .wordpress-dashboard {
        width: 48%;
    }
}

@media (min-width: 851px) and (max-width: 1100px) {
    .case-studies .case-card {
        min-height: 440px;
    }
}

@media (max-width: 1100px) {
    .why-cloudmate .why-feature-card .why-price-btn {
        margin-top: auto;
    }

    .why-cloudmate .why-feature-card p {
        margin-bottom: 14px;
    }
}
