@media (max-width: 1024px) {
    .nav, .btn--header { display: none; }

    /* Бургер и его анимация */
    .burger {
        display: flex; flex-direction: column; justify-content: space-between;
        width: 30px; height: 18px; cursor: pointer; position: relative; z-index: 3001;
    }
    .burger span {
        display: block; width: 100%; height: 3px; background: var(--primary);
        border-radius: 3px; transition: var(--transition); transform-origin: center;
    }
    .burger.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
    .burger.active span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
    .burger.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

    /* Кнопки в хедере */
    .header__m-btn {
        display: flex; flex-direction: column; align-items: center; text-decoration: none;
    }
    .header__m-icon {
        width: 38px; height: 38px; 
        margin-bottom: 4px;
    }
    .header__m-btn span { font-size: 8px; font-weight: 700; color: var(--text); text-transform: uppercase; }

    /* Меню */
    .mobile-menu {
        position: fixed; top: 0; right: -100%; width: 75vw; max-width: 400px; height: 100vh;
        background: var(--white); z-index: 2500; /* Ниже хедера */
        padding: 100px 30px 40px; transition: var(--transition);
        display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }
    .mobile-menu.active { right: 0; }
    
    .overlay {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.4); opacity: 0; visibility: hidden;
        transition: var(--transition); z-index: 2000;
    }
    .overlay.active { opacity: 1; visibility: visible; }

    .mobile-menu__list { list-style: none; margin-bottom: 30px; }
    .mobile-menu__list li { margin-bottom: 25px; }
    .mobile-menu__list a { text-decoration: none; color: var(--text); font-size: 22px; font-weight: 700; }
    
    .mobile-menu__divider { border: none; border-top: 1px solid #eee; margin-bottom: 30px; }
    .mobile-menu__phone { font-size: 20px; font-weight: 800; color: var(--primary); text-decoration: none; margin-bottom: 30px; display: block; }
    
    .socials { display: flex; gap: 15px; margin-bottom: auto; }
    .socials__link {
		width: 45px;
		height: 45px;
		background: #f9f9f9; /* Единый нейтральный фон */
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		transition: transform 0.2s ease;
		border: 1px solid #eee; /* Тонкая рамка в стиле сайта */
	}

	.socials__link:hover {
		transform: translateY(-3px);
		background: #ffffff;
		box-shadow: 0 5px 15px rgba(0,0,0,0.05);
	}

	.socials__link img {
		width: 24px; /* Единый размер для всех логотипов */
		height: 24px;
		object-fit: contain;
	}

    /* Hero Mobile */
    .hero { padding-top: 110px; }
    .hero__container { flex-direction: column; text-align: center; }
    .hero__image { order: -1; margin-bottom: 20px; width: 100%; }
    .hero__title { font-size: 28px; }
    .hero__features { grid-template-columns: 1fr; text-align: left; max-width: 300px; margin: 0 auto 30px; }
    .hero__btns { align-items: center; }
    .hero__stats { flex-direction: column; gap: 15px; align-items: flex-start; max-width: 280px; margin: 40px auto 0; }
	.hero__image {
        order: -1; /* Картинка выше текста */
        width: 100%;
        justify-content: center; /* Центрируем фото на мобилке */
        margin-bottom: 30px;
        padding: 0 10px; /* Отступы, чтобы декор не упирался в края */
    }

    .hero__main-photo {
        max-width: 320px; /* Уменьшаем фото для мобилок */
        border-radius: 20px;
    }

    .hero__decor-bg {
		width: 100% !important;
        top: 15%;
        left: 43%;
    }
	.container {
		padding: 0 10px;
	}
	.logo__img {
		height: auto;
		width: 90%;
	}
	.header__actions {
		gap: 10px;
	}
	.btn--primary, .btn--secondary{font-size: 16px;}
	
	.modal__content {
		width:90%;
        max-width: 380px; /* Узкое окно для мобилок */
        padding: 40px 20px 30px; /* Меньше паддинги */
        border-radius: 20px;
    }

    .modal__title { font-size: 22px; }
    .modal__subtitle { font-size: 13px; margin-bottom: 25px; }

    .modal__decor {
        width: 160%;
    }
	.about { padding: 0 0 100px; }
    
    .about__grid {
        grid-template-columns: repeat(2, 1fr); /* По 2 в ряд на планшетах */
        gap: 15px;
    }
    
    .section-title { font-size: 24px; }
	.hero{
		padding-bottom: 100px;
	}
	.market__grid {
        grid-template-columns: 1fr;
    }
    .market__title {
        font-size: 1.8rem;
    }
	.calc-grid, .package__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .calc-card { padding: 30px 20px; }
    .result-item--main .result-item__value { font-size: 32px; }
    .package__grid { grid-template-columns: repeat(2, 1fr); }
	.finance {
        padding: 60px 0 30px;
    }

    .finance__main-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
        text-align: center;
    }

    /* Карточка калькулятора */
    .finance-card {
        padding: 30px 20px;
        border-radius: 25px;
    }

    .finance-card__content {
        flex-direction: column; /* Стек вместо флекса */
        gap: 30px;
        text-align: center;
    }

    .finance-card__left, 
    .finance-card__right {
        width: 100%;
    }

    /* Ползунки на мобильных */
    .calc-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        margin-bottom: 20px;
    }

    .calc-label__range {
        font-size: 0.85rem;
        opacity: 0.6;
    }

    .range-thumb-custom {
        width: 55px; /* Увеличиваем область захвата для пальца */
        height: 55px;
    }

    /* Результат */
    .result-value {
        font-size: 38px; /* Уменьшаем, чтобы не вылезало за края */
        margin: 10px 0 20px;
    }

    .btn-download {
        width: 100%;
        padding: 20px;
    }

    /* Сетка состава франшизы */
    .package-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 колонки на планшете */
        gap: 15px;
    }

    .pkg-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }

    .pkg-card__icon img {
        width: 80px;
    }
	.calc-label {
        flex-direction: row; /* Оставляем в ряд, чтобы не занимать место по вертикали */
        align-items: center;
    }
    
    .calc-label span:first-child {
        font-size: 14px;
    }

    .calc-label__range {
        font-size: 16px;
    }
	.decor-bubble.bubble-1 {
		width: 60px;
		z-index: 2;
	}
	.decor-bubble.bubble-1 img {
		width: 100%;
		height: auto;
		animation: floatingBubble 8s infinite ease-in-out;
		filter: drop-shadow(0 20px 50px rgba(165, 185, 215, 0.3));
	}
	@keyframes floatingBubble {
		0% {
			transform: translate(0, 0) rotate(0deg) scale(1);
		}
		33% {
			transform: translate(5px, -10px) rotate(3deg) scale(1.02);
		}
		66% {
			transform: translate(-5px, -10px) rotate(-2deg) scale(0.98);
		}
		100% {
			transform: translate(0, 0) rotate(0deg) scale(1);
		}
	}
	.results-deep-section {
		padding: 50px 0;
	}
	.invest-section {
        clip-path: polygon(
            0 30px,
            100% 0,
            100% calc(100% - 30px), 
            0 100% 
        );
        margin: -30px 0; 
        padding: 60px 0; 
    }
	.faq-chat-section {
		mask-image: none;
		padding-top: 70px;
		padding-bottom: 50px;
	}
	.final-cta {
		mask-image: none;
		padding: 0 0 50px 0;
	}
	.results-deep-section{
		mask-image: none;
	}
	.logo__footer {
		height: 55px;
		width: auto;
		max-width: 80%;
		display: block;
		margin: 0 auto;
	}
	.kids-num{
		font-size:18px !important;
	}
	.final-cta .cta-visual-glass {
		left: 10px;
		top: 60px;
		opacity: .6;
	}
	.final-cta .cta-visual-glass img {
		width: 100px;
	}
}


