/* /news/{slug} — article page. Site palette: #0085cf, #132856, #2a9df4, Montserrat. */

:root {
    --nd-primary: #0085cf;
    --nd-primary-dark: #006da9;
    --nd-navy: #132856;
    --nd-muted: #6b7a90;
    --nd-border: #e6ebf1;
    --nd-bg: #f5f8fb;
    --nd-ease: cubic-bezier(.4, 0, .2, 1);
}

/* Reading progress */

.nd-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    height: 3px;
    pointer-events: none;
}

.nd-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #2a9df4, var(--nd-primary));
    transform: scaleX(0);
    transform-origin: 0 50%;
}

/* Hero */

.nd-hero {
    position: relative;
    overflow: hidden;
    padding: 44px 0 52px;
    background:
        radial-gradient(circle at 90% -20%, rgba(255, 255, 255, .22) 0, rgba(255, 255, 255, 0) 45%),
        linear-gradient(120deg, #2a9df4 0%, var(--nd-primary) 55%, #0b5f9c 100%);
    color: #fff;
}

.nd-hero::after {
    content: '';
    position: absolute;
    right: -120px;
    bottom: -160px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 60px solid rgba(255, 255, 255, .06);
}

.nd-hero .container {
    position: relative;
    z-index: 1;
    animation: nd-up .6s var(--nd-ease) both;
}

@keyframes nd-up {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

.nd-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    color: rgba(255, 255, 255, .7);
}

.nd-breadcrumbs a {
    color: rgba(255, 255, 255, .85);
    transition: color .2s ease;
}

.nd-breadcrumbs a:hover {
    color: #fff;
    text-decoration: none;
}

.nd-hero__title {
    max-width: 900px;
    margin: 0 0 20px;
    color: #fff;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.25;
}

.nd-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nd-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* Layout */

.nd {
    padding: 0 0 40px;
    background: linear-gradient(180deg, var(--nd-bg) 0, #fff 420px);
}

.nd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
    align-items: start;
    margin-top: -28px;
}

.nd-card {
    position: relative;
    padding: 40px 44px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 40px rgba(20, 30, 60, .08);
    animation: nd-up .6s .1s var(--nd-ease) backwards;
}

.nd-empty {
    padding: 40px 0;
    color: var(--nd-muted);
    text-align: center;
}

/* Article photos open in the lightbox (public/js/article-lightbox.js) */

.editor-content img.is-zoomable {
    cursor: zoom-in;
    transition: box-shadow .3s var(--nd-ease), filter .3s var(--nd-ease);
}

.editor-content img.is-zoomable:hover {
    box-shadow: 0 14px 30px rgba(20, 30, 60, .18);
    filter: brightness(1.04);
}

.editor-content img.is-zoomable:focus-visible {
    outline: 3px solid rgba(0, 133, 207, .45);
    outline-offset: 3px;
}

/* Media sections inside the card */

.nd-card .news-media {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--nd-border);
}

.nd-card .news-media__title {
    color: var(--nd-navy);
    font-size: 20px;
    font-weight: 700;
}

.nd-card .news-photo,
.nd-card .news-video-preview {
    border-radius: 12px;
}

/* Footer: back + share */

.nd-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--nd-border);
}

.nd-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--nd-border);
    border-radius: 12px;
    color: var(--nd-navy);
    font-weight: 600;
    transition: border-color .2s ease, color .2s ease, transform .2s ease;
}

.nd-back:hover {
    border-color: var(--nd-primary);
    color: var(--nd-primary);
    text-decoration: none;
    transform: translateX(-3px);
}

.nd-share {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nd-share__label {
    color: var(--nd-muted);
    font-size: 14px;
}

.nd-share__btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 133, 207, .1);
    color: var(--nd-primary);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.nd-share__btn:hover {
    background: var(--nd-primary);
    color: #fff;
    transform: translateY(-2px);
}

.nd-share__toast {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--nd-navy);
    color: #fff;
    font-size: 13px;
    white-space: nowrap;
    animation: nd-up .2s ease both;
}

/* Sidebar */

.nd-aside {
    position: sticky;
    top: 24px;
    animation: nd-up .6s .2s var(--nd-ease) backwards;
}

.nd-aside__inner {
    padding: 24px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 40px rgba(20, 30, 60, .08);
}

.nd-aside__title {
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--nd-border);
    color: var(--nd-navy);
    font-size: 18px;
    font-weight: 700;
}

.nd-related {
    display: grid;
    gap: 14px;
}

.nd-related__item {
    display: flex;
    gap: 12px;
    color: inherit;
}

.nd-related__item:hover {
    color: inherit;
    text-decoration: none;
}

.nd-related__thumb {
    position: relative;
    flex: 0 0 92px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
}

.nd-related__thumb .news-ph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2a9df4 0%, #0085cf 55%, #132856 100%);
    color: rgba(255, 255, 255, .9);
}

.nd-related__thumb .news-ph svg {
    width: 28px;
    height: 28px;
}

.nd-related__thumb .news-ph span {
    display: none;
}

.nd-related__thumb img {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s var(--nd-ease);
}

.nd-related__item:hover img {
    transform: scale(1.08);
}

.nd-related__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.nd-related__body time {
    color: var(--nd-primary);
    font-size: 12px;
    font-weight: 700;
}

.nd-related__title {
    color: var(--nd-navy);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s ease;
}

.nd-related__item:hover .nd-related__title {
    color: var(--nd-primary);
}

.nd-aside__all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    color: var(--nd-primary);
    font-weight: 600;
}

.nd-aside__all:hover {
    color: var(--nd-primary-dark);
    text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
    .nd-hero .container,
    .nd-card,
    .nd-aside {
        animation: none;
    }
}

/* Responsive */

@media (max-width: 1199.98px) {
    .nd-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 24px;
    }
}

@media (max-width: 991.98px) {
    .nd-layout {
        grid-template-columns: 1fr;
    }

    .nd-aside {
        position: static;
    }

    .nd-hero__title {
        font-size: 27px;
    }
}

@media (max-width: 575.98px) {
    .nd-hero {
        padding: 28px 0 44px;
    }

    .nd-hero__title {
        font-size: 22px;
    }

    .nd-card {
        padding: 24px 18px;
        border-radius: 14px;
    }

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

    .nd-back {
        justify-content: center;
    }
}
