/* Переменные оригинального дизайна */
:root {
    --primary-color: #0F33EF;
    --white-color: #FFFFFF;
    --border-color: rgba(255, 255, 255, 0.4);
    --black-color: #000000;
    --gray-color: #666666;
    --light-gray: #F0F0F0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f5f5f5;
    text-align: left;
    display: flex; /* flex здесь не нужен */
    overflow-x: hidden; /* оставим только по оси X, чтобы избегать горизонтального скролла */
    overflow-y: auto; /* разрешим вертикальный скролл */
    height: auto; /* убираем фиксированную высоту */
}

/* Основной контейнер без sidebar */
.home_content-wrapper {
    display: flex;
    flex-direction: column;
    width: calc(100% - 80px); /* 80px — это ширина sidebar */
    margin-left: 80px;        /* Сдвиг контента */
    min-height: 100vh; /* вместо фиксированной высоты */
    height: auto;
    overflow-x: hidden;
    transition: margin-left 0.3s ease;
}

@media screen and (max-width: 768px) {
    .home_content-wrapper {
        width: 100%;
        margin-left: 50px; /* убираем фиксированный отступ */
        box-sizing: border-box; /* на всякий случай, чтобы padding учитывался в width */
    }
}

/* Хедер с карточками */
.home_header-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
    padding: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.home_header-container::-webkit-scrollbar {
    display: none;
}

.home_header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 16px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1 1 200px; /* можно сжиматься до 200px */
    min-width: 150px; /* не меньше 150px, чтобы не сжималось до каши */
    max-width: calc(33.333% - 24px); /* максимум 3 в ряд */
    /*
    flex: 1 1 150px;
    min-width: 120px;
    max-width: 100%;
    */

    overflow: hidden;
    box-sizing: border-box;
}

.home_header-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.home_header-card.active {
    border: 1px solid var(--primary-color);
}

.home_header-card:not(.active) {
    border: 1px solid var(--white-color);
}

.home_card-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.25em;
    color: var(--black-color);
    width: 150px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    max-height: 2.5em;
}

.home_card-value {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 1.25em;
    color: var(--black-color);
    margin-left: auto;
    flex-shrink: 0;
    width: 30px;
    text-align: right;
}

/* Основной контент */
.home_content {
    flex: 1;
    overflow-y: auto;
}

.home_main-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    padding: 20px;
    margin-top: 20px;
}

.home_main-row {
    display: flex;
    flex-direction: row;
    gap: 24px;
    width: 100%;
}

/* Левый блок - AutoSMM в режиме ОБТ */
.home_info-block {
    flex: 1;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6));
    border: 1px solid var(--white-color);
    border-radius: 16px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.home_info-block-title {
    font-family: 'Unbounded', sans-serif;
    font-weight: 600;
    font-size: 40px;
    line-height: 1.25em;
    color: var(--black-color);
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.home_info-block-title span {
    color: var(--primary-color);
}

.home_info-block-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.25em;
    color: var(--black-color);
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
}

.home_info-features {
    display: flex;
    flex-direction: row;
    gap: 32px;
    margin-bottom: 32px;
    position: relative;
    z-index: 2;
}

.home_info-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.home_info-feature-value {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 1.25em;
    color: var(--primary-color);
}

.home_infinity-icon {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 64px;
    line-height: 0.625em;
    color: var(--primary-color);
}

.home_info-feature-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.25em;
    color: var(--black-color);
    text-align: center;
}

.home_info-buttons {
    display: flex;
    flex-direction: row;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.home_support-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 16px 32px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 40px;
    font-family: 'Unbounded', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1em;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.home_support-button:hover {
    background-color: #0b2ad9;
}

.home_play-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 64px;
    background-color: var(--primary-color);
    border-radius: 40px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.home_play-button:hover {
    background-color: #0b2ad9;
}

.home_play-button img {
    width: 24px;
    height: 24px;
}

.home_robot-image {
    position: absolute;
    right: -20px;
    top: 0;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.3;
    transition: opacity 0.3s ease, right 0.3s ease, transform 0.3s ease;
}

/* Правый блок - Этапы начала работы */
.home_steps-block {
    flex: 0.6;
    background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    border: 1px solid var(--white-color);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home_steps-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 1.25em;
    color: var(--black-color);
    margin-bottom: 4px;
}

.home_step-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 6px;
    text-decoration: none;
}

