/* =========================
   Mobile
========================= */
.back-to-top {
    display: none;
}

@media (max-width: 640px) and (pointer: coarse) {

    .call-btn,
    .head-nav > .call-btn,
    .head-content-buttons .call-btn,
    .footer-content-buttons .call-btn,
    .contact-section-buttons > .call-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .back-to-top {
        position: fixed;
        left: 18px;
        bottom: 18px;
        z-index: 900;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 1px solid rgba(231, 241, 251, 0.92);
        border-radius: 50%;
        background-color: var(--color-blue-medium);
        color: var(--color-white);
        font-size: 1.35rem;
        font-weight: 700;
        line-height: 1;
        box-shadow: 0 0.35rem 0.9rem rgba(10, 55, 104, 0.22);
        cursor: pointer;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
    }

    .back-to-top.is-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

@media (min-width: 560px) {
    .work-process-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================
   Tablet and desktop
========================= */
@media (min-width: 769px) {
    .head-content-text-tel {
        display: block;
    }
}

/* =========================
   Tablet and up
========================= */
@media (min-width: 769px) {
    .head-nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
    }

    .head-nav-list {
        flex-direction: row;
        gap: 0.15rem;
    }

    .head-content {
        width: min(100% - 2rem, 1100px);
        margin: 0 auto;
        padding: clamp(4rem, 10vw, 8rem) 1rem clamp(4rem, 9vw, 7rem);
        align-items: flex-start;
        text-align: left;
    }

    .head-content-title {
        max-width: 18ch;
    }

    .footer-content-buttons,
    .head-content-buttons,
    .contact-section-buttons {
        flex-direction: row;
        justify-content: flex-start;
    }

    .services-intro .container {
        align-items: stretch;
    }

    .what-includes {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 2em;
    }

    .includes {
        flex: 1 1 60%;
    }

    .guarantee {
        flex: 1 1 40%;
        text-align: left;
    }

    .montages-list {
        display: flex;
        gap: 1rem;
        width: 100%;
    }

    .montages-list.row-1 .montage-card {
        flex: 1 1 25%;
    }

    .montages-list.row-2 {
        justify-content: center;
    }

    .montages-list.row-2 .montage-card {
        flex: 0 1 calc(36% - 0.75rem);
        max-width: 360px;
    }

    .real-photos-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .work-process-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-section-content {
        flex-direction: row;
        align-items: stretch;
    }

    .contact-info-box {
        flex: 1 1 50%;
    }

    .important-before-contact-box {
        padding: 1.8rem 2rem;
    }

    .important-before-contact-list {
        gap: 1.1rem;
    }

    .footer-content-title,
    .footer-content-text {
        text-align: left;
    }

    .footer-meta-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (min-width: 769px) and (max-width: 1023px) and (orientation: landscape) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .work-process-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .head-nav {
        padding: 0.9rem clamp(2rem, 5vw, 4rem);
    }

    .head-content {
        padding: clamp(5rem, 11vw, 9rem) 2rem clamp(5rem, 10vw, 8rem);
    }

    .real-photos-list {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .services-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .work-process-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .work-step {
        min-height: 250px;
    }

    .service-box {
        min-height: 150px;
    }

    .footer-content-buttons {
        justify-content: center;
    }
}

@media (min-width: 900px) {
    .page-services .work-process-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 769px) and (orientation: portrait) and (pointer: coarse) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (min-width: 769px) and (hover: hover) and (pointer: fine) {
    .head-content {
        margin-top: 5.25rem;
    }

    .head-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        border-bottom: 1px solid rgba(219, 230, 239, 0.78);
        background-color: rgba(255, 255, 255, 0.93);
        box-shadow: 0 0.7rem 1.7rem rgba(20, 43, 66, 0.08);
        backdrop-filter: blur(12px);
    }

    .head-nav .logo-text,
    .head-nav-list a {
        color: var(--color-blue-dark);
    }

    .head-nav-list a:hover,
    .head-nav-list a.is-active {
        background-color: var(--color-blue-pale);
    }

    .head-nav .logo-icon {
        border-color: rgba(23, 105, 179, 0.26);
        box-shadow: none;
    }
}
