/* Featured Posts Slider Styles */
.featured-posts-slider-wrapper {
    position: relative;
    max-width: 886px;
    margin: 0 auto;
    padding: 0;
}

.featured-posts-slider {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    /* Let content determine height */
    min-height: 425px;
}

/* All slides positioned absolute except active */
.featured-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    /*transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;*/
    z-index: 1;
    background: #ffffff;
}

/* Active slide is relative for natural height */
.featured-slide.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide-inner {
    display: flex;
    align-items: center;
    min-height: 425px;
    padding: 33px;
    box-sizing: border-box;
}

.slide-image {
    flex: 0 0 358px;
    width: 358px;
    height: 358px;
    overflow: hidden;
    border-radius: 10px;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.featured-slide:hover .slide-image img {
    transform: scale(1.05);
}

.slide-content {
    flex: 1;
    padding: 0 0 0 40px;
    min-width: 0; /* Prevent flex item from overflowing */
}

.featured-label {
    color: #0A8CBF;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
    height: 36px;
}

.category-name {
    font-weight: 700;
}

.slide-title {
    font-size: 40px;
    line-height: 1;
    font-weight: 400;
    color: #000;
    margin: 0 0 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    height: 130px;
    border-bottom: 2px solid #e0e0e0;
}

.slide-date {
    color: #0A8CBF;
    font-size: 16px;
    margin-bottom: 15px;
}

.slide-excerpt {
    color: #666;
    font-size: 16px;
    line-height: 1.2;
    margin-bottom: 15px;
    height: 40px;
}

/* Center button row */
.button-row {
    display: flex;
    margin-top: 30px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 30px;
}

.slide-linkstl, .slide-linkstl:hover {
    text-decoration: none;
    color: #000;
}

.read-more-btn,
.btn-link {
    display: inline-block;
    background: #b8d500;
    color: #1a1a1a;
    padding: 12px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.read-more-btn:hover,
.btn-link:hover {
    background: #a3c000;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(184, 213, 0, 0.3);
}

/* Navigation inside slides */
.slide-content .slider-navigation {
    display: flex;
    gap: 10px;
}

/* Add Material Symbols icon */
.slider-prev::before,
.slider-next::before {
    font-family: 'Material Symbols Outlined';
    font-size: 42px;
    line-height: 1;
    color: #7B7C81;
    line-height: 1;
    transition: color 0.3s ease;
    display: inline-block;
    font-weight: normal;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'liga';
}

.slider-prev::before {
    content: "\e5c4"; /* arrow_forward back */
}

.slider-next::before {
    content: "\e5c8";  /* arrow_forward icon */
}

.slider-prev:hover::before, .slider-next:hover::before {
    color: #000; /* arrow_forward back */
}

.slider-prev,
.slider-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    box-shadow: 10px 11px 20px #00000029;
}

.slider-prev:hover,
.slider-next:hover {
    background: transparent;
    color: #000;
    transform: scale(1.05);
}

.slider-prev:active,
.slider-next:active {
    transform: scale(0.95);
}

/* Dots Navigation */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d0d0d0;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.slider-dot:hover {
    opacity: 1;
    transform: scale(1.2);
}

.slider-dot.active {
    background: #0A8CBF;
    width: 30px;
    border-radius: 5px;
    opacity: 1;
}

/* Base styles - remove fixed heights */
.featured-posts-slider {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    /* Remove min-height */
}

.featured-slides-container {
    position: relative;
    /* Remove min-height */
}


/* Center everything below 1200px */
@media (max-width: 1200px) {
    /* Center the wrapper */
    .featured-posts-slider-wrapper {
        text-align: center;
    }

    /* Center slider content */
    .featured-posts-slider {
        margin: 0 auto;
    }

    /* Stack layout vertically and center */
    .slide-inner {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }

    /* Center image */
    .slide-image {
        flex: none;
        margin: 0 auto 25px auto;
        width: 100%;
        max-width: 358px;
        height: auto;
    }

    /* Make image responsive */
    .slide-image img {
        width: 100%;
        height: auto;
        max-height: 358px;
        object-fit: cover;
    }

    /* Center content */
    .slide-content {
        padding: 0;
        text-align: center;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }

    /* Center elements within content */
    .featured-label {
        text-align: center;
    }

    .slide-title {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .slide-date {
        text-align: center;
    }

    .slide-excerpt {
        text-align: center;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 30px;
    }

    /* Ensure dots stay centered */
    .slider-dots {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Tablet specific adjustments */
@media (max-width: 1024px) {
    .slide-inner {
        padding: 25px;
    }

    .slide-image {
        max-width: 300px;
        margin-bottom: 20px;
    }

    .slide-title {
        font-size: 30px;
    }
}

/* Mobile (keeping your requested mobile layout) */
@media (max-width: 768px) {

    /* Compact layout */
    .slide-inner {
        padding: 25px 20px;
    }

    /* Left align text on mobile for better readability */
    .slide-content {
        text-align: left;
    }

    .slide-title {
        font-size: 22px;
        text-align: left;
        margin-bottom: 12px;
        height: auto;
        border: none;
    }

    .slide-excerpt {
        font-size: 14px;
        text-align: left;
        margin-bottom: 20px;
        text-align: center;
    }

    /* Button row */
    .button-row {
        justify-content: flex-start;
        margin-top: 0;
    }

    .read-more-btn,
    .btn-link {
        padding: 10px 30px;
        font-size: 14px;
    }
}

/* Even smaller devices */
@media (max-width: 480px) {
    .slide-inner {
        padding: 20px 15px;
    }

    .slide-title {
        font-size: 20px;
    }

    .slide-excerpt {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .read-more-btn,
    .btn-link {
        padding: 8px 25px;
        font-size: 13px;
    }
}

/* Optional: If you want to keep height for desktop only */
@media (min-width: 1201px) {
    .featured-posts-slider {
        min-height: 425px;
    }

    .slide-inner {
        min-height: 425px;
    }
}