.advanced-posts-widget {
    display: grid;
    /* grid-template-columns: repeat(3, 1fr);
    gap: 30px; */
}

/* Layout specific styles */
.advanced-posts-layout-one {
    /* Layout 1 specific styles - current design */
    position: relative;
}

/* Layout 4 - Categories pill at top-left over image */
.advanced-posts-layout-four .advanced-posts-item {
    position: relative;
}

.advanced-posts-layout-four .advanced-posts-categories {
    position: absolute;
    top: 16px;
    left: 16px;
    padding-top: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.advanced-posts-layout-four .advanced-posts-category {
    padding: 10px 12px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(108.46deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.08) 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    backdrop-filter: blur(20px);
}

/* Layout 2 Styles - Clean Card Design */
.advanced-posts-layout-two {
    position: relative;
}

.advanced-posts-layout-two .advanced-posts-swiper {
    padding-bottom: 0;
}

.advanced-posts-layout-two .layout-two-item {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
    overflow: visible;
    transition: none;
    height: auto;
}

.advanced-posts-layout-two .layout-two-item:hover {
    transform: none;
}

/* Layout 2 Thumbnail */
.advanced-posts-layout-two .layout-two-thumbnail {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    border-radius: 0;
    margin-bottom: 16px;
}

.advanced-posts-layout-two .layout-two-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: middle;
    border-radius: 0;
}

/* Layout 2 Content */
.advanced-posts-layout-two .layout-two-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Layout 2 Date */
.advanced-posts-layout-two .layout-two-date {
    font-size: 14px;
    color: #000000;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
}

/* Layout 2 Title */
.advanced-posts-layout-two .layout-two-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #333333;
}

.advanced-posts-layout-two .layout-two-title a {
    color: inherit;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.advanced-posts-layout-two .layout-two-title a:hover {
    color: #143AA2;
}

/* Layout 2 Navigation */
.advanced-posts-layout-two {
    position: relative;
}

.advanced-posts-layout-two .swiper-button-next,
.advanced-posts-layout-two .swiper-button-prev {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin: 0;
    z-index: 10;
}

.advanced-posts-layout-two .swiper-button-next {
    background: #143AA2;
    right: 0;
}

.advanced-posts-layout-two .swiper-button-prev {
    background: #f5f5f5;
    right: 48px;
}

.advanced-posts-layout-two .swiper-button-prev:hover {
    background: #e0e0e0;
}

/* Layout 3 Styles */
.advanced-posts-layout-three {
    position: relative;
}

.layout-three-container {
    display: flex;
    gap: 56px;
    align-items: flex-start;
}

.layout-three-featured {
    width: 45%;
}

.layout-three-small-posts {
    width: 55%;
    display: flex;
    flex-direction: column;
    gap: 32px;
    height: 100%;
}

/* Featured Post Styles */
.layout-three-featured-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.layout-three-featured-thumbnail {
    position: relative;
    height: 400px;
    overflow: hidden;
}
.layout-three-featured-thumbnail img{
    height: 100%;
}

.layout-three-featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.layout-three-featured-item:hover .layout-three-featured-image {
    transform: scale(1.05);
}

.layout-three-featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 32.4%, #000000 100%);
    padding: 25px 30px;
    color: white;
}

.layout-three-featured-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

