/**
 * Comandos WP CSS v3.5 - Ultra-Premium (Light Mode)
 * Focus on Typography, Readability & Space
 */

/* --- TOTAL ANIMATION PERFORMANCE FIX v66.5 --- */
a,
button,
input,
.toc-box *,
.btn-card,
.page-numbers,
.category-pill,
.back-link {
    transition-property: transform, opacity !important;
}

/* :root moved to functions.php for dynamic Customizer support (v5.8) */
/*
:root {
    --primary-dark: #2a3800;
    --slate-950: #050505;
    --slate-900: #111111;
    --slate-800: #1a1a1a;
    --slate-600: #4a4a4a;
    --slate-100: #f5f5f7;
}
*/

body {
    background-color: var(--bg-color, #f1f5f9);
    color: var(--slate-800);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    hyphens: none !important;
    -webkit-hyphens: none !important;
}

.site-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .site-inner {
        padding: 0 12px !important;
    }
}

/* НАВИГАЦИЯ (v60) */
.header-navigation {
    flex-grow: 1 !important;
    display: flex !important;
    justify-content: center !important;
}

.header-menu {
    display: flex !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 24px !important;
}

.header-menu li a {
    text-decoration: none !important;
    color: #1f2937 !important;
    font-weight: 600 !important;
    font-size: 15px !important;
}

/* 2. ШАПКА РЕАКТИВНАЯ */
.site-header {
    position: relative;
    top: 0;
    padding-top: 40px;
    z-index: 1000;
    min-height: 120px;
    /* Фиксация высоты для предотвращения CLS */
    contain: layout;
    transition: none !important;
    /* CLS FIX v88.0 */
}

.header-custom-logo {
    width: auto !important;
    height: 44px !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    display: block !important;
    border-radius: 0 !important;
    transition: none !important;
    /* CLS FIX v88.0 */
}

@media (max-width: 767px) {
    .header-custom-logo {
        width: auto !important;
        height: 30px !important;
    }
}

.header-inner {
    display: flex;
    justify-content: center;
}

.capsule-header {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 99px !important;
    padding: 14px 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 1040px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05) !important;
    min-height: 48px;
    /* Дополнительная гарантия стабильности */
}

.site-title {
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--slate-950);
    font-family: 'Unbounded', sans-serif;
}

.header-nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--slate-600);
    transition: opacity 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: #000;
}

/* Гарантированное скрытие лишних ссылок v4.1 */
.header-nav a:not([href*="blog"]):not([href="/"]):not([href*="autopipe.space/"]) {
    display: none !important;
}

/* --- MAIN --- */
.site-main {
    padding-top: 2rem;
    min-height: 100vh;
    /* Предотвращает скачок футера */
}

/* --- GRID (Consistent for all pages) --- */
.posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px 32px;
    margin-bottom: 6rem;
}

.post-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    /* LCP & Rendering Optimization v89.0 */
    content-visibility: auto;
    contain-intrinsic-size: 1px 500px;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

.post-thumb {
    width: 100%;
    overflow: hidden;
}

.post-thumb img {
    width: 100%;
    height: 100% !important;
    aspect-ratio: var(--img-aspect-ratio);
    object-fit: cover;
}

.post-body {
    padding: 32px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-category {
    font-size: 0.75rem;
    font-weight: 800;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.post-card .post-title {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
    min-height: 3.9em;
}

.post-card .post-title a {
    text-decoration: none;
    color: #000;
}

.post-excerpt {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 24px;
    min-height: 4.5em;
    overflow: hidden;
}

.btn-card {
    background: #000;
    color: #fff !important;
    text-align: center;
    padding: 16px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.9rem;
    margin-top: auto;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease !important;
}

.btn-card:hover {
    background: var(--primary);
    color: var(--slate-950) !important;
    transform: translateY(-4px);
    box-shadow: 0 12px 25px var(--primary-glow-medium);
}

/* --- PREMIUM PAGINATION (v3.6) --- */
.pagination {
    margin: 4rem 0 6rem;
    display: flex;
    justify-content: center;
}

.pagination .nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--slate-200);
    color: var(--slate-800);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease;
}

.page-numbers.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    box-shadow: 0 10px 20px var(--primary-glow-light);
}

.page-numbers:hover:not(.current) {
    transform: translateY(-4px);
    background: #000;
    color: #fff;
    border-color: #000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.page-numbers.prev,
.page-numbers.next {
    padding: 0 20px;
    background: var(--slate-950);
    color: #fff;
    border: none;
    font-weight: 800;
}

.page-numbers.prev:hover,
.page-numbers.next:hover {
    background: var(--slate-800);
}

.page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
}

.post-hero {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 3.5rem;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

@media (max-width: 767px) {
    .post-hero {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px !important;
    }
}

.single-thumb,
.wp-block-image img,
.post-content img:not(.avatar):not(.header-custom-logo) {
    width: 100% !important;
    /* Резервируем место на основе атрибутов (v59) */
    aspect-ratio: auto attr(width) / attr(height) !important;
    object-fit: cover !important;
    height: auto !important;
    display: block;
    border-radius: 20px;
}

@media (max-width: 767px) {

    .single-thumb,
    .wp-block-image img,
    .post-content img:not(.avatar):not(.header-custom-logo) {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px !important;
    }
}

/* ПРИМЕНЕНИЕ КАСТОМНЫХ ПРОПОРЦИЙ ИЗ НАСТРОЕК (v61.0) */
.post-content img:not(.avatar):not(.header-custom-logo),
.single-thumb,
.post-thumb img {
    aspect-ratio: var(--img-aspect-ratio) !important;
}

/* ИЗОЛЯЦИЯ АВАТАРОВ (Всегда 1:1) */
.author-avatar-wrapper,
.wp-block-avatar {
    width: 80px !important;
    height: 80px !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

.avatar,
.author-avatar-wrapper img,
.wp-block-avatar img,
.author-card img {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    min-height: 80px !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
}

/* --- SINGLE POST READABILITY FIX --- */
.single-post {
    max-width: 850px;
    /* Narrower for better reading and more gutters */
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 767px) {
    article.single-post {
        padding: 24px 16px !important;
        border-radius: 20px !important;
    }

    .post-title {
        font-size: 2.0rem !important;
        min-height: 80px !important;
        /* Sync with critical CSS v97.0 */
    }
}

.post-header {
    margin-bottom: 3rem;
    text-align: left;
}

.post-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    font-family: 'Unbounded', sans-serif;
    letter-spacing: -0.03em;
    min-height: 140px;
    /* Sync with critical CSS v97.0 */
    hyphens: none !important;
    -webkit-hyphens: none !important;
}

.post-content {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #111;
}

.post-content p {
    margin-bottom: 1.8rem;
}

/* --- LINKS CONTRAST --- */
.post-content a {
    color: #000;
    font-weight: 800;
    text-decoration: none;
    box-shadow: inset 0 -4px 0 var(--primary);
    transition: opacity 0.2s;
}

.post-content a:hover {
    background: var(--primary);
}

/* --- TOC (GLASSMORPHISM BRANDED v120.0) --- */
.toc-box {
    background: color-mix(in srgb, var(--primary) 8%, rgba(255, 255, 255, 0.5)) !important;
    backdrop-filter: blur(15px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(160%) !important;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, rgba(255, 255, 255, 0.4)) !important;
    border-radius: 40px !important;
    padding: 48px !important;
    margin: 4rem 0 !important;
    position: relative !important;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.04),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3) !important;
}

