/* Специальные стили для старых версий Chrome на Android */
@supports (-webkit-appearance: none) {
    .burger-menu {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-perspective: 1000;
        perspective: 1000;
    }
    
    .burger-menu span {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform, opacity;
    }
}

/* Специальные стили только для Chrome на Android */
.burger-menu.chrome-android svg {
    stroke-width: 2.5;
}

/* Android Chrome specific optimizations */
@supports (-webkit-appearance: none) {
    .burger-menu {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-perspective: 1000;
        perspective: 1000;
    }
    
    .burger-menu span {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform, opacity;
    }
}

/* Mobile Header Styles - Only for mobile devices */
@media screen and (max-width: 690px) {
    .header-container {
        height: 60px;
        padding: 0 20px;
    }

    .header .logo img {
        height: 40px;
    }

    /* Hide desktop nav and show burger menu */
    .nav {
        display: none;
    }
    
    .burger-menu {
        display: flex !important;
        z-index: 1001;
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        padding: 8px;
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        align-items: center;
        justify-content: center;
    }
    
    .burger-menu:active {
        background-color: rgba(255, 255, 255, 0.2);
    }
    
    .burger-menu svg {
        width: 24px;
        height: 24px;
        stroke: #FFFFFF;
    }

    /* Mobile nav styles */
    .nav.mobile-nav {
        display: block;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: rgba(7, 60, 96, 0.98);
        backdrop-filter: blur(10px);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        opacity: 0;
        visibility: hidden;
    }

    .nav.mobile-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        margin: 0;
        list-style: none;
    }

    .nav-list li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-list li:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: block;
        padding: 15px 20px;
        font-size: 1.1rem;
        text-align: center;
        color: var(--color-4);
        text-decoration: none;
        transition: background-color 0.3s ease;
    }

    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

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

    body {
        padding-top: 60px; /* Adjust for mobile header height */
    }
    
    /* Contacts page mobile styles */
    .contacts-page {
        padding: 50px 0 30px 0;
        overflow-x: hidden;
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
        margin: 0;
    }
    
    .contacts-page .cb {
        padding: 0;
        max-width: 100vw;
        width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
        margin: 0;
    }
    
    .contacts-page .s-head {
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
        padding: 0 10px;
        text-align: center;
    }
    
    .contacts-page .s-head h1 {
        font-size: 1.6rem;
        margin-bottom: 12px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.2;
    }
    
    .contacts-page .s-head p {
        font-size: 0.8rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        padding: 0 5px;
    }
    
    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 30px;
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
        padding: 0 10px;
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Contact card mobile styles */
    .contact-card {
        padding: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
        overflow: hidden;
        border-radius: 12px;
    }
    
    .contact-card h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
        text-align: center;
        line-height: 1.3;
    }
    
    .contact-item {
        padding: 15px;
        margin-bottom: 15px;
        gap: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        border-radius: 8px;
        min-height: 60px;
    }
    
    .contact-icon {
        width: 45px;
        height: 45px;
        flex-shrink: 0;
    }
    
    .contact-icon svg {
        width: 22px;
        height: 22px;
    }
    
    .contact-label {
        font-size: 0.8rem;
        opacity: 0.9;
        margin-bottom: 2px;
    }
    
    .contact-value:hover {
        color: rgba(255, 255, 255, 0.8);
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        word-break: break-all;
    }
    
    /* Social section mobile styles */
    .social-section {
        padding: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
        overflow: hidden;
        border-radius: 12px;
    }
    
    .social-section h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        text-align: center;
        line-height: 1.3;
    }
    
    .social-links {
        gap: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        align-items: stretch;
    }
    
    .social-link {
        padding: 10px 14px;
        font-size: 0.85rem;
        min-width: auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        border-radius: 25px;
        justify-content: center;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .social-link svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
}

