/* --- Стили для Утеплителя (Insulation Theme 2026) --- */
:root {
    --accent-insulation: #B45309;
    --accent-insulation-dark: #78350F;
    --accent-insulation-light: #FEF3C7;
    --gradient-insulation-card: linear-gradient(135deg, #F59E0B 0%, #B45309 100%);
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.12);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

.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: 16px; }
.input-group { margin-bottom: 16px; }

.input-group > label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.label-icon { font-size: 16px; }

/* Counter Wrapper */
.counter-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    height: 52px;
}

.counter-btn {
    width: 48px;
    height: 100%;
    border: none;
    background: #F9FAFB;
    cursor: pointer;
    font-weight: bold;
    color: var(--text-secondary);
    font-size: 22px;
    transition: all 0.2s;
}

.counter-btn:hover {
    background: #E5E7EB;
    color: var(--text-primary);
}

.counter-wrapper input {
    width: 100%;
    height: 100%;
    text-align: center;
    border: none;
    font-weight: 600;
    font-size: 18px;
    outline: none;
    padding: 0;
    font-family: var(--font-main);
}

.helper-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* Select Custom */
.calc-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 16px center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.2s;
}

.calc-select:focus {
    border-color: var(--accent-insulation);
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* Type Cards */
.type-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.type-card {
    position: relative;
    cursor: pointer;
}

.type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.type-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    background: #fff;
    border: 2px solid #E5E7EB;
    border-radius: var(--radius-md);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    gap: 6px;
    min-height: 100px;
    position: relative;
    z-index: 1;
}

.type-card-icon {
    font-size: 32px;
    line-height: 1;
}

.type-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.type-card-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.2;
}

.type-card-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #D1D5DB;
    background: #fff;
    transition: all 0.25s;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.type-card-check::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s;
    line-height: 1;
}

/* Hover state */
.type-card:hover .type-card-inner {
    border-color: #FDE68A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.15);
}

/* Checked state */
.type-card:has(input[type="radio"]:checked) .type-card-inner {
    border-color: var(--accent-insulation);
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
}

.type-card:has(input[type="radio"]:checked) .type-card-inner .type-card-title {
    color: var(--accent-insulation-dark);
}

.type-card:has(input[type="radio"]:checked) .type-card-check {
    background: var(--accent-insulation);
    border-color: var(--accent-insulation);
}

.type-card:has(input[type="radio"]:checked) .type-card-check::after {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 900px) {
    .type-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Divider */
.divider {
    border-top: 1px solid #E5E7EB;
    margin: 24px 0;
}

/* Результаты (Insulation Card) */
.card--insulation {
    background: var(--gradient-insulation-card);
    color: #fff;
    border: none;
}

.card--insulation h2 {
    color: rgba(255,255,255,0.95);
    margin-bottom: 20px;
    font-size: 16px;
}

@media (min-width: 900px) {
    .sticky-card {
        position: sticky;
        top: 24px;
    }
}

.big-result {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 24px;
    display: flex;
    align-items: baseline;
    gap: 12px;
    white-space: nowrap;
}

.big-result small {
    font-size: 20px;
    font-weight: 600;
    opacity: 0.8;
}

/* ============================================ */
/* KILLER FEATURE: Визуализация стенового пирога */
/* ============================================ */
.wall-pie-container {
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.15);
}

.wall-pie {
    display: flex;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.4);
}

