/* TULRUMUS MOBILE LAYER v1
   Desktop layout is not changed.
*/

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

@media (max-width: 900px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        min-width: 0 !important;
    }

    /* ---------- HEADER ---------- */

    .header,
    .account-header,
    .site-header .header-inner {
        height: auto !important;
        min-height: 64px;
    }

    .header,
    .account-header {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .header-actions,
    .main-nav {
        gap: 7px !important;
    }

    .header-actions a,
    .main-nav a,
    .about-btn,
    .news-btn,
    .market-btn,
    .cabinet-btn {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 8px 10px !important;
    }

    /* ---------- GENERAL LAYOUT ---------- */

    .site,
    .workspace,
    .panel,
    .hero-copy,
    .hero-layout,
    .account-layout,
    .catalog-wrap,
    .column-shell {
        max-width: 100%;
        min-width: 0;
    }

    /* ---------- FORMS ---------- */

    input,
    select,
    textarea,
    button {
        max-width: 100%;
        font-size: 16px;
    }

    input,
    select,
    button {
        min-height: 44px;
    }

    textarea {
        min-height: 96px;
    }

    button,
    a,
    input,
    select,
    textarea {
        touch-action: manipulation;
    }

    /* ---------- MAPS ---------- */

    #buy-map,
    #checkout-map,
    #column-map,
    .leaflet-container {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* ---------- TABLES ---------- */

    .table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        max-width: 100%;
    }

    /* ---------- BUTTONS ---------- */

    .primary-btn,
    .secondary-btn,
    .open-btn {
        min-height: 44px;
    }
}


@media (max-width: 700px) {

    /* ---------- HEADER ---------- */

    .header,
    .account-header {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .header-spacer {
        display: none !important;
    }

    .brand {
        flex: 1 1 auto;
        min-width: 0;
    }

    .brand-name {
        font-size: 18px !important;
    }

    .brand-mark {
        width: 36px !important;
        height: 36px !important;
    }

    .header-actions,
    .main-nav {
        width: 100%;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .header-actions a,
    .main-nav a {
        width: 100%;
        font-size: 10px !important;
        line-height: 1.2;
        text-align: center;
    }

    /* ---------- ACCOUNT ---------- */

    .account-header,
    .account-layout,
    .account-footer {
        width: calc(100% - 24px) !important;
    }

    .account-layout {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 16px !important;
    }

    .sidebar {
        position: static !important;
        width: 100%;
        padding: 12px !important;
    }

    .sidebar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .sidebar-nav a {
        min-width: 0;
        min-height: 44px;
        padding: 8px !important;
        justify-content: center;
        text-align: center;
        font-size: 10px !important;
    }

    .page-intro {
        display: block !important;
    }

    .page-intro h1 {
        font-size: clamp(30px, 10vw, 42px) !important;
        line-height: 1.05 !important;
    }

    .page-intro p {
        font-size: 14px !important;
        line-height: 1.55 !important;
    }

    .page-intro .primary-btn {
        width: 100%;
        margin-top: 16px;
    }

    .summary-grid {
        grid-template-columns: 1fr !important;
    }

    .summary-card small {
        font-size: 9px !important;
    }

    .summary-card span {
        font-size: 10px !important;
    }

    .panel {
        padding: 14px !important;
    }

    .panel-head {
        align-items: flex-start !important;
    }

    .tulrumus-card {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .meta-row,
    .info-list > div {
        grid-template-columns: 1fr !important;
    }

    .open-btn {
        width: 100%;
    }

    /* ---------- COLLECTIONS ---------- */

    .catalog-wrap,
    .column-shell {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .catalog-grid,
    .column-layout,
    .column-pair {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .column-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .column-actions > * {
        width: 100% !important;
    }
}


@media (max-width: 580px) {

    /* ---------- MOBILE TYPOGRAPHY ---------- */

    body {
        font-size: 16px;
    }

    p,
    li {
        overflow-wrap: anywhere;
    }

    /* ---------- HEADER ---------- */

    .header-actions,
    .main-nav {
        grid-template-columns: 1fr 1fr !important;
    }

    /* ---------- MAP ---------- */

    #buy-map,
    #checkout-map,
    #column-map {
        height: 320px !important;
        min-height: 280px;
    }

    /* ---------- TABLE SAFETY ---------- */

    th,
    td {
        overflow-wrap: anywhere;
    }
}


@media (max-width: 380px) {

    .header-actions,
    .main-nav,
    .sidebar-nav {
        grid-template-columns: 1fr !important;
    }

    .account-header,
    .account-layout,
    .account-footer {
        width: calc(100% - 18px) !important;
    }

    #buy-map,
    #checkout-map,
    #column-map {
        height: 285px !important;
    }
}

/* =========================================================
   TULRUMUS HOME — MOBILE COMPACT v1
   Только смартфоны. Десктоп не затрагивается.
   ========================================================= */

@media (max-width: 600px) {

    /* ---------- ШАПКА ---------- */

    body .hero .header {
        padding-top: 14px;
        padding-bottom: 10px;
        gap: 12px;
    }

    body .hero .brand {
        margin-bottom: 4px;
    }

    body .hero .brand-mark {
        width: 34px;
        height: 34px;
    }

    body .hero .brand-name {
        font-size: 22px;
    }

    body .hero .header-actions {
        gap: 7px;
    }

    body .hero .header-actions a {
        min-height: 42px;
        padding: 9px 12px;
        font-size: 12px;
        line-height: 1.15;
    }


    /* ---------- БАННЕР ЗАПУСКА ---------- */

    body #launch-banner-2026 {
        width: calc(100% - 32px);
        margin-top: 6px;
        padding: 11px 14px;
        gap: 4px;
        border-radius: 10px;
    }

    body #launch-banner-2026 strong {
        font-size: 15px;
        line-height: 1.25;
        letter-spacing: .045em;
    }

    body #launch-banner-2026 span {
        font-size: 14px;
        line-height: 1.3;
    }

    body #launch-banner-2026 a {
        font-size: 14px;
        line-height: 1.25;
    }


    /* ---------- ГЛАВНЫЙ ЭКРАН ---------- */

    body .hero .hero-layout {
        padding-top: 24px;
        padding-bottom: 28px;
        gap: 22px;
    }

    body .hero .hero-copy {
        margin: 0;
    }

    body .hero .eyebrow {
        margin-bottom: 12px;
    }

    body .hero h1[data-home-compact-title] {
        margin-bottom: 18px;
        line-height: 1.05;
    }

    body .hero .lead {
        margin-bottom: 20px;
        line-height: 1.48;
    }

    body .hero .hero-actions {
        gap: 10px;
    }

    body .hero .hero-actions a {
        min-height: 50px;
    }


    /* ---------- ВАШ TULRUMUS ЭТО ---------- */

    body .hero .info-card {
        width: 100%;
        margin-top: 22px;
        padding: 18px 16px 16px;
    }

    body .hero .info-title {
        margin-bottom: 12px;
    }

    body .hero .info-cell {
        min-height: 76px;
        padding: 10px 7px;
    }

    body .hero .info-note {
        margin-top: 11px;
        line-height: 1.4;
    }


    /* ---------- КАК ЭТО РАБОТАЕТ ---------- */

    body #how {
        padding-top: 34px;
    }

    body #how .section-head {
        margin-bottom: 22px;
    }

    body #how .steps {
        gap: 14px;
    }

    body #how .step {
        min-height: 0;
        padding: 18px 16px;
    }

    body #how .step h3 {
        margin: 7px 0;
        line-height: 1.3;
    }

    body #how .step p {
        line-height: 1.42;
    }


    /* ---------- ДОКАЗАТЕЛЬСТВА ---------- */

    body #how .proofs {
        gap: 14px;
    }

    body #how .proof {
        min-height: 0;
        padding: 17px 15px;
    }

    body #how .proof h3 {
        margin-bottom: 5px;
    }

    body #how .proof p {
        line-height: 1.42;
    }


    /* ---------- FOOTER ---------- */

    body .footer {
        padding-top: 28px;
        padding-bottom: 26px;
    }

    body .footer-nav {
        gap: 12px 18px;
    }

    body .footer-nav a {
        min-height: 32px;
        display: inline-flex;
        align-items: center;
    }
}



