/*
 * Responsive layer, widest screens first, then down to the smallest phones.
 * Target widths: 320 375 425 480 575 768 991 1024 1280 1366 1440 1560 1920 2160 2560 3840
 * Breakpoints follow Bootstrap 5 (576 / 768 / 992 / 1200 / 1400) plus extra steps for
 * large monitors and the narrowest phones.
 */

/* ---------- Large monitors: 1560 / 1920 / 2160 / 2560 / 3840 ---------- */

/* 1560 */
@media (min-width: 1560px){
    .container{
        max-width: 90rem;
    }
}
/* 1920: full HD gets a wider page; text stays at 16px */
@media (min-width: 1920px){
    .container{
        max-width: 100rem;
    }
}
/* 2160 / 2560 / 3840: everything is sized in rem, so raising the root font size
   scales text, spacing, buttons, cards and the container together */
@media (min-width: 2160px){
    html{
        font-size: 112.5%;
    }
}
@media (min-width: 2560px){
    html{
        font-size: 125%;
    }
}
@media (min-width: 3840px){
    html{
        font-size: 175%;
    }
    .dropdown-menu{
        border-bottom-width: 6px;
    }
    .d-border{
        border-width: 5px;
    }
}

/* ---------- Laptops: 1280 / 1366 (1200 - 1399) ---------- */
@media (max-width: 1399px){
    .work-card{
        height: 21rem;
    }
}

/* ---------- Small laptops and landscape tablets: 1024 (992 - 1199) ---------- */
@media (max-width: 1199px){
    /* Lets the footer's links and newsletter columns join its 2x2 tablet grid */
    .footer-links-wrap,
    .footer-links-wrap > .row{
        display: contents;
    }
    .footer-links-wrap > .row > *{
        margin-top: 1rem;
        padding-left: .5rem;
        padding-right: .5rem;
    }
    .service .serviceimgsec .col-md-6{
        margin-bottom: 1.5rem;
    }
    nav .nav-item .nav-link{
        padding: .375rem .5rem !important;
    }
    .logo-img{
        max-height: 5rem;
    }
    .work-card{
        height: 20rem;
    }
    .help-card img{
        height: 13rem;
    }
}
@media (min-width: 992px) and (max-width: 1199px){
    nav .nav-item .nav-link{
        font-size: .8125rem;
    }
}

/* ---------- Tablets: 768 / 991 (up to 991) ---------- */
@media (max-width: 991px){
    .toggler{
        display: block !important;
    }
    .header-con{
        display: none !important;
    }

    /* Collapsed menu: sub menus open on tap and only take space when open */
    .navbar-collapse{
        border-top: 1px solid var(--secondary2-color);
        margin-top: .5rem;
        padding: .5rem 0;
        max-height: calc(100dvh - 7rem);
        overflow-y: auto;
    }
    nav .nav-item .nav-link{
        font-size: .9375rem;
        padding: .5rem .75rem !important;
    }
    nav .nav-item .dropdown-toggle::after{
        content: "";
        display: inline-block;
        margin-left: .4em;
        vertical-align: .2em;
        border-top: .35em solid;
        border-right: .35em solid transparent;
        border-left: .35em solid transparent;
    }
    .dropdown-menu{
        display: none;
        visibility: visible;
        opacity: 1;
        transition: none;
        margin: 0 2px .25rem;
    }
    .dropdown-menu.show{
        display: block;
    }
    .dropdown-menu li{
        padding: 0;
    }
    .dropdown-menu .dropdown-item{
        font-size: .875rem;
        padding: .625rem 1rem;
        white-space: normal;
    }
    .navbar-toggler:focus{
        box-shadow: 0 0 0 .2rem rgba(204, 54, 40, .35);
    }
    .logo-img{
        max-height: 4.375rem;
    }

    .bottom-header{
        padding: .75rem 0;
    }
    .bottom-header .custom-btn{
        font-size: .8125rem;
        padding: .5rem 1rem;
    }

    .hero .crousel-header{
        font-size: clamp(1.25rem, 3.5vw, 2rem);
        left: 50%;
        right: auto;
        transform: translate(-50%);
        text-align: center;
        width: 80%;
    }

    .p-60{
        padding: 3rem 0;
    }
    /* Fixed backgrounds are not supported on iOS and jump on Android. The left of the
       estimate photo is red, so show its light side and back the text with a panel. */
    .estimate{
        background-attachment: scroll;
        background-position: 85% center;
    }
    .estimate-content{
        background-color: rgba(255, 255, 255, .85);
        padding: 1.5rem;
        border-radius: 8px;
    }

    .service .serviceimgsec img{
        width: 28.125rem;
    }
    .service-image{
        width: 28.125rem;
    }
    .story-image{
        float: right;
        width: 200px !important;
    }
    .help-link-body{
        min-height: 11rem;
    }
    .other-banner{
        padding: 4.5rem 0;
    }
}

