/* ===== Хаб /calculators ===== */
.calc_hub_intro {
    max-width: 760px;
    color: #5b6067;
    font-size: 15px;
    line-height: 22px;
    margin: 6px 0 24px;
}

ul.calc_hub_grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 16px;
    list-style: none;
    margin: 0 0 40px;
    padding: 0;
}

li.calc_hub_card {
    border: 1px solid #e7e9ec;
    border-radius: 14px;
    background: #fff;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

li.calc_hub_card:hover {
    box-shadow: 0 10px 28px rgba(20,20,20,.08);
    transform: translateY(-2px);
    border-color: #d7dbe0;
}

li.calc_hub_card a {
    display: flex;
    flex-direction: column;
    padding: 22px 20px;
    height: 100%;
    box-sizing: border-box;
}

.calc_hub_card_icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #eef6ea;
    color: #57ab30;
    margin-bottom: 14px;
}

.calc_hub_card_icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.calc_hub_card_title {
    font-size: 16px;
    font-weight: 700;
    color: #232323;
    line-height: 21px;
    margin-bottom: 6px;
}

.calc_hub_card_short {
    font-size: 13px;
    color: #7d838a;
    line-height: 18px;
    flex-grow: 1;
}

.calc_hub_card_link {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: #57ab30;
}

.calc_hub_empty {
    color: #8a9098;
    margin: 20px 0 40px;
}

@media only screen and (max-width: 1180px) {
    ul.calc_hub_grid { grid-template-columns: repeat(3,1fr); }
}
@media only screen and (max-width: 850px) {
    ul.calc_hub_grid { grid-template-columns: repeat(2,1fr); }
}
@media only screen and (max-width: 560px) {
    ul.calc_hub_grid { grid-template-columns: 1fr; gap: 10px; }
    li.calc_hub_card a { padding: 18px 16px; }
}

/* ===== Страница одного калькулятора ===== */
.calc_intro_text {
    max-width: 760px;
    color: #5b6067;
    font-size: 15px;
    line-height: 22px;
    margin: 6px 0 20px;
}

.calc_page_wrap {
    margin-bottom: 28px;
}

/* Общая разметка калькулятора: .calculator { .calc_field, .calc_actions, #calc-result } —
   переиспользуется всеми /templates/calculators/<slug>.php, чтобы каждый
   конкретный калькулятор не тащил за собой копию одних и тех же стилей формы. */
.calculator {
    max-width: 620px;
    padding: 24px;
    border: 1px solid #e7e9ec;
    border-radius: 14px;
    background: #fff;
    box-sizing: border-box;
}

.calculator h2 {
    margin: 0 0 4px;
    font-size: 19px;
}

.calculator .calc_field {
    margin-top: 14px;
}

.calculator label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #4b5157;
    margin-bottom: 6px;
}

.calculator input[type="number"],
.calculator input[type="text"],
.calculator select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dcdfe3;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
}

.calculator input:focus,
.calculator select:focus {
    outline: none;
    border-color: #57ab30;
}

.calc_actions {
    margin-top: 20px;
}

.calc_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    background: #57ab30;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease;
}

.calc_btn:hover {
    background: #4d9e28;
}

.calc_error {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fdecec;
    color: #c53030;
    font-size: 13.5px;
}

/* Блок результата, который каждый калькулятор рисует в #calc-result */
.calc_result {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px dashed #e7e9ec;
}

.calc_result h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.calc_result_row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 14px;
    color: #4b5157;
}

.calc_result_row b {
    color: #232323;
}

.calc_result_row.calc_result_total {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid #e7e9ec;
    font-size: 15px;
}

.calc_result_total b {
    color: #57ab30;
    font-size: 17px;
}

.calc_kit {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.calc_kit li {
    position: relative;
    padding: 5px 0 5px 18px;
    font-size: 13.5px;
    color: #5b6067;
}

.calc_kit li:before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #b9c0c7;
}

/* ===== Форма заявки (общая, рисуется js/calculators.js) ===== */
.calc_lead {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed #e7e9ec;
}

.calc_lead_row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.calc_lead_row input {
    flex: 1 1 200px;
    padding: 10px 12px;
    border: 1px solid #dcdfe3;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.calc_lead_hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #9aa1a8;
}

.calc_lead_done {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #57ab30;
    font-weight: 600;
    font-size: 14px;
}

/* ===== CTA "перейти в раздел" ===== */
.calc_cta_block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    max-width: 620px;
    padding: 18px 22px;
    border-radius: 14px;
    background: #f4f5f7;
    margin-bottom: 32px;
}

.calc_cta_text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calc_cta_text strong {
    font-size: 14.5px;
    color: #232323;
}

.calc_cta_text span {
    font-size: 13px;
    color: #7d838a;
}

.calc_cta_button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 8px;
    background: #232323;
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
}

.calc_cta_button:hover {
    background: #000;
}

@media only screen and (max-width: 560px) {
    .calculator { padding: 18px; }
    .calc_cta_block { padding: 16px 18px; }
}