/* TULRUMUS MOBILE BLACK SCREEN FIX v1 */
@media (max-width: 700px) {

    html,
    body {
        background: #020713 !important;
        min-height: 100%;
        overflow-x: hidden !important;
    }

    body .hero {
        position: relative !important;
        isolation: isolate !important;
        width: 100% !important;
        min-height: 100svh !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        background: #020713 !important;
    }

    body .hero .hero-bg {
        position: absolute !important;
        inset: 0 !important;
        z-index: 0 !important;

        /* На смартфоне используем более лёгкий фон */
        background-image: url('/static/tulrumus-home-hero.png') !important;
        background-position: center top !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
        background-attachment: scroll !important;

        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        filter: none !important;
    }

    body .hero .hero-shade {
        position: absolute !important;
        inset: 0 !important;
        z-index: 1 !important;
        pointer-events: none !important;
        visibility: visible !important;
        opacity: 1 !important;

        background:
            linear-gradient(
                180deg,
                rgba(2,7,19,.18) 0%,
                rgba(2,7,19,.08) 42%,
                rgba(2,7,19,.50) 100%
            ) !important;

        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    body .hero .header,
    body .hero #launch-banner-2026,
    body .hero .hero-layout {
        position: relative !important;
        z-index: 3 !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
    }

    body .hero .header *,
    body .hero #launch-banner-2026 *,
    body .hero .hero-layout * {
        visibility: visible;
    }

    body .hero #launch-banner-2026 {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* TULRUMUS MOBILE HERO v2 */
@media (max-width: 700px) {
    body .hero .hero-bg {
        background-image: url('/static/tulrumus-home-mobile.webp?v=20261002-1') !important;
        background-size: cover !important;
        background-position: 64% center !important;
        background-repeat: no-repeat !important;
        background-attachment: scroll !important;
    }
}


/* TULRUMUS MOBILE HERO COMPOSITION v3 */
@media (max-width: 700px) {
    body .hero .hero-bg {
        background-image: url('/static/tulrumus-home-mobile.webp?v=20261002-2') !important;
        background-size: auto 92% !important;
        background-position: 62% 54% !important;
        background-repeat: no-repeat !important;
        background-color: #020713 !important;
    }
}
