/* ═══ KUZNYA CALC v2 — редизайн ═══ */

.calc-hero {
    padding: 60px 0 40px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.calc-pulse {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    color: #4ADE80;
    margin-bottom: 16px;
}
.calc-pulse__dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #22C55E;
    animation: calcPulseDot 2s ease-in-out infinite;
}
@keyframes calcPulseDot {
    0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.7); }
    50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}

.calc-hero .page-title {
    font-size: clamp(30px, 4.5vw, 48px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 12px 0 18px;
    color: var(--text);
}
.calc-hero .page-subtitle {
    font-size: 17px;
    line-height: 1.65;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0;
}

/* ═══ ПОЧЕМУ МЫ ═══ */
.calc-why-section {
    padding: 32px 0;
    background: rgba(255,255,255,0.015);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.calc-why {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.calc-why__card {
    padding: 22px 20px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.calc-why__card:hover {
    transform: translateY(-4px);
    border-color: rgba(217,119,6,0.4);
}
.calc-why__card i {
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 12px;
    display: block;
}
.calc-why__card h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--text);
}
.calc-why__card p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
}

/* ═══ ОСНОВА ═══ */
.calc-section { padding: 40px 0 80px; }
.calc-root { max-width: 1200px; margin: 0 auto; position: relative; }

/* ═══ ПРОГРЕСС ═══ */
.calc-progress { margin-bottom: 40px; }
.calc-progress__bar {
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}
.calc-progress__fill {
    height: 100%;
    width: 25%;
    background: linear-gradient(90deg, var(--primary), #F59E0B);
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 12px rgba(217, 119, 6, 0.5);
}
.calc-progress__labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--text-muted);
}
.calc-progress__labels span { transition: color 0.3s ease; }
.calc-progress__labels span b { color: inherit; margin-right: 4px; }
.calc-progress__labels span.active { color: var(--primary); }

/* ═══ ШАГИ ═══ */
.calc-step {
    display: none;
    animation: calcStepIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.calc-step.is-active { display: block; }
@keyframes calcStepIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.calc-step__title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--text);
    letter-spacing: -0.02em;
}
.calc-step__hint {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0 0 32px;
}

/* ═══ ТИПЫ ═══ */
.calc-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.calc-type-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 38px 22px 22px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.calc-type-card:hover {
    transform: translateY(-4px);
    border-color: rgba(217, 119, 6, 0.4);
    background: rgba(217, 119, 6, 0.04);
}
.calc-type-card input { position: absolute; opacity: 0; pointer-events: none; }
.calc-type-card > i {
    font-size: 26px;
    color: var(--primary);
    margin-bottom: 14px;
    transition: transform 0.3s ease;
}
.calc-type-card:hover > i { transform: scale(1.15) rotate(-5deg); }
.calc-type-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--text);
}
.calc-type-card p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0 0 16px;
    flex: 1;
}
.calc-card-price {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 2px;
}
.calc-card-days {
    font-size: 12px;
    color: var(--text-muted);
}
.calc-type-card:has(input:checked) {
    border-color: var(--primary);
    background: rgba(217, 119, 6, 0.08);
    box-shadow: 0 0 0 1px var(--primary), 0 12px 32px rgba(217, 119, 6, 0.15);
}
.calc-type-card:has(input:checked)::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 12px; left: 12px;
    width: 22px; height: 22px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
}

/* ═══ БЕЙДЖИ ═══ */
.calc-badge {
    position: absolute;
    top: 12px; right: 12px;
    padding: 3px 9px;
    background: linear-gradient(135deg, #D97706, #F59E0B);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    border-radius: 6px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(217,119,6,0.4);
}
.calc-badge--sm {
    position: static;
    padding: 2px 6px;
    font-size: 9px;
    margin-left: auto;
    align-self: flex-start;
}

/* ═══ СЛАЙДЕРЫ ═══ */
.calc-field {
    margin-bottom: 20px;
    padding: 24px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
}
.calc-field label {
    display: block;
    font-size: 15px;
    color: var(--text);
    margin-bottom: 14px;
    font-weight: 600;
}
.calc-field label b {
    color: var(--primary);
    font-size: 18px;
    font-weight: 800;
}
.calc-field input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}
.calc-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.2), 0 4px 12px rgba(0,0,0,0.4);
    transition: transform 0.15s ease;
}
.calc-field input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.calc-field input[type="range"]::-moz-range-thumb {
    width: 22px; height: 22px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}
