/* Единая компактная навигация для планшетов и телефонов. */
.hamburger {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
}

.footer-content > * {
    min-width: 0;
}

.footer-links,
.footer-social {
    max-width: 100%;
    flex-wrap: wrap;
}

.footer-social img {
    width: 1em;
    height: 1em;
    object-fit: contain;
    vertical-align: middle;
}

@media (max-width: 1200px) {
    .navbar {
        padding: 0.45rem 0;
    }

    .nav-container {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        min-height: 32px;
        padding: 0 16px;
    }

    .nav-logo {
        gap: 8px;
        max-width: calc(100% - 54px);
        min-width: 0;
        font-size: 0.92rem;
        line-height: 1.1;
    }

    .nav-logo img {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
        object-fit: contain;
    }

    .nav-logo span {
        max-width: 220px;
        overflow: hidden;
        font-size: 0.92rem;
        line-height: 1.1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .social-links {
        display: none;
    }

    .hamburger {
        position: absolute;
        top: 50%;
        right: 12px;
        z-index: 1002;
        display: flex;
        width: 38px;
        height: 38px;
        padding: 7px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        cursor: pointer;
        transform: translateY(-50%);
    }

    .hamburger span,
    .hamburger .bar {
        display: block;
        width: 24px;
        height: 2px;
        margin: 0;
        border-radius: 2px;
        background: var(--text-dark, #333);
        transition: transform 0.25s ease, opacity 0.2s ease;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        top: 47px;
        left: -100%;
        z-index: 1000;
        display: flex;
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 47px);
        max-height: calc(100dvh - 47px);
        margin: 0;
        padding: 6px 0 8px;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: linear-gradient(135deg, var(--primary-gold, #f7ca3e), var(--primary-orange, #ff9f1c));
        box-shadow: var(--shadow, 0 4px 12px rgba(0, 0, 0, 0.2));
        text-align: center;
        transition: left 0.25s ease;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .nav-link {
        display: block;
        width: 100%;
        padding: 7px 16px;
        font-size: 1rem;
        line-height: 1.2;
        white-space: normal;
    }

    .nav-link::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.35rem 0;
    }

    .nav-container {
        min-height: 30px;
        padding: 0 12px;
    }

    .nav-logo img {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .nav-logo span {
        max-width: 190px;
        font-size: 0.86rem;
    }

    .hamburger {
        right: 7px;
        width: 36px;
        height: 36px;
        padding: 6px;
    }

    .nav-menu {
        top: 42px;
        max-height: calc(100vh - 42px);
        max-height: calc(100dvh - 42px);
        padding: 4px 0 6px;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 0.95rem;
    }

    .services-section .section-title {
        max-width: 100%;
        font-size: 1.75rem;
        overflow-wrap: anywhere;
    }

    .services-content,
    .services-list-styled,
    .services-category,
    .category-header,
    .category-header h3,
    .service-card,
    .additional-service-item {
        min-width: 0;
        max-width: 100%;
    }

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

    .services-category {
        padding: 20px;
    }

    .category-header h3,
    .service-card,
    .additional-service-item {
        overflow-wrap: anywhere;
    }
}
