/**
 * Шапка и подвал как на index.html для страниц блога.
 * Подключать после article.css
 */
:root {
    --site-sticky-offset: 156px;
}
@media (max-width: 960px) {
    :root { --site-sticky-offset: 148px; }
}
@media (max-width: 480px) {
    :root { --site-sticky-offset: 168px; }
}
html {
    scroll-padding-top: calc(var(--site-sticky-offset) + env(safe-area-inset-top, 0px));
}
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 9999;
    padding: 12px 20px;
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 16px;
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}
.site-sticky-head {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}
.site-sticky-head .trust-bar {
    position: relative;
    z-index: 2;
    top: auto;
}
.site-sticky-head .header {
    position: relative;
    z-index: 1;
    top: auto;
}
/* Строка доверия: кнопка как .btn на главной */
.trust-bar .trust-btn,
.trust-bar a.trust-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    background: linear-gradient(135deg, #00B8A9, #0A6E66);
    color: var(--bg-primary);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
.trust-bar .trust-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}
.header-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.header-phone i {
    color: var(--accent-primary);
    font-size: 13px;
}
.header-phone:hover,
.header-phone:focus-visible {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px rgba(0,184,169,0.28), 0 0 18px rgba(0,184,169,0.22);
    transform: translateY(-1px);
}
.nav-phone-item { display: none; }
.nav-phone-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid rgba(0, 184, 169, 0.45);
    background: linear-gradient(135deg, rgba(0, 184, 169, 0.18), rgba(10, 110, 102, 0.2));
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: var(--transition);
}
.nav-phone-mobile i { color: #38d39f; }
.nav-phone-mobile:hover,
.nav-phone-mobile:focus-visible {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px rgba(0,184,169,0.2), 0 0 20px rgba(0,184,169,0.22);
    transform: translateY(-1px);
}
@media (max-width: 1200px) {
    .header-phone { display: none; }
}
@media (max-width: 960px) {
    .header-phone,
    .header-cta { display: none; }
    .nav-phone-item { display: block; border-bottom: none !important; }
}
.scroll-to-top {
    position: fixed;
    bottom: 92px;
    right: max(8px, env(safe-area-inset-right, 0px));
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00B8A9, #0A6E66);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 184, 169, 0.4);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease, visibility 0.2s ease;
}
.scroll-to-top.visible { opacity: 1; visibility: visible; }
.scroll-to-top:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(0, 184, 169, 0.5);
}
.scroll-to-top:active { transform: scale(0.98); }
@keyframes whatsapp-pulse {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.6); opacity: 0; }
}
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: max(8px, env(safe-area-inset-right, 0px));
    z-index: 99;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(145deg, #25D366 0%, #128C7E 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45), 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.whatsapp-float::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.6);
    animation: whatsapp-pulse 2s ease-out infinite;
    pointer-events: none;
}
.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.55), 0 4px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: #fff;
}
.whatsapp-float:hover::before { animation-duration: 1.2s; }
.whatsapp-float:active { transform: scale(1.02); }
@media (prefers-reduced-motion: reduce) {
    .whatsapp-float::before { animation: none; opacity: 0; }
}
@media (max-width: 480px) {
    .scroll-to-top {
        right: max(6px, env(safe-area-inset-right, 0px));
        bottom: calc(16px + env(safe-area-inset-bottom) + 64px);
        width: 52px;
        height: 52px;
        font-size: 1.2rem;
    }
    .whatsapp-float {
        right: max(6px, env(safe-area-inset-right, 0px));
        bottom: calc(16px + env(safe-area-inset-bottom));
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }
    .whatsapp-float::before { inset: -2px; }
}

/* Футер как на index.html */
.ft-footer {
    margin: 28px auto 0;
    width: calc(100% - 64px);
    max-width: 1376px;
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-glow);
    border-radius: 32px 32px 0 0;
    overflow: hidden;
    position: relative;
    isolation: isolate;
}
.ft-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(1200px 280px at 10% 0%, rgba(0, 184, 169, 0.14), transparent 62%);
    pointer-events: none;
    z-index: 0;
}
.ft-stripe {
    position: relative;
    z-index: 1;
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 184, 169, 0.55), transparent);
    background-size: 200% 100%;
    animation: ftShift 10s linear infinite;
}
@keyframes ftShift { to { background-position: 200% 0; } }
.ft-body {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 42px 48px 18px;
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(180px, 1fr));
    gap: 36px;
    font-family: var(--font-sans);
}
.ft-body .logo { gap: 8px; transform: none; }
.ft-body .logo:hover { transform: none; }
.ft-body .logo .logo-img { height: 34px; }
.ft-body .logo .logo-text {
    font-size: clamp(2rem, 2.2vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 0.95;
}
.ft-brand-desc {
    margin-top: 14px;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 36ch;
}
.ft-cta-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 16px;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #00B8A9, #0A6E66);
    color: var(--bg-primary);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
}
.ft-cta-link:hover { transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.ft-cta-link:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}
.ft-col-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    opacity: 0.96;
    font-weight: 600;
}
.ft-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ft-list a,
.ft-list .ft-text {
    min-height: 40px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 10px;
    padding: 6px 10px;
    margin-left: -10px;
    line-height: 1.5;
}
.ft-list a::before,
.ft-list .ft-text::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-primary);
    flex-shrink: 0;
    opacity: 0.38;
    transition: opacity 0.2s ease;
}
.ft-list a:hover {
    color: var(--accent-primary);
    background: rgba(0, 184, 169, 0.08);
}
.ft-list a:hover::before { opacity: 0.95; }
.ft-list a:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    color: var(--accent-primary);
    background: rgba(0, 184, 169, 0.08);
}
.ft-bottom {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 16px 48px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 18px;
}
.ft-copy,
.ft-made {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.88;
}
.ft-made .ft-made-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 184, 169, 0.35);
    transition: color 0.2s ease, border-color 0.2s ease;
}
.ft-made .ft-made-link:hover {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    opacity: 1;
}
.ft-legal {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}
.ft-legal a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    opacity: 0.9;
}
.ft-legal a:hover { color: var(--accent-primary); opacity: 1; }
.ft-legal a:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-radius: 6px;
}
.theme-light .ft-footer {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.78));
}
@media (max-width: 768px) {
    .ft-footer { width: calc(100% - 40px); }
}
@media (max-width: 1120px) {
    .ft-body {
        padding: 36px 20px 16px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px;
    }
    .ft-bottom {
        padding: 14px 20px 20px;
        align-items: flex-start;
    }
}
@media (max-width: 700px) {
    .ft-footer {
        margin-top: 18px;
        border-radius: 24px 24px 0 0;
    }
    .ft-body {
        grid-template-columns: 1fr;
        padding: 30px 16px 14px;
        gap: 22px;
    }
    .ft-body .logo .logo-text { font-size: clamp(1.7rem, 8vw, 2rem); }
    .ft-bottom {
        padding: 12px 16px 18px;
        gap: 10px;
        flex-direction: column;
        align-items: flex-start;
    }
    .ft-col-title { font-size: 0.82rem; }
    .ft-list a, .ft-list .ft-text { font-size: 0.95rem; }
    .ft-copy, .ft-made, .ft-legal a { font-size: 0.82rem; }
}
@media (max-width: 480px) {
    .ft-footer { width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) {
    .ft-stripe { animation: none; }
    .ft-cta-link { transition: none; }
    .ft-cta-link:hover { transform: none; }
}

/* article.css задаёт header sticky+top — отключаем вне обёртки */
.header {
    position: relative;
    top: auto;
}
.trust-bar {
    position: relative;
    top: auto;
}
