/* Styles for Display Location 1 - Desktop */
.external-embedded-post.location-display-location-1 {
    position: relative;
    width: auto;
    height: 466px;
    overflow: hidden;
}


.display-location-1-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
}

.display-location-1-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Overlay with 40% opacity */
    z-index: 1;
}

.text-overlay {
    position: absolute;
    bottom: 30px;
    left: 30px;
    color: #fff; /* White text */
    z-index: 2;
    width: calc(100% - 60px); /* Maintain padding on left and right */
}

.text-overlay h2 {
    color: #FFF;
    font-family: "Open Sans";
    font-size: 25px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    margin-bottom: 20px; /* Space between the title and description */
}

.text-overlay h2 a {
    color: #fff; /* White color for the title link */
    text-decoration: none; /* Remove underline */
}

.text-overlay h2 a:hover {
    color: #fff; /* Keep the title white on hover */
}

.text-overlay p {
    color: #FFF;
    font-family: "Open Sans";
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin-bottom: 15px; /* Space between the description and the read more button */
}

.read-more-button {
    width: 229px;
    height: 42px;
    display: inline-block;
    background: rgba(217, 217, 217, 0.00); /* Transparent background */
    border: 2px solid #FFF; /* White border */
    color: #FFF; /* White text */
    text-decoration: none;
    border-radius: 5px;
    font-family: "Open Sans"; /* Font family */
    font-size: 20px; /* Font size */
    font-style: normal; /* Normal font style */
    font-weight: 600; /* Font weight */
    line-height: normal; /* Line height */
    text-align: center; /* Center text */
    display: flex;
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    transition: background-color 0.3s, color 0.3s;
}

.read-more-button:hover {
    background-color: #fff;
    color: #000; /* Change text color on hover */
}

/* Mobile Styles for Display Location 1 */
@media (max-width: 1024px) {
    .external-embedded-post.location-display-location-1 {
        width: 100%;
        min-height: 300px;
    }

    .display-location-1-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .overlay {
        background-color: rgba(0, 0, 0, 0.5); /* Increase overlay opacity for better contrast */
    }

    .text-overlay {
        bottom: 20px;
        left: 20px;
        width: calc(100% - 40px); /* Adjusted padding for mobile */
    }

    .text-overlay h2 {
        max-width: 100%;
        font-size: 20px;
        line-height: 1.2;
    }

    .text-overlay p {
        font-size: 14px;
        line-height: 1.4;
    }

    .read-more-button {
        width: 180px;
        font-size: 18px;
        margin-top: 10px;
    }
}
    
/* Styles for Display Location 2 (TRENDING NOW) */
.external-embedded-post.location-display-location-2 {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
}

.position-2-thumbnail {
    flex-shrink: 0;
}

.position-2-thumbnail img {
    width: 65px !important;
    height: 65px !important;
    object-fit: cover;
    margin-bottom: 0; /* Remove extra margin */
    padding-left: 5px;
}

.text-container {
    display: flex;
    flex-direction: column;
    max-width: calc(100% - 65px);
}

.external-embedded-post.location-display-location-2 h3 {
    color: #0976B9;
    font-family: "Open Sans";
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-decoration: underline;
    margin: 0 0 10px 0; /* Margin between title and author details */
    max-width: 309px;

}

.external-embedded-post.location-display-location-2 h3 a {
    color: #0976B9;
    text-decoration: underline;
}

.author-details {
    color: #9B9797;
    font-family: "Open Sans";
    font-size: 8px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin: 0;
}

.author-link {
    color: #9B9797;
    text-decoration: underline;
}

.author-link:hover {
    text-decoration: none; /* Optional: remove underline on hover */
}
    /* Mobile Styles for Display Location 2 (TRENDING NOW)*/
@media (max-width: 1024px) {
    .external-embedded-post.location-display-location-2 {
        display: block;
        margin-bottom: 10px;
        
        gap: 5px; /* Adjust gap between items */
    }

    .position-2-thumbnail {
        display: none; /* Hide thumbnail on mobile */
    }

    .external-embedded-post.location-display-location-2 h3 {
        font-size: 13px; /* Slightly smaller font size for mobile */
        max-width: 100%; /* Full width */
        line-height: normal;
        margin-bottom: 3px;
        margin-left: 10px;
    }

    .author-details {
        color: #9B9797;
        font-family: "Open Sans";
        font-size: 10px;
        font-style: normal;
        font-weight: 200; /* Ensures thinner appearance */
        line-height: normal;
        padding-left: 10px;
    }

    .author-link {
        color: #9B9797;
        text-decoration: underline;
        font-weight: 200; /* Ensures author link text is thinner */
        font-size: 10px;
    }
}