.toc-box strong {
    color: var(--slate-950) !important;
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2em !important;
    margin-bottom: 32px !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    font-family: 'Unbounded', sans-serif !important;
    opacity: 0.6;
}

.toc-box strong::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: color-mix(in srgb, var(--primary) 20%, transparent);
}

.toc-box ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    counter-reset: toc-counter;
}

.toc-box a {
    color: var(--slate-800) !important;
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    font-weight: 600 !important;
    font-size: 1.15rem !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 0 !important;
    margin-bottom: 24px !important;
    line-height: 1.4 !important;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease !important;
    position: relative;
    padding: 0;
}

.toc-box a::before {
    counter-increment: toc-counter;
    content: counter(toc-counter, decimal-leading-zero) ".";
    font-family: 'Unbounded', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    color: #000;
    min-width: 45px;
    display: block;
    margin-top: 4px;
    opacity: 0.9;
}

.toc-box a:hover {
    color: var(--primary-dark) !important;
    transform: translateX(4px);
}

@media (max-width: 767px) {
    .toc-box {
        padding: 32px 24px !important;
        margin: 2.5rem 0 !important;
        border-radius: 24px !important;
    }

    .toc-box a {
        font-size: 1.05rem !important;
    }
}

/* --- QUICK SUMMARY BLOCK (v4.2 / v4.5) --- */
.summary-card,
.stats-box {
    background: color-mix(in srgb, var(--primary) 7%, white) !important;
    border-left: 5px solid var(--primary) !important;
    border-radius: 0 24px 24px 0 !important;
    padding: 32px 40px !important;
    margin: 4rem 0 !important;
    position: relative !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02) !important;
}

.summary-card::before,
.stats-box::before {
    content: '\26A1' !important;
    /* Молния */
    position: absolute !important;
    top: -20px !important;
    left: -18px !important;
    background: var(--primary) !important;
    color: #000 !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    font-size: 1.3rem !important;
    box-shadow: 0 8px 20px var(--primary-glow-strong) !important;
    z-index: 2 !important;
}

.summary-card h2,
.stats-box h2,
.summary-card h3,
.stats-box h3,
.summary-card h4,
.stats-box h4,
.summary-card p strong:first-child,
.stats-box p strong:first-child {
    font-family: 'Unbounded', sans-serif !important;
    font-size: 1.5rem !important;
    font-weight: 900 !important;
    color: #000 !important;
    margin-top: 0 !important;
    margin-bottom: 24px !important;
    display: block !important;
    letter-spacing: -0.02em !important;
}

.summary-card ul,
.stats-box ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.summary-card li,
.stats-box li {
    position: relative !important;
    padding-left: 28px !important;
    margin-bottom: 16px !important;
    font-size: 1.15rem !important;
    line-height: 1.5 !important;
    color: #1a1a1a !important;
}

.summary-card li::before,
.stats-box li::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 10px !important;
    width: 8px !important;
    height: 8px !important;
    background: var(--primary) !important;
    border-radius: 50% !important;
}

@media (max-width: 768px) {
    .toc-box {
        padding: 32px 24px !important;
    }
}

/* MOBILE */
@media (max-width: 1024px) {
    .posts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .posts {
        grid-template-columns: 1fr;
    }

    .post-title {
        font-size: 2.2rem;
        min-height: 2.6em;
        /* Reserve space for 2-3 lines */
    }

    .capsule-header {
        padding: 12px 24px;
        border-radius: 20px;
    }

    .header-nav {
        display: none;
    }
}

/* A/B TEST #3: Убираем тени на мобильных */
@media (max-width: 767px) {

    .capsule-header,
    .post-card,
    .post-card:hover,
    .post-hero,
    .toc-box,
    .summary-card,
    .stats-box,
    .back-link,
    .back-link:hover,
    .category-pill,
    .category-pill:hover,
    .category-pill.active,
    .page-numbers,
    .page-numbers.current,
    .page-numbers:hover:not(.current),
    .btn-card,
    .btn-card:hover,
    .post-content a,
    .header-search-form .search-field,
    .header-search-form .search-field:focus,
    .hard-cta-box a,
    .hard-cta-box a:hover,
    .author-card a[href*="/author/"],
    .author-card a[href*="/author/"]:hover,
    .author-card img {
        box-shadow: none !important;
    }
}

/* --- BACK LINK BUTTON (v5.1) --- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--slate-950);
    color: var(--white) !important;
    text-decoration: none !important;
    padding: 18px 32px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1rem;
    margin-top: 4rem;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.back-link:hover {
    background: var(--primary);
    color: var(--slate-950) !important;
    transform: translateY(-4px);
    box-shadow: 0 15px 35px var(--primary-glow-medium);
}

/* --- CATEGORY FILTERS (v6.0/6.1) --- */
.category-filters-container {
    max-width: 1040px;
    margin: 1rem auto 3rem !important;
    padding: 0 20px;
    overflow: visible !important;
}

