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

.news-detail {
    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-detail .container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* Single Article Box */

.news-detail-box {
    padding: 40px;
    border: 1px solid rgba(110, 183, 197, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.80);
    color: #000000;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

/* Article Header */

.news-detail-header {
    margin-bottom: 45px;
}

.news-detail-header time {
    display: block;
    margin-bottom: 20px;
    color: #000000;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.news-detail-header h1 {
    margin: 0;
    color: #000000;
    font-family: "Exo", sans-serif;
    font-size: clamp(2.3rem, 5vw, 4.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
}

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

/* Article Image */

.news-detail-image {
    margin: 0 0 55px;
    overflow: hidden;
    border-radius: 12px;
    background: #193541;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.news-detail-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 580px;
    object-fit: cover;
}

/* Article Content */

.news-detail-content {
    width: 100%;
    margin: 0;
    color: #000000;
    font-family: "Manrope", sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.95;
    overflow-wrap: anywhere;
}

.news-detail-content p {
    margin: 0 0 1.5em;
    color: #000000;
}

.news-detail-content p:last-child {
    margin-bottom: 0;
}

/* If article content later contains HTML */

.news-detail-content h2,
.news-detail-content h3 {
    margin: 2em 0 0.8em;
    color: #000000;
    font-family: "Exo", sans-serif;
    line-height: 1.3;
}

.news-detail-content h2 {
    font-size: 1.8rem;
}

.news-detail-content h3 {
    font-size: 1.4rem;
}

.news-detail-content a {
    color: #000000;
    text-decoration: underline;
    text-underline-offset: 3px;
}

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

.news-detail-content ul,
.news-detail-content ol {
    margin: 0 0 1.5em;
    padding-left: 1.6em;
}

.news-detail-content li {
    margin-bottom: 0.5em;
}

.news-detail-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 2em auto;
    border-radius: 8px;
}

/* Back to News */

.news-detail-back {
    margin: 65px 0 0;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
}

.news-detail-back a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #000000;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-detail-back a:hover {
    color: #333333;
}

/* Keyboard Accessibility */

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

/* Tablet */

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

    .news-detail .container {
        max-width: 760px;
    }

    .news-detail-box {
        padding: 35px;
    }
}

/* Mobile */

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

    .news-detail-box {
        padding: 24px;
    }

    .news-detail-header {
        margin-bottom: 32px;
    }

    .news-detail-header time {
        margin-bottom: 16px;
    }

    .news-detail-header h1 {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    .news-detail-image {
        margin-bottom: 35px;
        border-radius: 8px;
    }

    .news-detail-content {
        font-size: 1rem;
        line-height: 1.85;
    }

    .news-detail-back {
        margin-top: 45px;
    }
}

/* Reduced Motion */

@media (prefers-reduced-motion: reduce) {
    .news-detail-back a {
        transition: none;
    }
}