/* ========== СТРАНИЦА БЛОГА ========== */

.blog-page {
    background-color: var(--color-bg);
    min-height: 100vh;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* Header */
.blog-header {
    position: relative;
    margin-bottom: 3rem;
    text-align: center;
}

.blog-header .back-button {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    color: var(--color-primary);
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.blog-header .back-button:hover {
    opacity: 0.7;
}

.blog-header .back-button i {
    width: 20px;
    height: 20px;
}

.blog-header .page-title {
    font-family: 'Comfortaa', cursive;
    font-size: 2.5rem;
    color: var(--color-text);
    margin: 0 0 1rem 0;
    text-align: center;
}

.blog-header .page-description {
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

/* Grid постов */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Карточка поста */
.blog-card {
    background: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.blog-image-container {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
}

.blog-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image {
    transform: scale(1.05);
}

.blog-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-family: 'Nunito', sans-serif;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.blog-content h3 {
    font-family: 'Comfortaa', cursive;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
    line-height: 1.4;
}

.blog-description {
    font-family: 'Nunito', sans-serif;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    font-size: 1rem;
}

/* Стили для ссылки "Читать далее" (как в карточках рецептов) */
.blog-link {
    margin: 0.5rem 0 0 0; 
    background: none;
    border: none;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    color: var(--color-primary);
    cursor: pointer;
    padding: 0.5rem 0;
    text-align: left;
    transition: opacity 0.2s;
    align-self: flex-start;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.blog-link:hover {
    opacity: 0.7;
    text-decoration: underline;
    gap: 8px;
}

/* Кнопка загрузки */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.load-more-btn {
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    background-color: var(--color-secondary);
    color: var(--color-bg);
}

.load-more-btn:hover {
    opacity: 0.8;
}

.load-more-btn.hidden {
    display: none;
}

/* Сообщение о пустом блоге */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--color-surface);
    border-radius: 24px;
    color: var(--color-text-light);
}

.no-posts i {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-posts p {
    font-size: 1.2rem;
    font-family: 'Nunito', sans-serif;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .blog-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-header {
        padding-top: 40px;
    }
    
    .blog-header .back-button {
        top: 0;
        transform: none;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .blog-header .page-title {
        font-size: 2rem;
        margin-top: 40px;
    }
    
    .blog-image-container {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .blog-container {
        padding: 20px 15px 40px;
    }
    
    .blog-content {
        padding: 20px;
    }
    
    .blog-content h3 {
        font-size: 1.2rem;
    }
    
    .blog-meta {
        flex-wrap: wrap;
    }
}