.category-filters {
    display: flex;
    justify-content: center !important;
    gap: 16px !important;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.category-pill {
    display: inline-flex !important;
    align-items: center;
    padding: 12px 28px !important;
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    color: var(--slate-600) !important;
    text-decoration: none !important;
    border-radius: 100px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease !important;
}

.category-pill:hover {
    border-color: var(--primary) !important;
    color: var(--slate-950) !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05) !important;
}

.category-pill.active {
    background: transparent !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    box-shadow: none !important;
}

/* MOBILE SCROLL FOR CATEGORIES */
@media (max-width: 768px) {
    .category-filters-container {
        padding: 0;
        margin-bottom: 3rem;
    }

    .category-filters {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 10px 20px 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
    }

    .category-filters::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .category-pill {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

/* --- LOGO & BRANDING (v7.0) --- */
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-logo-link {
    display: inline-flex;
    align-items: center;
}

.custom-logo {
    max-height: 32px !important;
    width: 32px !important;
    /* Force size for CLS v96.0 */
    height: 32px !important;
    display: block;
    transition: transform 0.3s ease;
}

.custom-logo-link:hover .custom-logo {
    transform: scale(1.05);
}

/* Если есть и логотип, и название - выводим красиво */
.logo-wrapper .site-title {
    font-size: 1.1rem !important;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
}

/* --- SIMPLIFIED PREMIUM HEADER (v8.1) --- */
.site-header {
    background: transparent;
    padding: 40px 0 15px;
    /* Sync with critical CSS desktop padding-top: 40px */
    border: none !important;
    position: relative;
    z-index: 1000;
}

.header-main-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.header-branding {
    display: flex;
    align-items: center;
}

.header-logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--slate-900);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.header-logo-link:hover {
    opacity: 0.8;
}

/* Стили логотипа перенесены в начало файла (v57) */

.header-site-title {
    font-size: 1.4rem !important;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--slate-900);
}

@media (max-width: 768px) {
    .site-header {
        padding: 20px 0;
    }

    .header-site-title {
        font-size: 1.1rem !important;
    }

    /* Стили логотипа мобильные консолидированы в начале файла */
}

/* --- HEADER SEARCH (v9.0) --- */
.header-main-wrapper {
    justify-content: space-between !important;
}

.header-search-wrapper {
    flex: 0 1 300px;
}

.header-search-form .search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search-form .search-icon {
    position: absolute;
    left: 16px;
    color: var(--slate-400);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.header-search-form .search-field {
    width: 100%;
    padding: 12px 16px 12px 48px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--slate-900);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.header-search-form .search-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 10px 25px var(--primary-glow-light);
}

.header-search-form .search-field:focus+.search-icon {
    color: var(--primary);
}

@media (max-width: 768px) {
    .header-main-wrapper {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start !important;
    }

    .header-search-wrapper {
        width: 100%;
        flex: 1 1 auto;
    }
}

/* --- BLOCKQUOTE BRANDING (v10.1) --- */
.post-content blockquote,
blockquote {
    border-left: 5px solid var(--primary) !important;
    background: color-mix(in srgb, var(--primary) 5%, white) !important;
    padding: 24px 32px !important;
    margin: 2rem 0 !important;
    border-radius: 0 12px 12px 0 !important;
    font-style: italic;
    color: var(--slate-800) !important;
}

.post-content blockquote p,
blockquote p {
    margin: 0 !important;
    line-height: 1.7 !important;
}

/* --- AD-BOX BRANDING (v10.1) --- */
.post-content .ad-box,
.ad-box {
    border-left: 4px solid var(--primary) !important;
    background: color-mix(in srgb, var(--primary) 3%, white) !important;
    padding: 20px !important;
    margin: 25px 0 !important;
    text-align: left !important;
    border-radius: 0 12px 12px 0 !important;
}

.ad-box strong {
    color: var(--slate-950) !important;
    font-size: 1.1rem !important;
}

.ad-box a {
    color: var(--slate-950) !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
    transition: opacity 0.3s ease !important;
}

.ad-box a:hover {
    color: var(--primary-dark) !important;
}

/* --- HARD CTA BOX BRANDING (v10.1) --- */
.post-content .hard-cta-box,
.hard-cta-box {
    background: var(--slate-950) !important;
    color: #fff !important;
    padding: 30px !important;
    border-radius: 20px !important;
    text-align: center !important;
    margin: 40px 0 !important;
}

.hard-cta-box h3 {
    color: #fff !important;
    margin-top: 0 !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
}

.hard-cta-box p {
    font-size: 17px !important;
    opacity: 1.0 !important;
    line-height: 1.6 !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

.hard-cta-box a {
    display: inline-block !important;
    background: var(--primary) !important;
    color: #000 !important;
    /* Force black for contrast v58 */
    padding: 16px 32px !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    font-weight: 800 !important;
    font-size: 1.05rem !important;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease !important;
    box-shadow: 0 10px 30px var(--primary-glow-medium) !important;
}

.hard-cta-box a:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 15px 40px var(--primary-glow-strong) !important;
}

/* --- HEADING HIERARCHY (v11.0) --- */
.post-content h2 {
    font-size: 2rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 2.5rem 0 1.5rem !important;
    color: var(--slate-950) !important;
}

.post-content h3 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 2rem 0 1rem !important;
    color: var(--slate-900) !important;
}

.post-content h4 {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 1.5rem 0 0.75rem !important;
    color: var(--slate-800) !important;
}

/* --- FIX: Headings inside dark boxes --- */
.hard-cta-box h2,
.hard-cta-box h3,
.hard-cta-box h4 {
    color: #fff !important;
}

/* --- RELATED POSTS BLOCK (v11.0 - Compact) --- */
.related-posts {
    margin: 1.5rem 0 !important;
    padding: 1rem 0 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.related-posts .related-title {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    color: var(--slate-950) !important;
    margin-bottom: 1rem !important;
    text-align: left !important;
}

.related-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    contain: layout style !important;
}

.related-item {
    text-decoration: none !important;
    display: block !important;
    transition: transform 0.3s ease !important;
}

