/**
 * Posts Grid Widget Styles
 */
.posts-grid-widget {
    width: 100%;
}

.posts-grid-list {
    display: grid;
}

.posts-grid-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.posts-grid-card .post-grid-image {
    display: block;
    overflow: hidden;
    position: relative;
}

.posts-grid-card .post-grid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.posts-grid-card:hover .post-grid-image img {
    transform: scale(1.05);
}

.posts-grid-card .post-grid-image .no-image {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
}

.posts-grid-card .post-grid-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.posts-grid-card .post-grid-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.posts-grid-card .post-grid-title a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.posts-grid-card .post-grid-excerpt {
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.6;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.posts-grid-card .post-grid-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.posts-grid-card .post-grid-date {
    font-size: 14px;
}

.posts-grid-card .post-grid-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.posts-grid-card .post-grid-arrow svg {
    transition: fill 0.3s ease;
    stroke: currentColor;
}

.posts-grid-card:hover .post-grid-arrow {
    transform: translateX(4px);
}

/* Swiper Layout */
.posts-grid-swiper {
    overflow: hidden;
    position: relative;
    padding: 0 50px;
}
.posts-grid-swiper .swiper-slide {
    height: auto;
}
.posts-grid-swiper .swiper-slide > .pgrid__card,
.posts-grid-swiper .swiper-slide > .posts-grid-card {
    height: 100%;
}
.posts-grid-swiper .pgrid-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px !important;
    height: 40px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f5f5f5;
    cursor: pointer;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
    margin-top: 0;
    overflow: hidden;
}
.posts-grid-swiper .pgrid-nav::after {
    display: none !important;
    content: '' !important;
}
.posts-grid-swiper .pgrid-nav.swiper-button-lock {
    display: flex !important;
}
.posts-grid-swiper .pgrid-nav:hover {
    background-color: #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.posts-grid-swiper .pgrid-nav svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px;
    max-height: 16px;
    stroke: #999;
    fill: none;
    flex-shrink: 0;
}
.posts-grid-swiper .pgrid-nav--prev {
    left: 0;
}
.posts-grid-swiper .pgrid-nav--next {
    right: 0;
}
.posts-grid-swiper .pgrid-nav.swiper-button-disabled {
    opacity: 0.3;
    cursor: default;
}
@media (max-width: 768px) {
    .posts-grid-swiper {
        padding: 0 40px;
    }
}
@media (max-width: 480px) {
    .posts-grid-swiper {
        padding: 0 35px;
    }
    .posts-grid-swiper .pgrid-nav {
        width: 30px;
        height: 30px;
    }
    .posts-grid-swiper .pgrid-nav svg {
        width: 12px;
        height: 12px;
    }
}
