/* --- Стили для 1ПМ (Red Theme) --- */
:root {
    --accent-red: #DC2626;
    --accent-red-light: #FEE2E2;
    --gradient-red-card: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
}

.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; }
.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, box-shadow 0.2s;
    font-family: var(--font-main);
}
.input-wrapper input:focus { border-color: var(--accent-red); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1); }
.suffix { position: absolute; right: 16px; color: var(--text-secondary); pointer-events: none; }
.helper-text { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.row-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Selector */
.gender-selector { display: flex; gap: 16px; }
.gender-option { flex: 1; cursor: pointer; }
.gender-option input { display: none; }
.gender-card {
    border: 1px solid #E5E7EB; border-radius: 12px; padding: 12px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; transition: all 0.2s; background: #fff; color: var(--text-secondary);
    height: 100%;
}
.formula-title { font-weight: 700; color: var(--text-primary); }
.formula-desc { font-size: 11px; opacity: 0.8; }

.gender-option input:checked + .gender-card {
    border-color: var(--accent-red); background: #FEF2F2; color: var(--accent-red);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}
.gender-option input:checked + .gender-card .formula-title { color: var(--accent-red); }

/* Results Card (Усиленные селекторы) */
.card--red { background: var(--gradient-red-card); color: #fff; border: none; }
.card--red h2 { color: #fff !important; font-size: 16px; margin-bottom: 4px; opacity: 1; text-shadow: none; }
.result-big { font-size: 64px; font-weight: 800; line-height: 1; margin-top: 12px; color: #fff; }
.unit { font-size: 24px; opacity: 0.9; font-weight: 600; color: #fff; }

/* ВОТ ЗДЕСЬ ИСПРАВЛЕНИЕ: Используем более специфичный селектор */
.card--red .result-desc { 
    color: #fff !important; 
    opacity: 1; 
    font-size: 15px; 
    margin-bottom: 20px; 
    margin-top: 8px; 
    font-weight: 500; 
}
.card--red p { color: #fff !important; opacity: 1; }

.summary-divider { height: 1px; background: rgba(255,255,255,0.3); margin: 24px 0; }
.card--red h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.9; margin-bottom: 12px; color: #fff !important; }

/* Visual Barbell */
.barbell-visual {
    width: 100%; height: 100px;
    background: rgba(0,0,0,0.25);
    border-radius: 12px;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    margin-bottom: 12px;
}

.bar-shaft {
    width: 90%; height: 10px;
    background: #9CA3AF;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.bar-sleeve {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 25%; height: 18px; background: #D1D5DB; border: 1px solid #9CA3AF;
    z-index: 1;
}
.bar-sleeve.left { left: 0; border-radius: 4px 0 0 4px; }
.bar-sleeve.right { right: 0; border-radius: 0 4px 4px 0; }

.plates-stack {
    position: absolute; top: 50%; transform: translateY(-50%);
    display: flex; align-items: center; z-index: 2; gap: 1px;
}
.plates-stack.left { left: 8px; flex-direction: row-reverse; }
.plates-stack.right { right: 8px; flex-direction: row; }

/* Plates */
.plate { border-radius: 2px; border: 1px solid rgba(0,0,0,0.15); width: 6px; box-shadow: 1px 0 2px rgba(0,0,0,0.2); }
.plate-25 { height: 80px; background: #EF4444; }
.plate-20 { height: 72px; background: #3B82F6; }
.plate-15 { height: 64px; background: #EAB308; }
.plate-10 { height: 56px; background: #10B981; }
.plate-5  { height: 44px; background: #F9FAFB; }
.plate-2_5{ height: 36px; background: #374151; }
.plate-1_25{ height: 28px; background: #9CA3AF; }

.plates-legend {
    font-family: monospace; font-size: 13px; 
    background: rgba(0,0,0,0.25);
    padding: 10px; border-radius: 8px;
    text-align: center; color: #fff;
    line-height: 1.4;
}

/* Table */
.styled-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.styled-table th { text-align: left; padding: 10px; border-bottom: 2px solid #E5E7EB; color: var(--text-secondary); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.styled-table td { padding: 10px; border-bottom: 1px solid #F3F4F6; color: var(--text-primary); }
.styled-table tr:last-child td { border-bottom: none; }
.styled-table tr:hover { background: #F9FAFB; }

/* --- НОВЫЕ ИНФОРМАЦИОННЫЕ БЛОКИ (Адаптация под Red/OneRep) --- */

.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;
}

.header-icon svg { width: 24px; height: 24px; stroke-width: 2px; }

/* Цвета иконок */
.blue-icon svg { color: #3B82F6; }
.orange-icon svg { color: #F59E0B; }
.green-icon svg { color: #10B981; }
.red-icon svg { color: #DC2626; } /* Red */

/* Маленькие подзаголовки */
.small-heading {
    margin-top: 40px;
    margin-bottom: 16px;
    font-size: 20px;
}
.small-heading .header-icon { width: 40px; height: 40px; }
.small-heading .header-icon svg { width: 20px; height: 20px; }

.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: 0 4px 20px rgba(0,0,0,0.03);
    border-radius: 24px; 
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}
.formula-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }

/* Вертикальный хедер (бейдж сверху) */
.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;
}

/* Бейджи */
.badge-blue {
    background: #3B82F6; color: #fff;
    padding: 6px 12px; border-radius: 99px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    display: inline-block;
}
.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;
    display: inline-block;
}

.formula-card p {
    font-size: 14px; color: var(--text-secondary);
    margin: 0; line-height: 1.5; font-weight: 500;
}

.math-expression {
    background: #FEF2F2; /* Red Light */
    border: 1px solid #FECACA;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--accent-red); /* Red Accent */
    text-align: center;
    margin-bottom: 16px;
    font-size: 15px;
}

/* Разделитель */
.soft-divider {
    border: none; height: 1px;
    background: linear-gradient(90deg, transparent, #E5E7EB, transparent);
    margin: 48px 0;
}

/* Описание */
.calc-description p {
    font-size: 16px; line-height: 1.7;
    color: var(--text-secondary); margin-bottom: 24px;
}
.calc-description strong { color: var(--text-primary); }

/* FAQ (Новый стиль под Red/OneRep) */
.faq-section .faq-item {
    background: #fff; border: 1px solid #E5E7EB;
    border-radius: 12px; margin-bottom: 12px;
    overflow: hidden; transition: all 0.2s ease;
}

.faq-section .faq-item[open] {
    border-color: var(--accent-red); 
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.15); /* Red Shadow */
}

summary.faq-question {
    padding: 16px 20px; cursor: pointer;
    font-weight: 600; color: var(--text-primary);
    list-style: none; position: relative;
    display: flex; justify-content: space-between;
    align-items: center; transition: background 0.2s;
}

summary.faq-question:hover { background-color: #F9FAFB; }

.faq-section .faq-item[open] summary.faq-question {
    color: var(--accent-red);
    background: #FEF2F2;
}

.faq-question::after {
    content: '+'; font-size: 20px;
    color: var(--text-secondary); font-weight: 400; line-height: 1;
}
.faq-question .icon-plus { display: none; }

.faq-section .faq-item[open] summary.faq-question::after {
    content: '−'; color: var(--accent-red);
}

.faq-answer {
    padding: 20px; color: var(--text-secondary);
    line-height: 1.6; font-size: 15px;
}

/* --- МОБИЛЬНАЯ АДАПТАЦИЯ --- */
@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; }
}

/* --- ВЫРАВНИВАНИЕ ТАБЛИЦЫ --- */
.content-section {
    max-width: 800px;
    margin: 32px auto 0;
}