/* News Section */

.news-carousel button {
    all: unset;
    cursor: pointer;
    opacity: 0.7;

    /* animations */
    transition: opacity 300ms ease-out;
}

.news-carousel button:hover {
    opacity: 1;

    /* animations */
    transition: opacity 300ms ease-out;
}

.news-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px 0px;
    background-color: var(--color-grey-background);
}

.news-carousel {
    /* display */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 250px;
    margin: 0 auto;
}

.news {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 60px;
    padding: 30px 260px;
    max-width: 1800px;
    width: 100%;
}

.news h2 {
    font-weight: 600;
    font-size: 34px;
    line-height: normal;
    letter-spacing: 0px;
    color: var(--color-green);
    margin: 0;
}

.news .description {
    position: relative;
    align-self: stretch;
    font-family: var(--paragraph-body-text-font-family);
    font-weight: var(--paragraph-body-text-font-weight);
    color: #000000;
    font-size: var(--paragraph-body-text-font-size);
    letter-spacing: var(--paragraph-body-text-letter-spacing);
    line-height: var(--paragraph-body-text-line-height);
    font-style: var(--paragraph-body-text-font-style);
}

.news .news-blocks-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 4vw;
}

.news .news-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 400px;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.4);

    /* animations */
    transition: all 300ms ease-out, transform 0.5s;
    min-width: 350px;
}

@media screen and (max-width: 900px) {
    .news {
        align-items: center;
    }

    .news .news-title {
        text-wrap: nowrap;

    }

    .news .news-block {
        width: 50vw;
    }

}

.news-block:hover {
    transform: scale(1.1);
}

.news-block .news-bg {
    min-height: 40%;
    width: 100%;
    background-repeat: no-repeat;
    background-position: top;
    background-size: cover;
    z-index: 1;
    margin-bottom: -10px;
    overflow: hidden;
}

.news-block::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    /* Grey overlay */
    transition: opacity 300ms ease-out;
    z-index: 2;
    /* Ensure it's above the image but below the text */
}

.news-block:hover::after {
    opacity: 0;
    /* Hide the overlay on hover */
}

.news-block .news-txt {
    display: flex;
    flex-direction: column-reverse;
    padding: 20px;
    margin: 10px;
    gap: 20px;
    border-radius: 20px;
    background-color: transparent;
}

.news-block .news-content-container {
    border-radius: 15px;
}

.news-content-container {
    z-index: 3;
    background-color: white;
    min-height: 70%;
    min-width: 30%;
}

.news-block .news-txt h2 {
    color: var(--color-green);
    font-size: 22px;
}

.news-block .news-txt p {
    position: relative;
    align-self: stretch;
    font-family: var(--paragraph-body-text-font-family);
    font-weight: var(--paragraph-body-text-font-weight);
    color: var(--color-grey);
    font-size: var(--paragraph-body-text-font-size);
    letter-spacing: var(--paragraph-body-text-letter-spacing);
    line-height: var(--paragraph-body-text-line-height);
    font-style: var(--paragraph-body-text-font-style);
}

.news-block .news-txt .read-now {
    position: relative;
    font-weight: bold;
    color: var(--color-grey);
    font-size: 16px;
    letter-spacing: 0.32px;
    line-height: 19.2px;
    text-decoration: underline;
}

.off-screen {
    opacity: 0;
    pointer-events: none;
    transition: all 300ms ease-out;
}

.news-block.animate {
    animation: fadeInUp 0.7s ease-out;
    opacity: 1;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (max-width: 600px) {
    .news-block {
        min-width: 90%;
    }
}

/* Loading and Error States for News */
.news-blocks-wrapper .loading-message,
.news-blocks-wrapper .error-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    width: 100%;
    text-align: center;
    padding: 40px 20px;
}

.news-blocks-wrapper .loading-message p {
    color: var(--color-green);
    font-size: 18px;
    font-weight: 500;
    margin: 0;
}

.news-blocks-wrapper .error-message p {
    color: #dc3545;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}