.calc-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ═══ ФУНКЦИИ ═══ */
.calc-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.calc-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    position: relative;
}
.calc-feature:hover {
    border-color: rgba(217, 119, 6, 0.4);
    background: rgba(217, 119, 6, 0.04);
}
.calc-feature input { position: absolute; opacity: 0; pointer-events: none; }
.calc-feature > i {
    font-size: 18px;
    color: var(--primary);
    margin-top: 2px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.calc-feature:hover > i { transform: scale(1.15); }
.calc-feature__body { flex: 1; min-width: 0; }
.calc-feature__body strong {
    display: block;
    font-size: 14.5px;
    color: var(--text);
    margin-bottom: 2px;
}
.calc-feature__body small {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.4;
}
.calc-feature__price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    margin-left: 8px;
}
.calc-feature__price b {
    font-size: 13.5px;
    color: var(--primary);
    font-weight: 700;
    white-space: nowrap;
}
.calc-feature__price small {
    font-size: 11px;
    color: var(--text-muted);
}
.calc-feature:has(input:checked) {
    border-color: var(--primary);
    background: rgba(217, 119, 6, 0.08);
}

/* ═══ СРОЧНОСТЬ ═══ */
.calc-urgency-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.calc-urgency-card {
    position: relative;
    padding: 24px 20px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.calc-urgency-card:hover {
    transform: translateY(-3px);
    border-color: rgba(217, 119, 6, 0.4);
}
.calc-urgency-card input { position: absolute; opacity: 0; pointer-events: none; }
.calc-urgency-card i {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 12px;
    display: block;
}
.calc-urgency-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--text);
}
.calc-urgency-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}
.calc-urgency-card:has(input:checked) {
    border-color: var(--primary);
    background: rgba(217, 119, 6, 0.08);
    box-shadow: 0 0 0 1px var(--primary);
}

/* ═══ НАВИГАЦИЯ ═══ */
.calc-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.calc-nav__indicator {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}
.calc-nav__indicator b { color: var(--primary); }
.calc-nav button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

/* ═══ РЕЗУЛЬТАТ ═══ */
.calc-result {
    position: sticky;
    bottom: 16px;
    margin-top: 32px;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.1), rgba(255,255,255,0.02));
    border: 1px solid rgba(217, 119, 6, 0.35);
    border-radius: 18px;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
    backdrop-filter: blur(12px);
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 24px;
    align-items: center;
}
.calc-result__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 6px;
}
.calc-result__price {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1;
}
.calc-result__currency {
    font-size: 20px;
    color: var(--text-muted);
    font-weight: 600;
}
.calc-result__days {
    font-size: 14px;
    color: var(--text-muted);
}
.calc-result__days i { color: var(--primary); margin-right: 6px; }
.calc-result__days b { color: var(--text); }
.calc-result__cta { white-space: nowrap; }
.calc-result__note {
    grid-column: 1 / -1;
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.calc-result__note i { color: var(--primary); margin-right: 6px; }

/* ═══ МОДАЛКА ═══ */
.calc-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.calc-modal.is-open { opacity: 1; visibility: visible; }
.calc-modal__overlay {
    position: absolute; inset: 0;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(6px);
}
.calc-modal__dialog {
    position: relative;
    width: 90%; max-width: 460px;
    background: var(--bg-light, #14141A);
    border: 1px solid rgba(217, 119, 6, 0.3);
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.6);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s ease;
    max-height: 90vh; overflow-y: auto;
}
.calc-modal.is-open .calc-modal__dialog { transform: translateY(0) scale(1); }
.calc-modal__close {
    position: absolute; top: 12px; right: 12px;
    width: 32px; height: 32px;
    border: none;
    background: rgba(255,255,255,0.06);
    color: var(--text);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}
.calc-modal__close:hover { background: rgba(255,255,255,0.12); }
.calc-modal__head { text-align: center; margin-bottom: 24px; }
.calc-modal__head i {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 12px;
    display: block;
}
.calc-modal__head h3 {
    font-size: 20px; font-weight: 700; margin: 0 0 6px; color: var(--text);
}
.calc-modal__head p { font-size: 13.5px; color: var(--text-muted); margin: 0; }
.calc-form input, .calc-form textarea {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease;
}
.calc-form input:focus, .calc-form textarea:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,0.05);
}
.calc-modal__success { text-align: center; padding: 16px 0; }
.calc-modal__success i {
    font-size: 56px; color: #22C55E; margin-bottom: 16px; display: block;
}
.calc-modal__success h3 {
    font-size: 22px; font-weight: 700; color: var(--text); margin: 0 0 8px;
}
.calc-modal__success p { color: var(--text-muted); margin: 0; }

