.home-main-window {
    margin: 32px auto;
    max-width: 1100px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(24,24,139,0.07);
    padding: 32px 0 32px 0;
}

.home-inner {
    border-radius: 12px;
    margin: 0 auto;
    max-width: 800px;
    padding: 24px 0 24px 0;
    background: #f8f8f6;
}

.carousel-title {
    font-weight: 700;
    color: #2323a6;
    font-size: 1.8rem;
    margin: 40px 0 20px 0;
    padding: 0;
    display: block;
    letter-spacing: 0.5px;
    position: relative;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.carousel-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #2323a6, #4a90e2);
    border-radius: 2px;
}

.carousel-title:hover {
    color: #18188B;
}

.carousel-title:hover::after {
    background: linear-gradient(90deg, #18188B, #4a90e2);
}

.carousel-title.subcategory-title {
    font-size: 1.2rem;
    margin-top: 32px;
}

.carousel-title.subcategory-title a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.carousel-title.subcategory-title a:hover {
    color: #18188B;
    transform: translateY(-1px);
}

.carousel-title.page-title {
    margin-bottom: 40px;
    font-size: 1.8rem;
    font-weight: 700;
}

.post-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

.post-link:hover {
    text-decoration: none;
    color: inherit;
}

.post-card {
    width: 176px;
    height: 300px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    background: #fff;
    margin-bottom: 16px;
    overflow: hidden;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.post-card .card-img-top {
    border-radius: 12px 12px 0 0;
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    object-position: center;
    background-color: #f8f9fa;
}

.post-card .card-body {
    padding: 20px 16px 16px 16px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.post-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.post-card .card-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-card .card-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 12px 16px 18px 16px;
    font-size: 0.9rem;
    color: #333;
    text-align: center;
    border-radius: 0 0 12px 12px;
}



.home-content-area {
    width: 80vw;
    max-width: 1200px;
    margin: 40px auto;
    background: #f8f9fa;
    border-radius: 18px;
    min-height: 300px;
    box-shadow: 0 2px 16px rgba(0, 0, 64, 0.07);
    padding: 120px 30px 32px 30px;
}


/* .swiper {
    position: relative;
    overflow: hidden;
}

.swiper-wrapper {
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
}

.swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    transition-property: transform;
}

.swiper-slide.empty-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
} */

@media (max-width: 900px) {
    .home-content-area { 
        width: 95vw;
        padding: 100px 20px 24px 20px;
    }
    
    
    /* .carousel-block {
        width: 100%;
    } */
    
    .post-card {
        width: 160px;
        height: 280px;
    }
    
    
    /* .swiper-button-next,
    .swiper-button-prev {
        width: 35px;
        height: 35px;
    }
    
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 14px;
    } */
}

@media (max-width: 600px) {
    
    /* .carousel-block {
        padding: 8px 12px;
    } */
    
    .post-card {
        width: 140px;
        height: 260px;
    }
    
    
    /* .swiper-button-next,
    .swiper-button-prev {
        width: 30px;
        height: 30px;
    }
    
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 12px;
    } */
}

@media (max-width: 480px) {
    
    /* .carousel-block {
        padding: 6px 8px;
    } */
    
    .post-card {
        width: 120px;
        height: 240px;
    }
    
    .post-card .card-img-top {
        aspect-ratio: 4/3;
    }
    
    .post-card .card-body {
        padding: 12px;
    }
    
    .post-card .card-title {
        font-size: 0.8rem;
    }
    
    .post-card .card-text {
        font-size: 0.8rem;
    }
    
    .post-card .card-footer {
        padding: 8px 12px 12px 12px;
        font-size: 0.8rem;
    }
    
    
    /* .swiper-button-next,
    .swiper-button-prev {
        width: 25px;
        height: 25px;
    }
    
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 10px;
    }
    
    .swiper-slide {
        padding: 0 4px;
    } */
}

@media (max-width: 768px) {
    
    /* .swiper-button-next,
    .swiper-button-prev {
        display: none;
    } */
    
    .post-card {
        width: 150px;
        height: 270px;
    }
    
    
    /* .swiper-slide {
        padding: 0 6px;
    } */
}


/* .home-banner-large {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color, #18188B), #4a90e2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(24, 24, 139, 0.2);
}

.home-banner-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.home-banner-square {
    flex: 1;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-color, #18188B), #4a90e2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(24, 24, 139, 0.2);
} */

@media (max-width: 900px) {
    
    /* .home-banner-large { width: 98vw; min-width: 0; }
    .home-banner-row { flex-wrap: wrap; gap: 12px; }
    .home-banner-square { width: 30vw; min-width: 90px; height: 30vw; max-width: 150px; max-height: 150px; } */
}

.posts-grid-block {
    margin: 24px 0;
    padding: 0 16px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 200px);
    gap: 16px;
    justify-content: center;
}

.post-grid-item {
    width: 200px;
    max-width: 200px;
}

.post-grid-item .post-card {
    width: 200px;
    height: auto;
    min-height: 300px;
}

@media (max-width: 1200px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fill, 180px);
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fill, 160px);
        gap: 16px;
    }
    
    .posts-grid-block {
        padding: 0 12px;
    }
}