.related-item:hover {
    transform: translateY(-4px) !important;
}

.related-thumb-wrapper {
    width: 100% !important;
    aspect-ratio: var(--img-aspect-ratio, 16 / 9) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: #f1f5f9 !important;
    margin-bottom: 12px !important;
    contain: strict !important;
}

.related-thumb {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.related-item-title {
    font-size: 1rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    color: #1e293b !important;
    margin: 0 !important;
}

.related-item:hover .related-item-title {
    color: var(--primary-dark) !important;
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }

    .related-item-title {
        font-size: 1.15rem !important;
    }
}

/* --- AUTHOR CARD BRANDING (v11.0 - Compact) --- */
.author-card {
    background: #fff !important;
    padding: 20px 32px !important;
    border-radius: 16px !important;
    margin: 1rem 0 !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

/* Author Articles Button Pill (v13.3 - Jitter Fix) */
.author-card a[href*="/author/"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 42px !important;
    background: var(--primary, #c5ef31) !important;
    color: #000000 !important;
    padding: 0 24px !important;
    border-radius: 100px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    margin-top: 15px !important;
    font-size: 14px !important;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(197, 239, 49, 0.2) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transform: translateY(0) !important;
}

.author-card a[href*="/author/"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(197, 239, 49, 0.4) !important;
}

.author-card img {
    border: 3px solid var(--primary) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.author-card h3 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 1rem !important;
}

/* --- MOBILE FIX FOR AUTHOR AVATAR --- */
@media (max-width: 768px) {
    .author-card img {
        width: 80px !important;
        height: 80px !important;
        max-width: 80px !important;
        max-height: 80px !important;
        border-radius: 50% !important;
    }
}

/* --- CRITICAL FIX: AUTHOR AVATAR MOBILE (v44.0) --- */
@media (max-width: 767px) {

    .author-card img,
    .author-avatar-wrapper img {
        width: 80px !important;
        height: 80px !important;
        max-width: 80px !important;
        max-height: 80px !important;
        min-width: 80px !important;
        min-height: 80px !important;
        border-radius: 50% !important;
        aspect-ratio: 1 / 1 !important;
        object-fit: cover !important;
    }
}

/* --- HEADER NAVIGATION (v12.0) --- */
.header-navigation {
    margin: 0 40px;
    flex-grow: 1;
}

.header-menu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    gap: 30px !important;
    align-items: center !important;
}

.header-menu li {
    margin: 0 !important;
    padding: 0 !important;
}

.header-menu a {
    text-decoration: none !important;
    color: var(--slate-800) !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    transition: transform 0.3s ease, opacity 0.3s ease !important;
    position: relative;
    padding: 5px 0;
}

.header-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.header-menu a:hover {
    color: var(--slate-950) !important;
}

.header-menu a:hover::after {
    transform: scaleX(1);
}

.header-menu .current-menu-item a {
    color: var(--slate-950) !important;
}

.header-menu .current-menu-item a::after {
    transform: scaleX(1);
}

@media (max-width: 1024px) {
    .header-navigation {
        display: none !important;
    }

    .site-header {
        min-height: 80px !important;
        padding-top: 15px !important;
    }

    .capsule-header {
        padding: 10px 20px !important;
    }
}

/* --- CONTRAST IMPROVEMENTS (v13.0) --- */
.author-card p {
    color: var(--slate-800) !important;
    line-height: 1.6 !important;
    font-size: 0.95rem !important;
}

figcaption,
.wp-block-image figcaption {
    color: var(--slate-800) !important;
    font-size: 0.9rem !important;
    margin-top: 10px !important;
    text-align: center !important;
    font-style: italic !important;
}

.page-description {
    color: var(--slate-800) !important;
    opacity: 1 !important;
}

/* --- CONTRAST FIXES RE-APPLIED (v73.1) --- */
.post-meta,
.post-meta a,
.post-meta time {
    color: #334155 !important;
    font-weight: 500;
}

/* Captions and Source info (Captions from n8n/WP) */
.post-content figcaption,
.post-content .wp-caption-text,
.post-content .wp-block-image figcaption {
    color: #1a1a1a !important;
    font-size: 0.95rem;
    opacity: 1 !important;
}

/* Target inline #666 color often found in current content */
.post-content p[style*="color: #666"],
.post-content div[style*="color: #666"],
.post-content span[style*="color: #666"] {
    color: #111111 !important;
    font-weight: 500;
}

/* Author block signatures */
.author-card .author-description {
    color: #1a1a1a !important;
    line-height: 1.6;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: optional;
    src: url('/wp-content/themes/autopipe-blog/assets/fonts/inter-400-subset.woff2') format('woff2');
}

/* ASYNC FONTS LOADER (v103.0) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: optional;
    src: url('/wp-content/themes/autopipe-blog/assets/fonts/inter-700-subset.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    font-display: optional;
    src: url('/wp-content/themes/autopipe-blog/assets/fonts/inter-800-subset.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 900;
    font-display: optional;
    src: url('/wp-content/themes/autopipe-blog/assets/fonts/inter-900-subset.woff2') format('woff2');
}

@font-face {
    font-family: 'Unbounded';
    font-style: normal;
    font-weight: 900;
    font-display: optional;
    src: url('/wp-content/themes/autopipe-blog/assets/fonts/unbounded-wght.ttf') format('truetype');
}

/* HIDE SEARCH ON MOBILE FOR ARTICLES (v135.0) */
@media (max-width: 767px) {

    .single .header-search-wrapper,
    .page .header-search-wrapper {
        display: none !important;
    }
}

/* --- FEATURES SECTION (v2.0) --- */
.features-section {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 3rem !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.features-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
    contain: layout style !important;
}

/* Карточка — CSS Grid: иконка + заголовок в одну строку, описание ниже */
.feature-card {
    background: #fff !important;
    border-radius: 20px !important;
    padding: 28px 24px !important;
    border: 1px solid var(--primary) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
    display: grid !important;
    grid-template-columns: 40px 1fr !important;
    grid-template-rows: auto auto !important;
    column-gap: 14px !important;
    row-gap: 12px !important;
    align-items: start !important;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.3s ease !important;
    content-visibility: visible !important;
    box-sizing: border-box !important;
}

.feature-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 40px rgba(104, 43, 141, 0.15) !important;
}