/* ═══ ТОСТ (уведомление) ═══ */
.calc-toast {
    position: fixed;
    top: 24px; left: 50%;
    transform: translateX(-50%) translateY(-120%);
    z-index: 10000;
    padding: 14px 24px 14px 20px;
    background: #14141A;
    border: 1px solid rgba(217, 119, 6, 0.5);
    border-left: 3px solid var(--primary);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 90vw;
}
.calc-toast.is-visible {
    transform: translateX(-50%) translateY(0);
}
.calc-toast i { color: var(--primary); font-size: 18px; flex-shrink: 0; }
.calc-toast--warning { border-left-color: #F59E0B; }
.calc-toast--warning i { color: #F59E0B; }

/* ═══ АДАПТИВ ═══ */


/* ═══ SCROLL-FIX ═══ */
html, body { overflow-x: hidden !important; }
body.calc-modal-open { overflow: hidden !important; }

/* Модалка: убираем горизонтальный overflow */
.calc-modal,
.calc-modal__dialog { overflow-x: hidden !important; }
.calc-modal__dialog > * { max-width: 100% !important; }
.calc-form input,
.calc-form textarea { max-width: 100%; box-sizing: border-box; }

.calc-days-range { color: var(--text); font-weight: 600; }
.calc-days-range:empty::before { content: 'уточним после обсуждения'; color: var(--text-muted); font-weight: 500; }

/* ═══ РАЗДЕЛИТЕЛЬ ПЕРЕД КАЛЬКУЛЯТОРОМ ═══ */
.calc-start {
    padding: 64px 0 40px;
    background: transparent;
    border-top: 1px solid rgba(255,255,255,0.06);
    position: relative;
}

.calc-start__inner {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}
.calc-start__tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(217,119,6,0.1);
    border: 1px solid rgba(217,119,6,0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
}
.calc-start__tag i { font-size: 13px; }
.calc-start-title {
    font-size: clamp(26px, 3.6vw, 38px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0 0 14px;
}
.calc-start-subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 0 28px;
}

/* ═══ CLEAN MOBILE — calc-result в потоке ═══ */
@media (max-width: 900px) {
    .calc-why { grid-template-columns: repeat(2, 1fr); }
    .calc-type-grid { grid-template-columns: repeat(2, 1fr); }
    .calc-features-grid { grid-template-columns: 1fr; }
    .calc-urgency-grid { grid-template-columns: 1fr; }
    .calc-result {
        grid-template-columns: 1fr;
        gap: 14px;
        position: static;
        margin-top: 24px;
        padding: 22px;
        border-radius: 14px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.25);
        backdrop-filter: none;
    }
    .calc-result__cta { width: 100%; justify-content: center; }
    .calc-result__price { font-size: 28px; }
}
@media (max-width: 600px) {
    .calc-why { grid-template-columns: 1fr; }
    .calc-type-grid { grid-template-columns: 1fr; }
    .calc-step__title { font-size: 22px; }
    .calc-result { padding: 18px; }
    .calc-result__price { font-size: 24px; }
}