/* Hide the content source */
.news-accordion-content-source {
    display: none;
}

/* Desktop Horizontal Accordion */
.news-desktop-accordion {
    display: flex;
    gap: var(--space-6);
    min-height: 420px;
}

.news-accordion-panel {
    width: 100%;
    max-width: 294px;
    transition: max-width .5s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-top: 16px;
}

.news-accordion-panel:last-child.collapsed img {
    object-position: left;
}

.news-accordion-panel::before {
    display: block;
    content: "";
    position: absolute;
    height: 16px;
    width: 45px;
    left: 0;
    top: -16px;
    border-radius: var(--space-2) var(--space-2) 0 0;
    background-color: var(--btn-bg);
    transition: width .5s ease;
}

.news-accordion-panel.expanded::before {
    width: 250px;
}

.news-accordion-panel::after {
    display: block;
    content: '';
    position: absolute;
    opacity: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgb(27 70 108 / 85%);
    transition: opacity .5s ease;
}

.news-accordion-panel.expanded::after {
    opacity: 1;
}

.news-accordion-panel.expanded {
    max-width: 660px;
}

.news-accordion-panel .fade-in {
    opacity: 0;
    animation: fadeIn 0.4s forwards;
}
  
@keyframes fadeIn {
    to {
      opacity: 1;
    }
}

.news-accordion-panel.expanded h3 {
    color: var(--btn-primary);
}

.news-accordion-panel img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.news-accordion-panel-content {
    left: 0;
    top: 0;
    height: 100%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 var(--space-12);
}

.news-panel-title {
    font-family: var(--font-heading);
    line-height: var(--leading-tight);
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    position: absolute;
    bottom: 0;
    background: var(--bg-section);
    color: var(--white);
    padding: var(--space-4);
}

/* Mobile Vertical Accordion */
.news-mobile-accordion {
    display: none;
}

@media (max-width: 1199px) {
    .news-desktop-accordion {
        display: none;
    }

    .news-mobile-accordion {
        display: block;
        overflow: hidden;
    }

    .news-mobile-panel {
        border-bottom: 1px solid var(--gray-300);
    }

    .news-mobile-panel:last-child {
        border-bottom: none;
    }

    .news-mobile-panel-header {
        background: var(--btn-primary);
        padding: var(--space-4);
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: var(--space-2);
    }

    .news-mobile-panel-header h3 {
        font-size: var(--text-lg);
    }

    .news-mobile-panel-content {
        background: var(--bg-section);
        color: var(--white);
        height: 0;
        opacity: 0;
        overflow: hidden;
        padding: 0;
        transition: height 0.5s ease, opacity 0.5s ease, padding 0.5s ease;
    }

    .news-mobile-panel-content.active {
        height: auto;
        opacity: 1;
        padding: var(--space-4);
    }

    .news-mobile-panel-content img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .chevron {
        transition: transform 0.3s ease;
    }

    .chevron::before {
        font-weight: var(--font-semibold) !important;
    }

    .news-mobile-panel-header.active .chevron {
        transform: rotate(180deg);
    }
}