/* ============================================================
   Общие стили сайта «Акустика помещений · Калькуляторы»
   ============================================================ */

:root {
    --brand-dark:   #0b2b3c;
    --brand-dark-2: #12455e;
    --brand-mid:    #0e7a9c;
    --brand-mid-2:  #0b6e8c;
    --brand-light:  #eef6fb;
    --brand-light-2:#e2eef8;
    --border:       #cbdae6;
    --border-soft:  #eaf1f8;
    --text-dark:    #103a4e;
    --text-mid:     #1f4b62;
    --text-soft:    #4f6f82;
    --text-muted:   #6f8a9c;
    --bg-page:      #f0f5fa;
    --bg-card:      #f9fcff;
    --radius-lg:    32px;
    --radius-md:    22px;
    --radius-sm:    14px;
    --shadow-card:  0 24px 48px -14px rgba(0, 20, 30, 0.3);
    --shadow-soft:  0 8px 16px -8px rgba(0,0,0,0.06);
    --shadow-btn:   0 8px 18px -8px rgba(11, 43, 60, 0.5);
}

/* ---------- Кнопка «На главную» (fixed) ---------- */
.back-home {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-dark);
    color: #ffffff;
    text-decoration: none;
    padding: 9px 16px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 8px 18px -8px rgba(11, 43, 60, 0.6);
    transition: 0.18s;
}
.back-home:hover {
    background: var(--brand-dark-2);
    transform: translateY(-1px);
}

/* ---------- Нижняя навигация между калькуляторами ---------- */
.calc-nav {
    max-width: 1340px;
    width: 100%;
    margin: 22px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    padding: 0 12px;
}
.calc-nav a {
    text-decoration: none;
    background: var(--brand-light);
    border: 1px solid var(--border);
    color: var(--text-mid);
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: 0.15s;
    white-space: nowrap;
}
.calc-nav a:hover { background: var(--brand-light-2); }
.calc-nav a.active {
    background: var(--brand-dark);
    color: #fff;
    border-color: var(--brand-dark);
    pointer-events: none;
}

/* ---------- Общий футер ---------- */
.site-footer {
    max-width: 1340px;
    width: 100%;
    margin: 26px auto 8px;
    padding: 16px 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.site-footer a {
    color: var(--brand-mid);
    text-decoration: none;
    font-weight: 500;
}
.site-footer a:hover { text-decoration: underline; }

/* ---------- Шапка «velesuik.ru» ---------- */
.site-brand {
    max-width: 1340px;
    width: 100%;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    padding: 0 12px;
}
.site-brand .brand-text {
    font-weight: 600;
    font-size: 1.9rem;
    color: var(--text-dark);
    letter-spacing: 0.2px;
    line-height: 1.25;
}

/* ---------- Адаптив ---------- */
@media (max-width: 600px) {
    .back-home {
        top: 10px;
        left: 10px;
        padding: 7px 12px;
        font-size: 0.78rem;
    }
    .calc-nav { gap: 6px; margin-top: 16px; }
    .calc-nav a { padding: 6px 10px; font-size: 0.74rem; }
    .site-brand .brand-text { font-size: 1.7rem; }
}

/* ---------- Тёмная тема (по желанию, включается data-theme="dark") ---------- */
html[data-theme="dark"] {
    --bg-page:   #0f172a;
    --bg-card:   #1e293b;
    --brand-light: #24344a;
    --brand-light-2: #2c4058;
    --border:    #3b4f66;
    --border-soft: #2b3b4f;
    --text-dark: #e2e8f0;
    --text-mid:  #cbd5e1;
    --text-soft: #94a3b8;
    --text-muted:#7c8ea3;
}
html[data-theme="dark"] body { background: var(--bg-page); }
html[data-theme="dark"] .container,
html[data-theme="dark"] .card,
html[data-theme="dark"] .calc-card { background: var(--bg-card); }