/* ========================================================= */
/* NEWS SECTION */
/* ========================================================= */

.news-section {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 100px 30px;
    box-sizing: border-box;
    overflow: hidden;
}


/* Header */

.news-section-header {
    max-width: 800px;
    margin-bottom: 45px;
    padding-left: 15%
}

.news-section-header h2 {
    margin-bottom: 15px;
}


/* ========================================================= */
/* CAROUSEL */
/* ========================================================= */

.news-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}


/* Track */

.news-carousel-track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;

    width: 100%;

    overflow: hidden;
    padding: 20px 0 35px;
}


/* ========================================================= */
/* NEWS CARD */
/* ========================================================= */

.news-card {
    position: relative;

    flex: 0 0 280px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);

    overflow: hidden;

    cursor: pointer;

    opacity: 0.45;
    transform: scale(0.88);

    transition:
        transform var(--transition),
        opacity var(--transition),
        box-shadow var(--transition);
}


/* Main card */

.news-card.active {
    flex-basis: 650px;

    opacity: 1;
    transform: scale(1);

    box-shadow:
        0 20px 50px rgba(0, 0, 0, .30);

    z-index: 2;
}


/* Hover */

.news-card:hover {
    opacity: 0.75;
    transform: scale(0.92);
}

.news-card.active:hover {
    opacity: 1;
    transform: scale(1.015);
}


/* ========================================================= */
/* IMAGE */
/* ========================================================= */

.news-card-image {
    position: relative;

    width: 100%;
    height: 180px;

    overflow: hidden;
}

.news-card.active .news-card-image {
    height: 300px;
}

.news-card-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;

    transition: transform .4s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.04);
}


/* ========================================================= */
/* CONTENT */
/* ========================================================= */

.news-card-content {
    padding: 22px 24px 25px;
}

.news-card-content h3 {
    margin: 5px 0 10px;
}

.news-card-content p {
    margin: 0;

    color: var(--info);

    line-height: 1.7;
}

.news-card-date {
    display: block;

    margin-top: 14px;

    font-size: 0.85rem;
    color: var(--info);
}


/* ========================================================= */
/* NEW BADGE */
/* ========================================================= */

.news-new-badge {
    position: absolute;

    top: 24px;
    left: -45px;

    width: 180px;

    padding: 8px 0;

    text-align: center;

    background: var(--primary);
    color: white;

    font-size: 0.8rem;
    font-weight: 800;

    letter-spacing: 1px;

    transform: rotate(-45deg);

    z-index: 5;

    box-shadow: 0 5px 15px rgba(0, 0, 0, .25);
}


/* ========================================================= */
/* ARROWS */
/* ========================================================= */

.news-arrow {
    flex-shrink: 0;

    width: 50px;
    height: 50px;

    border: 1px solid var(--border);
    border-radius: 50%;

    background: var(--surface);
    color: var(--text);

    font-family: inherit;
    font-size: 1.3rem;

    cursor: pointer;

    transition:
        background var(--transition),
        transform var(--transition),
        border-color var(--transition);
}

.news-arrow:hover {
    background: var(--primary);
    border-color: var(--primary);

    transform: scale(1.08);
}

.news-arrow:disabled {
    opacity: 0.25;
    cursor: default;
    transform: none;
}


/* ========================================================= */
/* NEWS DETAIL */
/* ========================================================= */

.news-detail-header {
    display: flex;
    align-items: center;
    gap: 45px;

    margin-top: 40px;
}


.news-detail-image-wrapper {
    position: relative;

    flex: 1;
    max-width: 600px;

    border-radius: var(--radius);

    overflow: hidden;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, .25);
}


.news-detail-image {
    display: block;

    width: 100%;
    height: auto;

    object-fit: cover;
}


.news-detail-info {
    flex: 1;
}


.news-detail-info h1 {
    margin: 10px 0 15px;
}


.news-detail-date {
    color: var(--info);
    margin-bottom: 20px;
}


.news-detail-subtitle {
    font-size: 1.05rem;
    line-height: 1.8;
}


/* New badge on detail page */

.news-detail-new {
    position: absolute;

    top: 35px;
    left: -50px;

    width: 200px;

    padding: 10px 0;

    text-align: center;

    background: var(--primary);
    color: white;

    font-weight: 800;
    letter-spacing: 1px;

    transform: rotate(-45deg);

    z-index: 5;
}


/* ========================================================= */
/* DETAIL CONTENT */
/* ========================================================= */

.news-detail-content {
    max-width: 900px;

    margin: 70px auto 0;
}


.news-detail-section {
    margin-bottom: 55px;
}


.news-detail-section h2 {
    margin-bottom: 20px;
}


.news-detail-section p {
    line-height: 1.9;

    margin-bottom: 18px;
}


.news-detail-footer {
    max-width: 900px;

    margin: 70px auto 0;

    padding-top: 30px;

    border-top: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}


.news-detail-footer-date {
    color: var(--info);
}


/* ========================================================= */
/* RESPONSIVE */
/* ========================================================= */

@media (max-width: 900px) {

    .news-carousel-track {
        gap: 15px;
    }

    .news-card {
        flex-basis: 220px;
    }

    .news-card.active {
        flex-basis: 500px;
    }

    .news-detail-header {
        flex-direction: column;
        align-items: stretch;
    }

    .news-detail-image-wrapper {
        max-width: none;
    }

}


@media (max-width: 650px) {

    .news-section {
        padding: 70px 20px;
    }

    .news-carousel {
        gap: 8px;
    }

    .news-carousel-track {
        gap: 10px;
    }

    .news-card {
        flex-basis: 150px;
    }

    .news-card.active {
        flex-basis: 300px;
    }

    .news-card-image {
        height: 120px;
    }

    .news-card.active .news-card-image {
        height: 180px;
    }

    .news-card-content {
        padding: 15px;
    }

    .news-card-content h3 {
        font-size: 1rem;
    }

    .news-card-content p {
        font-size: 0.85rem;
    }

    .news-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .news-detail-footer {
        flex-direction: column;
        align-items: stretch;
    }

}