/* =========================================================
   Fly with R1cK - News
   ========================================================= */

.news {
    min-height: 75vh;
    padding: 100px 24px 120px;

    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.5),
            rgba(0, 0, 0, 0.5)
        ),
        var(--news-background-image, none);

    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #102630;

    color: #ffffff;
}

.news .container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}

/* Heading */

.news h1 {
    margin: 0 0 55px;
    font-family: "Exo", sans-serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.035em;
    text-transform: uppercase;
}

.news h1::after {
    content: "";
    display: block;
    width: 76px;
    height: 4px;
    margin-top: 22px;
    background: #6eb7c5;
    border-radius: 4px;
}

/* News Grid */

.news-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    align-items: stretch;
}

/* Cards */

.news-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(110, 183, 197, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.60);
    color: #000000;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-6px);
    border-color: rgba(110, 183, 197, 0.45);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

/* Images */

.news-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #193541;
}

.news-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Content */

.news-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
    color: #000000;
}

.news-card-content time {
    display: block;
    margin-bottom: 14px;
    color: #000000;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.news-card-content h2 {
    margin: 0 0 16px;
    font-family: "Exo", sans-serif;
    font-size: clamp(1.2rem, 1.6vw, 1.55rem);
    font-weight: 700;
    line-height: 1.3;
}

.news-card-content h2 a {
    color: #000000;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-card-content h2 a:hover {
    color: #333333;
}

.news-card-content p {
    margin: 0 0 28px;
    color: #000000;
    font-size: 0.96rem;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

/* Read more link */

.news-card-content > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: #000000;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition:
        color 0.2s ease,
        gap 0.2s ease;
}

.news-card-content > a::after {
    content: "→";
    font-size: 1.15rem;
}

.news-card-content > a:hover {
    gap: 14px;
    color: #333333;
}

/* Empty state */

.news .container > p {
    color: #b9c9ce;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Keyboard accessibility */

.news-card a:focus-visible {
    outline: 2px solid #6eb7c5;
    outline-offset: 4px;
}

/* Tablet */

@media (max-width: 1000px) {
    .news {
        padding: 80px 24px 100px;
    }

    .news-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }
}

/* Mobile */

@media (max-width: 640px) {
    .news {
        padding: 60px 18px 80px;
    }

    .news h1 {
        margin-bottom: 35px;
    }

    .news-list {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

    .news-card-content h2 {
        font-size: 1.4rem;
    }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
    .news-card,
    .news-card-image img,
    .news-card-content > a {
        transition: none;
    }

    .news-card:hover {
        transform: none;
    }

    .news-card:hover .news-card-image img {
        transform: none;
    }
}