/* ==========================================================
   1. ОБЩИЕ СТИЛИ СТРАНИЦЫ И ТЕКСТОВ
   ========================================================== */
.info-section-title { font-size: 24px; font-weight: 700; color: #334155; margin: 70px 0 50px; text-align: center; text-transform: uppercase; }
.ppppp { width: 60%; text-align: center; margin: -40px auto 50px; font-size: 15px; color: #646679; }
.mbbbbb{
    margin-top:30px;
}
.mbb1{
    margin-bottom:-30px;
}
/* ==========================================================
   2. ГЛАВНАЯ СЕТКА И БЛОКИ (ОБЩЕЕ ДЛЯ КАЛЬКУЛЯТОРА И ТЕСТА)
   ========================================================== */
.uni-calc-wrapper { font-family: inherit; color: #334155; line-height: 1.6; margin: 0 auto 50px;}

.section-bordered { border: 1px solid #c8d4d8; border-radius: 15px; padding: 60px; position: relative; background: #ffffff; margin-bottom: 60px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02); }
.section-bordered-title { width: auto; max-width: 90%; position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); background: #ffffff; padding: 0 80px; color: #223767; font-weight: 700; font-size: 24px; text-transform: uppercase; text-align: center; white-space: nowrap; }

.uni-step-title { font-size: 18px; font-weight: 700; color: #3b82f6; margin: 0 0 16px 0; display: flex; align-items: center; gap: 8px; }
.step-desc { font-size: 13px; color: #64748b; margin-top: -10px; margin-bottom: 20px; }

/* ==========================================================
   3. ФОРМЫ, ПОЛЯ И КНОПКИ (ОБЩЕЕ)
   ========================================================== */
.uni-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 40px; }
.mb-0 { margin-bottom: 0 !important; }
.col-full { grid-column: 1 / -1; }

.uni-label { display: block; font-size: 14px; font-weight: 600; color: #475569; margin-bottom: 8px; }
.req-star { color: #ef4444; }

.uni-input, .uni-select { width: 100%; padding: 14px 16px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; font-family: inherit; background: #f8fafc; transition: all 0.2s; box-sizing: border-box; }
.uni-input:focus, .uni-select:focus, .uni-input:hover, .uni-select:hover { border-color: #3b82f6; background: #fff; outline: none; }

.uni-btn { background: #2563eb; color: white; border: none; padding: 18px 32px; font-size: 16px; font-weight: 700; border-radius: 8px; cursor: pointer; width: 100%; transition: background 0.3s; text-transform: uppercase; letter-spacing: 0.5px; }
.uni-btn:hover { background: #1d4ed8; }
.btn-calc-submit { margin-top: 20px; }

.uni-error { color: #ef4444; font-size: 14px; text-align: center; margin-bottom: 16px; display: none; background: #fef2f2; padding: 10px; border-radius: 8px; }
.privacy-notice { text-align: center; font-size: 12px; color: #64748b; margin-top: 16px; }

/* ==========================================================
   4. РАСКРЫВАЮЩИЙСЯ ТЕКСТ (КНОПКА "ПОКАЗАТЬ ОПИСАНИЕ")
   ========================================================== */
.textcalc { box-sizing: border-box; position: relative; max-height: 350px; overflow: hidden; padding-bottom: 80px; transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1); margin-bottom: 40px; text-align: left; }
.textcalc::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 180px; background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 70%); pointer-events: none; transition: opacity 0.4s ease; z-index: 1; }
.textcalc.expanded::after { opacity: 0; }

.pokpok-wrapper { position: absolute; bottom: 15px; left: 0; width: 100%; display: flex; align-items: center; z-index: 2; }
.pokpok-wrapper::before, .pokpok-wrapper::after { content: ''; flex: 1; height: 1px; background: #cbd5e1; margin: 0 0; }
.pokpok { background: #ffffff; color: #356DDC; font-size: 14px; font-weight: 700; cursor: pointer; padding: 12px 24px; border: 2px dashed #356DDC; border-radius: 8px; transition: all 0.3s ease; text-transform: uppercase; white-space: nowrap; }
.pokpok:hover { background: #eff6ff; }

/* ==========================================================
   5. КАЛЬКУЛЯТОР ВРЕДА: КОНСТРУКТОР НАПИТКОВ
   ========================================================== */
.drink-item { background: #f8fafc; padding: 16px; border-radius: 8px; border: 1px dashed #cbd5e1; margin-bottom: 16px; position: relative; }
.d-custom-str, .d-custom-vol { margin-top: 8px; display: none; }
.remove-drink-btn { 
    display: none; 
    position: absolute; 
    top: -10px; 
    right: -10px; 
    background: #ef4444; 
    color: white; 
    border: none; 
    border-radius: 50%; 
    width: 24px; 
    height: 24px;
    line-height: 24px; 
    cursor: pointer; 
    font-weight: bold; 
    line-height: 1; 
    padding: 0; 
    font-size: 11px;
    align-items: center; 
    justify-content: center; 
    padding-bottom:1px;
}
.remove-drink-btn:hover { 
   background: #223767;  
}
.add-drink-btn { background: transparent; border: 2px dashed #3b82f6; color: #3b82f6; padding: 12px; width: 100%; border-radius: 8px; font-weight: 600; cursor: pointer; margin-bottom: 24px; transition: 0.2s; text-transform: uppercase;}
.add-drink-btn:hover { background: #eff6ff; }

/* ==========================================================
   6. ТЕСТ НА ЗАВИСИМОСТЬ: ИНТЕРАКТИВНЫЕ ЭЛЕМЕНТЫ
   ========================================================== */
/* Динамические блоки (Дерево решений) */
.dynamic-block { transition: opacity 0.4s ease, max-height 0.4s ease; overflow: hidden; opacity: 1; max-height: 1000px; }
.dynamic-block.hidden { opacity: 0; max-height: 0; pointer-events: none; margin: 0; padding: 0; border: none; }

/* Визуальная аналоговая шкала (ВАШ) */
.vas-container { background: #f8fafc; padding: 30px; border-radius: 12px; border: 1px solid #e2e8f0; margin-bottom: 40px; text-align: center; }

.vas-slider { 
    -webkit-appearance: none; 
    width: 100%; 
    height: 16px; 
    border-radius: 8px; 
    /* Красивый градиент опасности (от зеленого к красному) */
    background: linear-gradient(90deg, #22c55e 0%, #f59e0b 50%, #ef4444 100%);
    outline: none; 
    margin: 30px 0; 
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}
.vas-slider::-webkit-slider-thumb { 
    -webkit-appearance: none; 
    appearance: none; 
    width: 36px; 
    height: 36px; 
    border-radius: 50%; 
    background: #ffffff; 
    cursor: pointer; 
    border: 6px solid #356DDC; /* Твой фирменный синий цвет */
    box-shadow: 0 4px 12px rgba(0,0,0,0.3); 
    transition: transform 0.1s ease; 
}
.vas-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15); /* Приятное увеличение при наведении */
}

.vas-labels { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: #64748b; }
.vas-value-display { font-size: 36px; font-weight: 800; color: rgb(0, 50, 150); margin-top: 10px; line-height: 1; }

/* Визуальный выбор напитков */
.visual-drinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin-top: 10px; }
.drink-card { background: #ffffff; border: 2px solid #e2e8f0; border-radius: 12px; padding: 16px 8px; text-align: center; cursor: pointer; transition: 0.2s; user-select: none; }
.drink-card:hover { border-color: #cbd5e1; background: #f8fafc; }
.drink-card.active { border-color: #3b82f6; background: #eff6ff; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15); }
.drink-icon { font-size: 36px; line-height: 1; margin-bottom: 8px; }
.drink-name { font-size: 13px; font-weight: 600; color: #475569; }

/* ==========================================================
   7. ВЫДАЧА РЕЗУЛЬТАТОВ (ВИДЖЕТЫ И СТАТУСЫ)
   ========================================================== */
#uni-results, #test-results { display: none; } /* Скрыто по умолчанию для обоих сервисов */
.uni-widgets-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.uni-widget { background: #ffffff; border-radius: 12px; padding: 24px; border: 1px solid #e2e8f0; position: relative; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.03); display: flex; flex-direction: column; }

.wg-alcotest { border-top: 4px solid #3b82f6; }
.wg-alcotest .uni-widget-title { color: #1e3a8a; }
.wg-toxic { border-top: 4px solid #b91c1c; }
.wg-toxic .uni-widget-title { color: #b91c1c; }
.wg-calories { border-top: 4px solid #f59e0b; }
.wg-calories .uni-widget-title { color: #b45309; }
.wg-audit { border-top: 4px solid #b91c1c; grid-column: 1 / -1; text-align: center; }
.wg-audit .uni-widget-title { justify-content: center; font-size: 20px; color: #b91c1c; }
.wg-recovery,.wg-recovery1 { border-top: 4px solid #10b981; grid-column: 1 / -1; }
.wg-recovery .uni-widget-title { justify-content: center; font-size: 20px; color: #047857; text-align: center; }
.wg-recovery1 .uni-widget-title { color: #047857;}

.uni-widget-title { font-size: 16px; font-weight: 700; margin: 0 0 16px; display: flex; align-items: center; }
.uni-big-num { font-size: 40px; font-weight: 800; line-height: 1; margin: 10px 0; }
#r-promille { color: #3b82f6; } #r-doses { color: #ef4444; } #r-kcal { color: #f59e0b; }

.res-label { font-size: 12px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.res-highlight { background: #eff6ff; padding: 6px 12px; border-radius: 8px; display: inline-block; color: #1d4ed8; font-weight: 600; border: 1px solid #bfdbfe; margin-bottom: 16px; font-size: 13px;}
.res-doses-badge { color: #b91c1c; font-weight: 600; background: #fef2f2; padding: 6px 12px; border-radius: 8px; display: inline-block; border: 1px solid #fecaca; margin-bottom: 16px; font-size: 13px;}
.res-desc-text { font-size: 14px; color: #475569; line-height: 1.5; margin: 0; }
.res-time-row { font-size: 14px; margin-bottom: 12px; color: #64748b; }
.text-dark { color: #0f172a; font-size: 16px; }
.text-danger { color: #b91c1c; font-size: 18px; font-weight: 800; }

.toxic-alert { font-size: 12px; background: #fef2f2; color: #991b1b; padding: 10px; border-radius: 6px; margin-top: auto; }
.finance-block { font-size: 12px; color: #166534; border-left: 2px solid #22c55e; padding-left: 8px; margin-top: auto; background: #f0fdf4; padding: 10px; border-radius: 6px; display: none; }
.legal-alert { font-size: 12px; border: 1px dashed #ef4444; padding: 8px; border-radius: 6px; margin-top: 12px; }

/* Цветовые статусы (Светофор) */
.status-box { padding: 12px; border-radius: 8px; font-size: 13px; font-weight: 600; margin-top: auto; border-left: 4px solid; }
.st-green { background: #f0fdf4; color: #166534; border-color: #22c55e; }
.st-yellow { background: #fffbeb; color: #b45309; border-color: #f59e0b; }
.st-orange { background: #fff7ed; color: #c2410c; border-color: #f97316; }
.st-red { background: #fef2f2; color: #991b1b; border-color: #ef4444; }

/* Блок старого AUDIT из Калькулятора */
.color-low { color: #166534; } .color-med { color: #b45309; } .color-high { color: #c2410c; } .color-crit { color: #b91c1c; }
.audit-result-container { display: flex; flex-direction: column; gap: 20px; align-items: center; }
.audit-score-box { background: #f8fafc; padding: 24px; border-radius: 12px; border: 1px solid #e2e8f0; width: 100%; max-width: 320px; text-align: center; }
.audit-score-label { font-size: 14px; color: #475569; font-weight: 600; text-transform: uppercase; }
.audit-score { font-size: 56px; font-weight: 800; line-height: 1; margin: 12px 0; }
.audit-score-max { font-size: 14px; color: #94a3b8; font-weight: 500; }
.audit-text-box { width: 100%; max-width: 650px; text-align: center;}
.audit-verdict { font-size: 20px; font-weight: 800; margin-bottom: 12px; text-transform: uppercase; }
.audit-desc { font-size: 15px; color: #475569; margin: 0 0 16px; line-height: 1.6; }
.audit-alert { font-size: 15px; background: #fef2f2; color: #991b1b; padding: 16px; border-radius: 8px; border-left: 4px solid #ef4444; font-weight: 700; display: none; }

/* ==========================================================
   8. ТРЕКЕР ТРЕЗВОСТИ
   ========================================================== */
.tracker-intro { text-align: center; }
.tracker-intro p { font-size: 15px; color: #475569; margin-bottom: 24px; }
.btn-tracker { display: inline-block; background: #10b981; color: white; padding: 14px 32px; border-radius: 8px; font-weight: 600; cursor: pointer; border: none; font-size: 15px; text-transform: uppercase; transition: 0.2s; }
.btn-tracker:hover { background: #059669; }

#tracker-app { display: none; }
.tracker-controls { background: #f8fafc; padding: 20px; border-radius: 12px; margin-bottom: 24px; display: flex; align-items: center; gap: 20px; border: 1px solid #e2e8f0; }
.tracker-controls-label { font-size: 14px; color: #475569; }
.tracker-range { flex: 1; cursor: pointer; accent-color: #10b981; }
.tracker-input-box { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #223767; }
.tracker-input-box input { width: 80px; text-align: center; font-size: 18px; font-weight: bold; }

.milestones-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.milestone { background: #ffffff; border: 1px solid #e2e8f0; padding: 16px; border-radius: 8px; display: flex; gap: 16px; align-items: flex-start; opacity: 0.5; filter: grayscale(100%); transition: all 0.3s ease; }
.milestone.achieved { opacity: 1; filter: grayscale(0%); border-color: #34d399; background: #f0fdf4; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.1); }
.ms-icon { width: 32px; height: 32px; background: #cbd5e1; color: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 14px; flex-shrink: 0; transition: 0.3s; }
.milestone.achieved .ms-icon { background: #10b981; }
.ms-content h5 { margin: 0 0 4px 0; font-size: 15px; color: #0f172a; }
.ms-content p { margin: 0; font-size: 13px; color: #475569; line-height: 1.4; }

/* ==========================================================
   9. ТЕСТ: СПИДОМЕТР РИСКА И ДИАГНОЗЫ
   ========================================================== */
.risk-meter-wrap { background: #f8fafc; padding: 30px; border-radius: 16px; border: 1px solid #e2e8f0; text-align: center; margin-bottom: 40px; }
.risk-meter-title { font-size: 14px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; }
.risk-bar { width: 100%; height: 24px; background: #e2e8f0; border-radius: 12px; overflow: hidden; display: flex; margin-bottom: 16px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); }
.rb-segment { height: 100%; transition: 0.6s cubic-bezier(0.4, 0, 0.2, 1); opacity: 0.2; }
.rb-seg-1 { width: 25%; background: #22c55e; }
.rb-seg-2 { width: 25%; background: #f59e0b; }
.rb-seg-3 { width: 25%; background: #f97316; }
.rb-seg-4 { width: 25%; background: #ef4444; }

.risk-zone-1 .rb-seg-1 { opacity: 1; box-shadow: 0 0 12px #22c55e; }
.risk-zone-2 .rb-seg-1, .risk-zone-2 .rb-seg-2 { opacity: 1; }
.risk-zone-2 .rb-seg-2 { box-shadow: 0 0 12px #f59e0b; }
.risk-zone-3 .rb-seg-1, .risk-zone-3 .rb-seg-2, .risk-zone-3 .rb-seg-3 { opacity: 1; }
.risk-zone-3 .rb-seg-3 { box-shadow: 0 0 12px #f97316; }
.risk-zone-4 .rb-segment { opacity: 1; }
.risk-zone-4 .rb-seg-4 { box-shadow: 0 0 12px #ef4444; }

.risk-level-name { font-size: 28px; font-weight: 800; text-transform: uppercase; margin-top: 10px; }
.risk-level-desc { font-size: 15px; color: #475569; line-height: 1.6; max-width: 650px; margin: 10px auto 0; }

.cage-alert { display: none; margin-top: 24px; padding: 16px; background: #fef2f2; border-left: 4px solid #b91c1c; border-radius: 8px; text-align: left; }
.cage-alert-title { color: #b91c1c; font-weight: 800; font-size: 16px; margin-bottom: 8px; }
.cage-alert-text { color: #7f1d1d; font-size: 14px; margin: 0; line-height: 1.5; }

.diag-block { margin-top: 16px; padding: 16px 20px; background: #f8fafc; border-radius: 8px; border-left: 4px solid; text-align: left; }
.diag-title { font-size: 14px; font-weight: 800; color: #1e3a8a; text-transform: uppercase; margin-bottom: 6px; }
.diag-text { font-size: 14px; color: #475569; margin: 0; line-height: 1.5; }

/* ==========================================================
   11. АДАПТИВНОСТЬ (МОБИЛЬНЫЕ УСТРОЙСТВА) И ПЕЧАТЬ
   ========================================================== */
@media print {
    body * { visibility: hidden; }
    /* Показываем результаты для обоих возможных сервисов */
    #test-results, #uni-results, #test-results *, #uni-results * { visibility: visible; }
    #test-results, #uni-results { position: absolute; left: 0; top: 0; width: 100%; border: none; box-shadow: none; margin: 0; padding: 0; }
    .btn-pdf, .btn-contacts, .section-bordered-title, .tracker-intro { display: none !important; } 
    .risk-meter-wrap, .uni-widget { border: 1px solid #ccc; break-inside: avoid; }
}

@media (max-width: 900px) {
    .section-bordered-title { font-size: 18px; white-space: normal; line-height: 1.4; padding: 10px 20px;}
    .uni-widgets-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .uni-grid, .uni-widgets-grid, .milestones-list { grid-template-columns: 1fr; }
    .section-bordered { padding: 50px 20px 20px; }
    .tracker-controls { flex-direction: column; align-items: stretch; }
    .vas-labels { font-size: 11px; }
    .visual-drinks { grid-template-columns: 1fr 1fr; }
    .drink-card { padding: 10px; }
}

/* ==========================================================
   12. СТАРЫЕ ИНФО-БЛОКИ (СЕРДЦЕ, ПЕЧЕНЬ, ЭТАПЫ ВОССТАНОВЛЕНИЯ)
   ========================================================== */
.danger-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 50px; text-align: left; }
.danger-card { padding: 30px 40px 40px 40px; border-radius: 15px; background: #EBEEF0; }
.danger-card h3 { display: flex; align-items: center; color: #334155; font-size: 20px; margin-bottom: 16px; }
.danger-card ul { margin-top: 20px; }
.danger-card li { position: relative; padding-left: 20px; margin-bottom: 12px; color: #646679; display: block; line-height: 1.6; }
.danger-card li:last-child { margin-bottom: 0; }
.danger-card li::before { content: '•'; position: absolute; left: 0; top: 11px; transform: translateY(-50%); color: #356ddc; font-size: 20px; font-weight: bold; line-height: 1; }

.recovery-modern-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; max-width: 100%; margin: 0 auto 0; text-align: left; }
.recovery-modern-list .recovery-modern-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.recovery-modern-card { display: flex; background: #ffffff; border-radius: 20px; padding: 30px; box-shadow: 0 10px 40px rgba(30, 58, 138, 0.05); border: 1px solid #f1f5f9; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.recovery-modern-card:hover { transform: translateY(-3px); box-shadow: 0 15px 50px rgba(30, 58, 138, 0.1); border-color: #dbeafe; }
.rm-step { flex-shrink: 0; width: 56px; height: 56px; background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #ffffff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; margin-right: 20px; box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3); }
.rm-content { flex: 1; }
.rm-time { color: #3b82f6; font-size: 13px; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; display: block; }
.rm-title { color: #223767; font-size: 18px; font-weight: 700; margin-bottom: 10px; margin-top: 0; }
.rm-desc { color: #475569; font-size: 14px; line-height: 1.6; margin: 0; }

@media (max-width: 768px) {
    /* Сброс сетки для старых медицинских блоков */
    .danger-grid, .recovery-modern-list { grid-template-columns: 1fr; }
    .recovery-modern-list .recovery-modern-card:last-child:nth-child(odd) { grid-column: auto; }
    .recovery-modern-card { flex-direction: column; padding: 24px; }
    .rm-step { margin-bottom: 16px; width: 48px; height: 48px; font-size: 18px; }
}
