/* Mobile adaptation layer for the homepage. Keep this file last in the cascade. */

@media (max-width: 767px) {
    :root {
        --radius-lg: 18px;
        --radius-md: 14px;
        --radius-sm: 10px;
    }

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    body {
        -webkit-text-size-adjust: 100%;
    }

    .container,
    .site-footer .container,
    .site-footer__bottom {
        width: calc(100% - 28px) !important;
        max-width: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .section {
        padding: 34px 0 !important;
    }

    .section-head {
        max-width: 100% !important;
        margin-bottom: 18px !important;
        text-align: left !important;
    }

    .section-head--center {
        text-align: center !important;
    }

    h1,
    h2,
    h3 {
        letter-spacing: 0 !important;
        overflow-wrap: anywhere;
    }

    h1 {
        font-size: 28px !important;
        line-height: .96 !important;
    }

    h2,
    .frost .section-head h2 {
        font-size: 22px !important;
        line-height: .98 !important;
    }

    h3 {
        font-size: 22px !important;
        line-height: 1.02 !important;
    }

    .section-head p,
    .hero-card p,
    .product-section__content p,
    .request-form-card p {
        font-size: 13px !important;
        line-height: 1.42 !important;
    }

    .btn,
    button.btn,
    a.btn {
        width: min(100%, 300px) !important;
        min-width: 0 !important;
        min-height: 46px !important;
        height: auto !important;
        padding: 12px 16px !important;
        border-radius: 8px !important;
        font-size: 13px !important;
        line-height: 1.15 !important;
        white-space: normal !important;
    }

    .white-card,
    .dark-card {
        border-radius: 18px !important;
    }

    /* Header */
    .site-header {
        position: sticky !important;
        top: 0;
        z-index: 1000;
        background: #fff !important;
    }

    .header-top {
        display: none !important;
    }

    .header-main__inner {
        min-height: 62px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;
    }

    .logo img {
        width: 82px !important;
    }

    .burger {
        display: inline-flex !important;
        width: 42px !important;
        height: 42px !important;
        border-radius: 10px !important;
        background: #fff !important;
        align-items: center !important;
        justify-content: center !important;
        border: 1px solid rgba(0, 0, 0, .12) !important;
        cursor: pointer !important;
    }

    .burger span {
        display: block !important;
        width: 22px !important;
        height: 2px !important;
        border-radius: 4px !important;
        background: #2d2d2d !important;
    }

    .site-nav {
        left: 14px !important;
        right: 14px !important;
        top: 70px !important;
        max-height: calc(100dvh - 84px);
        padding: 14px !important;
        border-radius: 16px !important;
        overflow-y: auto;
        background: #fff !important;
        box-shadow: 0 18px 44px rgba(0, 0, 0, .18) !important;
    }

    .site-nav__list {
        gap: 0 !important;
        font-size: 15px !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        padding: 0 !important;
    }

    .site-nav a,
    .nav-dropdown-toggle {
        min-height: 44px !important;
        padding: 0 10px !important;
        display: flex !important;
        align-items: center !important;
    }

    .product-dropdown {
        border-radius: 12px !important;
    }

    .header-main__cta {
        display: none !important;
    }

    /* Hero */
    .hero {
        padding: 20px 0 32px !important;
    }

    .hero__inner {
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
        gap: 16px !important;
    }

    .hero__content,
    .hero-card,
    .hero-benefits {
        width: 100%;
    }

    .hero-card {
        min-height: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 22px 18px !important;
        border-radius: 18px !important;
        overflow: hidden !important;
    }

    .hero-card h1 {
        max-width: 100% !important;
        font-size: 25px !important;
        line-height: .98 !important;
    }

    .hero-card p {
        max-width: 100% !important;
        overflow-wrap: break-word !important;
    }

    .hero-card__actions,
    .product-actions,
    .form__actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        width: 100%;
    }

    .hero-benefits {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        margin-top: 12px !important;
    }

    .mini-card {
        min-height: 0 !important;
        display: grid !important;
        grid-template-columns: 34px 1fr;
        gap: 12px !important;
        align-items: center;
        padding: 14px !important;
        border-radius: 14px !important;
    }

    .mini-card img {
        width: 30px !important;
        height: 30px !important;
        margin: 0 !important;
    }

    .mini-card p {
        font-size: 14px !important;
        line-height: 1.28 !important;
    }

    .hero__visual {
        width: 100% !important;
        margin: 0 !important;
        justify-content: center !important;
        align-self: auto !important;
        overflow: hidden !important;
    }

    .hero__visual img {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 250px !important;
        object-fit: contain !important;
        object-position: center !important;
    }

    .hero-slider {
        position: static !important;
        margin: -4px 0 0 !important;
        justify-content: center !important;
    }

    .slider-arrow {
        width: 28px !important;
        height: 28px !important;
        font-size: 38px !important;
    }

    /* Grids */
    .frost-grid,
    .problem-grid,
    .reline-grid,
    .economy-grid,
    .participants-grid,
    .projects-grid,
    .product-section__inner,
    .documents-layout,
    .request__inner,
    .site-footer__inner {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .frost-card,
    .problem-card,
    .feature-card,
    .participant-card,
    .project-card,
    .documents-card,
    .request-form-card,
    .side-card {
        min-height: 0 !important;
        padding: 16px !important;
        border-radius: 16px !important;
    }

    /* Frost cards */
    .frost .card-title-row {
        align-items: center !important;
        justify-content: flex-start !important;
        flex-direction: row !important;
        gap: 10px !important;
        margin-bottom: 12px !important;
    }

    .frost .card-title-row img,
    .problem-card img,
    .feature-card img {
        width: 38px !important;
        height: 38px !important;
        flex: 0 0 38px !important;
        margin-bottom: 0 !important;
    }

    .frost-card h3 {
        font-size: 20px !important;
        line-height: 1.12 !important;
    }

    .frost .frost-card__image-wrap {
        width: 100% !important;
        margin: 12px 0 !important;
        border-radius: 16px !important;
        aspect-ratio: 296 / 407 !important;
        overflow: hidden !important;
    }

    .frost .frost-card__animation {
        min-height: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .frost .cost-list {
        gap: 10px !important;
        margin-top: 8px !important;
    }

    .frost .cost-item {
        grid-template-columns: 42px 1fr 22px !important;
        gap: 9px !important;
        min-height: 0 !important;
        padding: 10px !important;
        border-radius: 12px !important;
    }

    .frost .cost-item img {
        width: 38px !important;
        height: 38px !important;
    }

    .frost .cost-item strong {
        font-size: 14px !important;
        line-height: 1.15 !important;
    }

    .frost .cost-item span:not(.up-arrow) {
        font-size: 12px !important;
        line-height: 1.2 !important;
    }

    .frost .up-arrow {
        font-size: 25px !important;
    }

    .frost .cost-summary {
        margin-top: 10px !important;
        font-size: 17px !important;
        text-align: center;
    }

    /* Problem cards */
    .problem-card,
    .feature-card {
        display: grid;
        grid-template-columns: 40px 1fr;
        gap: 10px 12px;
        align-items: start;
    }

    .problem-card h3,
    .feature-card h3 {
        align-self: center;
    }

    .problem-card p,
    .feature-card p {
        grid-column: 1 / -1;
        margin-top: 0 !important;
        font-size: 13px !important;
    }

    .info-panel {
        margin-top: 12px !important;
        padding: 13px !important;
        border-radius: 12px !important;
        gap: 10px !important;
        font-size: 13px !important;
        line-height: 1.35 !important;
    }

    .info-panel img {
        width: 32px !important;
        height: 32px !important;
        flex: 0 0 32px !important;
    }

    /* Product section */
    .product-section {
        padding: 30px 0 !important;
    }

    .product-section--reverse .product-section__content {
        order: 0 !important;
    }

    .product-section__content {
        order: 1;
    }

    .product-section__image {
        order: 2;
    }

    .product-section__image img,
    .product-section--reverse .product-section__image img {
        width: 100% !important;
        max-width: none !important;
        aspect-ratio: 1.28 / 1 !important;
        border-radius: 16px !important;
    }

    .stock {
        margin-top: 12px !important;
        font-size: 13px !important;
    }

    /* Comparison table */
    .comparison-table-wrap {
        overflow-x: auto !important;
        border-radius: 14px !important;
        -webkit-overflow-scrolling: touch;
        max-width: 100% !important;
    }

    .comparison-table {
        min-width: 640px !important;
        font-size: 13px !important;
        table-layout: fixed !important;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 11px 12px !important;
        overflow-wrap: anywhere !important;
    }

    /* Participants & Projects */
    .participant-card,
    .project-card {
        display: flex !important;
        flex-direction: column !important;
    }

    .round-arrow {
        width: 30px !important;
        height: 30px !important;
        top: 14px !important;
        right: 14px !important;
    }

    .participant-card h3,
    .project-card h3 {
        padding-right: 36px !important;
    }

    .participant-card p,
    .project-card span {
        font-size: 13px !important;
        line-height: 1.32 !important;
    }

    .participant-card img {
        height: auto !important;
        max-height: 220px !important;
        margin-top: 12px !important;
        object-fit: contain !important;
    }

    .participant-card .btn {
        margin-top: 12px !important;
    }

    .project-card img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1.22 / 1 !important;
        margin-top: 14px !important;
        border-radius: 14px !important;
    }

    .projects:not(.projects-page) .projects-grid .project-card:nth-child(n+2) {
        display: none !important;
    }

    /* Documents */
    .documents-layout {
        gap: 18px !important;
    }

    .documents-card ul {
        padding-left: 18px !important;
        font-size: 13px !important;
        line-height: 1.35 !important;
    }

    .document-images {
        display: grid !important;
        grid-auto-flow: column;
        grid-auto-columns: minmax(170px, 74%);
        gap: 10px !important;
        overflow-x: auto !important;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .document-images img {
        width: 100% !important;
        min-width: 0 !important;
        height: 245px !important;
        object-fit: contain !important;
    }

    .section-actions {
        margin-top: 16px !important;
    }

    /* Geography */
    .geography .section-head {
        text-align: left !important;
    }

    .geography .map-scroll {
        width: 100% !important;
        margin: 0 !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .interactive-project-map {
        min-width: 760px !important;
        border-radius: 0 !important;
        width: 100% !important;
    }

    .khmao-map-label,
    .yakutia-map-label,
    .norilsk-map-label,
    .yanao-map-label {
        width: 250px !important;
    }

    /* Request / Form */
    .request {
        padding-bottom: 34px !important;
    }

    .form {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .form label,
    .form__full {
        grid-column: 1 !important;
    }

    .form input:not([type=checkbox]),
    .form textarea,
    .form select {
        min-height: 42px !important;
        padding: 11px 12px !important;
        border-radius: 8px !important;
        font-size: 14px !important;
        width: 100% !important;
    }

    .form textarea {
        min-height: 100px !important;
    }

    .form__actions {
        grid-column: 1 !important;
    }

    .benefit-list,
    .contact-list {
        gap: 10px !important;
    }

    .benefit-list li,
    .contact-list li {
        grid-template-columns: 34px 1fr !important;
        gap: 10px !important;
        font-size: 13px !important;
    }

    .benefit-list img,
    .contact-list img {
        width: 34px !important;
        height: 34px !important;
    }

    /* Footer */
    .site-footer {
        padding: 28px 0 24px !important;
        min-height: 0 !important;
    }

    .site-footer__inner {
        gap: 18px !important;
    }

    .footer-addresses,
    .footer-contacts,
    .footer-cta {
        grid-column: 1 !important;
    }

    .site-footer .footer-contact-row {
        grid-template-columns: 32px 1fr !important;
        gap: 10px !important;
        font-size: 13px !important;
    }

    .site-footer .footer-contact-row img {
        width: 32px !important;
        height: 32px !important;
    }

    .site-footer .footer-contact-row p,
    .site-footer .footer-contact-row a {
        font-size: 13px !important;
        line-height: 1.25 !important;
    }

    .footer-cta {
        justify-content: stretch !important;
    }

    .site-footer .footer-cta .btn {
        width: 100% !important;
        min-width: 0 !important;
    }

    .site-footer__bottom {
        display: grid !important;
        gap: 12px !important;
        margin-top: 24px !important;
        font-size: 12px !important;
    }

    /* Modal */
    .modal {
        padding: 10px !important;
    }

    .modal__dialog {
        width: 100% !important;
        max-height: calc(100dvh - 20px) !important;
        padding: 20px 16px !important;
        border-radius: 18px !important;
    }

    .modal__close {
        right: 14px !important;
        top: 14px !important;
    }

    .modal__dialog h2 {
        padding-right: 36px !important;
        font-size: 28px !important;
    }
}

/* Extra small screens */
@media (max-width: 380px) {

    .container,
    .site-footer .container,
    .site-footer__bottom {
        width: calc(100% - 24px) !important;
    }

    h1 {
        font-size: 30px !important;
    }

    h2,
    .frost .section-head h2 {
        font-size: 27px !important;
    }

    .hero__visual img {
        max-height: 230px !important;
    }

    .frost .cost-item {
        grid-template-columns: 38px 1fr 18px !important;
    }

    .frost .up-arrow {
        font-size: 21px !important;
    }
}

/* Font settings - Bebas Neue */
h1,
.hero-card h1,
.section-head h2,
.product-section__content h2,
.comparison h2,
.geography h2,
.request h2,
.modal__dialog h2 {
    font-family: "Bebas Neue Cyrillic Local", "Bebas Neue", "Arial Narrow", Impact, sans-serif !important;
    font-weight: 700 !important;
    font-synthesis: weight !important;
    text-shadow: none !important;
    -webkit-text-stroke: 0 !important;
}

.heading-num,
h1 .heading-num,
h2 .heading-num,
h3 .heading-num {
    font-family: inherit !important;
    font-size: 1em !important;
    font-weight: 700 !important;
    font-synthesis: weight !important;
    color: inherit !important;
    text-shadow: none !important;
    -webkit-text-stroke: 0 !important;
}

/* Prevention of horizontal scroll */
@media (max-width: 767px) {

    *,
    *::before,
    *::after {
        min-width: 0;
    }

    html,
    body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    img,
    video,
    svg,
    canvas,
    iframe {
        max-width: 100% !important;
    }

    .container,
    .site-header .container,
    .site-footer .container,
    .site-footer__bottom {
        width: min(100% - 28px, 390px) !important;
        max-width: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .site-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
        background: #fff !important;
    }

    .header-main__inner {
        min-height: 58px !important;
        display: grid !important;
        grid-template-columns: auto 44px !important;
        align-items: center !important;
        gap: 12px !important;
    }

    .site-header .logo img {
        width: 84px !important;
        height: auto !important;
        display: block !important;
    }

    .burger {
        display: inline-flex !important;
        position: static !important;
        width: 44px !important;
        height: 44px !important;
        align-items: center !important;
        justify-content: center !important;
        justify-self: end !important;
        padding: 0 !important;
        border: 1px solid rgba(0, 0, 0, .12) !important;
        border-radius: 10px !important;
        background: #fff !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
    }

    .burger span {
        display: block !important;
        width: 22px !important;
        height: 2px !important;
        border-radius: 4px !important;
        background: #111 !important;
    }

    .site-nav {
        display: block !important;
        position: absolute !important;
        top: calc(100% + 8px) !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1001 !important;
        width: 100% !important;
        max-height: calc(100dvh - 78px) !important;
        padding: 12px !important;
        overflow-y: auto !important;
        border: 1px solid rgba(0, 0, 0, .12) !important;
        border-radius: 14px !important;
        background: #fff !important;
        box-shadow: 0 18px 44px rgba(0, 0, 0, .18) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: translateY(-8px) !important;
        transition: opacity .2s ease, transform .2s ease, visibility .2s ease !important;
    }

    .site-nav.is-open {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateY(0) !important;
    }

    .site-nav__list {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 4px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .site-nav li {
        width: 100% !important;
    }

    .site-nav a,
    .nav-dropdown-toggle {
        width: 100% !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 10px !important;
        color: #111 !important;
        border-radius: 8px !important;
    }

    .product-dropdown {
        position: static !important;
        width: 100% !important;
        min-width: 0 !important;
        margin-top: 4px !important;
        padding: 10px !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        display: none !important;
        box-shadow: none !important;
        border-radius: 10px !important;
    }

    .site-nav__item--dropdown.is-open .product-dropdown {
        display: grid !important;
    }

    .header-main__cta {
        display: none !important;
    }

    .hero,
    .section {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .hero-card .hero__visual {
        width: 100% !important;
        margin: 18px 0 0 !important;
    }

    .hero-card .hero__visual img {
        width: 100% !important;
        max-width: 100% !important;
    }

    .comparison-table-wrap,
    .map-scroll {
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .interactive-project-map {
        min-width: 0 !important;
        width: 100% !important;
    }

    .btn,
    button.btn,
    a.btn {
        width: 100% !important;
        max-width: 100% !important;
    }

    .modal {
        display: none !important;
        position: fixed !important;
        inset: 0 !important;
        z-index: 2000 !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 12px !important;
        overflow-y: auto !important;
    }

    .modal.is-open {
        display: flex !important;
    }

    .modal__dialog {
        width: min(100%, 390px) !important;
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100dvh - 24px) !important;
        overflow-y: auto !important;
        padding: 22px 16px !important;
        border-radius: 18px !important;
    }

    .form,
    .form--modal {
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }

    .form input:not([type=checkbox]),
    .form textarea,
    .form select {
        width: 100% !important;
    }

    .form__actions,
    .privacy,
    .form__full {
        grid-column: 1 !important;
    }

    .site-footer {
        padding: 34px 0 26px !important;
    }

    .site-footer__inner {
        display: grid !important;
        gap: 22px !important;
    }

    .calculator-layer-actions {
        flex-wrap: wrap;
    }
    .calculator-layer-actions button {
        width: 100%;
    }
}