/* Mobile-friendly section titles — max 2 lines on phones & small tablets */

@media (max-width: 768px) {
    .section-header,
    section.section-padding > .container > div[data-aos]:first-child,
    section.section-padding > .container > div[style*="text-align"]:first-child {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .section-header h2,
    section .section-header h2,
    .about-content > h2,
    section.section-padding > .container > h2,
    section.section-padding > .container > div[data-aos] > h2,
    section.section-padding > .container > div[style*="text-align"] > h2,
    section .text-center h2,
    section h2.text-2xl,
    .cta-banner h2,
    .page-header h1,
    #estimator-heading,
    section#refer-earn h2,
    .contact-form-wrapper h2 {
        font-size: clamp(1.15rem, 4.5vw, 1.6rem) !important;
        line-height: 1.25 !important;
        letter-spacing: -0.01em !important;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: 0 0.25rem;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        text-wrap: balance;
    }

    .section-header p,
    section.section-padding > .container > div[data-aos] > p,
    section.section-padding > .container > div[style*="text-align"] > p {
        font-size: 0.9rem !important;
        line-height: 1.55 !important;
        max-width: 100%;
        padding: 0 0.25rem;
    }

    .section-header span,
    section.section-padding > .container > div[data-aos] > span[style*="uppercase"] {
        font-size: 0.75rem !important;
        letter-spacing: 1.5px !important;
    }
}

@media (max-width: 480px) {
    .section-header h2,
    section .section-header h2,
    .about-content > h2,
    section.section-padding > .container > h2,
    section.section-padding > .container > div[data-aos] > h2,
    section.section-padding > .container > div[style*="text-align"] > h2,
    section .text-center h2,
    section h2.text-2xl,
    .cta-banner h2,
    .page-header h1,
    #estimator-heading,
    section#refer-earn h2,
    .contact-form-wrapper h2 {
        font-size: clamp(1.05rem, 5vw, 1.4rem) !important;
        -webkit-line-clamp: 2;
    }

    .page-header h1 {
        font-size: clamp(1.35rem, 6vw, 1.85rem) !important;
        line-height: 1.2 !important;
    }
}

@media (max-width: 360px) {
    .section-header h2,
    section .section-header h2,
    .about-content > h2,
    section.section-padding > .container > h2,
    section.section-padding > .container > div[data-aos] > h2,
    section.section-padding > .container > div[style*="text-align"] > h2,
    section .text-center h2,
    section h2.text-2xl,
    .cta-banner h2,
    .page-header h1,
    #estimator-heading {
        font-size: clamp(0.95rem, 5.5vw, 1.25rem) !important;
    }
}