/* Иконка — первая колонка, первая строка */
.feature-icon {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 40px !important;
    height: 40px !important;
    display: block !important;
    flex-shrink: 0 !important;
}

.feature-icon svg {
    width: 40px !important;
    height: 40px !important;
    display: block !important;
}

/* Заголовок — вторая колонка, первая строка, выравнивание по верху иконки */
.feature-title {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: start !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: var(--slate-950, #050505) !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

/* Описание — обе колонки, вторая строка */
.feature-desc {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    font-size: 0.875rem !important;
    color: var(--slate-600, #4a4a4a) !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr !important;
    }
}

/* --- HOW IT WORKS SECTION (v1.0) --- */
.how-it-works-section {
    width: 100% !important;
    margin: 0 0 4rem !important;
    padding: 0 !important;
}

.how-it-works-title {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: var(--slate-950, #050505) !important;
    margin: 0 0 3rem !important;
    font-family: 'Unbounded', sans-serif !important;
    letter-spacing: -0.02em !important;
}

/* Desktop: горизонтальный таймлайн */
.how-it-works-steps {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 0 18px !important;
    position: relative !important;
}

/* Соединительная линия между кружками (desktop) */
.how-it-works-steps::before {
    content: '' !important;
    position: absolute !important;
    top: 28px !important;
    left: 10% !important;
    right: 10% !important;
    height: 2px !important;
    background: var(--primary) !important;
    opacity: 0.25 !important;
    z-index: 0 !important;
}

.how-step {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
}

/* Обёртка кружка — центрирует его и поднимает над линией */
.how-step-top {
    display: flex !important;
    justify-content: center !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Кружок с номером шага */
.how-step-number {
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    background: #fff !important;
    border: 1px solid var(--primary) !important;
    color: var(--primary) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    font-family: 'Unbounded', sans-serif !important;
    flex-shrink: 0 !important;
}

.how-step-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    text-align: center !important;
}

.how-step-title {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: var(--slate-950, #050505) !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

.how-step-desc {
    font-size: 0.875rem !important;
    color: var(--slate-600, #4a4a4a) !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

/* --- PRICING SECTION (v1.0) --- */
.pricing-section {
    width: 100% !important;
    margin: 0 0 4rem !important;
    padding: 0 !important;
}

.pricing-title {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: var(--slate-950, #050505) !important;
    margin: 0 0 0.75rem !important;
    font-family: 'Unbounded', sans-serif !important;
    letter-spacing: -0.02em !important;
}

.pricing-subtitle {
    font-size: 1rem !important;
    color: var(--slate-600, #4a4a4a) !important;
    margin: 0 0 3rem !important;
    line-height: 1.6 !important;
}

.pricing-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0 24px !important;
    align-items: start !important;
}

/* Базовая карточка */
.pricing-card {
    background: #fff !important;
    border-radius: 24px !important;
    padding: 40px 32px !important;
    border: 1px solid var(--primary) !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

/* Центральная (выделенная) карточка */
.pricing-card--featured {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    transform: translateY(-20px) !important;
    box-shadow: 0 24px 60px rgba(104, 43, 141, 0.35) !important;
    padding-top: 52px !important;
    padding-bottom: 52px !important;
}

.pricing-card-label {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: var(--slate-600, #4a4a4a) !important;
    margin-bottom: 10px !important;
}

.pricing-card--featured .pricing-card-label {
    color: rgba(255, 255, 255, 0.65) !important;
}

.pricing-card-name {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
    font-family: 'Unbounded', sans-serif !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 14px !important;
    line-height: 1.2 !important;
}

.pricing-card--featured .pricing-card-name {
    color: #fff !important;
}

.pricing-card-price {
    font-size: 2.2rem !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
    font-family: 'Unbounded', sans-serif !important;
    letter-spacing: -0.03em !important;
    margin-bottom: 28px !important;
    line-height: 1 !important;
}

.pricing-card--featured .pricing-card-price {
    color: #fff !important;
}

/* Кнопки на белых карточках: pill-стиль как "Все статьи" */
.pricing-btn {
    display: block !important;
    text-align: center !important;
    padding: 16px 24px !important;
    border-radius: 100px !important;
    font-weight: 800 !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease !important;
    margin-bottom: 28px !important;
    background: #fff !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
}

.pricing-btn:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 25px rgba(104, 43, 141, 0.15) !important;
    color: var(--primary) !important;
}

/* Кнопка центральной карточки */
.pricing-btn--featured {
    background: #fff !important;
    color: var(--primary) !important;
    border: 1px solid #fff !important;
}

.pricing-btn--featured:hover {
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.25) !important;
    color: var(--primary) !important;
}

/* Описание УТП (прозой, вместо списка фич) */
.pricing-desc {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: var(--slate-600, #4a4a4a) !important;
    margin: 0 !important;
    padding-top: 24px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.pricing-card--featured .pricing-desc {
    color: rgba(255, 255, 255, 0.92) !important;
    border-top-color: rgba(255, 255, 255, 0.25) !important;
}

/* Оставляем старые стили списка для обратной совместимости, на случай если где-то ещё используется */
.pricing-features {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 13px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    padding-top: 24px !important;
}

.pricing-card--featured .pricing-features {
    border-top-color: rgba(255, 255, 255, 0.2) !important;
}

.pricing-features li {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    color: var(--slate-800, #1a1a1a) !important;
    padding-left: 22px !important;
    position: relative !important;
}

.pricing-features li::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 7px !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: var(--primary) !important;
}

.pricing-card--featured .pricing-features li {
    color: rgba(255, 255, 255, 0.92) !important;
}

.pricing-card--featured .pricing-features li::before {
    background: rgba(255, 255, 255, 0.7) !important;
}

/* Mobile: вертикальный таймлайн */
@media (max-width: 768px) {
    .how-it-works-steps {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    /* Убираем горизонтальную линию */
    .how-it-works-steps::before {
        display: none !important;
    }

    .how-step {
        flex-direction: row !important;
        gap: 20px !important;
        align-items: flex-start !important;
        position: relative !important;
        padding-bottom: 32px !important;
    }

    /* Вертикальная линия между шагами */
    .how-step:not(:last-child)::after {
        content: '' !important;
        position: absolute !important;
        top: 44px !important;
        left: 22px !important;
        width: 2px !important;
        bottom: 0 !important;
        background: var(--primary) !important;
        opacity: 0.25 !important;
        z-index: 0 !important;
    }

    .how-step:last-child {
        padding-bottom: 0 !important;
    }

    .how-step-top {
        justify-content: flex-start !important;
        flex-shrink: 0 !important;
    }

    .how-step-number {
        width: 44px !important;
        height: 44px !important;
        font-size: 1rem !important;
        background: #fff !important;
        border: 1px solid var(--primary) !important;
        color: var(--primary) !important;
    }

    .how-step-body {
        text-align: left !important;
        padding-top: 6px !important;
    }

    .how-it-works-title {
        font-size: 1.5rem !important;
    }
}

/* Pricing: mobile */
@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 24px 0 !important;
    }

    /* Центральная карточка — первой на мобильном, без смещения */
    .pricing-card--featured {
        transform: none !important;
        order: -1 !important;
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }

    .pricing-title {
        font-size: 1.5rem !important;
    }

    .pricing-card-price {
        font-size: 1.8rem !important;
    }
}

/* ============================================
   POPUP MAKER — попап обратной связи (#pum-28)
   Подгон под стиль сайта Brand Lifts
   ============================================ */

/* Контейнер попапа */
#pum-28 .pum-container,
.pum-theme-28 .pum-container {
    border-radius: 20px !important;
    padding: 48px 44px !important;
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 30px 80px rgba(17, 0, 68, 0.22), 0 0 0 1px rgba(104, 43, 141, 0.08) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    color: var(--slate-950, #050505) !important;
}

/* Заголовок попапа (если есть) */
#pum-28 .pum-title,
#pum-28 h1,
#pum-28 h2,
#pum-28 h3 {
    font-family: 'Unbounded', 'Inter', sans-serif !important;
    font-weight: 700 !important;
    color: var(--slate-950, #050505) !important;
    margin: 0 0 24px !important;
    line-height: 1.2 !important;
}

/* Кнопка закрытия */
#pum-28 .pum-close,
.pum-theme-28 .pum-close {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    width: 36px !important;
    height: 36px !important;
    background: #ffffff !important;
    color: var(--slate-950, #050505) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 50% !important;
    font-size: 18px !important;
    line-height: 1 !important;
    padding: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

#pum-28 .pum-close:hover,
.pum-theme-28 .pum-close:hover {
    background: var(--primary, #682B8D) !important;
    color: #ffffff !important;
    border-color: var(--primary, #682B8D) !important;
}

/* Лейблы полей */
#pum-28 label,
#pum-28 .wpcf7-form label,
#pum-28 form label {
    display: block !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    color: var(--slate-950, #050505) !important;
    margin-bottom: 8px !important;
}

/* Звёздочка обязательного поля */
#pum-28 .wpcf7-required,
#pum-28 label .required,
#pum-28 label span[style*="color"] {
    color: var(--primary, #682B8D) !important;
    font-weight: 700 !important;
    margin-left: 2px !important;
}

/* Текстовые поля */
#pum-28 input[type="text"],
#pum-28 input[type="email"],
#pum-28 input[type="tel"],
#pum-28 input[type="url"],
#pum-28 input[type="number"],
#pum-28 textarea,
#pum-28 select {
    width: 100% !important;
    padding: 13px 16px !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    font-family: 'Inter', sans-serif !important;
    color: var(--slate-950, #050505) !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    margin: 0 !important;
}

#pum-28 textarea {
    min-height: 110px !important;
    resize: vertical !important;
}

#pum-28 input[type="text"]:focus,
#pum-28 input[type="email"]:focus,
#pum-28 input[type="tel"]:focus,
#pum-28 input[type="url"]:focus,
#pum-28 input[type="number"]:focus,
#pum-28 textarea:focus,
#pum-28 select:focus {
    outline: none !important;
    border-color: var(--primary, #682B8D) !important;
    box-shadow: 0 0 0 3px rgba(104, 43, 141, 0.12) !important;
}

/* Плейсхолдеры */
#pum-28 input::placeholder,
#pum-28 textarea::placeholder {
    color: rgba(0, 0, 0, 0.4) !important;
    font-family: 'Inter', sans-serif !important;
}

/* Отступы между полями формы */
#pum-28 .wpcf7-form p,
#pum-28 form p {
    margin: 0 0 22px !important;
}

#pum-28 .wpcf7-form p:last-of-type,
#pum-28 form p:last-of-type {
    margin-bottom: 0 !important;
}

/* Подсказки под полями (Имя/Фамилия) */
#pum-28 .wpcf7-form p small,
#pum-28 form small {
    display: block !important;
    font-size: 0.8rem !important;
    color: var(--slate-600, #4a4a4a) !important;
    margin-top: 6px !important;
}

/* Кнопка "Отправить" — pill-style как у основных кнопок сайта */
#pum-28 input[type="submit"],
#pum-28 button[type="submit"],
#pum-28 .wpcf7-submit,
#pum-28 .pum-submit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--primary, #682B8D) !important;
    color: #ffffff !important;
    border: 1px solid var(--primary, #682B8D) !important;
    border-radius: 100px !important;
    padding: 0 40px !important;
    height: 52px !important;
    line-height: 1 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    font-family: 'Inter', sans-serif !important;
    cursor: pointer !important;
    box-shadow: 0 6px 18px rgba(104, 43, 141, 0.25) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    vertical-align: middle !important;
    margin-top: 8px !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

#pum-28 input[type="submit"]:hover,
#pum-28 button[type="submit"]:hover,
#pum-28 .wpcf7-submit:hover,
#pum-28 .pum-submit:hover {
    background: #54236f !important;
    border-color: #54236f !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 24px rgba(104, 43, 141, 0.35) !important;
}

/* Двухколоночные поля (Имя + Фамилия) — если форма использует wpforms/cf7 columns */
#pum-28 .wpforms-field-row,
#pum-28 .wpcf7-form .row-inline {
    display: flex !important;
    gap: 16px !important;
}

#pum-28 .wpforms-field-row > *,
#pum-28 .wpcf7-form .row-inline > * {
    flex: 1 !important;
}

/* Оверлей (затемнённый фон) */
#pum-28 .pum-overlay,
.pum-theme-28 + .pum-overlay {
    background: rgba(17, 0, 68, 0.55) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
}

/* Мобильная адаптация попапа */
@media (max-width: 600px) {
    #pum-28 .pum-container,
    .pum-theme-28 .pum-container {
        padding: 36px 24px !important;
        border-radius: 16px !important;
        margin: 16px !important;
    }

    #pum-28 .wpforms-field-row,
    #pum-28 .wpcf7-form .row-inline {
        flex-direction: column !important;
        gap: 22px !important;
    }

    #pum-28 input[type="submit"],
    #pum-28 button[type="submit"],
    #pum-28 .wpcf7-submit {
        width: 100% !important;
        padding: 14px 24px !important;
    }
}

/* ============================================
   POPUP #28 — выравнивание форм по всем осям
   (форма обратной связи, WPForms/CF7)
   ============================================ */

/* Контейнер формы — всё на всю ширину, выравнивание по левому краю */
#pum-28 form,
#pum-28 .wpforms-form,
#pum-28 .wpforms-container,
#pum-28 .wpforms-container-full,
#pum-28 .wpcf7,
#pum-28 .wpcf7-form {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

/* Все обёртки полей — полная ширина, без центрирования */
#pum-28 .wpforms-field,
#pum-28 .wpforms-field-container,
#pum-28 .wpforms-field-name,
#pum-28 .wpforms-field-email,
#pum-28 .wpforms-field-text,
#pum-28 .wpforms-field-textarea,
#pum-28 .wpcf7-form p {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 22px !important;
    padding: 0 !important;
    text-align: left !important;
    box-sizing: border-box !important;
    float: none !important;
    clear: both !important;
}

/* Главный лейбл поля (Представьтесь, Компания, Эл. почта) */
#pum-28 .wpforms-field-label,
#pum-28 .wpforms-field > label,
#pum-28 label.wpforms-field-label {
    display: block !important;
    text-align: left !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    color: var(--slate-950, #050505) !important;
    line-height: 1.3 !important;
}

/* Строка из двух полей (Имя + Фамилия) — side by side */
#pum-28 .wpforms-field-row,
#pum-28 .wpforms-field-name .wpforms-field-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 16px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: flex-start !important;
}

#pum-28 .wpforms-field-row-block,
#pum-28 .wpforms-one-half,
#pum-28 .wpforms-first {
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    display: block !important;
}

/* Инпуты внутри блоков — на всю ширину своего блока */
#pum-28 .wpforms-field-row-block input,
#pum-28 .wpforms-one-half input,
#pum-28 .wpforms-field-name input {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Подпись под полем (Имя / Фамилия) — слева, приглушённая */
#pum-28 .wpforms-field-sublabel,
#pum-28 label.wpforms-field-sublabel {
    display: block !important;
    text-align: left !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: var(--slate-600, #4a4a4a) !important;
    margin: 8px 0 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}

/* Звёздочка обязательного поля — фирменный фиолетовый */
#pum-28 .wpforms-required-label,
#pum-28 .wpforms-field-required,
#pum-28 abbr[title="required"],
#pum-28 .wpcf7-form label .wpcf7-required {
    color: var(--primary, #682B8D) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    margin-left: 2px !important;
}

/* Submit wrapper — слева */
#pum-28 .wpforms-submit-container,
#pum-28 .wpcf7-form p:has(input[type="submit"]) {
    text-align: left !important;
    margin: 28px 0 0 !important;
    padding: 0 !important;
    width: 100% !important;
    display: block !important;
}

/* Мобильная адаптация — поля в колонку */
@media (max-width: 600px) {
    #pum-28 .wpforms-field-row,
    #pum-28 .wpforms-field-name .wpforms-field-row {
        flex-direction: column !important;
        gap: 22px !important;
        width: 100% !important;
    }
    #pum-28 .wpforms-field-row-block,
    #pum-28 .wpforms-field-row-block.wpforms-one-half,
    #pum-28 .wpforms-field-row-block.wpforms-one-third,
    #pum-28 .wpforms-field-row-block.wpforms-two-thirds,
    #pum-28 .wpforms-field-row-block.wpforms-first,
    #pum-28 .wpforms-field-row-block.wpforms-last {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    #pum-28 .wpforms-field-row-block input,
    #pum-28 .wpforms-field-row-block textarea,
    #pum-28 .wpforms-field-row-block select {
        width: 100% !important;
    }
}