.wall-layer {
    background: linear-gradient(180deg, #A8A29E 0%, #78716C 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: width 0.6s ease;
    min-width: 40px;
    position: relative;
}

.insulation-layer {
    background: linear-gradient(180deg, #FDE68A 0%, #F59E0B 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: width 0.6s ease;
    min-width: 40px;
    position: relative;
}

.layer-label {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    white-space: nowrap;
}

.layer-thickness {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.wall-pie-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 12px;
    font-size: 12px;
    color: rgba(255,255,255,0.9);
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.legend-dot.wall {
    background: linear-gradient(135deg, #A8A29E, #78716C);
}

.legend-dot.insulation {
    background: linear-gradient(135deg, #FDE68A, #F59E0B);
}

/* Dew Point Indicator */
.dew-point-indicator {
    margin-top: 14px;
    padding: 14px 16px;
    background: rgba(0,0,0,0.4);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.dew-label {
    font-size: 13px;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.dew-value {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    padding: 6px 12px;
    border-radius: 6px;
    border: 2px solid rgba(255,255,255,0.3);
}

.dew-value.good { 
    background: linear-gradient(135deg, #059669, #10B981);
    border-color: #34D399;
}
.dew-value.warning { 
    background: linear-gradient(135deg, #D97706, #F59E0B);
    border-color: #FCD34D;
}
.dew-value.bad { 
    background: linear-gradient(135deg, #DC2626, #EF4444);
    border-color: #F87171;
}

/* Summary Divider */
.summary-divider {
    height: 1px;
    background: rgba(255,255,255,0.2);
    margin: 24px 0;
}

/* Details List */
.details-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding-bottom: 10px;
    font-size: 14px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row strong {
    font-size: 16px;
    font-weight: 700;
}

/* Cost Summary */
.cost-summary {
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-top: 18px;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: rgba(255,255,255,0.9);
}

.cost-total {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.3);
    font-size: 16px;
    font-weight: 700;
}

.cost-total span:last-child {
    color: #FDE68A;
}

/* Tip Box */
.tip-box {
    font-size: 13px;
    line-height: 1.5;
    color: #ffffff !important;
    background: rgba(0, 0, 0, 0.3) !important;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 24px;
}

.tip-box p {
    margin: 0;
    color: #ffffff !important;
}

/* ============================================ */
/* INFO WRAPPER - SEO Content                   */
/* ============================================ */
.info-wrapper {
    padding: 60px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.info-wrapper .container {
    max-width: 900px;
    margin: 0 auto;
}

/* Icon Heading */
.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.08);
    flex-shrink: 0;
    margin-top: -4px;
}

.header-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2px;
}

.blue-icon svg { color: #0284C7; }
.orange-icon svg { color: #EA580C; }
.green-icon svg { color: #10B981; }
.red-icon svg { color: #EF4444; }

.intro-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

/* Formulas Grid */
.formulas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 48px;
}

.formula-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.3s;
}

.formula-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.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);
}

.badge-blue {
    background: #0284C7;
    color: #fff;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-green {
    background: #10B981;
    color: #fff;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.formula-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.math-expression {
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    color: var(--accent-insulation-dark);
    text-align: center;
    margin-bottom: 16px;
    font-size: 16px;
}

/* Soft Divider */
.soft-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #E5E7EB, transparent);
    margin: 48px 0;
}

/* Calc Description */
.calc-description p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.calc-description strong {
    color: var(--text-primary);
}

.small-heading {
    margin-top: 40px;
    margin-bottom: 16px;
    font-size: 20px;
}

.small-heading .header-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.small-heading .header-icon svg {
    width: 20px;
    height: 20px;
}

/* Dew Point Table */
.dew-point-table {
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 32px;
}

.dew-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    padding: 12px 16px;
    border-bottom: 1px solid #E5E7EB;
    font-size: 14px;
}

.dew-row.header {
    background: #F9FAFB;
    font-weight: 600;
    color: var(--text-primary);
}

.dew-row:last-child {
    border-bottom: none;
}

.status-good { color: #10B981; font-weight: 600; }
.status-warning { color: #F59E0B; font-weight: 600; }
.status-bad { color: #EF4444; font-weight: 600; }

/* Types Comparison */
.types-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.type-compare-item {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-md);
    padding: 20px;
}

.type-compare-item h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.type-compare-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.type-compare-item li {
    font-size: 14px;
    padding: 6px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid #F1F5F9;
}

.type-compare-item li:last-child {
    border-bottom: none;
}

/* FAQ */
.faq-section .faq-item {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.faq-section .faq-item[open] {
    border-color: var(--accent-insulation);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.12);
}

summary.faq-question {
    padding: 18px 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

summary.faq-question:hover {
    background: #F9FAFB;
}

.faq-section .faq-item[open] summary.faq-question {
    color: var(--accent-insulation-dark);
    background: var(--accent-insulation-light);
}

.faq-question::after {
    content: '+';
    font-size: 22px;
    color: var(--text-secondary);
    font-weight: 400;
    transition: all 0.2s;
}

.faq-section .faq-item[open] summary.faq-question::after {
    content: '−';
    color: var(--accent-insulation-dark);
}

.faq-answer {
    padding: 20px;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 15px;
    border-top: 1px solid #F1F5F9;
}

.faq-answer p {
    margin: 0;
}

/* ============================================ */
/* Mobile Responsive                            */
/* ============================================ */
@media (max-width: 900px) {
    .formulas-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .icon-heading {
        font-size: 20px;
        gap: 12px;
    }

    .header-icon {
        width: 40px;
        height: 40px;
    }

    .big-result {
        font-size: 36px;
    }

    .types-comparison {
        grid-template-columns: 1fr;
    }

    .dew-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 600px) {
    .info-wrapper {
        padding: 40px 0;
        margin-top: 40px;
    }

    .wall-pie {
        height: 80px;
    }

    .big-result {
        font-size: 32px;
    }
}
