/* ==========================================================================
   POSTS GRID SECTION - Секция с сеткой постов 2x2 (стили из html-post)
   ========================================================================== */

/* Основная секция - используем стили из banner-section */
.posts-grid-section {
    padding-top: 70px;
}

.posts-grid-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    position: relative;
    overflow: visible; /* Важно для работы sticky */
}

.posts-grid-main {
    flex-basis: 66%;
    position: relative;
    z-index: 1; /* z-index ниже хедера (z-index: 9999), но выше брендированного фона (z-index: 0) */
}

/* Сетка постов - 2 строки по 2 поста в каждой */
.posts-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 30px 30px;
}

.posts-grid-2x2 .main-article {
    padding-top: 0;
    display: block;
    width: 100%;
}

/* Стили для малых постов - точно как в html-post */
.posts-grid-2x2 .main-article__small {
    max-width: 330px;
}

.posts-grid-2x2 .main-article__small .main-article__title {
    font-size: 28px;
    line-height: 34px;
}

/* Правый сайдбар с баннером - используем стили из banner-section */
.sidebar-banner {
    flex-basis: 30%;
    width: 100%;
}

.banner-330x600 {
    position: sticky;
    top: 20px;
    width: 100%;
    height: 660px;
}

.banner-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.banner-placeholder:hover {
    background-color: #e8e8e8;
}

.banner-placeholder span {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
}

/* Адаптивность - точно как в html-post */
@media (max-width: 1150px) {
    .posts-grid-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .posts-grid-main {
        flex-basis: 100%;
    }
    
    .sidebar-banner {
        flex-basis: 100%;
        max-width: 330px;
        margin: 0 auto;
    }
    
    .banner-330x600 {
        position: static;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    /* На планшетах - посты в одну колонку */
    .posts-grid-2x2 {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .posts-grid-2x2 .main-article__small {
        max-width: 100%;
    }
    
    .sidebar-banner {
        max-width: 100%;
    }
    
    .banner-330x600 {
        width: 100%;
        max-width: 330px;
        height: 400px;
    }
}

@media (max-width: 480px) {
    .banner-330x600 {
        height: 300px;
    }
}
