/* --- Стили для Пиццы (Orange Theme) --- */
:root {
    --accent-orange: #F97316;
    --accent-orange-dark: #C2410C;
    --gradient-orange-card: linear-gradient(135deg, #FB923C 0%, #EA580C 100%);
    --accent-orange-light: #FFF7ED; /* Для фонов */
}

.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; }

/* Колонки сравнения */
.pizza-columns { 
    display: grid; 
    grid-template-columns: 1fr auto 1fr; 
    gap: 12px; 
    align-items: start; 
}
.pizza-col {
    background: #FFF7ED; /* Light Orange */
    padding: 16px; border-radius: 16px;
    border: 1px solid #FED7AA;
    transition: opacity 0.3s;
}
.vs-divider {
    align-self: center; font-weight: 800; color: #D1D5DB; font-size: 14px;
}

.col-header { text-align: center; margin-bottom: 12px; }
.badge { 
    font-size: 12px; font-weight: 700; padding: 4px 8px; 
    border-radius: 6px; text-transform: uppercase; 
    display: inline-block;
}
.badge-a { background: #E5E7EB; color: #374151; }
.badge-b { background: #E5E7EB; color: #374151; }

/* Подсветка победителя */
.pizza-col.winner .badge { background: #22C55E; color: #fff; }
.pizza-col.loser { opacity: 0.6; }

/* Inputs Compact */
.input-group { margin-bottom: 12px; }
.input-group label { font-size: 11px; font-weight: 600; color: var(--text-secondary); display: block; margin-bottom: 4px; }

.input-wrapper input {
    width: 100%; padding: 10px; font-size: 16px; font-weight: 700;
    border: 1px solid #E5E7EB; border-radius: 8px; text-align: center;
    outline: none; transition: border 0.2s;
    font-family: var(--font-main);
    box-sizing: border-box; 
}
.input-wrapper input:focus { border-color: var(--accent-orange); }

/* Counter Mini */
.counter-mini { 
    display: flex; 
    align-items: center; 
    background: #fff;
    border: 1px solid #E5E7EB; 
    border-radius: 8px; 
    overflow: hidden; 
    height: 38px; 
}
.cnt-btn { 
    width: 32px; 
    height: 100%; 
    border: none; 
    background: #F9FAFB;
    cursor: pointer; 
    font-weight: bold; 
    color: var(--text-secondary); 
    font-size: 16px;
    transition: background 0.2s;
}
.cnt-btn:hover { background: #E5E7EB; color: var(--text-primary); }
.counter-mini input { 
    width: 100%; 
    height: 100%; 
    text-align: center; 
    border: none; 
    font-weight: 600; 
    font-size: 14px; 
    outline: none; 
    padding: 0;
    font-family: var(--font-main);
}

/* Range Slider */
.range-wrapper { margin-top: 8px; display: flex; align-items: center; gap: 12px; }
.range-slider { flex-grow: 1; -webkit-appearance: none; height: 6px; background: #E5E7EB; border-radius: 5px; outline: none; cursor: pointer; }
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
    background: var(--accent-orange); cursor: pointer; border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2); transition: transform 0.1s;
}
.range-val { font-weight: 700; color: var(--accent-orange); font-size: 14px; width: 50px; text-align: right; }

.helper-text { font-size: 11px; color: var(--text-secondary); margin-top: 6px; line-height: 1.3; }
.divider { border: 0; border-top: 1px solid #E5E7EB; margin: 20px 0; }

/* --- Результаты --- */
.card--orange { background: var(--gradient-orange-card); color: #fff; border: none; }
.card--orange h2 { color: rgba(255,255,255,0.95); margin-bottom: 24px; font-size: 20px; text-align: center; }

/* Визуализация кругов */
.pizza-visual-box {
    height: 220px; background: rgba(255,255,255,0.15); border-radius: 16px;
    position: relative; display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px; overflow: hidden;
}

.pizza-circle {
    position: absolute; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#pizza-a {
    background: #FDBA74; /* Crust color */
    z-index: 2; 
    border: 1px solid rgba(0,0,0,0.1);
}
#pizza-b {
    background: #FB923C; /* Crust color darker */
    z-index: 1;
    border: 1px solid rgba(0,0,0,0.1);
}

/* Начинка */
.pizza-crust {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: var(--inner-size, 100%); height: var(--inner-size, 100%);
    background: #FECACA; /* Tomato sauce */
    border-radius: 50%;
    opacity: 0.8;
    transition: all 0.5s ease;
}
/* Пепперони */
.pizza-crust::after {
    content: ''; position: absolute; top: 20%; left: 30%; width: 15%; height: 15%;
    background: #EF4444; border-radius: 50%; box-shadow: 20px 20px 0 #EF4444, -10px 30px 0 #EF4444;
    opacity: 0.5;
}

.p-label {
    position: relative; z-index: 3; font-weight: 800; font-size: 14px;
    color: #7C2D12; text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

/* --- ТАБЛИЦА СРАВНЕНИЯ (ИСПРАВЛЕНО ВЫРАВНИВАНИЕ) --- */
.compare-table { display: grid; gap: 8px; font-size: 14px; margin-bottom: 20px; }
.c-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; padding: 8px; border-bottom: 1px solid rgba(255,255,255,0.2); }

/* Заголовок таблицы */
.c-row.header { 
    font-weight: 700; 
    opacity: 0.8; 
    border-bottom: 2px solid rgba(255,255,255,0.3); 
}

/* Выравнивание заголовков */
.c-row.header span { 
    text-align: right; /* По умолчанию вправо (для А и Б) */
}
.c-row.header span:first-child { 
    text-align: left; /* Первая колонка (название) влево */
}

.c-row.highlight { background: rgba(255,255,255,0.15); border-radius: 8px; border-bottom: none; }
.c-row strong { text-align: right; }

.summary-divider { height: 1px; background: rgba(255,255,255,0.2); margin: 20px 0; }

.tip-box {
    font-size: 13px; line-height: 1.5; color: #ffffff;
    background: rgba(0, 0, 0, 0.3); padding: 16px; border-radius: 12px;
}
.tip-box p { margin: 0; }

/* --- НОВЫЕ ИНФОРМАЦИОННЫЕ БЛОКИ (Адаптация под Orange/Pizza) --- */

.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: #2563EB; }
.orange-icon svg { color: #F97316; } /* Pizza Orange */
.green-icon svg { color: #10B981; }
.red-icon svg { color: #EF4444; }

/* Маленькие подзаголовки */
.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: #2563EB; 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: #FFF7ED; /* Orange Light */
    border: 1px solid #FED7AA;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--accent-orange); /* Orange 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 (Новый стиль под Orange/Pizza) */
.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-orange); 
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.15); /* Orange 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-orange);
    background: #FFF7ED;
}

.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-orange);
}

.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; }
}