/* --- Стили China Delivery (Blue Theme) --- */
:root {
    --accent-blue: #2563EB;
    --accent-blue-dark: #1D4ED8;
    --accent-blue-light: #DBEAFE;
    --gradient-blue-card: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-white: #FFFFFF;
    --text-white-soft: rgba(255, 255, 255, 0.95);
    --text-white-muted: rgba(255, 255, 255, 0.85);
    --text-white-dim: rgba(255, 255, 255, 0.75);
    
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --radius-lg: 16px;
    --font-main: 'Inter', sans-serif;
}

/* Base Layout */
.calc-header { margin-bottom: 32px; }
.subtitle { color: var(--text-secondary); margin-top: 8px; }
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1.2fr 0.8fr; } }

/* Inputs */
.calc-inputs { gap: 24px; }
.input-group { margin-bottom: 24px; }
.grid-2-col { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 24px; 
    margin-bottom: 16px; 
}
@media (max-width: 600px) { 
    .grid-2-col { 
        grid-template-columns: 1fr; 
        gap: 16px;
    } 
}

.input-group label { 
    display: block; 
    font-size: 14px; 
    font-weight: 600; 
    margin-bottom: 8px; 
    color: var(--text-primary); 
}
.input-wrapper { 
    position: relative; 
    display: flex; 
    align-items: center; 
}

.input-wrapper input {
    width: 100%; 
    padding: 16px; 
    padding-right: 40px;
    font-size: 18px; 
    font-weight: 500;
    border: 1px solid #E5E7EB; 
    border-radius: 12px;
    outline: none; 
    transition: border 0.2s; 
    background: #fff;
    font-family: var(--font-main);
}
.input-wrapper input:focus { 
    border-color: var(--accent-blue); 
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); 
}
.currency { 
    position: absolute; 
    right: 16px; 
    color: var(--text-secondary); 
    pointer-events: none; 
}
.input-hint { 
    font-size: 12px; 
    color: var(--text-secondary); 
    margin-top: 6px; 
}

/* Method Selector */
.method-selector { margin-top: 8px; }
.method-options { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 12px; 
}
@media (max-width: 768px) { 
    .method-options { 
        grid-template-columns: 1fr; 
    } 
}

.method-option {
    border: 1px solid #E5E7EB; 
    border-radius: 12px;
    padding: 16px; 
    cursor: pointer; 
    transition: all 0.2s;
    text-align: center; 
    background: #fff;
}
.method-option:hover { 
    border-color: #D1D5DB; 
    background: #F9FAFB; 
}
.method-option input { 
    display: none; 
}
.method-option.selected {
    border-color: var(--accent-blue); 
    background: var(--accent-blue-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.method-icon { 
    font-size: 24px; 
    display: block; 
    margin-bottom: 8px; 
}
.method-title { 
    display: block; 
    font-weight: 600; 
    color: var(--text-primary); 
}
.method-desc { 
    font-size: 12px; 
    color: var(--text-secondary); 
    margin-top: 4px; 
}

/* Range Slider */
.range-slider-wrapper { margin-top: 8px; }
.range-labels { 
    display: flex; 
    justify-content: space-between; 
    font-size: 13px; 
    color: var(--text-secondary); 
    margin-bottom: 8px; 
}
#urgency-value { 
    font-weight: 700; 
    color: var(--accent-blue); 
}
.slider {
    width: 100%; 
    height: 6px;
    border-radius: 3px; 
    background: #E5E7EB;
    outline: none; 
    -webkit-appearance: none;
}
.slider::-webkit-slider-thumb {
    -webkit-appearance: none; 
    width: 22px; 
    height: 22px;
    border-radius: 50%; 
    background: var(--accent-blue);
    border: 3px solid #fff; 
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
}
.slider::-moz-range-thumb {
    width: 22px; 
    height: 22px; 
    border-radius: 50%;
    background: var(--accent-blue); 
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2); 
    cursor: pointer;
}
.range-ticks {
    display: flex; 
    justify-content: space-between; 
    margin-top: 8px;
    font-size: 11px; 
    color: var(--text-secondary);
}

