/* Блог — в стилистике бренда (cream, terracotta, заголовки) */
/* padding на body давал лишний зазор под подвалом; отступы — у .container / секций */
.blog-page {
    padding-bottom: 0;
}

.blog-page .main-content {
    padding-top: 8px;
    padding-bottom: 28px;
}

.blog-hero {
    background: linear-gradient(135deg, var(--cream-light) 0%, var(--cream) 45%, #fff 100%);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.blog-hero::after {
    content: '🌸';
    position: absolute;
    right: 1.5rem;
    bottom: 0.5rem;
    font-size: 4rem;
    opacity: 0.12;
    pointer-events: none;
}

.blog-hero .page-title {
    margin-bottom: 0.5rem;
    font-size: 2.25rem;
}

.blog-hero .blog-lead {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0;
    line-height: 1.55;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.blog-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    box-shadow: 0 12px 32px rgba(88, 94, 146, 0.12);
    transform: translateY(-3px);
}

.blog-card-image {
    aspect-ratio: 16 / 9;
    background: linear-gradient(145deg, var(--cream), var(--mint));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--terracotta);
    opacity: 0.85;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-body {
    padding: 1.25rem 1.35rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.blog-card-title {
    font-size: 1.25rem;
    margin: 0 0 0.65rem;
    line-height: 1.3;
    color: #585E92;
}

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

.blog-card-title a:hover {
    color: var(--terracotta);
}

.blog-card-excerpt {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.55;
    flex: 1;
    margin-bottom: 1rem;
}

.blog-card-more {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--terracotta);
    align-self: flex-start;
}

.blog-card-more:hover {
    text-decoration: underline;
}

.blog-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--bg-light);
    border-radius: 16px;
    color: var(--text-light);
}

/* Страница статьи */
.blog-post-page .blog-article {
    max-width: 760px;
    margin: 0 auto;
}

.blog-post-page .blog-article-header {
    margin-bottom: 1.75rem;
}

.blog-post-page .blog-article-title {
    font-size: 2.1rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    color: #585E92;
}

.blog-post-page .blog-article-meta {
    font-size: 0.95rem;
    color: var(--text-light);
}

.blog-post-page .blog-article-cover {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.blog-post-page .blog-article-cover img {
    width: 100%;
    display: block;
    vertical-align: middle;
}

/* Карусель фото в статье */
.blog-carousel {
    position: relative;
    margin-bottom: 2rem;
    border-radius: 16px;
    overflow: visible;
}

.blog-carousel-viewport {
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: transparent;
    aspect-ratio: 16 / 10;
    max-height: min(52vh, 520px);
}

.blog-carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

.blog-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    vertical-align: middle;
}

.blog-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #585E92;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.blog-carousel-btn:hover {
    background: #fff;
    color: var(--terracotta);
    box-shadow: 0 4px 16px rgba(217, 72, 72, 0.2);
}

.blog-carousel-btn--prev {
    left: 10px;
}

.blog-carousel-btn--next {
    right: 10px;
}

.blog-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.blog-carousel-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--border-dark);
    cursor: pointer;
    opacity: 0.45;
    transition: opacity 0.2s, transform 0.2s, background 0.2s;
}

.blog-carousel-dot:hover {
    opacity: 0.85;
}

.blog-carousel-dot.is-active {
    opacity: 1;
    background: var(--terracotta);
    transform: scale(1.15);
}

@media (max-width: 576px) {
    .blog-carousel-btn {
        width: 38px;
        height: 38px;
        font-size: 1.35rem;
    }
    .blog-carousel-btn--prev { left: 6px; }
    .blog-carousel-btn--next { right: 6px; }
    .blog-carousel-viewport {
        aspect-ratio: 4 / 3;
        max-height: 56vh;
    }
}

.blog-post-body {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-dark);
}

.blog-post-body h2,
.blog-post-body h3,
.blog-post-body h4,
.blog-post-body h5 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #585E92;
}

.blog-post-body p {
    margin-bottom: 1.1rem;
}

.blog-post-body ul,
.blog-post-body ol {
    margin: 0 0 1.1rem 1.25rem;
}

.blog-post-body a {
    color: var(--terracotta);
    text-decoration: underline;
}

.blog-post-body blockquote {
    border-left: 4px solid var(--mint);
    margin: 1.25rem 0;
    padding: 0.5rem 0 0.5rem 1.25rem;
    background: var(--cream-light);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-light);
}

.blog-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: var(--text-light);
}

.blog-back:hover {
    color: var(--terracotta);
}

@media (max-width: 576px) {
    .blog-hero {
        padding: 1.5rem 1.25rem;
    }
    .blog-hero .page-title {
        font-size: 1.75rem;
    }
    .blog-post-page .blog-article-title {
        font-size: 1.65rem;
    }
}
