* {
    font-family: 'Arial', sans-serif;
}

a {
    text-decoration: none;
}

body {
    margin: 20px 100px;
}

.btn {
    padding: 10px 17px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    border: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.btn--primary {
    background-color: #ededed;
    color: #595959;
}

.btn--dark {
    background-color: #191919;
    color: #fff;
}


.btn--active {
    outline: 1px solid black;
    outline-offset: -1px;
}

.btn:hover {
    outline: 1px solid black;
    opacity: 0.8;
    cursor: pointer;
    outline-offset: -1px;
}

.btn--arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.news__item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    flex: 2;
}

.news__image {
    height: 100%;
}

.news__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.news-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.8),
            rgba(0, 0, 0, 0.3),
            transparent
    );
}

.news-title {
    line-height: 1.4;
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news {
    display: flex;
    gap: 20px;
    max-height: 530px;
    overflow: hidden;
    box-sizing: border-box;
}

.news__featured {
    flex: 1 1 30%;
    background-color: #ededed;
    border-radius: 20px;
    padding: 20px;
    box-sizing: border-box;
    max-width: 30%;
}

.news__featured p {
    color: #595959;
    margin: 10px 0;
}

.news-meta {
    color: #a2a2a2;
    font-size: 14px;
}

.news__actions {
    display: flex;
    align-items: center;
}

.news__actions--mobile {
    display: none;
}

.news-item:hover {
    opacity: 0.6;
    cursor: pointer;
}

.news-item h2 {
    margin: 10px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-item p {
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-section__list p {
    margin: 3px 0;
    font-size: 14px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #595959;
}

.news-section__list h4 {
    margin: 3px 0 5px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-section {
    margin-top: 60px;
    overflow: hidden;
}


.news-section__list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.news-section__item {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.news-section__image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

@media (max-width: 1024px) {
    .news-section__list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-section__list {
        grid-template-columns: 1fr;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-content: center;
}

.modal img {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    max-width: 700px;
    border-radius: 10px;
    max-height: 80%;
    overflow: auto;
    box-sizing: border-box;
}

.close-btn {
    color: #aaa;
    font-size: 23px;
    font-weight: bold;
    float: right;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.read-more-container {
    display: flex;
    justify-content: center;
    margin: 20px;
}

@media (max-width: 1024px) {
    body {
        margin: 20px;
    }

    .news__item {
        height: 300px;
    }

    .news {
        flex-direction: column;
        max-height: 100%;
        gap: 0;
    }

    .news__featured {
        max-width: 100%;
    }

    .news__item, .news__featured {
        flex: none;
    }

    .news__actions {
        display: none;
    }

    .news__actions--mobile {
        display: flex;
        margin: 5px 0 20px 0;
    }

    .btn--dark,
    .btn--arrow {
        background-color: black;
        color: white;
    }

    .invert {
        filter: invert(1);
    }

    .news-overlay h1 {
        margin: 0;
    }
}

canvas {
    max-height: 250px;
}

#chartContainer {
    min-width: 850px;
    height: 500px;
    user-select: none;
}
#chartContainer span {
    font-size: 12px;
    padding: 4px;
}

#monthSlider {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 10px 0;
}

#monthData {
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    gap: 20px;
}

#redData {
    color: #c01b1e;
}

#blueData {
    color: #143e95;
}

#monthButtons {
    display: flex;
    overflow: hidden;
    width: 100%;
    justify-content: space-around;
    gap: 10px;
    margin: 8px;
}

.news__image img {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.news__image img.fade-out {
    opacity: 0;
}