/* Checkboxes - ИСПРАВЛЕНО: идеальное выравнивание */
.checkbox-group { 
    margin-bottom: 0; 
    display: flex;
    flex-direction: column;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    min-height: 24px;
    padding: 2px 0;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #D1D5DB;
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s;
    box-sizing: border-box;
}

.checkbox-label:hover .checkmark {
    border-color: var(--accent-blue);
    background-color: rgba(37, 99, 235, 0.05);
}

.checkbox-label input:checked + .checkmark {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.checkbox-label input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    box-sizing: border-box;
}

.checkbox-label input:focus + .checkmark {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.checkbox-desc { 
    font-size: 12px; 
    color: var(--text-secondary); 
    margin-left: 32px; 
    margin-top: 4px; 
    line-height: 1.4;
}

/* Buttons */
.btn--block { width: 100%; }

/* Result Card */
.card--blue { 
    background: var(--gradient-blue-card); 
    color: var(--text-white); 
    border: none; 
}

.card--blue h2, 
.card--blue h3 { 
    color: var(--text-white); 
    margin-bottom: 24px; 
    text-align: center; 
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card--blue h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

.card--blue p {
    color: var(--text-white-soft);
    line-height: 1.6;
}

@media (min-width: 900px) { .sticky-card { position: sticky; top: 24px; } }

.price-big {
    font-size: 56px; 
    font-weight: 800; 
    line-height: 1;
    margin-bottom: 24px; 
    display: flex; 
    justify-content: center;
    align-items: baseline; 
    gap: 8px;
    color: var(--text-white);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.price-big .currency { 
    font-size: 32px; 
    font-weight: 600; 
    color: var(--text-white-soft);
}

.cost-breakdown {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px; 
    margin-bottom: 24px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.breakdown-row {
    display: flex; 
    justify-content: space-between;
    margin-bottom: 8px; 
    font-size: 14px;
    color: var(--text-white-soft);
}

.breakdown-row:last-child { margin-bottom: 0; }

.breakdown-row strong { 
    font-size: 16px; 
    color: var(--text-white);
    font-weight: 700;
}

.summary-divider { 
    height: 2px; 
    background: rgba(255, 255, 255, 0.2); 
    margin: 24px 0; 
}

/* Delivery Timeline */
.delivery-timeline h3 { 
    font-size: 16px; 
    margin-bottom: 16px; 
    text-align: center; 
    color: var(--text-white);
}

.timeline-visual { margin-bottom: 24px; }
.timeline-track {
    height: 8px; 
    background: rgba(255,255,255,0.3);
    border-radius: 4px; 
    position: relative; 
    margin: 0 20px;
}
.timeline-progress {
    height: 100%; 
    background: #fff; 
    border-radius: 4px;
    width: 0%; 
    transition: width 0.8s ease;
}
.timeline-marker {
    position: absolute; 
    top: 50%; 
    transform: translate(-50%, -50%);
    transition: left 0.8s ease;
}
.marker-dot {
    width: 20px; 
    height: 20px; 
    background: #fff;
    border-radius: 50%; 
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}
.marker-label {
    position: absolute; 
    top: -30px; 
    left: 50%;
    transform: translateX(-50%); 
    white-space: nowrap;
    background: rgba(0,0,0,0.8); 
    color: #fff; 
    padding: 4px 10px;
    border-radius: 6px; 
    font-size: 12px; 
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.timeline-labels {
    display: flex; 
    justify-content: space-between;
    margin-top: 8px; 
    font-size: 12px; 
    color: var(--text-white-muted);
    font-weight: 500;
}

/* KILLER FEATURE: Interactive Chart */
.chart-container { 
    margin-top: 24px; 
    width: 100%;
    max-width: 100%;
}

.chart-container h3 { 
    font-size: 16px; 
    margin-bottom: 16px; 
    text-align: center; 
    color: var(--text-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-wrapper {
    position: relative; 
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px; 
    padding: 16px;
    margin-bottom: 16px;
    width: 100%;
    max-height: 220px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

#cost-chart {
    width: 100% !important;
    height: 180px !important;
    max-height: 180px;
    display: block;
}

.chart-legend {
    display: flex; 
    justify-content: center; 
    gap: 20px;
    margin-top: 12px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex; 
    align-items: center; 
    gap: 8px;
    font-size: 13px; 
    color: var(--text-white);
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.legend-color {
    width: 12px; 
    height: 12px; 
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chart-note {
    font-size: 12px; 
    text-align: center; 
    color: var(--text-white-muted);
    margin-top: 8px;
    margin-bottom: 0;
    font-style: italic;
}

/* TIP BOX */
.tip-box {
    font-size: 14px;
    line-height: 1.6;
    padding: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    margin-top: 24px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tip-box p {
    margin: 0;
    color: var(--text-white);
}

.tip-box strong {
    color: var(--text-white);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 4px;
}

/* Info Wrapper */
.info-wrapper { 
    padding: 60px 0 60px 0; 
    margin-top: 60px; 
    border-top: 1px solid rgba(0,0,0,0.06); 
    margin-bottom: 20px; 
}
.info-wrapper .container { 
    max-width: 800px; 
    margin: 0 auto; 
}

.icon-heading { 
    display: flex; 
    align-items: flex-start; 
    gap: 16px; 
    margin-bottom: 24px; 
    font-size: 24px; 
    font-weight: 800; 
    color: var(--text-primary); 
    line-height: 1.3; 
}
.header-icon { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 48px; 
    height: 48px; 
    border-radius: 14px; 
    background: #fff; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.04); 
    flex-shrink: 0; 
    margin-top: -4px; 
}
.blue-icon svg { color: #3B82F6; }
.orange-icon svg { color: #F97316; }
.red-icon svg { color: #EF4444; }

.intro-text { 
    font-size: 16px; 
    color: var(--text-secondary); 
    margin-bottom: 32px; 
    line-height: 1.6; 
}

.formulas-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 24px; 
    margin-bottom: 48px; 
}
.formula-card { 
    background: #fff; 
    border: 1px solid rgba(0,0,0,0.04); 
    box-shadow: var(--shadow-soft); 
    border-radius: var(--radius-lg); 
    padding: 24px; 
    display: flex; 
    flex-direction: column; 
}
.formula-header { 
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 12px; 
    margin-bottom: 16px; 
}
.formula-card h3 { 
    margin: 0; 
    font-size: 18px; 
    font-weight: 700; 
    color: var(--text-primary); 
    line-height: 1.3; 
}
.formula-card p { 
    font-size: 14px; 
    color: var(--text-secondary); 
    margin: 0; 
    line-height: 1.5; 
    font-weight: 500; 
}
.badge-blue { 
    background: #3B82F6; 
    color: #fff; 
    padding: 6px 12px; 
    border-radius: 99px; 
    font-size: 11px; 
    font-weight: 700; 
    text-transform: uppercase; 
}
.badge-green { 
    background: #10B981; 
    color: #fff; 
    padding: 6px 12px; 
    border-radius: 99px; 
    font-size: 11px; 
    font-weight: 700; 
    text-transform: uppercase; 
}
.math-expression { 
    background: #F9FAFB; 
    border: 1px solid #E5E7EB; 
    padding: 12px 16px; 
    border-radius: 12px; 
    font-weight: 700; 
    color: var(--accent-blue-dark); 
    text-align: center; 
    margin-bottom: 16px; 
    font-size: 15px; 
}

/* Table */
.table-wrapper { 
    overflow-x: auto; 
    margin-bottom: 24px; 
    border-radius: 12px; 
    border: 1px solid #E5E7EB; 
}
.comparison-table { 
    width: 100%; 
    border-collapse: collapse; 
    min-width: 500px; 
}
.comparison-table th { 
    background: #F9FAFB; 
    padding: 12px 16px; 
    text-align: left; 
    font-size: 13px; 
    text-transform: uppercase; 
    color: var(--text-secondary); 
    font-weight: 700; 
    border-bottom: 1px solid #E5E7EB; 
}
.comparison-table td { 
    padding: 16px; 
    font-size: 14px; 
    color: var(--text-primary); 
    border-bottom: 1px solid #F3F4F6; 
}
.comparison-table tr:last-child td { 
    border-bottom: none; 
}
.comparison-table tr:hover td { 
    background: var(--accent-blue-light); 
}

/* Links */
.info-wrapper a {
    color: var(--accent-blue-dark); 
    text-decoration: underline; 
    text-decoration-color: rgba(29, 78, 216, 0.3); 
    font-weight: 600; 
    transition: all 0.2s ease;
}
.info-wrapper a:hover { 
    color: var(--accent-blue); 
    background: rgba(37, 99, 235, 0.05); 
    border-radius: 4px; 
}

.soft-divider { 
    border: none; 
    height: 1px; 
    background: linear-gradient(90deg, transparent, #E5E7EB, transparent); 
    margin: 48px 0; 
}

/* FAQ */
.faq-fuel-style .faq-item { 
    background: #fff; 
    border: 1px solid #E5E7EB; 
    border-radius: 12px; 
    margin-bottom: 12px; 
    overflow: hidden; 
    transition: all 0.2s ease; 
}
.faq-fuel-style .faq-item[open] { 
    border-color: var(--accent-blue); 
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1); 
}
.faq-fuel-style summary.faq-question { 
    padding: 16px 20px; 
    cursor: pointer; 
    font-weight: 600; 
    color: var(--text-primary); 
    list-style: none; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.faq-fuel-style .faq-item[open] summary.faq-question { 
    color: var(--accent-blue-dark); 
    background: var(--accent-blue-light); 
}
.faq-question::after { 
    content: '+'; 
    font-size: 20px; 
    color: var(--text-secondary); 
    font-weight: 400; 
    line-height: 1; 
}
.faq-fuel-style .faq-item[open] summary.faq-question::after { 
    content: '−'; 
    color: var(--accent-blue-dark); 
}
.faq-answer { 
    padding: 20px; 
    color: var(--text-secondary); 
    line-height: 1.6; 
    font-size: 15px; 
}

/* Mobile */
@media (max-width: 900px) {
    .formulas-grid { 
        grid-template-columns: 1fr; 
        gap: 16px; 
        margin-bottom: 32px; 
    }
    .icon-heading { 
        font-size: 20px; 
        gap: 12px; 
        margin-bottom: 20px; 
    }
    .header-icon { 
        width: 40px; 
        height: 40px; 
        border-radius: 12px; 
    }
    .header-icon svg { 
        width: 20px; 
        height: 20px; 
    }
    .formula-card { 
        padding: 24px; 
        text-align: center; 
        align-items: center; 
    }
    .formula-header { 
        align-items: center; 
        width: 100%; 
    }
    .math-expression { 
        width: 100%; 
        max-width: 300px; 
        margin-left: auto; 
        margin-right: auto; 
    }
    .info-wrapper { 
        margin-top: 40px; 
        padding-top: 40px; 
    }
    .method-options { 
        grid-template-columns: 1fr; 
    }
    
    /* Исправления для карточки на мобильных */
    .sticky-card {
        position: relative;
        top: 0;
    }
    
    .chart-wrapper {
        max-height: 200px;
        padding: 12px;
    }
    
    #cost-chart {
        height: 160px !important;
    }
    
    .chart-legend {
        gap: 16px;
    }
    
    .tip-box {
        padding: 16px;
        font-size: 13px;
    }

    /* Чекбоксы на мобильных */
    .grid-2-col {
        gap: 20px;
    }
    
    .checkbox-group {
        margin-bottom: 0;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .chart-wrapper {
        max-height: 180px;
        padding: 10px;
    }
    
    #cost-chart {
        height: 140px !important;
    }
    
    .chart-legend {
        gap: 12px;
        margin-top: 8px;
    }
    
    .legend-item {
        font-size: 12px;
    }
    
    .tip-box {
        padding: 14px;
    }

    .checkbox-desc {
        margin-left: 32px;
        font-size: 11px;
    }
}

/* Дополнительные улучшения для читаемости на синем фоне */
.card--blue .breakdown-row span {
    color: var(--text-white-muted);
}

.card--blue .breakdown-row strong {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
}

.card--blue .cost-breakdown {
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.1);
}

.card--blue .chart-note {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 8px;
}

@keyframes fadeIn { 
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    } 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}

/* --- СТИЛИ ДЛЯ SIDEBAR (СМОТРИТЕ ТАКЖЕ) --- */
.sidebar-related {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.sidebar-related h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.related-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
}

.related-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.related-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.related-info {
    flex: 1;
    min-width: 0;
}

.related-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text-primary);
    line-height: 1.3;
}

.related-info span {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}