/* ================================= */
/* Grouped Styles for All Display Locations DESKTOP */
.external-embedded-post.location-display-location-3,
.external-embedded-post.location-display-location-4,
.external-embedded-post.location-display-location-5,
.external-embedded-post.location-display-location-6 {
    width: auto;
    height: 466px;
    margin-bottom: 20px
}

.external-embedded-post.location-display-location-3 h2,
.external-embedded-post.location-display-location-4 h2,
.external-embedded-post.location-display-location-5 h2,
.external-embedded-post.location-display-location-6 h2 {
    color: #000;
    font-family: "Open Sans";
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    text-decoration: underline;
    max-width: 369px;
    margin: 0 0 20px 0;
    height: 60px;
}

.external-embedded-post.location-display-location-3 h2 a,
.external-embedded-post.location-display-location-4 h2 a,
.external-embedded-post.location-display-location-5 h2 a,
.external-embedded-post.location-display-location-6 h2 a {
    display: block;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    color: #000;
    text-decoration: underline;
    display: block;
    margin-top: 20px;
}

.external-embedded-post.location-display-location-3 h2 a:hover,
.external-embedded-post.location-display-location-4 h2 a:hover,
.external-embedded-post.location-display-location-5 h2 a:hover,
.external-embedded-post.location-display-location-6 h2 a:hover {
    text-decoration: none;
}

.position-3-thumbnail img,
.position-4-thumbnail img,
.position-5-thumbnail img,
.position-6-thumbnail img {
    width: 100%;
    height: 173px;
    aspect-ratio: 16/9;
    object-fit: cover;
    object-position: center;
    display: block;
    margin:auto;
}

.description-container {
    display:block;
    max-width: 420px;
    height: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    margin-bottom: 20px;
}

.description {
    color: #000;
    font-family: "Open Sans";
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
}

.author-details {
    color: #959191;
    font-family: "Open Sans";
    font-size: 13px;
    font-weight: 600;
    margin: 5px 0 0;
}

.author-link {
    color: #959191;
    text-decoration: underline;
    font-family: "Open Sans";
    font-weight: 600;
}

.author-link:hover {
    text-decoration: none;
}


/* ================================= */
/* Small Screens 767px and below */

@media (max-width: 767px) {
    .external-embedded-post.location-display-location-3,
    .external-embedded-post.location-display-location-4,
    .external-embedded-post.location-display-location-5,
    .external-embedded-post.location-display-location-6 {
        width: 300px;
        margin-bottom: 15px;
        align: center;
        height: 370px;
    }

    .position-3-thumbnail img,
    .position-4-thumbnail img,
    .position-5-thumbnail img,
    .position-6-thumbnail img {
        width: auto;
        max-width: 300px;
        margin-bottom: 10px;
        object-fit: cover;
        object-position: center;
    }

    .external-embedded-post.location-display-location-3 h2,
    .external-embedded-post.location-display-location-4 h2,
    .external-embedded-post.location-display-location-5 h2,
    .external-embedded-post.location-display-location-6 h2 {
        max-width: 300px;
        font-size: 16px;
        line-height: 1.3;
        margin-bottom: 10px;
        margin-top: 20px;
    }

    .description-container {
        max-width: 300px !important;
        -webkit-line-clamp: 3;
        margin-bottom: 10px;
    }

    .description {
        font-size: 14px;
    }

    .author-details {
        font-size: 11px;
    }
    .mobile-read-more-button {
        display: block;
        width: 100%;
        max-width: 200px;
        margin: 10px auto;
        text-align: center;
        color: #0976B9;
        padding: 10px 0;
        border-radius: 5px;
        font-size: 14px;
        font-weight: 600;
        transition: background-color 0.3s, color 0.3s;
    }

    .mobile-read-more-button:hover {
        background-color: #000;
        color: #fff;
    }
}