@media (max-width: 768px) {
    .action-bar__content {
        flex-direction: column; /* Возвращаем в стек, если мало места */
        gap: 20px;
    }
    
    .action-bar__contacts {
        position: static;       /* Отменяем абсолют для мобилок */
        order: 2;               /* Иконки под кнопку */
    }
    
    .action-bar__button-wrap {
        order: 1;
        width: 100%;
    }

    .action-bar__button-wrap {
        width: 100%;
        order: 1;
    }

    .btn-action-primary {
        width: 90%;
        font-size: 12px;
        padding: 18px 20px;
    }
	.finance-action-bar.is-landed{
		width: calc(100% - 20px);
	}
	.contact-link{
		width: 35px;
		height: 35px;
	}
	
	
	
	

    .steps-section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 50px;
        padding: 0 20px;
    }

    .timeline-container {
        padding: 20px 0 40px 0;
        margin: 0 15px; /* Небольшой отступ от краев экрана */
    }

    /* 1. Смещаем центральную нить влево */
    .timeline-line {
        left: 20px; /* Фиксируем линию слева */
        transform: none;
    }

    /* 2. Сбрасываем Flex-поведение строк */
    .step-row {
        flex-direction: column;
        align-items: flex-start; /* Все к левому краю */
        margin-bottom: 40px; /* Отступ между карточками */
        width: 100%;
        justify-content: flex-start;
    }

    /* 3. Оформляем карточку контента */
    .step-content {
        width: calc(100% - 50px) !important; /* Занимает всё место минус отступ для линии */
        margin-left: 50px !important; /* Отступаем от линии справа */
        margin-right: 0 !important;
        padding: 25px; /* Чуть меньше падинги на мобилках */
        text-align: left !important; /* Всегда левосторонняя верстка */
        border-radius: 20px;
    }

    /* 4. Позиционируем узлы (круги) точно на линии */
    .step-node {
        left: 20px;
        top: 40px; /* Центрируем узел относительно верхней части контента */
        transform: translateX(-50%);
    }

    /* 5. Обработка параллельных шагов (5 и 6) */
    .parallel-wrapper {
        display: block; /* Убираем параллельность */
    }

    .parallel-item {
        margin-bottom: 40px;
    }

    /* Убираем лишние узлы, если они дублируются в параллельных блоках */
    .parallel-item .step-node {
        display: block;
    }

    /* 6. Адаптация фиксированной панели действий */
    .steps-action-bar {
        padding: 15px 0;
    }

    .action-bar__content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .action-bar__contacts {
        justify-content: center;
    }

    .btn-action-primary {
        width: 100%;
        font-size: 14px;
        padding: 15px 10px;
    }

	.market-bento {
		padding-top: 50px;
		padding-bottom: 70px;
	}
	.gear-wrapper--right {
		display: none;
	}
	.gear-svg--small {
		width: 125px;
		height: 125px;
	}
	.gear-wrapper--left {
		top: 10px;
		left: -40px;
	}
	.el--circle {
		display: none;
	}
	.glass-el--gear {
		width: 110px;
	}
	.footer {
		padding: 40px 0 40px;
	}
	.step-pointer {
		left: -40px;
	}
	.step-card.active .step-pointer {
		left: -50px;
	}
}


