/* Extra large devices (large desktops, 1200px and up) */

/* Large devices (desktops, 991px and down) */

@media (max-width: 991px) {
    :root {
        --hero-scale: 1.4;
    }
    html {
        font-size: 93.75%;
    }
    .header-bg {
        background-color: #222329;
    }
    .contact-wrapper {
        padding: 100px 50px;
    }
    .contact-item {
        display: inline-block;
        margin-right: 40px;
        margin-bottom: 30px;
    }
}

/* Medium devices (tablets, 768px and down) */

@media (max-width: 767px) {
    .counter,
    .testimonials,
    .contact-wrapper {
        padding: 100px 30px;
    }
    .work-popup {
    	padding: 60px 15px;
    }
}

/* Small devices (mobile, 575px and down) */
@media (max-width: 991px) {
    header .menu-item {
        padding: 0 10px;
    }
}

@media (max-width: 575px) {
    :root {
        --hero-scale: 1;
    }
    html {
        font-size: 87.5%;
    }
    .image-overlay h1 {
        margin-bottom: 15px;
    }
    .work-popup {
    	padding: 60px 0px;
    }
    .work-popup .work-details-2 .work-info {
    	margin-bottom: 60px;
    }
    .filter-buttons {
        margin-bottom: 40px;
    }
    .filter-buttons button {
        padding: 0 10px;
        display: block;
        margin-bottom: 5px;
    }
}

/* extraSmall devices ( 400px and down) */
@media (max-width: 400px) {
    html {
        font-size: 81.25%;
    }
    .counter,
    .testimonials,
    .contact-wrapper {
        padding: 75px 15px;
    }
    .clients {
        padding: 75px 0;
    }
    .image-overlay h1 {
        margin-bottom: 15px;
    }
    .counter span {
        letter-spacing: 2px;
    }
    .counter h4 {
        margin-bottom: 12px;
    }
    .counter i {
        margin-bottom: 12px;
    }
    .testimonial-single-item p {
        line-height: 170%;
    }
    .no-bg-img.imagery {
        padding-top: 120px;
    }
}

/* ==========================================================================
   MOBILE NAVIGATION AND CAPTIONS
========================================================================== */

@media (max-width: 767px) {
    /* plain side padding on small screens (no calc/max needed) */
    footer,
    section:not(.imagery) {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* section gap 40px, body text about 70% of desktop size */
    section {
        margin-top: 40px;
        margin-bottom: 40px;
    }
    header + section {
        margin-top: 0;
    }
    section.dark {
        margin-bottom: 0;
        padding-top: 30px;
        padding-bottom: 30px;
    }
    footer {
        padding-top: 30px;
        padding-bottom: 30px;
    }
    .section-title {
        margin-bottom: 20px;
    }

    /* gallery: edge to edge, no gaps */
    section.image-gallery {
        padding-left: 0;
        padding-right: 0;
    }
    .image-gallery .row {
        margin-left: 0;
        margin-right: 0;
    }
    .image-gallery figure {
        margin: 0;
        padding: 0;
    }
    .image-gallery figure::after {
        right: 10px;
    }

    /* tables must not be wider than the screen */
    table {
        table-layout: fixed;
    }
    table tr td {
        padding: 0.5em;
        overflow-wrap: break-word;
    }
    table tr td:nth-of-type(1) {
        width: 35%;
    }

    /* default: keep all items in a second row, shrink them to fit */
    header,
    header .content {
        height: 80px;
    }
    .logo {
        top: 10px;
    }
    .logo img {
        height: 30px;
    }
    .logo-brand {
        left: 78px;
        right: auto;
        top: 12px;
    }
    header .social-icons {
        top: 16px;
        right: 10px;
    }
    .social-icons img {
        width: 18px;
        height: 18px;
    }
    .social-icons li {
        margin: 0 3px;
    }
    .logo-brand img {
        width: 70px;
    }
    header nav {
        top: 46px;
        left: 0;
        right: 0;
        line-height: 28px;
        font-size: var(--fs-sm);
        text-align: center;
    }
    .menu-item {
        padding: 0 6px;
    }
    .image-overlay {
        padding-top: 100px;
    }
    .image-overlay .content > * {
        max-width: 100%;
    }

    /* header.dropdown-nav: collapsible navigation */
    .dropdown-nav,
    .dropdown-nav .content {
        height: 60px;
    }
    .dropdown-nav .logo {
        top: 15px;
    }
    .dropdown-nav .logo-brand {
        left: 78px;
        right: auto;
        top: 17px;
    }
    .dropdown-nav .social-icons {
        top: 21px;
        right: 55px;
    }
    .dropdown-nav .nav-btn {
        display: block;
        position: absolute;
        top: 10px;
        right: 15px;
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: var(--fs-lg);
        text-align: right;
        cursor: pointer;
    }
    .dropdown-nav .nav-btn span {
        display: block;
        transition: transform .3s;
    }
    .dropdown-nav .nav-toggle:checked ~ .nav-btn span {
        transform: rotate(180deg);
    }
    .dropdown-nav .nav-toggle:focus-visible ~ .nav-btn {
        outline: 2px solid #fff;
    }
    .dropdown-nav nav {
        top: 60px;
        max-height: 0;
        overflow: hidden;
        line-height: 45px;
        font-size: var(--fs-base);
        background-color: #151C25;
        transition: max-height .3s;
    }
    .dropdown-nav .nav-toggle:checked ~ nav {
        max-height: 400px;
    }
    .dropdown-nav .menu-items {
        padding-bottom: 10px;
    }
    .dropdown-nav .menu-items li {
        display: block;
    }
    .dropdown-nav .menu-item {
        padding: 0;
    }
    .dropdown-nav ~ .imagery .image-overlay {
        padding-top: 70px;
    }

    /* image sections: square image area (height = screen width), caption below it */
    .imagery {
        height: auto;
    }
    .imagery > img {
        position: static;
        display: block;
        height: 100vw;
    }
    .imagery > .image-overlay {
        bottom: auto;
        height: 100vw;
    }
    .imagery > .caption {
        position: static;
        width: auto;
        margin: 0;
    }
}
