/* Visual QA: confirmed tablet and mobile overflow fixes. */
@media (min-width: 768px) and (max-width: 1023px) {
    .hed .container.hed-title-div {
        width: calc(100vw - 160px);
        max-width: calc(100vw - 160px);
        box-sizing: border-box;
    }
    .hed .container.hed-title-div .row,
    .hed .container.hed-title-div .title {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .hed-port .container.hed-title-div-port {
        width: calc(100vw - 160px);
        max-width: calc(100vw - 160px);
        box-sizing: border-box;
    }
    .hed-port .container.hed-title-div-port .title {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 767px) {
    .hed-port .container.hed-title-div-port {
        width: calc(100% - 48px);
        max-width: calc(100% - 48px);
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }
    .hed-port .title {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        font-size: clamp(30px, 8.5vw, 42px) !important;
        line-height: 1.1 !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: break-word;
        box-sizing: border-box;
    }
}

@media (max-width: 700px) {
    .hed .iconpok {
        box-sizing: border-box;
        width: 100px;
        max-width: 100%;
    }
}

@media (max-width: 700px) {
    #home-content ~ #trigger-overlay {
        display: none;
    }
}

@media (max-width: 700px) {
    .hed .iconpok span {
        font-size: 12px;
        line-height: 1.2;
        white-space: nowrap;
    }
}

@media (max-width: 700px) {
    .hed .iconpok {
        position: relative;
        width: 84px;
        height: 84px;
        line-height: normal;
    }
    .hed .iconpok img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    .hed .iconpok span {
        position: absolute;
        top: calc(100% + 8px);
        left: 50%;
        display: block !important;
        margin: 0 !important;
        transform: translateX(-50%);
        font-size: 12px;
        line-height: 1.2;
        white-space: nowrap;
    }
}

@media (max-width: 700px) {
    #portfolio-work-content ~ #trigger-overlay {
        display: none;
    }
}

/* Russian hero labels: place longer translated labels below original icon buttons. */
.ru-hero-nav .iconpok {
    position: relative;
    line-height: normal;
}
.ru-hero-nav .iconpok span {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    display: block !important;
    margin: 0 !important;
    transform: translateX(-50%);
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
}


/* 2026-08-21: post title responsive containment */
@media (max-width: 1024px) {
    .section--post .section__header,
    .section--post .post {
        width: 100%;
        max-width: calc(100vw - 148px);
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    .section--post .post-hero-title {
        display: block !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: break-word;
        letter-spacing: clamp(1px, 1.3vw, 5px) !important;
        font-size: clamp(24px, 6.4vw, 42px);
        line-height: 1.15;
    }
}

/* 2026-08-21: post mobile width reset */
@media (max-width: 700px) {
    .section--post .section__header,
    .section--post .post {
        max-width: calc(100vw - 36px);
    }
}


/* 2026-08-21: Russian Services mobile hero containment */
@media (max-width: 767px) {
    .servicesbox .hed-port .hed-title-div-port {
        left: 50%;
        width: calc(100vw - 48px) !important;
        max-width: calc(100vw - 48px) !important;
        margin: 0 !important;
        transform: translateX(-50%);
    }

    .servicesbox .hed-port .hed-title-div-port .col-xs-12 {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .servicesbox .hed-port .title {
        width: 100%;
        max-width: 100%;
        margin: 0;
        font-size: clamp(30px, 10.5vw, 42px) !important;
        line-height: 1.1 !important;
        text-align: center;
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: break-word;
        box-sizing: border-box;
    }
}


/* 2026-08-21: Russian Hire mobile hero containment */
@media (max-width: 767px) {
    .ru-hire-hero .hed-title-div-port {
        left: 50%;
        width: calc(100vw - 48px) !important;
        max-width: calc(100vw - 48px) !important;
        margin: 0 !important;
        transform: translateX(-50%);
    }

    .ru-hire-hero .hed-title-div-port .col-xs-12 {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .ru-hire-hero .title {
        width: 100%;
        max-width: 100%;
        margin: 0;
        font-size: clamp(28px, 9vw, 34px) !important;
        line-height: 1.12 !important;
        letter-spacing: 0.25px !important;
        text-align: center;
        white-space: normal !important;
        overflow-wrap: normal;
        word-break: normal;
        box-sizing: border-box;
    }
}
