/* ==========================================================================
   IndeedClean - Responsive rules
   ========================================================================== */

/* ---------- Laptop ---------- */
@media (max-width: 1240px) {
    .hero__copy,
    .hero__visual,
    .work__head h2 {
        width: auto;
    }

    .section-head {
        grid-template-columns: 1.4fr 1fr;
        gap: 48px;
    }

    .footer__inner {
        grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
    }

    .hero__copy,
    .hero__visual {
        flex: 1 1 0;
    }
}

@media (max-width: 1080px) {
    h1 {
        font-size: 44px;
    }

    h2 {
        font-size: 34px;
    }

    .hero__inner {
        gap: 44px;
    }

    .row {
        gap: 40px;
    }

    .about__row {
        gap: 44px;
    }

    .about__card {
        height: 480px;
    }

    /* Two columns of checks get too narrow to read at this width */
    .about__list {
        grid-template-columns: 1fr;
    }

    .commit__left,
    .commit__right {
        padding: 42px 34px;
    }

    .commit__stat {
        left: 34px;
        bottom: 34px;
    }
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
    .section {
        padding: 72px 0;
    }

    .topbar__group--left .topbar__item:last-child,
    .topbar__group--right .topbar__item:first-child {
        display: none;
    }

    /* Desktop nav gives way to the burger menu */
    .nav {
        display: none;
    }

    .burger {
        display: flex;
    }

    .mobile-nav {
        display: block;
    }

    .hero {
        padding: 56px 0 72px;
    }

    .hero__inner {
        flex-direction: column;
        gap: 56px;
    }

    .hero__copy,
    .hero__visual {
        width: 100%;
    }

    .visual-card {
        height: 420px;
    }

    .visual-card__range::-webkit-slider-thumb {
        height: 420px;
    }

    .visual-card__range::-moz-range-thumb {
        height: 420px;
    }

    .section-head {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 40px;
    }

    .work-card {
        height: 380px;
    }

    .trust__inner {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .services__grid {
        grid-template-columns: 1fr 1fr;
    }

    .catalog__grid,
    .related__grid,
    .extras__grid {
        grid-template-columns: 1fr 1fr;
    }

    .slider {
        --per: 2;
    }

    .service:nth-child(3n) {
        border-right: 1px solid var(--line);
    }

    .service:nth-child(2n) {
        border-right: none;
    }

    .service:nth-last-child(-n + 3) {
        border-bottom: 1px solid var(--line);
    }

    .service:nth-last-child(-n + 2) {
        border-bottom: none;
    }

    .commit__panel,
    .offers__grid {
        grid-template-columns: 1fr;
    }

    /* Columns stack once there is no room for two side by side */
    .col-4,
    .col-6,
    .col-8 {
        grid-column: span 12;
    }

    .about__card {
        height: 420px;
    }

    .commit__right {
        padding-bottom: 150px;
    }

    .cta-banner__inner,
    .cta-bar__inner {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .cta-banner h2 {
        font-size: 28px;
    }

    .how__steps {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .how__steps::before {
        display: none;
    }

    .stats__inner {
        grid-template-columns: 1fr 1fr;
        gap: 40px 0;
        padding: 48px 0;
    }

    .stats__item:nth-child(odd) {
        border-left: none;
    }

    .footer__inner {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 620px) {
    h1 {
        font-size: 34px;
    }

    h2 {
        font-size: 27px;
    }

    h3 {
        font-size: 21px;
    }

    .container {
        padding: 0 18px;
    }

    .topbar__inner {
        justify-content: center;
    }

    .topbar__group--right {
        display: none;
    }

    .header__inner {
        height: 72px;
    }

    .hero__actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .visual-card {
        height: 330px;
    }

    .visual-card__range::-webkit-slider-thumb {
        height: 330px;
    }

    .visual-card__range::-moz-range-thumb {
        height: 330px;
    }

    .hero__stats {
        left: 16px;
        right: 16px;
        padding: 18px;
    }

    .hero__stats strong {
        font-size: 21px;
    }

    .trust__inner,
    .services__grid,
    .about__list,
    .commit__grid,
    .footer__inner {
        grid-template-columns: 1fr;
    }

    .catalog__grid,
    .related__grid,
    .extras__grid,
    .loyalty__grid {
        grid-template-columns: 1fr;
    }

    .service-detail__photo img {
        height: 320px;
    }

    .cta-estimate h2 {
        font-size: 24px;
    }

    .loyalty-card {
        border-radius: 0;
    }

    /* One card at a time on mobile */
    .slider {
        --per: 1;
    }

    /* The quote button also lives in the mobile menu */
    .header__cta {
        display: none;
    }

    .service {
        border-right: none !important;
        border-bottom: 1px solid var(--line) !important;
    }

    .service:last-child {
        border-bottom: none !important;
    }

    /* Below the photo rather than over it, so the quote stays readable */
    .about__quote {
        position: static;
        margin-top: 18px;
        left: auto;
        right: auto;
        bottom: auto;
    }

    .about__card {
        height: 340px;
    }

    .quote__text {
        font-size: 22px;
    }

    .stats__inner {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .stats__item {
        border-left: none !important;
    }

    .offer {
        grid-template-columns: 88px 1fr;
    }

    .footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .filters {
        flex-wrap: wrap;
    }
}