/* ---------- Large phones and small tablets: 575 (up to 767) ---------- */
@media (max-width: 767px){
    .p-60{
        padding: 2.5rem 0;
    }
    .capText{
        font-size: 1.0625rem;
        padding: .75rem 1.75rem;
    }

    .work-card{
        height: 18.75rem;
    }

    .service .serviceimgsec .col-md-6{
        width: 100%;
    }
    .service .serviceimgsec img{
        width: 100%;
    }
    .help-link-body{
        min-height: 0;
    }
    .drain-shield .liquide-img{
        display: block;
        margin: 0 auto 1.5rem;
    }

    footer{
        padding-top: 2.5rem;
    }
    footer .row.mb-5{
        margin-bottom: 2rem !important;
    }
    footer h3.mb-5{
        margin-bottom: 1.5rem !important;
    }
    .footer-bottom .d-flex{
        flex-direction: column;
        text-align: center;
        gap: .5rem;
    }
}

/* ---------- Phones: 425 / 480 / 575 (up to 575) ---------- */
@media (max-width: 575px){
    .logo-img{
        max-height: 3.75rem;
    }
    .bottom-header .d-flex{
        gap: .5rem;
    }

    .hero .carousel-item img{
        min-height: 15rem;
    }
    .hero .crousel-header{
        font-size: 1.25rem;
        width: 86%;
        top: 12%;
    }
    .carousel-control-prev,
    .carousel-control-next{
        width: 12%;
    }

    .help-card img{
        height: 12.5rem;
    }
    .forHelp .help-card .card-body{
        padding: 1.25rem;
    }
    .whyChoose-img{
        max-width: 6.5rem;
    }
    .owl-theme .owl-nav [class*=owl-]{
        font-size: 2.5rem !important;
    }

    .works-filter .filter-btn{
        font-size: 1rem;
        padding: .375rem 1rem;
    }
    .work-card{
        height: 16.25rem;
        margin-bottom: 1.25rem;
    }
    .work-card-text{
        font-size: 1rem;
        padding: .75rem;
    }

    .other-banner{
        padding: 3.5rem 0;
    }

    .area-cleaning .table td img{
        width: 70px;
    }
    .area-cleaning .table tbody tr td{
        padding: .5rem;
        font-size: .875rem;
    }
    /* The decorative drain photo beside the link table leaves too little room on phones */
    .area-cleaning .area-table-img{
        display: none;
    }
    .town-search-input{
        max-width: none;
    }

    .story-image{
        width: 40% !important;
    }
    .drain-img{
        width: 40%;
        height: auto;
    }
    .video-card .video-title{
        font-size: 1.125rem;
    }
    .contact .con-box{
        padding: 1rem;
    }
    .employ-card{
        padding: 1rem;
    }
    .employ-card h4.mb-5{
        margin-bottom: 1.5rem !important;
    }
}

/* ---------- Small phones: 375 / 425 (up to 424) ---------- */
@media (max-width: 424px){
    .capText{
        font-size: 1rem;
        padding: .75rem 1.25rem;
    }
    .custom-btn{
        font-size: 1rem;
    }
    /* Full-width photo above the text instead of a narrow float */
    .story-image{
        float: none;
        width: 100% !important;
        margin: 0 0 1rem !important;
    }
    .drain-img{
        float: none;
        display: block;
        width: 70%;
        max-width: 70%;
        margin: 0 auto 1rem !important;
    }
    .area-cleaning .table tbody tr td{
        font-size: .8125rem;
    }
}

/* ---------- Smallest phones: 320 (up to 374) ---------- */
@media (max-width: 374px){
    .bottom-header .custom-btn{
        font-size: .75rem;
        padding: .5rem .625rem;
    }
    .hero .crousel-header{
        font-size: 1.125rem;
    }
    .whyChoose-img{
        max-width: 5.5rem;
    }
    .work-card{
        height: 14.5rem;
    }
    .d-border{
        padding: 1.25rem .75rem;
    }
}