.home_step-number {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 1em;
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 34px;
    height: 34px;
}

.home_step-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.25em;
    color: var(--black-color);
    flex: 1;
    width: calc(100% - 46px);
}

.home_step-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--primary-color);
    opacity: 0;
    transition: all 0.3s ease;
}

.home_step-item:hover {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(15, 51, 239, 0.15);
    transform: translateY(-2px);
}

.home_step-item:hover::before {
    opacity: 1;
}

.home_step-item.clicked {
    transform: scale(0.98);
    box-shadow: 0 2px 4px rgba(15, 51, 239, 0.2);
}

.home_step-item:hover .home_step-number {
    color: var(--black-color);
}

.home_step-item::after {
    content: '→';
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1em;
    color: var(--black-color);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.home_step-item:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Инструкции */
.home_instructions-section {
    width: 100%;
    padding: 40px 20px;
    margin-top: 20px;
}

.home_instructions-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 1.25em;
    color: var(--black-color);
    text-align: left;
    margin-bottom: 24px;
}

.home_instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 16px;
    width: 100%;
}

/* Карточка инструкции */
.home_instruction-card {
    background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    border: 1px solid var(--white-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.home_instruction-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Заголовок карточки */
.home_card-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    text-align: left;
}

.home_user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.home_user-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    text-align: left;
}

.home_card-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.25em;
    color: var(--black-color);
    text-align: left;
}

.home_user-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 10px;
    line-height: 1.25em;
    color: var(--gray-color);
    text-align: left;
}

/* Теги карточки */
.home_card-tags {
    display: flex;
    align-items: center;
    gap: 4px;
}

.home_tag {
    border: 1px solid var(--primary-color);
    border-radius: 16px;
    padding: 0 16px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home_tag-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.25em;
    color: var(--primary-color);
}

/* Контент карточки */
.home_card-content {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.25em;
    color: var(--black-color);
    width: 100%;
    text-align: left;
}

/* Дата и футер */
.home_card-date {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 10px;
    line-height: 1.25em;
    color: var(--gray-color);
}

.home_card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 8px;
}

.home_card-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.home_card-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 10px;
    color: var(--gray-color);
}