@media (max-width: 600px) {
    .about__grid {
        grid-template-columns: 1fr; /* По 1 на телефонах */
    }
    
    .about__accent-box { font-size: 14px; padding: 15px; }
	.market__reasons {
        grid-template-columns: 1fr;
    }
	.package__grid { grid-template-columns: 1fr; }
	/* На маленьких телефонах всё в одну колонку */
    .package-grid {
        grid-template-columns: 1fr;
    }

    .finance__main-title {
        font-size: 1.5rem;
    }

    .result-value {
        font-size: 32px;
    }

    /* Прячем часть декора, чтобы не перегружать экран */
    .glass-el--bubble {
        display: none;
    }
}


@media (max-width: 992px) {
    .results-stack {
        display: flex;
        flex-direction: column;
        gap: 30px;
        min-height: auto;
    }

    .case-card {
        position: relative; /* Возвращаем в поток */
        width: 100%;
        max-width: 450px;
        transform: none !important; /* Отменяем наклоны */
        margin: 0 auto;
    }

    .results-header {
        text-align: center;
        margin-bottom: 50px;
    }

    .floating-sphere {
        width: 300px;
        top: 50%;
        right: -20%;
    }
}

@media (max-width: 480px) {
    .case-card {
        padding: 25px;
    }
    
    .card-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 992px) {
    .case-item-wrapper {
        position: relative;
        transform: none !important;
        width: 100%;
        height: auto;
        margin-bottom: 20px;
    }
    .case-card {
        transform: none !important;
    }

    .invest-main-card { flex-direction: column; padding: 40px; }
    .invest-plus { padding: 30px 0; }
    .invest-total { flex-direction: column; text-align: center; gap: 15px; }


    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .item-lg, .item-md, .item-sm, .item-wide {
        grid-column: span 1;
        grid-row: span 1;
    }

    .footer-top { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .footer-desc { margin: 0 auto 25px; }
    .footer-socials { justify-content: center; }
    .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
    .footer-legal a { margin: 0 10px; }

    .bento-grid { grid-template-columns: 1fr; }
    .stats-main, .full-width { grid-column: span 1; }
}