/* ================================= */
/* iPad Mini Breakpoint (768px - 899px) */
@media (min-width: 768px) and (max-width: 899px) {
    .external-embedded-post.location-display-location-3,
    .external-embedded-post.location-display-location-4,
    .external-embedded-post.location-display-location-5,
    .external-embedded-post.location-display-location-6 {
        max-width: 320px;
        width: 100%; /* Ensure it doesn't exceed 320px */
        flex-wrap: wrap;
    }
    .external-embedded-post.location-display-location-3 h2,
    .external-embedded-post.location-display-location-4 h2,
    .external-embedded-post.location-display-location-5 h2,
    .external-embedded-post.location-display-location-6 h2 {
        display: block;
        max-width: 320px;
        width: 100%;
        font-size: 16px;
        line-height: 1.3;
        margin-bottom: 20px;
        margin-top: 20px;
    }

    .description-container {
        max-width: 320px !important;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        line-height: 1.5em; /* Adjust based on your font size */
        max-height: 4.5em; /* 3 lines * 1.5em line-height */
        white-space: normal;
        word-break: break-word;
    }
    
    

    .description {
        font-size: 14px;
        line-height: 1.4;
        max-width: 320px;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
    }
}

/* ================================= */
/* Grouped Styles for All Display Locations on Medium Screens 900px to 1200px */
@media (min-width: 900px) and (max-width: 1200px) {
    .external-embedded-post.location-display-location-3,
    .external-embedded-post.location-display-location-4,
    .external-embedded-post.location-display-location-5,
    .external-embedded-post.location-display-location-6 {
        max-width: 320px;
        width: 100%; /* Ensure it doesn't exceed 320px */
        flex-wrap: wrap;
    }
    .external-embedded-post.location-display-location-3 h2,
    .external-embedded-post.location-display-location-4 h2,
    .external-embedded-post.location-display-location-5 h2,
    .external-embedded-post.location-display-location-6 h2 {
        display: block;
        max-width: 320px;
        width: 100%;
        font-size: 16px;
        line-height: 1.3;
        margin-bottom: 20px;
        margin-top: 20px;
    }

    .description-container {
        max-width: 320px !important;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        line-height: 1.5em; /* Adjust based on your font size */
        max-height: 4.5em; /* 3 lines * 1.5em line-height */
        white-space: normal;
        word-break: break-word;
    }
    
    

    .description {
        font-size: 14px;
        line-height: 1.4;
        max-width: 320px;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
    }
}
/* ================================= */
/* Other Styles */
@media (min-width: 1200px) {
    .description {
        font-size: 15px;
    }

    .author-details {
        font-size: 13px;
    }
}
/* Grouped Mobile Read More Button Styles */
.mobile-read-more-button {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 10px auto;
    text-align: center;
    color: #0976B9;
    padding: 10px 0;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s;
}

.mobile-read-more-button:hover {
    background-color: #000;
    color: #fff;
}
/* Grouped Hover Styles for Buttons */
.download-ebook-button:hover,
.read-article-button:hover {
    background-color: #000;
    color: #fff;
}

/* Button styles for "Download E-book" */
.download-ebook-button {
    display: block;
    width: 200px;
    margin: 20px auto 0;
    text-align: center;
    background-color: #FFC107;
    color: #000;
    font-family: "Open Sans";
    font-size: 16px;
    font-weight: 600;
    padding: 10px 0;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

/* Hover styles for "Download E-book" button */
.download-ebook-button:hover {
    background-color: #000;
    color: #fff;
}

/* Hide "Read Article" link on desktop for all display locations */
.mobile-read-more-button {
    display: none;
}


    

/* Mobile Styles for Read More Button (Display Location 6) */
@media (max-width: 768px) {
    .location-display-location-6 .mobile-read-more-button {
        display: none;
        width: 100%;
        max-width: 200px;
        margin: 10px auto;
        text-align: center;
        color: #0976B9;
        padding: 10px 0;
        border-radius: 5px;
        font-size: 14px;
        font-weight: 600;
        transition: background-color 0.3s, color 0.3s;
    }

    .mobile-read-more-button:hover {
        background-color: #000;
        color: #fff;
    }
}
