/* Базовые стили для блога в киберпанк-стиле */
.blog-container {
    /* max-width убран, чтобы соответствовать другим страницам */
    margin: 0 auto;
    padding: 20px;
    padding-top: 8rem;
    /* Оставляем отступ сверху для хедера */
}

.blog-header {
    text-align: left;
    /* Общий стиль сайта - выравнивание по левому краю */
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--heading-color);
    /* Используем цвет заголовков (циан) */
}

.blog-header h1 {
    font-size: 2.5rem;
    color: var(--heading-color);
    /* Используем цвет заголовков */
    margin-bottom: 10px;
    text-shadow: 0 0 5px var(--heading-color);
    /* Добавляем свечение */
}

.blog-subtitle {
    font-size: 1.2rem;
    color: var(--body-text-color);
    /* Используем основной цвет текста */
    opacity: 0.8;
}

.blog-posts {
    display: grid;
    gap: 40px;
}

/* Стилизация поста в стиле .card и .tile из custom.css */
.blog-post {
    padding: 30px;
    border-radius: 0;
    /* Убираем скругление углов */
    background-color: rgba(10, 10, 13, 0.7);
    /* Темный полупрозрачный фон */
    border: 1px solid #00ffff;
    /* Неоновая рамка */
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.7);
    /* Неоновое свечение */
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    /* Плавный переход для ховера */
}

.blog-post:hover {
    transform: translateY(-5px);
    /* Легкий подъем при наведении */
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.8);
    /* Усиленное свечение */
}

.blog-post header h2 {
    margin-top: 0;
    margin-bottom: 15px;
}

.blog-post header h2 a {
    color: var(--heading-color);
    /* Используем цвет заголовков */
    text-decoration: none;
}

/* Ховер-эффект для заголовков постов уже есть в custom.css (text-shadow) */

.post-meta {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--body-text-color);
    /* Используем основной цвет текста */
    opacity: 0.7;
    /* Делаем мета-информацию менее заметной */
}

.post-meta .date {
    margin-right: 15px;
}

.post-image {
    margin: 20px 0;
    border: 1px solid var(--heading-color);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.post-image img {
    max-width: 100%;
    height: auto;
    border-radius: 0;
    /* Убираем скругление */
}

.post-summary {
    margin: 20px 0;
    line-height: 1.6;
}

/* Редизайн кнопки "Читать далее" */
.read-more {
    display: inline-block;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--heading-color);
    color: var(--heading-color) !important;
    text-decoration: none !important;
    border-radius: 0;
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, text-shadow 0.3s ease;
    text-transform: uppercase;
}

.read-more:hover {
    background: rgba(0, 255, 255, 0.1);
    color: #fff !important;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.7);
    text-shadow: 0 0 5px #fff;
}

/* Стилизация тегов */
.tags {
    margin-top: 15px;
}

.tag {
    display: inline-block;
    padding: 5px 10px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: var(--heading-color);
    font-size: 0.8rem;
    border-radius: 0;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .blog-container {
        padding: 10px;
        padding-top: 6rem;
    }

    .blog-header h1 {
        font-size: 2rem;
    }

    .blog-post {
        padding: 1rem;
    }

    .blog-posts {
        gap: 1rem;
    }

    .e-content {
        padding: 1rem;
    }

    .content-item {
        padding: 1rem;
    }
}

/* Featured Posts */
.featured-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.featured-post {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--heading-color);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
}

.featured-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: #fff;
}

.featured-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.featured-post:hover .featured-image {
    transform: scale(1.1);
}

.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

.featured-content h2 {
    font-size: 1.2rem;
    margin: 0 0 10px 0;
    color: var(--heading-color);
    text-shadow: 0 0 5px #000;
}

.featured-content .date {
    font-size: 0.8rem;
    color: #ccc;
}

/* Layout with Sidebar */
.blog-content-wrapper {
    display: grid;
    gap: 40px;
}

.blog-content-wrapper.with-sidebar {
    grid-template-columns: 1fr 300px;
}

/* Timeline Layout */
.timeline-posts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    position: relative;
    padding: 20px 0;
}

/* Vertical Line */
.timeline-posts::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--heading-color);
    box-shadow: 0 0 10px var(--heading-color);
    transform: translateX(-50%);
    z-index: 0;
}

.timeline-post {
    position: relative;
    width: 100%;
    /* Reset width to full grid cell */
    padding-bottom: 40px;
}

.timeline-post.left {
    padding-right: 40px;
    text-align: right;
    grid-column: 1;
}

.timeline-post.right {
    padding-left: 40px;
    text-align: left;
    grid-column: 2;
    margin-top: 5rem;
    /* The asymmetrical shift */
}

/* Connector Dot */
.timeline-post::after {
    content: '';
    position: absolute;
    top: 20px;
    width: 16px;
    height: 16px;
    background: #000;
    border: 2px solid var(--heading-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--heading-color);
    z-index: 1;
}

.timeline-post.left::after {
    right: -8px;
}

.timeline-post.right::after {
    left: -8px;
    top: -3rem;
    /* Adjust dot to align with shifted content if needed, or keep at content top */
    top: 20px;
    /* Keep at top of content box */
}

/* Adjust dot for the margin shift? 
   The dot is inside .timeline-post.
   If .timeline-post is shifted down by margin-top, the dot moves with it.
   So top: 20px is correct relative to the content.
*/

.timeline-content {
    background: rgba(10, 10, 13, 0.7);
    border: 1px solid var(--heading-color);
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
    border-radius: 0;
    position: relative;
    z-index: 1;
}

/* Responsive */
@media (max-width: 900px) {
    .blog-content-wrapper.with-sidebar {
        grid-template-columns: 1fr;
    }

    .featured-posts {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .featured-post {
        aspect-ratio: 16 / 9;
    }

    /* Collapse Timeline to Single Column */
    .timeline-posts {
        grid-template-columns: 1fr;
    }

    .timeline-posts::before {
        left: 20px;
    }

    .timeline-post {
        width: 100%;
        /* Ensure full width */
        padding-bottom: 20px;
    }

    .timeline-post.left,
    .timeline-post.right {
        grid-column: 1;
        margin-top: 0;
        /* Remove shift on mobile */
        padding-left: 50px;
        padding-right: 0;
        text-align: left;
    }

    .timeline-post::after {
        left: 12px !important;
        right: auto !important;
    }
}