.home_stat-icon {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

.home_stat-count {
    color: var(--gray-color);
}

.home_card-stat:hover {
    color: var(--primary-color);
    cursor: pointer;
}

.home_card-stat:hover .home_stat-icon {
    opacity: 1;
}

.home_card-stat:hover .home_stat-count {
    color: var(--primary-color);
}

.home_read-more {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.25em;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.home_read-more:hover {
    text-decoration: underline;
}

/* Специальная карточка с призывом к действию */
.home_cta-card {
    background: var(--primary-color) !important;
    color: var(--white-color);
    border: none !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 203px;
}

.home_cta-card .home_card-content {
    color: var(--white-color);
    font-size: 14px;
    margin-bottom: auto;
}

.home_cta-button {
    background: var(--white-color);
    color: var(--primary-color);
    border: none;
    border-radius: 40px;
    padding: 16px 32px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.home_cta-button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.home_cta-button-text {
    font-family: 'Unbounded', sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 1em;
}

/* Стили для лайкнутых карточек */
.home_card-stat.liked {
    color: #FF4D4D;
}

.home_card-stat.liked .home_stat-icon {
    fill: #FF4D4D;
    stroke: #FF4D4D;
}

.home_card-stat.liked .home_stat-count {
    color: #FF4D4D;
}

/* Анимации для карточек */
.home_instruction-card {
    opacity: 0;
    transform: translateY(20px);
    animation: home_fadeInUp 0.6s ease forwards;
}

.home_instruction-card:nth-child(1) { animation-delay: 0.1s; }
.home_instruction-card:nth-child(2) { animation-delay: 0.2s; }
.home_instruction-card:nth-child(3) { animation-delay: 0.3s; }
.home_instruction-card:nth-child(4) { animation-delay: 0.4s; }
.home_instruction-card:nth-child(5) { animation-delay: 0.5s; }
.home_instruction-card:nth-child(6) { animation-delay: 0.6s; }
.home_instruction-card:nth-child(7) { animation-delay: 0.7s; }
.home_instruction-card:nth-child(8) { animation-delay: 0.8s; }

@keyframes home_fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media screen and (max-width: 1200px) {
    .home_instructions-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

@media screen and (max-width: 992px) {
    .home_main-row {
        flex-direction: column;
    }
    
    .home_info-block, .home_steps-block {
        width: 100%;
    }
    
    .home_robot-image {
        right: -20px;
        opacity: 0.7;
    }
}

@media screen and (max-width: 768px) {
    .home_header-container {
        gap: 16px;
        padding: 16px;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .home_header-card {
        padding: 8px 12px;
        min-width: 180px;
        flex: 1 1 calc(50% - 6px);
        max-width: calc(50% - 6px);
    }
    
    .home_card-title {
        font-size: 11px;
        width: auto;
        max-height: 2.2em;
        flex: 1;
    }
    
    .home_card-value {
        font-size: 18px;
        width: 25px;
    }
    
    .home_info-block, .home_steps-block {
        padding: 30px;
    }
    
    .home_robot-image {
        right: -80px;
    }
    
    .home_steps-title {
        font-size: 18px;
    }
    
    .home_instructions-section {
        padding: 30px 16px;
    }
    
    .home_instructions-title {
        font-size: 18px;
        text-align: center;
    }
    
    .home_instructions-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .home_instruction-card {
        padding: 14px;
    }
    
    .home_card-title {
        font-size: 13px;
    }
    
    .home_card-content {
        font-size: 11px;
    }
}

@media screen and (max-width: 576px) {
    .home_main-container {
        padding: 15px;
    }
    
    .home_info-block, .home_steps-block {
        padding: 20px;
    }
    
    .home_info-block-title {
        font-size: 24px;
    }
    
    .home_info-block-subtitle {
        font-size: 14px;
    }
    
    .home_info-features {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .home_info-feature {
        min-width: 85px;
    }
    
    .home_info-feature-value {
        font-size: 22px;
    }
    
    .home_infinity-icon {
        font-size: 40px;
    }
    
    .home_info-feature-label {
        font-size: 11px;
    }
    
    .home_info-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .home_support-button {
        width: 100%;
    }
    
    .home_play-button {
        width: 48px;
        height: 48px;
        align-self: center;
    }
    
    .home_robot-image {
        opacity: 0.15;
        right: -50%;
        transform: translateX(25%);
    }
    
    .home_steps-title {
        font-size: 16px;
    }
    
    .home_step-number {
        font-size: 16px;
        width: 28px;
    }
    
    .home_step-text {
        font-size: 11px;
    }
    
    .home_step-item {
        padding: 8px 10px;
    }
    
    .home_step-item::after {
        font-size: 12px;
    }
    
    .home_instructions-section {
        padding: 20px 12px;
    }
    
    .home_instructions-title {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    .home_instruction-card {
        padding: 12px;
    }
    
    .home_user-avatar {
        width: 32px;
        height: 32px;
    }
    
    .home_card-title {
        font-size: 12px;
    }
    
    .home_card-content {
        font-size: 10px;
    }
    
    .home_cta-card .home_card-content {
        font-size: 12px;
    }
    
    .home_cta-button {
        padding: 12px 24px;
        height: 40px;
    }
    
    .home_cta-button-text {
        font-size: 12px;
    }
}

@media screen and (max-width: 480px) {
    .home_header-container {
        gap: 8px;
        padding: 10px;
        flex-direction: column;
        align-items: stretch;
    }

    .home_header-card {
        padding: 8px 12px;
        min-width: auto;
        width: 100%;
        flex: none;
        max-width: none;
        height: auto;
        min-height: 40px;
    }

    .home_card-title {
        font-size: 11px;
        width: auto;
        max-height: none;
        flex: 1;
        line-height: 1.3em;
    }

    .home_card-value {
        font-size: 18px;
        width: auto;
        min-width: 25px;
    }
}

@media screen and (max-width: 360px) {
    .home_header-container {
        padding: 8px;
        gap: 6px;
    }

    .home_header-card {
        padding: 6px 10px;
        min-height: 35px;
    }

    .home_card-title {
        font-size: 10px;
    }

    .home_card-value {
        font-size: 16px;
    }
}