/* --- Главная: заголовок и отступы --- */
body.home .site-main {
    padding-top: 16px;
}
.blog-header .page-description {
    margin-top: 0.75em;
}

/* --- Единый утончённый стиль для всех заголовков ---
   Inter 500 вместо Unbounded/Inter 700-900. Unbounded на сайте
   подключён только в weight 900, поэтому для согласованности
   переводим H2/H3 карточек тоже на Inter.
   !important нужен, потому что существующие правила темы
   (.feature-title, .how-step-title, .how-it-works-title и т.д.)
   используют font-weight 700/900 !important. */
h1, h2, h3, h4, h5, h6,
.page-title,
.feature-title,
.how-it-works-title,
.how-step-title,
.pricing-title,
.pricing-card-name,
.post-title,
.entry-title,
.widget-title {
    font-family: Inter, -apple-system, "system-ui", sans-serif !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em !important;
    line-height: 1.25 !important;
}

/* У мелких заголовков чуть больше воздуха */
h3, h4, h5, h6,
.feature-title,
.how-step-title {
    line-height: 1.3 !important;
}

/* Снимаем дефолтный margin-top у главного заголовка главной */
.blog-header .page-title {
    margin-top: 0;
}

/* --- Кнопка «Отправить заявку» в шаге 1 блока «Пять шагов» --- */
.how-step-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    padding: 0 28px;
    height: 44px;
    line-height: 1;
    background: var(--primary, #682B8D);
    color: #ffffff;
    border: 1px solid var(--primary, #682B8D);
    border-radius: 100px;
    font-family: Inter, -apple-system, "system-ui", sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.how-step-btn:hover,
.how-step-btn:focus {
    background: #51206e;
    border-color: #51206e;
    color: #ffffff;
    text-decoration: none;
}
.how-step-btn:active {
    transform: translateY(1px);
}

/* --- 5 шагов: адаптация под разные экраны --- */
/* На средних экранах 5 колонок становятся слишком узкими — чуть уменьшаем шрифт */
@media (max-width: 1200px) and (min-width: 769px) {
    .how-it-works-steps {
        gap: 0 12px !important;
    }
    .how-step-title {
        font-size: 0.875rem !important;
    }
    .how-step-desc {
        font-size: 0.8rem !important;
        line-height: 1.55 !important;
    }
    .how-step-btn {
        font-size: 0.82rem;
        padding: 0 20px;
        height: 40px;
    }
}

/* =====================================================================
   Правки по улучшающему аудиту brandlifts.ru (C2/C3 + H2/H3 + M1/M2/M4)
   ===================================================================== */

/* --- M2. Дизайн-токены --- */
:root {
    --bl-space-1: 8px;
    --bl-space-2: 16px;
    --bl-space-3: 24px;
    --bl-space-4: 32px;
    --bl-space-5: 48px;
    --bl-space-6: 64px;

    --bl-fs-sm: 0.875rem;   /* 14px */
    --bl-fs-base: 1rem;     /* 16px */
    --bl-fs-md: 1.125rem;   /* 18px */
    --bl-fs-lg: 1.5rem;     /* 24px */
    --bl-fs-xl: 2rem;       /* 32px */
    --bl-fs-2xl: 2.75rem;   /* 44px — для H1 */

    --bl-color-text: #020617;
    --bl-color-text-muted: #4a4a4a;
    --bl-color-accent: #682b8d;
    --bl-color-accent-dark: #51206e;
    --bl-color-border: #e2e8f0;
    --bl-color-surface: #ffffff;
    --bl-color-surface-soft: #f8fafc;
}

/* --- C3. Визуальная иерархия: H1 крупнее H2 --- */
/* H1 — крупнее H2 примерно в 1.37×, тот же refined-стиль Inter 500 */
.blog-header .page-title,
body.home .page-title,
h1.page-title {
    font-size: var(--bl-fs-2xl) !important;     /* 44px */
    line-height: 1.15 !important;
    letter-spacing: -0.015em !important;
    margin: 0 0 var(--bl-space-2) 0 !important;
}

/* H2 всех секций — оставляем 2rem (32px), утончённый Inter 500 */
.features-title,
.how-it-works-title,
.pricing-title,
.faq-title {
    font-size: var(--bl-fs-xl) !important;      /* 32px */
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
    margin: 0 0 var(--bl-space-3) 0 !important;
}

/* Планшет: H1 чуть меньше, чтобы не распирать сетку */
@media (max-width: 768px) {
    .blog-header .page-title,
    body.home .page-title,
    h1.page-title {
        font-size: 2.125rem !important;  /* 34px */
    }
    .features-title,
    .how-it-works-title,
    .pricing-title,
    .faq-title {
        font-size: 1.5rem !important;    /* 24px */
    }
}

/* --- H2. Lead-абзац с определением Brand Lift --- */
.lead {
    max-width: 760px;
    margin: 0 0 var(--bl-space-5) 0;
    font-family: Inter, -apple-system, "system-ui", sans-serif;
    font-size: var(--bl-fs-md);
    font-weight: 400;
    line-height: 1.6;
    color: var(--bl-color-text-muted);
}
.lead strong {
    color: var(--bl-color-text);
    font-weight: 600;
}
.lead em {
    font-style: normal;
    color: var(--bl-color-accent);
    font-weight: 500;
}

/* --- C2. Заголовок секции «Почему Brand Lift» --- */
.features-title {
    display: block;
    margin: 0 0 var(--bl-space-3) 0 !important;
    color: var(--bl-color-text);
}

/* --- M1. Подсказка над блоком тарифов --- */
.pricing-hint {
    max-width: 820px;
    margin: 0 0 var(--bl-space-4) 0;
    padding: 14px 18px;
    background: var(--bl-color-surface-soft);
    border: 1px solid var(--bl-color-border);
    border-radius: 12px;
    font-family: Inter, -apple-system, "system-ui", sans-serif;
    font-size: var(--bl-fs-sm);
    line-height: 1.55;
    color: var(--bl-color-text-muted);
}

/* --- M1. Бейдж «Рекомендуем» на центральной карточке --- */
.pricing-card--featured {
    position: relative;
}
.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 14px;
    background: var(--bl-color-accent);
    color: #ffffff;
    border-radius: 100px;
    font-family: Inter, -apple-system, "system-ui", sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(104, 43, 141, 0.25);
    white-space: nowrap;
    z-index: 2;
}

/* --- H3. Секция FAQ --- */
.faq-section {
    width: 100%;
    margin: 0 0 var(--bl-space-6) 0;
    padding: 0;
}
.faq-title {
    color: var(--bl-color-text);
}
.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--bl-space-2);
    max-width: 820px;
}
.faq-item {
    padding: var(--bl-space-3);
    background: var(--bl-color-surface);
    border: 1px solid var(--bl-color-border);
    border-radius: 14px;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.faq-item:hover {
    border-color: rgba(104, 43, 141, 0.35);
    box-shadow: 0 6px 20px -10px rgba(104, 43, 141, 0.2);
}
.faq-q {
    margin: 0 0 10px 0 !important;
    font-family: Inter, -apple-system, "system-ui", sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: var(--bl-color-text) !important;
    letter-spacing: -0.005em !important;
}
.faq-a {
    margin: 0;
    font-family: Inter, -apple-system, "system-ui", sans-serif;
    font-size: var(--bl-fs-sm);
    line-height: 1.6;
    color: var(--bl-color-text-muted);
}

@media (max-width: 768px) {
    .faq-item {
        padding: 18px 16px;
    }
    .faq-q {
        font-size: 1rem !important;
    }
}
