/**
 * Стили для раздела "Блог / База знаний"
 * ALP Theme
 */

:root {
    --blog-bg: #080d14;
    --blog-surface: #101722;
    --blog-card-bg: linear-gradient(180deg, #131c2a 0%, #0d141e 100%);
    --blog-border: rgba(255, 255, 255, 0.08);
    --blog-border-hover: rgba(8, 187, 14, 0.4);
    --blog-text: #ffffff;
    --blog-muted: #94a3b8;
    --blog-green: #08bb0e;
    --blog-green-light: #22c55e;
    --blog-green-glow: rgba(8, 187, 14, 0.25);
    --blog-gold: #f59e0b;
    --blog-radius: 20px;
}

/* =========================================================
   HERO
   ========================================================= */
.blog-hero {
    position: relative;
    overflow: hidden;
    padding: 80px 0 50px;
    background: radial-gradient(circle at 15% 20%, rgba(8, 187, 14, 0.12), transparent 40%),
                radial-gradient(circle at 85% 70%, rgba(8, 187, 14, 0.06), transparent 50%),
                var(--blog-bg);
}

.blog-hero__noise {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: radial-gradient(circle, #fff 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

.blog-hero__bg-word {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(80px, 16vw, 180px);
    font-weight: 900;
    color: #fff;
    opacity: 0.02;
    letter-spacing: 0.3em;
    pointer-events: none;
    white-space: nowrap;
    user-select: none;
}

.blog-hero .container {
    position: relative;
    z-index: 2;
}

.blog-hero__content {
    max-width: 820px;
}

.blog-hero__content .subtitle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 100px;
    background: rgba(8, 187, 14, 0.08);
    border: 1px solid rgba(8, 187, 14, 0.2);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--blog-green);
    margin-bottom: 18px;
}

.blog-hero h1 {
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.15;
    font-weight: 900;
    color: #fff;
    margin: 0 0 18px;
}

.blog-hero h1 span {
    display: block;
    color: var(--blog-green);
    background: linear-gradient(135deg, #08bb0e 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-hero p {
    font-size: 18px;
    line-height: 1.7;
    color: var(--blog-muted);
    max-width: 640px;
    margin: 0;
}

/* =========================================================
   SEARCH & TOOLBAR
   ========================================================= */
.blog-toolbar {
    padding: 30px 0 20px;
    background: var(--blog-bg);
    border-bottom: 1px solid var(--blog-border);
}

.blog-search-form {
    display: flex;
    gap: 12px;
    max-width: 650px;
    margin-bottom: 24px;
}

.blog-search-form__wrap {
    position: relative;
    flex: 1;
}

.blog-search-form__icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.blog-search-form input {
    width: 100%;
    height: 52px;
    padding: 0 20px 0 50px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--blog-border);
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.blog-search-form input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--blog-green);
    box-shadow: 0 0 0 4px rgba(8, 187, 14, 0.15);
}

.blog-search-form button {
    height: 52px;
    padding: 0 28px;
    border: none;
    border-radius: 14px;
    background: var(--blog-green);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.blog-search-form button:hover {
    background: var(--blog-green-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--blog-green-glow);
}

/* =========================================================
   CATEGORY PILLS
   ========================================================= */
.blog-categories-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.blog-categories-wrap::-webkit-scrollbar {
    height: 4px;
}

.blog-categories-wrap::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.blog-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 100px;
    border: 1px solid var(--blog-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--blog-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.blog-cat-pill:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.blog-cat-pill.active {
    background: var(--blog-green);
    border-color: var(--blog-green);
    color: #fff;
    box-shadow: 0 4px 16px rgba(8, 187, 14, 0.3);
}

/* =========================================================
   FEATURED POST
   ========================================================= */
.blog-featured {
    padding: 50px 0 20px;
    background: var(--blog-bg);
}

.featured-post {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    overflow: hidden;
    border-radius: 28px;
    background: var(--blog-card-bg);
    border: 1px solid var(--blog-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
}

.featured-post:hover {
    border-color: var(--blog-border-hover);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(8, 187, 14, 0.08);
}

.featured-post__image {
    position: relative;
    overflow: hidden;
    min-height: 400px;
    background: #090e15;
}

.featured-post__image a {
    display: block;
    width: 100%;
    height: 100%;
}

.featured-post__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.featured-post:hover .featured-post__image img {
    transform: scale(1.05);
}

.featured-post__badge {
    position: absolute;
    top: 24px;
    left: 24px;
    padding: 6px 14px;
    border-radius: 100px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.featured-post__content {
    padding: 45px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-post__category {
    display: inline-block;
    color: var(--blog-green);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.featured-post__category a {
    color: inherit;
    text-decoration: none;
}

.featured-post h2 {
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.25;
    font-weight: 800;
    color: #fff;
    margin: 0 0 16px;
}

.featured-post h2 a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-post h2 a:hover {
    color: var(--blog-green);
}

.featured-post p {
    color: var(--blog-muted);
    font-size: 16px;
    line-height: 1.7;
    margin: 0 0 28px;
}

.featured-post__meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 30px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--blog-border);
}

.featured-post__meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.featured-post__button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    padding: 14px 32px;
    border-radius: 100px;
    background: var(--blog-green);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
}

.featured-post__button:hover {
    background: var(--blog-green-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--blog-green-glow);
}

/* =========================================================
   BLOG GRID & CARDS
   ========================================================= */
.blog-grid {
    padding: 40px 0 90px;
    background: var(--blog-bg);
}

.blog-grid__wrapper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.blog-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--blog-card-bg);
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.blog-card:hover {
    transform: translateY(-8px);
    border-color: var(--blog-border-hover);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45), 0 0 30px rgba(8, 187, 14, 0.08);
}

.blog-card__image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #090e15;
}

.blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.blog-card:hover .blog-card__image img {
    transform: scale(1.06);
}

.blog-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 26px 28px 24px;
}

.blog-card__category {
    display: inline-block;
    color: var(--blog-green);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.blog-card__category a {
    color: inherit;
    text-decoration: none;
}

.blog-card h3 {
    margin: 0 0 12px;
    font-size: 21px;
    line-height: 1.35;
    font-weight: 700;
}

.blog-card h3 a {
    color: #fff;
    text-decoration: none;
    transition: color 0.25s ease;
}

.blog-card:hover h3 a {
    color: var(--blog-green);
}

.blog-card p {
    flex: 1;
    margin: 0 0 24px;
    color: var(--blog-muted);
    line-height: 1.65;
    font-size: 14.5px;
}

.blog-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    border-top: 1px solid var(--blog-border);
    margin-top: auto;
}

.blog-card__date {
    color: #64748b;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-card__link {
    color: var(--blog-green);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
}

.blog-card__link:hover {
    color: var(--blog-green-light);
    transform: translateX(4px);
}

/* =========================================================
   PAGINATION (Современная, идеально выровненная пагинация)
   ========================================================= */
.blog-pagination-wrapper {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--blog-border);
}

.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--blog-border);
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-sizing: border-box;
    user-select: none;
}

.blog-pagination .page-numbers:hover {
    background: rgba(8, 187, 14, 0.12);
    border-color: var(--blog-green);
    color: var(--blog-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(8, 187, 14, 0.2);
}

.blog-pagination .page-numbers.current {
    background: var(--blog-green);
    border-color: var(--blog-green);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(8, 187, 14, 0.35);
    pointer-events: none;
    transform: none;
}

.blog-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 700;
    min-width: 24px;
    padding: 0 4px;
    box-shadow: none;
    pointer-events: none;
    transform: none;
}

.blog-pagination .page-numbers.prev,
.blog-pagination .page-numbers.next {
    padding: 0 22px;
    border-radius: 100px;
    font-weight: 600;
    gap: 6px;
    min-width: auto;
}

/* =========================================================
   CTA SECTION
   ========================================================= */
.blog-cta {
    padding: 70px 0 110px;
    background: var(--blog-bg);
}

.blog-cta__box {
    position: relative;
    overflow: hidden;
    max-width: 960px;
    margin: 0 auto;
    padding: 60px 50px;
    border-radius: 30px;
    text-align: center;
    background: radial-gradient(circle at top right, rgba(8, 187, 14, 0.15), transparent 50%),
                linear-gradient(180deg, #131b26 0%, #0d141e 100%);
    border: 1px solid var(--blog-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.blog-cta__box::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 45%);
    pointer-events: none;
}

.blog-cta h2 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.2;
    color: #fff;
    margin: 0 0 16px;
}

.blog-cta p {
    max-width: 620px;
    margin: 0 auto 32px;
    color: var(--blog-muted);
    line-height: 1.7;
    font-size: 17px;
}

.blog-cta .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    padding: 0 38px;
    border-radius: 100px;
    background: var(--blog-green);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px var(--blog-green-glow);
}

.blog-cta .button:hover {
    background: var(--blog-green-light);
    transform: translateY(-3px);
    box-shadow: 0 14px 35px rgba(8, 187, 14, 0.4);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
    .blog-grid__wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .featured-post {
        grid-template-columns: 1fr;
    }

    .featured-post__image {
        min-height: 280px;
    }

    .featured-post__content {
        padding: 35px 30px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 60px 0 40px;
    }

    .blog-toolbar {
        padding: 20px 0;
    }

    .blog-search-form {
        flex-direction: column;
    }

    .blog-search-form button {
        width: 100%;
    }

    .blog-grid__wrapper {
        grid-template-columns: 1fr;
    }

    .featured-post__content {
        padding: 28px 22px;
    }

    .featured-post__meta {
        flex-wrap: wrap;
        gap: 12px;
    }

    .featured-post__button {
        width: 100%;
        justify-content: center;
    }

    .blog-cta__box {
        padding: 40px 24px;
    }

    .blog-cta .button {
        width: 100%;
    }

    .blog-pagination .page-numbers.prev,
    .blog-pagination .page-numbers.next {
        padding: 0 16px;
        font-size: 14px;
    }
}