/* --- Стили для Септика (Septic Theme 2026) --- */
:root {
    --accent-septic: #0284C7;
    --accent-septic-dark: #0C4A6E;
    --accent-septic-light: #E0F2FE;
    --gradient-septic-card: linear-gradient(135deg, #0284C7 0%, #0C4A6E 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-septic);
    outline: none;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.sub-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

/* ============================================ */
/* Type Cards (Radio Cards) - ИСПРАВЛЕНО        */
/* ============================================ */
.type-cards {
    display: grid;
    grid-template-columns: repeat(2, 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: 18px 12px;
    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: 8px;
    min-height: 110px;
    position: relative;
    z-index: 1;
}

.type-card-icon {
    font-size: 36px;
    line-height: 1;
    margin-bottom: 4px;
}

.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: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    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: 13px;
    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: #BAE6FD;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.12);
}

/* Checked state */
.type-card:has(input[type="radio"]:checked) .type-card-inner {
    border-color: var(--accent-septic);
    background: linear-gradient(135deg, #E0F2FE 0%, #F0F9FF 100%);
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.2);
}

.type-card:has(input[type="radio"]:checked) .type-card-inner .type-card-title {
    color: var(--accent-septic-dark);
}

.type-card:has(input[type="radio"]:checked) .type-card-check {
    background: var(--accent-septic);
    border-color: var(--accent-septic);
}

.type-card:has(input[type="radio"]:checked) .type-card-check::after {
    opacity: 1;
    transform: scale(1);
}

/* Mobile */
@media (max-width: 600px) {
    .type-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .type-card-inner {
        min-height: 100px;
        padding: 14px 8px;
    }
    .type-card-icon {
        font-size: 32px;
    }
    .type-card-title {
        font-size: 13px;
    }
    .type-card-desc {
        font-size: 10px;
    }
}

/* Divider */
.divider {
    border-top: 1px solid #E5E7EB;
    margin: 24px 0;
}

/* Checkbox List */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.checkbox-item:hover {
    background: #F9FAFB;
}

.checkbox-item input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #CBD5E1;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: #fff;
    margin-top: 2px;
}

.checkbox-item:has(input:checked) .checkbox-custom {
    background: var(--accent-septic);
    border-color: var(--accent-septic);
}

.checkbox-custom::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s;
}

.checkbox-item:has(input:checked) .checkbox-custom::after {
    opacity: 1;
    transform: scale(1);
}

.checkbox-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 10px;
}

.checkbox-label span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.checkbox-icon {
    font-size: 16px;
}

.checkbox-hint {
    color: var(--text-secondary);
    font-size: 11px;
    font-style: italic;
    font-weight: normal;
}

/* Row 2 col */
.row-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ============================================ */
/* Результаты (Septic Card)                     */
/* ============================================ */
.card--septic {
    background: var(--gradient-septic-card);
    color: #fff;
    border: none;
}

.card--septic 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: Визуализация септика         */
/* ============================================ */
.septic-3d-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);
}

.septic-3d {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: flex-end;
    height: 140px;
    position: relative;
    padding: 10px 20px;
}

.septic-chamber {
    flex: 1;
    max-width: 90px;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.08) 100%);
    border: 3px solid rgba(255,255,255,0.5);
    border-radius: 8px 8px 4px 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.septic-chamber.hidden {
    display: none;
}

.chamber-water {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(180deg, #38BDF8 0%, #0369A1 100%);
    transition: height 0.8s ease;
    overflow: hidden;
}

/* Анимация волн на воде */
.chamber-water::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(255,255,255,0.5);
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% {
        transform: translateY(0) scaleX(1);
    }
    50% {
        transform: translateY(-2px) scaleX(1.05);
    }
}


.chamber-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
    z-index: 2;
}

/* Трубы между камерами */
.septic-chamber::after {
    content: '';
    position: absolute;
    top: 35%;
    right: -9px;
    width: 12px;
    height: 4px;
    background: rgba(255,255,255,0.6);
    border-radius: 0 4px 4px 0;
}

.septic-chamber:last-child::after {
    display: none;
}

.septic-3d-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.water {
    background: linear-gradient(135deg, #38BDF8, #0369A1);
}

.legend-dot.sludge {
    background: linear-gradient(135deg, #92400E, #451A03);
}

/* ============================================ */
/* KILLER FEATURE: Шкала нагрузки               */
/* ============================================ */
.load-meter {
    background: rgba(0,0,0,0.25);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-top: 18px;
}

.load-meter-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    margin-bottom: 8px;
    text-align: center;
}

.load-meter-bar {
    height: 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    overflow: hidden;
}

.load-meter-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10B981 0%, #F59E0B 50%, #EF4444 100%);
    border-radius: 6px;
    transition: width 0.6s ease;
    position: relative;
}

/* Shimmer эффект */
.load-meter-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.load-meter-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 10px;
    color: rgba(255,255,255,0.7);
}

#loadMeterValue {
    font-weight: 700;
    color: #fff;
    font-size: 11px;
}

/* ============================================ */
/* Details List                                 */
/* ============================================ */
.summary-divider {
    height: 1px;
    background: rgba(255,255,255,0.2);
    margin: 24px 0;
}

.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;
}

.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: #F0F9FF;
    border: 1px solid #BAE6FD;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    color: var(--accent-septic);
    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;
}

/* Norms Grid */
.norms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.norm-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px;
    background: #F8FAFC;
    border-radius: var(--radius-md);
    border: 1px solid #E2E8F0;
}

.norm-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.norm-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-septic);
}

.norm-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 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-septic);
    box-shadow: 0 4px 20px rgba(2, 132, 199, 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-septic);
    background: var(--accent-septic-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-septic);
}

.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;
    }

    .row-2-col {
        grid-template-columns: 1fr;
    }

    .types-comparison {
        grid-template-columns: 1fr;
    }

    .norms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .info-wrapper {
        padding: 40px 0;
        margin-top: 40px;
    }

    .septic-3d {
        height: 110px;
        padding: 10px 10px;
    }

    .septic-chamber {
        max-width: 60px;
    }

    .chamber-label {
        font-size: 18px;
    }

    .big-result {
        font-size: 32px;
    }
}
