/**
 * Блог — обновлённый дизайн
 */

.page-blog {
    background: var(--white, #ffffff);
    background-image: none;
    color: var(--charcoal, #2a2825);
}

.blog-main {
    min-height: calc(100vh - 120px);
    padding: 2rem 1rem 3rem;
}

.blog-main__inner {
    max-width: 860px;
    margin: 0 auto;
}

.blog-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--charcoal, #2a2825);
    margin: 0 0 0.5rem;
}

.blog-breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--cream-dark, #6b6560);
}

.blog-breadcrumb a {
    color: var(--charcoal, #2a2825);
    text-decoration: none;
}

.blog-breadcrumb a:hover {
    text-decoration: underline;
    color: var(--gold-dark);
}

.blog-breadcrumb__sep {
    margin: 0 0.35rem;
    opacity: 0.7;
}

.blog-breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.blog-breadcrumb li {
    display: inline-flex;
    align-items: center;
}

.blog-breadcrumb__current {
    color: var(--charcoal, #2a2825);
    font-weight: 500;
}

.blog-lead {
    font-size: 1.05rem;
    color: var(--cream-dark, #6b6560);
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.blog-summary {
    font-size: 0.9rem;
    color: var(--cream-dark, #6b6560);
    margin: 0 0 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.blog-summary strong {
    color: var(--charcoal, #2a2825);
    font-weight: 700;
}

#blog-list-wrap {
    position: relative;
    min-height: 120px;
}

#blog-list-wrap.blog-list-wrap--loading {
    pointer-events: none;
}

#blog-list-wrap.blog-list-wrap--loading::after {
    content: "Загрузка…";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    color: var(--charcoal, #2a2825);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.page-blog .paper-card {
    border-radius: 12px;
    clip-path: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Пустое состояние */
.blog-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.blog-empty__icon {
    display: block;
    font-size: 3rem;
    color: var(--beige-dark, #c4b8a8);
    margin-bottom: 1rem;
}

.blog-empty__text {
    margin: 0 0 1.25rem;
    font-size: 1.1rem;
    color: #2a2520;
}

.blog-empty .btn {
    display: inline-block;
}

/* Список записей (в стиле DLE 19.1: постер слева, контент справа) */
.blog-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blog-item {
    margin: 0;
    padding: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

@media (min-width: 640px) {
    .blog-item {
        flex-direction: row;
    }
}

.blog-item:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.blog-item__poster-wrap {
    flex-shrink: 0;
    overflow: hidden;
    line-height: 0;
    min-height: 180px;
}

@media (min-width: 640px) {
    .blog-item__poster-wrap {
        width: 280px;
        min-height: 0;
        aspect-ratio: 4/3;
    }
}

.blog-item__poster-link,
.blog-item__poster-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 180px;
}

@media (min-width: 640px) {
    .blog-item__poster-link,
    .blog-item__poster-placeholder {
        min-height: 0;
        aspect-ratio: 4/3;
    }
}

.blog-item__poster {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

@media (min-width: 640px) {
    .blog-item__poster {
        min-height: 100%;
    }
}

.blog-item__poster-link:hover .blog-item__poster {
    transform: scale(1.04);
}

.blog-item__poster-placeholder {
    background: linear-gradient(145deg, #e8e2d9 0%, #d5cdc4 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8a8279;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.blog-item__poster-placeholder:hover {
    background: linear-gradient(145deg, #ddd6cc 0%, #c9c0b5 100%);
    color: #6b635b;
}

.blog-item__poster-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.35rem;
    opacity: 0.85;
}

.blog-item__poster-placeholder-text {
    font-size: 0.85rem;
    font-weight: 500;
}

.blog-item__content {
    flex: 1;
    min-width: 0;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.blog-item__title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.35;
}

@media (min-width: 640px) {
    .blog-item__title {
        font-size: 1.3rem;
    }
}

.blog-item__title a {
    color: #2a2520;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-item__title a:hover {
    color: var(--red, #8b1e1e);
}

.blog-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.25rem;
    margin-bottom: 0.65rem;
    font-size: 0.875rem;
    color: #6b635b;
}

.blog-item__date,
.blog-item__views {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.blog-item__date i,
.blog-item__views i {
    opacity: 0.8;
    font-size: 0.9em;
}

.blog-item__views {
    color: #5a5350;
}

.blog-item__excerpt {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #444;
    flex: 1;
}

.blog-item__link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
    background: linear-gradient(180deg, var(--red, #8b1e1e) 0%, #6b1717 100%);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    align-self: flex-start;
    box-shadow: 0 2px 6px rgba(139, 30, 30, 0.25);
}

.blog-item__link:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 30, 30, 0.35);
}

.blog-item__link i {
    font-size: 0.75em;
    transition: transform 0.2s;
}

.blog-item__link:hover i {
    transform: translateX(3px);
}

/* Пагинация (в стиле DLE) */
.blog-pagination {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.blog-pagination__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.blog-pagination__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--beige, #e8e0d5);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.blog-pagination__link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.blog-pagination__link--current {
    background: var(--red, #8b1e1e);
    border-color: var(--red, #8b1e1e);
    color: #fff;
    cursor: default;
}

.blog-pagination__link--current:hover {
    background: var(--red, #8b1e1e);
    border-color: var(--red, #8b1e1e);
    color: #fff;
}

.blog-pagination__link--prev,
.blog-pagination__link--next {
    font-weight: 600;
}

/* Одна запись (blog-post.php) — обновлённый дизайн */
.blog-post-page {
    max-width: 720px;
}

.blog-post-breadcrumb {
    margin-bottom: 1.5rem;
}

.blog-single {
    padding: 0;
    overflow: hidden;
}

.blog-single__poster {
    margin: 0;
    overflow: hidden;
    line-height: 0;
    position: relative;
}

.blog-single__poster-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    position: relative;
}

.blog-single__poster-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.blog-single__poster-zoom-hint {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.blog-single__poster-trigger:hover .blog-single__poster-zoom-hint {
    opacity: 1;
}

.blog-single__header {
    padding: 1.5rem 1.75rem 0;
}

.blog-single__title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #2a2520;
    line-height: 1.25;
}

.blog-single__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    font-size: 0.9rem;
    color: #6b635b;
    margin-bottom: 0;
}

.blog-single__date,
.blog-single__views {
    display: inline-flex;
    align-items: center;
}

.blog-single__date i,
.blog-single__views i {
    margin-right: 0.5rem;
    opacity: 0.85;
}

.blog-single__views {
    color: #5a5350;
}

.blog-single__photo {
    margin: 1.25rem 1.75rem 0;
    position: relative;
}

.blog-single__photo-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    position: relative;
}

.blog-single__photo img,
.blog-single__photo-trigger img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.blog-single__photo-zoom-hint {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.blog-single__photo-trigger:hover .blog-single__photo-zoom-hint {
    opacity: 1;
}

/* Галерея записи блога (отдельный блок ниже текста) */
.blog-single__gallery-block {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-left: 1.75rem;
    padding-right: 1.75rem;
}
.blog-single__gallery-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: #2a2520;
    margin: 0 0 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.blog-single__gallery-hint {
    font-size: 0.8rem;
    color: #555;
    margin: 0 0 0.75rem;
}
.blog-single__gallery-thumbs {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.blog-single__gallery-thumb {
    width: 128px;
    height: 128px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: #fff;
    cursor: zoom-in;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s, transform 0.2s;
}
.blog-single__gallery-thumb:hover {
    box-shadow: 0 4px 12px rgba(139, 30, 30, 0.2);
    transform: scale(1.04);
}
.blog-single__gallery-thumb-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
}
.blog-single__gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.blog-single__gallery-thumb-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s;
}
.blog-single__gallery-thumb:hover .blog-single__gallery-thumb-zoom {
    opacity: 1;
}

.blog-single__body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #2a2520;
    padding: 1.25rem 1.75rem 0;
}

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

.blog-single__body p:last-child {
    margin-bottom: 0;
}

.blog-single__body a {
    color: var(--red-dark, #8b1e1e);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-single__body a:hover {
    color: #6b1717;
}

.blog-single__body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 1rem 0;
}

.blog-single__body blockquote {
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--red-dark, #8b1e1e);
    background: rgba(139, 30, 30, 0.06);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #444;
}

.blog-single__body h2,
.blog-single__body h3,
.blog-single__body h4 {
    font-family: var(--font-heading);
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.blog-single__body ul,
.blog-single__body ol {
    margin: 0.75rem 0 1rem;
    padding-left: 1.5rem;
}

.blog-single__body li {
    margin-bottom: 0.35rem;
}

.blog-single__footer {
    padding: 1.5rem 1.75rem 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 1rem;
}

.blog-single__footer-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.blog-single__footer-catalog {
    font-size: 0.95rem;
    color: #6b635b;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-single__footer-catalog:hover {
    color: var(--red-dark, #8b1e1e);
}

.btn--outline-blog {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--red);
    background: transparent;
    border: 2px solid var(--red);
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.btn--outline-blog:hover {
    background: var(--red);
    color: #fff;
}

.btn--outline-blog i {
    margin-right: 0.5rem;
}