.layout-three-featured-title a {
    color: white;
    font-size: 20px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.layout-three-featured-title a:hover {
    color: var(--home-experts-pro-primary-color);
}

/* Small Posts Styles */
.layout-three-small-item {
    display: flex;
    gap: 32px;
    background: #fff;
    flex: 1;
}


.layout-three-small-thumbnail {
    flex: 0 0 264px;
    max-height: 184px;
    border-radius: 16px;
    overflow: hidden;
}

.layout-three-small-image {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}

.layout-three-small-content {
    flex: 1;
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}

.layout-three-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.layout-three-small-date {
    font-size: 12px;
    color: #666;
    font-weight: 400;
    margin: 0;
}

.layout-three-author {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.layout-three-small-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
}

.layout-three-small-title a {
    color: #333;
    font-size: 20px;
    text-decoration: none;
    line-height: 1.6;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layout-three-small-title a:hover {
    color: var(--home-experts-pro-primary-color);
}

.layout-three-small-item .advanced-posts-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
}
@media (max-width: 1024px) {
    .layout-three-container{
        gap: 32px;
    }
    .layout-three-small-thumbnail {
        flex: 0 0 200px; 
    }
}
@media (max-width: 768px) { 
    .layout-three-featured, .layout-three-small-posts{
        width: 100%;
    }
    .advanced-posts-layout-three{
        display: block;
    }
    /* Layout 3 Responsive */
    .layout-three-container {
        flex-direction: column;
        gap: 20px;
    }

    .layout-three-small-posts {
        flex: none;
        width: 100%;
        gap: 24px;
    }

    .layout-three-featured-thumbnail {
        height: 300px;
    }

    .layout-three-featured-content {
        padding: 30px 20px 20px;
    }

    .layout-three-featured-title {
        font-size: 20px;
    }
}

.advanced-posts-layout-two .swiper-button-next:hover {
    background: #0f2d7a;
}

.advanced-posts-layout-two .swiper-button-prev::after,
.advanced-posts-layout-two .swiper-button-next::after {
    font-family: 'swiper-icons';
    font-size: 16px;
    font-weight: 900;
    color: #666666;
}

.advanced-posts-layout-two .swiper-button-next::after {
    color: #ffffff;
}

/* Disabled state for navigation */
.advanced-posts-layout-two .swiper-button-prev.swiper-button-disabled,
.advanced-posts-layout-two .swiper-button-next.swiper-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.advanced-posts-layout-two .swiper-button-prev.swiper-button-disabled:hover,
.advanced-posts-layout-two .swiper-button-next.swiper-button-disabled:hover {
    background: #f5f5f5;
}

.advanced-posts-layout-two .swiper-button-next.swiper-button-disabled:hover {
    background: #143AA2;
}

/* Responsive Design for Layout 2 */
@media (max-width: 1023px) {
    .advanced-posts-layout-two .layout-two-thumbnail {
        height: 200px;
    }

    .advanced-posts-layout-two .layout-two-title {
        font-size: 16px;
    }

    .advanced-posts-layout-two .layout-two-date {
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .advanced-posts-layout-two .layout-two-thumbnail {
        height: 180px;
    }

    .advanced-posts-layout-two .layout-two-title {
        font-size: 15px;
    }

    .advanced-posts-layout-two .layout-two-date {
        font-size: 12px;
    }

    .advanced-posts-layout-two .swiper-button-prev,
    .advanced-posts-layout-two .swiper-button-next {
        width: 36px;
        height: 36px;
        top: -10px;
    }

    .advanced-posts-layout-two .swiper-button-prev {
        right: 44px;
    }

    .advanced-posts-layout-two .swiper-button-prev::after,
    .advanced-posts-layout-two .swiper-button-next::after {
        font-size: 14px;
    }

}

@media (max-width: 575px) {
    .advanced-posts-layout-two .layout-two-thumbnail {
        height: 160px;
    }

    .advanced-posts-layout-two .layout-two-title {
        font-size: 14px;
    }

    .advanced-posts-layout-two .layout-two-date {
        font-size: 11px;
    }

}

.advanced-posts-swiper {
    width: 100%;
    height: auto;
    padding-bottom: 24px;
}

.advanced-posts-swiper .swiper-slide {
    height: auto;
}


/* Post Item */
.advanced-posts-item {
    background: #ffffff;
    /* border-radius: 8px; */
    overflow: hidden;
    /* box-shadow: 0 2px 4px rgba(0,0,0,0.1); */
    transition: transform 0.3s ease;
}

/* Thumbnail */
.advanced-posts-thumbnail {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
}

.advanced-posts-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: middle;
}

/* Date */
.advanced-posts-layout-one .advanced-posts-date {
    background-color: #000000;
    padding: 16px;
    display: inline-block;
    position: absolute;
    top: 28px;
    font-size: 14px;
    font-weight: 700;
    right: 0;
    rotate: -90deg;
    transform: translateY(55%);
    color: #ffffff;
}

/* Categories */
.advanced-posts-categories {
    padding-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.advanced-posts-layout-one .advanced-posts-category {
    display: inline-block;
    padding-bottom: 4px;
    border-bottom: 1px solid #143AA2;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

/* .advanced-posts-category:hover {
    color: #FFBF1C !important;
    border-color: #FFBF1C;

} */


/* Content */
.advanced-posts-content {
    display: flex;
    padding-top: 16px;
    flex-direction: column;
}

.advanced-posts-title {
    margin: 0 0 15px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
}

.advanced-posts-title a {
    color: inherit;
    text-decoration: none;
}

.advanced-posts-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.advanced-posts-button-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.advanced-posts-button {
    display: flex;
    text-align: center;
    width: fit-content;
}

/* Archive Link */
.advanced-posts-archive-link-wrapper {
    display: flex;
    margin-top: 30px;
    justify-content: center;
}

.advanced-posts-archive-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: transparent;
    color: #143AA2;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border: 1px solid #143AA2;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.advanced-posts-archive-link:hover {
    background-color: #143AA2;
    color: #ffffff;
}

/* Large Desktop (1440px and up) */
@media (min-width: 1440px) {
    .advanced-posts-thumbnail {
        height: 520px;
    }

    .advanced-posts-title {
        font-size: 22px;
    }
}

/* Desktop (1200px to 1439px) */
@media (max-width: 1439px) {
    .advanced-posts-thumbnail {
        height: 480px;
    }
}

/* Small Desktop/Tablet Landscape (1024px to 1199px) */
@media (max-width: 1199px) {
    .advanced-posts-thumbnail {
        height: 420px;
    }


    .advanced-posts-title {
        font-size: 18px;
        margin: 0 0 12px;
    }
}

/* Tablet Portrait (768px to 1023px) */
@media (max-width: 1023px) {
    .advanced-posts-thumbnail {
        height: 380px;
    }

    .advanced-posts-archive-link {
        padding: 8px 16px;
        font-size: 15px;
    }
}

/* Mobile Landscape (576px to 767px) */
@media (max-width: 767px) {
    .advanced-posts-thumbnail {
        height: 340px;
    }

    .advanced-posts-swiper {
        padding-bottom: 60px;
    }

    .advanced-posts-content {
        padding-top: 12px;
    }

    .advanced-posts-title {
        font-size: 16px;
        margin: 0 0 10px;
    }

    .advanced-posts-excerpt {
        font-size: 13px;
        line-height: 1.5;
    }

    .advanced-posts-categories {
        padding-top: 16px;
    }

    .advanced-posts-archive-link-wrapper {
        margin-top: 20px;
    }

    .advanced-posts-archive-link {
        padding: 6px 12px;
        font-size: 14px;
    }
}

/* Mobile Portrait (575px and down) */
@media (max-width: 575px) {
    .advanced-posts-thumbnail {
        height: 300px;
    }

    /* .advanced-posts-date {
        top: 12px;
        right: 12px;
        padding: 5px 8px;
        font-size: 11px;
    } */

    .advanced-posts-title {
        font-size: 15px;
        margin: 0 0 8px;
    }

    .advanced-posts-excerpt {
        font-size: 12px;
    }

    .advanced-posts-archive-link {
        padding: 5px 10px;
        font-size: 13px;
    }
    .layout-three-small-posts .layout-three-small-item{
        gap: 24px;
        flex-direction: column;
    }
}