@media (max-width: 768px) {
    .header__nav { display: none; }
    .header__burger { display: flex; margin-right: 8px; }
    .header__logo { margin-right: auto; }
    .header__actions { gap: 8px; }
    .header__login { display: none; }
    .header__theme-toggle { display: none; }
    .header__profile { display: flex; }
    .header__logo-text { font-size: 18px; }

    .main-title { font-size: 24px; margin-top: 8px; padding-bottom: 12px; }
    .main { padding-top: 8px; }

    .services-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-top: 16px;
    }

    .service-card,
    .service-card--large,
    .service-card--small,
    .service-card--wide {
        width: auto !important;
        height: auto !important;
        min-height: 92px;
        border-radius: 12px;
        padding: 12px;
    }

    .service-card__img { max-width: 80%; max-height: 80%; right: 4px; bottom: 4px; }
    .service-card__title { font-size: 12px; line-height: 14px; }
    .service-card__subtitle { font-size: 11px; }
    .service-card-stack { display: contents; }

    .mobile-menu__close { display: none; }
    .mobile-menu { top: 65px; height: calc(100% - 65px); z-index: 1000; }
    body.menu-open { overflow: hidden; }

    .container { padding: 0 16px; }

    .section-currency-wrapper { padding: 24px 16px 0; gap: 20px; }

    .currency-widget,
    .services-widget { width: 100%; max-width: 100%; min-width: 0; }

    .service-minis { width: 100%; margin-top: 0; }
    .currency-widget { max-width: 100%; padding: 16px; }

    .market-card { width: 100%; height: auto; min-height: 420px; }
    .market-section { padding: 24px 0 32px; }

    .market-grid { flex-wrap: wrap; }
}

@media (max-width: 450px) {
    .section-currency-wrapper {
        padding: 16px 16px 0;
        gap: 0;
        flex-direction: column;
        align-items: stretch;
    }

    .currency-widget,
    .services-widget { height: auto; flex-shrink: 1; }
    .service-minis { height: auto; }

    .services-mini-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px 16px;
        margin: 20px 0 0;
    }

    .servicis-minis-text { max-width: none; flex: none; text-align: center; }

    .market-grid {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding-bottom: 10px;
        scrollbar-width: none;
    }
    .market-grid::-webkit-scrollbar { display: none; }
    .market-grid::after { content: ''; flex: 0 0 1px; height: 1px; }

    .market-card { width: 300px !important; height: 504px !important; flex-shrink: 0; }
    .market-card__footer { justify-content: normal; gap: 9px; }
    .market-card__cta { padding: 8px 12px; font-size: 9px; }
    .market-tab { padding: 6px 9px; border-radius: 8px; font-size: 11px; color: var(--color-text); }
    .market-card__footer-text { font-size: 12px; }

    .journal-section { padding: 24px 0 36px; }
    .journal-section__title { font-size: 20px; margin-bottom: 16px; }

    .journal-categories {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding-bottom: 4px;
        scrollbar-width: none;
        margin-bottom: 20px;
    }
    .journal-categories::-webkit-scrollbar { display: none; }

    .journal-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .journal-card { width: 100%; flex-shrink: 0; border-radius: 12px; }
}


@media (max-width: 1320px) {
    .journal-grid { grid-template-columns: repeat(3, 1fr); }
    .journal-card { width: 100%; }
}

@media (max-width: 768px) {
    .login-wrapper { padding: 16px; }

    .login-back {
        position: absolute;
        top: 20px;
        left: 16px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        margin-bottom: 0;
        z-index: 2;
    }
    .login-back svg { width: 24px; height: 24px; }
    .login-back span { display: none; }

    .login-header { margin-bottom: 24px; position: relative; justify-content: center; }

    .login-box {
        width: 100%;
        max-width: 400px;
        padding: 24px 16px;
        margin-top: 150px;
        min-height: 380px;
        display: flex;
        flex-direction: column;
    }

    .login-form__input--large { width: 100%; height: 52px; }
    #emailForm .login-form__button { width: 100%; }

    .login-social__icons { gap: 12px; }
    .login-social__icon { width: 44px; height: 44px; }
    .login-social__icon:nth-child(4) img,
    .login-social__icon:nth-child(3) img { width: 60px; height: 40px; }

    .help-modal { align-items: flex-end; background-color: rgba(255, 255, 255, 0.568); }

    .help-modal__content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 20px 20px 0 0;
        padding: 20px 16px;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
        background-color: #171d23;
        color: #fff;
        position: relative;
        bottom: 0;
    }

    .help-modal.active .help-modal__content { transform: translateY(0); }
    .help-modal__content::before { display: none; }
    .help-modal__title { color: #fff; }
    .help-modal__subtitle { color: #868D98; }
    .help-modal__list,
    .help-modal__list li { color: #fff; }
    .help-modal__phone { color: #00AFFF !important; }
    .help-modal__email { color: #00AFFF !important; }
    .help-modal__hours { color: #868D98; }

    .help-modal__close {
        position: static;
        width: 100%;
        margin-top: 20px;
        background-color: #00afff;
        padding: 14px;
        border-radius: 12px;
        color: black;
        font-weight: 600;
        justify-content: center;
        border: none;
    }
    .help-modal__close svg { display: none; }
    .help-modal__close::after { content: 'Закрыть'; }

    .help-modal__content::after {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 70px;
        height: 4px;
        background-color: #4F5864;
        border-radius: 2px;
    }
}