.blog-section-label,
.blog-section-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6366f1;
    margin-bottom: 0.5rem;
}

.blog-index-head {
    max-width: 760px;
    margin-bottom: 2rem;
}

.blog-index-head h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.blog-index-head p {
    margin: 0;
    color: #6b7280;
    font-size: 1.05rem;
}

.blog-categories-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.blog-cat-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 0.9rem;
    text-decoration: none;
}

.blog-cat-link span {
    color: #9ca3af;
    font-size: 0.8rem;
}

.blog-cat-link.is-active,
.blog-cat-link:hover {
    border-color: #6366f1;
    color: #4338ca;
    background: #eef2ff;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.blog-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.blog-card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #eef2ff, #ecfdf5);
}

.blog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-category {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.75rem;
}

.blog-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem 1.1rem 1.15rem;
    flex: 1;
}

.blog-card-date {
    font-size: 0.8rem;
    color: #9ca3af;
}

.blog-card-title {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
}

.blog-card-title a {
    color: #111827;
    text-decoration: none;
}

.blog-card-title a:hover {
    color: #4338ca;
}

.blog-card-excerpt {
    margin: 0;
    color: #6b7280;
    font-size: 0.92rem;
    line-height: 1.5;
}

.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: #9ca3af;
    font-size: 0.8rem;
}

.blog-card-link {
    margin-top: auto;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4338ca;
    text-decoration: none;
}

.blog-card-link i {
    font-size: 0.75rem;
}

.blog-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}

.blog-page-link {
    min-width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: #374151;
}

.blog-page-link.is-active,
.blog-page-link:hover {
    background: #4338ca;
    border-color: #4338ca;
    color: #fff;
}

.blog-empty {
    color: #6b7280;
    padding: 2rem 0;
}

.blog-index,
.blog-category-page,
.blog-post-page {
    padding: 2rem 0 4rem;
}

.blog-post-head {
    max-width: 820px;
    margin-bottom: 1.5rem;
}

.blog-post-category {
    display: inline-block;
    margin-bottom: 0.75rem;
    color: #4338ca;
    font-weight: 600;
    text-decoration: none;
}

.blog-post-head h1 {
    margin: 0 0 0.85rem;
    font-size: clamp(1.8rem, 3.5vw, 2.75rem);
    line-height: 1.15;
}

.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    color: #6b7280;
    font-size: 0.92rem;
}

.blog-post-cover {
    margin: 0 0 1.5rem;
    border-radius: 20px;
    overflow: hidden;
}

.blog-post-cover img {
    width: 100%;
    display: block;
    max-height: 480px;
    object-fit: cover;
}

.blog-post-lead {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #374151;
    margin: 0 0 1.5rem;
}

.blog-post-content {
    max-width: 820px;
}

.blog-related {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.blog-related h2 {
    margin: 0 0 1.25rem;
}

.home-blog {
    background: #f8fafc;
}

.home-blog-shell {
    display: grid;
    gap: 1.5rem;
}

.home-blog-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.cabinet-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.admin-posts-layout {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

.admin-posts-categories {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.admin-posts-categories li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #eef2f7;
    font-size: 0.92rem;
}

.admin-posts-cat-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-link-danger {
    border: 0;
    background: none;
    color: #dc2626;
    cursor: pointer;
    padding: 0;
}

@media (max-width: 1100px) {
    .home-blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .blog-grid,
    .blog-grid--compact,
    .cabinet-blog-grid {
        grid-template-columns: 1fr;
    }

    .admin-posts-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .home-blog-grid {
        grid-template-columns: 1fr;
    }
}