/* Дополнительные стили для очень маленьких экранов */
@media screen and (max-width: 360px) {
    .contacts-page {
        padding: 40px 0 25px 0;
    }
    
    .contacts-page .cb {
        padding: 0;
    }
    
    .contacts-page .s-head {
        padding: 0 5px;
    }
    
    .contacts-page .s-head h1 {
        font-size: 1.4rem;
        line-height: 1.1;
    }
    
    .contacts-page .s-head p {
        font-size: 0.75rem;
        padding: 0 2px;
    }
    
    .contacts-grid {
        padding: 0 5px;
        gap: 8px;
    }
    
    .contact-card,
    .social-section {
        padding: 8px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
    }
    
    .contact-card h3,
    .social-section h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .contact-item {
        padding: 12px;
        margin-bottom: 12px;
        gap: 12px;
        min-height: 55px;
    }
    
    .contact-icon {
        width: 38px;
        height: 38px;
    }
    
    .contact-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .contact-label {
        font-size: 0.75rem;
        margin-bottom: 2px;
    }
    
    .contact-value:hover {
        color: rgba(255, 255, 255, 0.8);
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        word-break: break-all;
    }
    
    .social-link {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
    
    .social-link svg {
        width: 16px;
        height: 16px;
    }
}

footer form .fw  {
    flex-direction: column;
    align-items: stretch;
    /* padding: 30px 15px; */
}

footer form {
    padding: 20px;
}

footer .cb {
    padding: 0 15px;
}

section.services.cb {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px 15px;
}

section.info .b2 .btn {
    align-self: center;
}

section.services .b2 {
    gap: 15px;
    grid-template-columns: 1fr;
}

.popup video {
    width: calc(100% - 30px);
}

section.hero .text-block {
    gap: 120px;
}

section.about .b2 img.design {
    width: 60%;
    z-index: 1;
    right: -50px;
    opacity: 0.8;
    bottom: -110px;
    height: auto;
    z-index: -1;
}

section.points {
    padding: 30px 15px;
}

section.points h2:before {
    font-size: 5rem;
}

section.services .b2 div:nth-child(3) {
    grid-column: 1;
}

section.services img.design {
    position: absolute;
    height: 122px;
    top: 50px;
    right: 30px;
    bottom: auto;
    left: auto;
}

section.hero .text-block div .logo img {
    height: 70px;
}

section.hero .text-block div h1 {
    text-align: center;
    font-size: 1.5rem;
}

section.hero {
    padding: 15px;
}

section.hero .text-block div {
    flex-direction: column;
    gap: 50px;
}

section.hero .text-block div hr {
    display: none;
}

section.info {
    display: flex;
    flex-direction: column;
    padding: 0 0 30px 0;
    overflow: hidden;
}

section.services h2:before {
    font-size: 5rem;
}

footer form button {
    flex: auto;
}

section.about {
    padding: 0 0 30px 0;
    display: flex;
    flex-direction: column;
}

section.about .image {
    margin: 0;
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-position: left center;
    background-size: cover;
}

section.about:before {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    background: linear-gradient(to top, var(--color-4), var(--color-5), transparent);
}

section.points .container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0;
}

section.points .list.active {
    gap: 5px;
}

section.points .list span {
    height: 30px;
}

/* Мобильные стили для блока информации о городе */
section.points .location-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    margin: 0;
    max-width: 100%;
    width: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    overflow-y: auto;
}

section.points .location-info.active {
    display: block;
    opacity: 1;
}

section.points .location-photo {
    aspect-ratio: 16 / 9;
}

section.points .location-photo img {
    mask-image: 
        linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: 
        linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
}

section.points .location-text h3 {
    font-size: 1.1rem;
}

section.points .location-text p {
    font-size: 0.85rem;
}

section.services h2 {
    font-size: 2.3rem;
}

section.points h2 {
    font-size: 2.3rem;
}

section.points .cb {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

section.points .container .b2 {
}

section.info h2 {
    font-size: 2.3rem;
    line-height: 2.2rem;
}

section.points .container .b2 button.l {
    align-self: auto;
}

section.points .b1 {
    order: 2;
}

section.about h2 {
    font-size: 3rem;
}

section.about .cb {
    grid-template-columns: 1fr;
    gap: 0px;
    position: relative;
    z-index: 1;
}

section.info:before {
    width: 100%;
    height: auto;
    z-index: 1;
    aspect-ratio: 1 / 1;
    background: linear-gradient(to top, var(--color-4), var(--color-5), transparent);
}

section.info .b2 {
    padding: 0 15px;
    position: relative;
    z-index: 1;
}

section.info .b2 button {
    align-self: auto;
}

section.info .cb {
    grid-template-columns: 1fr;
    gap: 20px
}

section.info .image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
}
