/**
 * Posts Slider Widget Styles
 * 
 * Provides styling for the posts slider widget including slider,
 * draggable navigation, and arrow controls.
 */

/* Main Widget Container */
.posts-slider-widget {
    position: relative;
    width: 100%;
}

/* Slider Container */
.posts-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.posts-slider {
    width: 100%;
}

/* Individual Slide */
.posts-slide {
    height: auto;
}

.posts-slide-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 40px;
    overflow: hidden;
}

/* Make entire card clickable */
.posts-slide-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Slide Image */
.posts-slide-image {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Image retains fixed height without inner link */
.posts-slide-image { 
    height: 200px; 
}

.posts-slide-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Slide Body */
.posts-slide-body {
    padding: 24px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background:#ECECEC;
}
.grey-bg-section .posts-slide-body {
    background:#fff;
}

.posts-slide-content-main {
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.posts-slide-title {
    margin: 0 !important;
    font-size: 18px;
    font-weight: 500;
}

/* Ensure title color when not wrapped by an <a> */
.posts-slide-title { color: #000; }

.posts-slide-mehr-btn-container {
    margin-top:auto;
}
.posts-slide-mehr-btn-container .posts-slide-mehr-btn {
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 32px;
    background: transparent;
    border-radius: 50px;
    transition: background 0.3s ease;
}

.posts-slide-mehr-btn-container .posts-slide-mehr-btn:hover,
.posts-slide-link:hover .posts-slide-mehr-btn {
    background: #C8FF00;
}

/* Remove legacy anchor-specific title styles (title no longer linked) */

.posts-slide-excerpt {
    margin: 0;
    font-size: 16px;
    line-height: 130%;
}

.posts-slide-date {
    font-size: 16px;
    color: #10AB49;
    margin-top:0;
}

/* Draggable Navigation Bar */
.posts-slider-draggable-nav {
    margin: 20px 0 25px;
    padding: 0;
}

.draggable-nav-track {
    position: relative;
    width: 100%;
    height: 16px;
    background: #ECECEC;
    border-radius: 48px;
    cursor: pointer;
}

.draggable-nav-handle {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #10AB49;
    border-radius: 48px;
    cursor: grab;
    transition: background 0.3s ease;
}

.draggable-nav-handle:active {
    cursor: grabbing;
}

/* Bottom Navigation Section */
.posts-slider-bottom-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding: 0;
}

/* Button Container */
.posts-slider-button-container {
    flex: 1;
}

a.posts-slider-button {
    display: inline-block;
    padding: 032px 64px 32px 64px;
    background: #11AB49;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 400;
    transition: background 0.3s ease, transform 0.2s ease;
    color: #FFF;
    font-size: var( --e-global-typography-1396f13-font-size );
    line-height: var( --e-global-typography-1396f13-line-height );
    letter-spacing: var( --e-global-typography-1396f13-letter-spacing );
    word-spacing: var( --e-global-typography-1396f13-word-spacing );
}

.posts-slider-button:hover {
    background: #C8FF00;
    color:#000;
}

/* Arrow Navigation */
.posts-slider-arrow-nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

button.posts-slider-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 0;
    cursor:pointer !important;
}
button.posts-slider-arrow:hover,
button.posts-slider-arrow:active,
button.posts-slider-arrow:focus {
    background:transparent;
}

.posts-slider-arrow img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    cursor:pointer !important;
}
@media (max-width:768px) {
    .posts-slider-arrow img {
        width: 50px;
        height: 50px;
    }
    button.posts-slider-arrow {
        width: 50px;
        height: 50px;
    }
    a.posts-slider-button {
        padding: 18px 32px;
    }
}

/* Arrow States */
.posts-slider-arrow .prev-inactive,
.posts-slider-arrow .next-inactive {
    display: none;
}

.posts-slider-arrow.disabled .prev-active,
.posts-slider-arrow.disabled .next-active {
    display: none;
}

.posts-slider-arrow.disabled .prev-inactive,
.posts-slider-arrow.disabled .next-inactive {
    display: block;
}

.posts-slider-arrow.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.posts-slider-arrow.disabled:hover {
    transform: none;
}

/* Swiper Custom Styles */
.posts-slider .swiper-slide {
    height: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {

}

@media (max-width: 768px) {

}

/* Accessibility Improvements */
.posts-slider-arrow:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.posts-slider-button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.draggable-nav-track:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Loading State */
.posts-slider-widget.loading {
    opacity: 0.7;
    pointer-events: none;
}

.posts-slider-widget.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Podcast Category Styling */
.posts-slide-link.podcast-category .posts-slide-content {
    border: 2px solid #10AB49 !important;
}

/* No Posts State */
.posts-slider-no-posts {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
} 
.swiper-slide.posts-slide .posts-slide-content {
    border: 2px solid transparent;
    transition: border 0.3s ease;
}
.grey-bg-section .swiper-slide.posts-slide .posts-slide-content {
    border: 2px solid #ECECEC;
}
.grey-bg-section .draggable-nav-track {
    background:#fff;
}
.swiper-slide.posts-slide:hover .posts-slide-content{
    border: 2px solid transparent;
    transition: border 0.3s ease;
}