/* Make each story a flex container for text+image */

#news .story {
    border: none !important;
    box-shadow: none !important;
    transition: transform 0.2s ease-in-out !important;
    background-color: transparent !important; 
}

.story a {
    display: flex !important;
    align-items: center !important;
    /* row puts the image on the left, text on the right */
    flex-direction: row !important; 
    /* optional spacing between text and image */
    justify-content: space-between !important;
    text-decoration: none !important; /* remove link underline */
    border-radius: 8px !important;
    margin: 1rem 0 !important;
    padding: 1rem !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    background: rgba(255, 255, 255, 0.1) !important; /* Semi-transparent background */
    border-bottom: 0px !important;
    transition: box-shadow 0.2s ease !important;
    background-color: white !important; 
}

/* Ensure the text container (header) can expand */
.ssb .story__header {
    margin-left: 1rem !important; /* space between image and text */
    margin-right: 0 !important; /* remove previous margin */
    flex-grow: 1; /* Allow header to take available space */
}

.story__heading {
    margin-bottom: 10px !important;
    padding: 0 !important;
    overflow: hidden !important;
    flex-grow: 1 !important;
    min-height: 0;
    line-height: 160%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* The article heading */
.ssb .story__heading {
    margin: 0 0 0.5rem !important;
    font-weight: bold !important;
}

/* The date */
.ssb .story__post-date {
    position: static !important; /* Disable absolute positioning */
}

/* Image on the right side with fixed width and height */
.ssb .story__image {
    margin-bottom: 0 !important;
    width: 650px !important;  /* Set fixed width for square image */
    height: 300px !important; /* Set fixed height to match width for square image */
    border-radius: 4px !important;
    object-fit: cover !important; /* Ensure the image covers the square area */
    order: -1; /* Ensure image comes first in flex layout if not explicitly first child */
}

/* Footer can be styled separately */
.ssb .story__footer {
    text-align: right !important; /* or left/center as you prefer */
}

.ssb .story__source {
    text-decoration: none !important;
}

#news #ssb-stories > article > div > article > footer > a {
    display: none !important;
}

.ssb .story-widget__stories {
    display: block !important;
}

.story:hover {
    transform: translateY(-2px) !important;
}

.story:hover a {
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2) !important;
}

/* On smaller screens, adjust the layout */
@media (max-width: 992px) {
    .ssb .story a {
        flex-direction: row !important; /* Keep image on left, text on right */
        align-items: center !important;
        padding: 0.75rem !important; /* Adjust padding for mobile */
    }
    .ssb .story__header {
        margin-left: 0.5rem !important; /* Space between image and text */
        margin-right: 0 !important; /* remove previous margin */
    }
    .ssb .story__image {
        width: 100px !important; /* Set width for square image */
        height: 100px !important; /* Set height to match width for square image */
        border-radius: 8px !important; /* Rounded corners for images */
        margin: 0 !important; /* Remove margin */
    }
    #news #ssb-stories > article > div > article > a > header > h2, #news #ssb-stories > article > div > article > a > header > .h2 {
        font-size: 1rem !important;
    }
    .ssb .story__post-date {
        position: static !important; /* Disable absolute positioning */
    }
    .ssb .story__footer {
        margin-top: 0.5rem !important;
    }
}

.owl-dots {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    position: relative;
    height: 14px;
}

.owl-dots .owl-dot {
    width: 14px;
    height: 14px;
    margin: 0 22px 0 0;
    border-radius: 9999px;
    background: #E1E1E1 !important;
    border: none;
    padding: 0;
}

.owl-dots .owl-dot:last-child {
    margin-right: 0;
}

.owl-dots .owl-dot.active {
    background: #595F67 !important;
}