@media (max-width: 600px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fill, 140px);
        gap: 16px;
    }
    
    .posts-grid-block {
        padding: 0 8px;
    }
    
    .post-grid-item .post-card {
        min-height: 260px;
    }
}

@media (max-width: 480px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fill, 120px);
        gap: 16px;
    }
    
    .post-grid-item .post-card {
        min-height: 240px;
    }
    
    .post-grid-item .post-card .card-img-top {
        aspect-ratio: 4/3;
    }
    
    .post-grid-item .post-card .card-body {
        padding: 16px 8px 8px 8px;
    }
    
    .post-grid-item .post-card .card-title {
        font-size: 0.75rem;
        line-height: 1.2;
        height: 2.4em;
        margin-bottom: 6px;
    }
    
    .post-grid-item .post-card .card-text {
        font-size: 0.7rem;
        margin-bottom: 2px;
    }
    
    .post-grid-item .post-card .card-footer {
        padding: 6px 8px 8px 8px;
        font-size: 0.7rem;
    }
} 

.post-card, .post-grid-item .post-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover, .post-grid-item .post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.post-card .card-title, .post-grid-item .post-card .card-title {
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
} 

.matrix-grid {
    display: grid;
    grid-template-columns: repeat(5, 200px);
    grid-template-rows: repeat(2, auto);
    gap: 16px;
    margin: 24px 0;
    padding: 0 16px;
    justify-content: center;
}

.matrix-grid .post-grid-item {
    width: 200px;
    max-width: 200px;
}

.matrix-grid .post-card {
    width: 200px;
    height: auto;
    min-height: 300px;
}

.matrix-grid-other {
    display: grid;
    grid-template-columns: repeat(5, 200px);
    grid-template-rows: repeat(2, auto);
    gap: 16px;
    margin: 24px 0;
    padding: 0 16px;
    justify-content: center;
}

.matrix-grid-other .post-grid-item {
    width: 200px;
    max-width: 200px;
}

.matrix-grid-other .post-card {
    width: 200px;
    height: auto;
    min-height: 300px;
}

@media (max-width: 1200px) {
    .matrix-grid {
        grid-template-columns: repeat(4, 200px);
        grid-template-rows: repeat(3, auto);
        gap: 16px;
    }
    
    .matrix-grid-other {
        grid-template-columns: repeat(4, 200px);
        grid-template-rows: repeat(3, auto);
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .matrix-grid {
        grid-template-columns: repeat(3, 200px);
        grid-template-rows: repeat(4, auto);
        gap: 16px;
        padding: 0 12px;
    }
    
    .matrix-grid-other {
        grid-template-columns: repeat(3, 200px);
        grid-template-rows: repeat(4, auto);
        gap: 16px;
        padding: 0 12px;
    }
}

@media (max-width: 600px) {
    .matrix-grid {
        grid-template-columns: repeat(2, 200px);
        grid-template-rows: repeat(5, auto);
        gap: 16px;
        padding: 0 8px;
    }
    
    .matrix-grid .post-card {
        min-height: 260px;
    }
    
    .matrix-grid-other {
        grid-template-columns: repeat(2, 200px);
        grid-template-rows: repeat(5, auto);
        gap: 16px;
        padding: 0 8px;
    }
    
    .matrix-grid-other .post-card {
        min-height: 260px;
    }
}

@media (max-width: 480px) {
    .matrix-grid {
        grid-template-columns: repeat(1, 200px);
        grid-template-rows: repeat(10, auto);
        gap: 16px;
    }
    
    .matrix-grid .post-card {
        min-height: 240px;
    }
    
    .matrix-grid-other {
        grid-template-columns: repeat(1, 200px);
        grid-template-rows: repeat(10, auto);
        gap: 16px;
    }
    
    .matrix-grid-other .post-card {
        min-height: 240px;
    }
} 