/**
 * Popular Posts Swiper Styles
 */

/* Container Styles */
.popular-posts-swiper-container {
    margin: 30px 0;
    overflow: hidden;
}

/* Header Styles */
.popular-posts-swiper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.popular-posts-title {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

/* Navigation Buttons */
.popular-posts-navigation {
    display: flex;
    gap: 10px;
}

.popular-swiper-button-prev,
.popular-swiper-button-next {
    position: static;
    width: 40px;
    height: 40px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.popular-swiper-button-prev:hover,
.popular-swiper-button-next:hover {
    background-color: #e0e0e0;
}

.popular-swiper-button-prev:after,
.popular-swiper-button-next:after {
    font-family: 'swiper-icons';
    font-size: 18px;
    color: #333;
}

.popular-swiper-button-prev:after {
    content: 'prev';
}

.popular-swiper-button-next:after {
    content: 'next';
}

/* Swiper Styles */
.popular-posts-swiper {
    overflow: visible;
    position: relative;
}
.popular-posts-swiper > .swiper-wrapper {
    position: relative;
}
/* Slide Styles */
.popular-post-slide {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.popular-post-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.popular-post-image-container {
    position: relative;
    width: 100%;
    /* 9:16 aspect ratio */
    padding-bottom: 177.78%; 
    overflow: hidden;
    border-radius: 8px;
}

.popular-post-image, .popular-post-embed, .popular-post-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-embed iframe, .popular-post-video video {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.popular-post-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 500;
    z-index: 2;
    border-radius: 0 0 8px 8px;
}

.popular-post-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popular-post-no-image:after {
    content: "No Image";
    color: #999;
}

.popular-post-title {
    margin: 10px 0 0;
    font-size: 1em;
    line-height: 1.4;
    font-weight: 500;
}

/* Hover Effects */
.popular-post-link:hover .popular-post-image, .popular-post-link:hover .popular-post-embed, .popular-post-link:hover .popular-post-video {
    transform: scale(1.05);
}

.popular-post-link:hover .popular-post-title {
    text-decoration: underline;
}

/* Youtube CTA in header */

.custom-swiper-container .youtube-channel-container {
	padding: 15px 30px;
	position: absolute;
	right: 15px;
	top: 15px;
	background: rgb(255,255,255,.2);
	border-radius: 24px;
	z-index: 1;

}

.custom-swiper-container .youtube-channel-container a {
	color: #fff;
}

.custom-swiper-container .youtube-channel-container .fa-youtube {
	color: red;
	margin-right: 10px;
}

/* Max width slide content */

.custom-swiper-container .slide-content> div {
	margin-left: auto;
	margin-right: auto;
}


/* Responsive Adjustments */
@media (max-width: 767px) {
    .popular-posts-swiper-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .popular-posts-title {
        width: 100%;
        text-align: center;
    }
    
    .popular-posts-navigation {
        width: 100%;
        justify-content: center;
    }
}
