/* Cyber News pages (/cyber-news and /cyber-news/{slug}). Loaded by both views. */

/* ---------- hero (dark, sits under the header + breadcrumb) ---------- */
/* Banner art: globe + "CYBER NEWS" laptop + shield on the right, plain
   navy on the left where the text sits (public/img/cyber-news-hero*.webp). */
.cn-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    margin-top: -44px;               /* slide under the breadcrumb row */
    min-height: 260px;
    padding: 64px 0 40px;
    background: #031a4d url('/img/cyber-news-hero-1440.webp') right center / cover no-repeat;
}
@media (min-width: 1600px) {
    .cn-hero { background-image: url('/img/cyber-news-hero.webp'); min-height: 300px; }
}
.cn-hero .container { position: relative; z-index: 1; width: 100%; }
.cn-hero__title { font-size: 40px; font-weight: 600; color: #fff; margin: 0 0 10px; }
.cn-hero__sub { font-size: 16px; line-height: 1.6; color: #c9d6ee; max-width: 470px; margin: 0; }
@media (max-width: 991px) {
    /* the art slides behind the text on narrow screens — darken it */
    .cn-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, rgba(3, 20, 60, .92) 0%, rgba(3, 20, 60, .75) 60%, rgba(3, 20, 60, .35) 100%);
    }
}

/* ---------- light content area ---------- */
.cn-body { background: #F6F8FC; color: #0B1530; padding: 38px 0 70px; }
.cn-body a { text-decoration: none; }

.cn-search { position: relative; margin-bottom: 22px; }
.cn-search i { position: absolute; left: 26px; top: 50%; transform: translateY(-50%); color: #0b1b33; font-size: 16px; }
.cn-search input {
    width: 100%;
    border: 1px solid #d9dee7;
    border-radius: 999px;
    padding: 15px 22px 15px 56px;
    font-size: 15px;
    color: #0b1b33;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.cn-search input::placeholder { color: #6b7280; }
.cn-search input:focus { outline: none; border-color: #00AEFF; box-shadow: 0 0 0 3px rgba(0, 174, 255, .18); }

.cn-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.cn-chip {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid #dfe4ec; border-radius: 999px;
    padding: 9px 16px; font-size: 14px; font-weight: 500;
    color: #1f2a44 !important; background: #fff;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.cn-chip i { color: #00AEFF; font-size: 13px; }
.cn-chip:hover { border-color: #00AEFF; }
.cn-chip.is-active { background: #00AEFF; border-color: #00AEFF; color: #fff !important; }
.cn-chip.is-active i { color: #fff; }

.cn-heading { font-size: 26px; font-weight: 600; color: #0b1b33; margin: 0 0 20px; }

/* featured */
.cn-featured {
    display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center;
    background: linear-gradient(120deg, #07163a 0%, #0a1f4d 100%);
    border-radius: 12px; padding: 14px; margin-bottom: 46px;
    color: #fff !important;
}
.cn-featured__img { border: 1px solid rgba(0, 174, 255, .45); border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; background: #0b1b3d; }
/* contain, not cover: never crop the uploaded image (16:9 fills the box exactly) */
.cn-featured__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cn-featured__body { padding: 10px 22px 10px 0; }
.cn-featured__title { font-size: 30px; font-weight: 500; line-height: 1.3; color: #fff; margin: 14px 0 12px; }
.cn-featured__text { font-size: 15px; line-height: 1.6; color: #d4ddef; margin: 0 0 30px; max-width: 440px; }
.cn-featured__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cn-featured .cn-date { color: #fff; }
.cn-featured:hover .cn-more i { transform: translateX(3px); }

/* cards */
.cn-card {
    display: flex; flex-direction: column; height: 100%;
    background: #fff; border: 1px solid #e3e7ee; border-radius: 10px; padding: 9px;
    color: #0b1b33 !important;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.cn-card:hover { border-color: #00AEFF; box-shadow: 0 6px 18px rgba(0, 120, 200, .10); }
.cn-card__img { border-radius: 6px; overflow: hidden; aspect-ratio: 16 / 9; background: #e9eef5; }
.cn-card__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cn-card__body { display: flex; flex-direction: column; flex: 1; padding: 14px 3px 6px; }
.cn-card__title { font-size: 17px; font-weight: 600; line-height: 1.35; color: #0b1b33; margin: 12px 0 8px; }
.cn-card__text { font-size: 13.5px; line-height: 1.6; color: #4b5563; margin: 10px 0 18px; }
.cn-card .cn-more { margin-top: auto; }

.cn-badge {
    display: inline-block; align-self: flex-start;
    background: #e6f6fd; color: #0b3b5c;
    border-radius: 6px; padding: 4px 9px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
    transition: background-color .2s ease, color .2s ease;
}
.cn-card:hover .cn-badge, .cn-featured .cn-badge { background: #00AEFF; color: #fff; }

.cn-date { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: #374151; }
.cn-date i { color: #00AEFF; }
.cn-more { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #0a9be0; }
.cn-more i { transition: transform .2s ease; }
.cn-card:hover .cn-more i { transform: translateX(3px); }

.cn-empty { text-align: center; color: #4b5563; padding: 40px 0; }

/* pagination */
.cn-pages { display: flex; justify-content: center; gap: 10px; margin-top: 44px; list-style: none; padding: 0; }
.cn-pages a, .cn-pages span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 6px;
    border: 1px solid #dfe4ec; border-radius: 8px;
    font-size: 14px; color: #0b1b33; background: #fff;
}
.cn-pages a:hover { border-color: #00AEFF; }
.cn-pages .is-active span { background: #00AEFF; border-color: #00AEFF; color: #fff; }
.cn-pages .is-disabled span { color: #b6bcc7; }

@media (max-width: 991px) {
    .cn-featured { grid-template-columns: 1fr; }
    .cn-featured__body { padding: 4px 8px 10px; }
}
@media (max-width: 575px) {
    .cn-hero__title { font-size: 30px; }
    .cn-featured__title { font-size: 22px; }
    .cn-heading { font-size: 21px; }
}

/* =====================================================================
   Article page (/cyber-news/{slug})
   ===================================================================== */
.cn-badge--solid { background: #00AEFF; color: #fff; }

.cn-article {
    background: #fff;
    border: 1px solid #e3e7ee;
    border-radius: 12px;
    padding: 26px 28px 28px;
}
.cn-article__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.cn-share { display: flex; gap: 8px; }
.cn-share a, .cn-share button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: #f1f4f9; border: 1px solid #e3e7ee;
    color: #0b1b33; font-size: 14px;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.cn-share a:hover, .cn-share button:hover { background: #00AEFF; border-color: #00AEFF; color: #fff; }
.cn-share button.is-copied { background: #22c55e; border-color: #22c55e; color: #fff; }

.cn-article__title { font-size: 26px; font-weight: 500; line-height: 1.35; color: #0b1b33; margin: 16px 0 12px; }

.cn-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; font-size: 13.5px; color: #374151; margin-bottom: 20px; }
.cn-article__meta span { display: inline-flex; align-items: center; gap: 7px; }
.cn-article__meta span + span::before { content: ""; width: 1px; height: 16px; background: #d4d9e2; margin: 0 14px; }
.cn-article__meta i { color: #00AEFF; }

.cn-article__cover { border-radius: 10px; overflow: hidden; margin-bottom: 26px; background: #e9eef5; }
/* full image at its own shape — no height cap, no crop */
.cn-article__cover img { width: 100%; height: auto; display: block; }

.cn-pdf {
    display: inline-flex; align-items: center; gap: 8px;
    background: #00AEFF; color: #fff !important; border-radius: 8px;
    padding: 9px 18px; font-size: 14px; font-weight: 600; margin: 0 0 22px;
}
.cn-pdf:hover { background: #0095dc; }

/* Body HTML from the admin's RichTextEditor */
.cn-article__content { color: #4b5563; font-size: 14.5px; line-height: 1.7; overflow-wrap: break-word; }
.cn-article__content h1, .cn-article__content h2, .cn-article__content h3,
.cn-article__content h4, .cn-article__content h5, .cn-article__content h6 {
    color: #0b1b33; font-weight: 600; line-height: 1.35; margin: 24px 0 6px;
}
.cn-article__content h1, .cn-article__content h2 { font-size: 20px; }
.cn-article__content h3 { font-size: 18px; }
.cn-article__content h4, .cn-article__content h5, .cn-article__content h6 { font-size: 16px; }
.cn-article__content > :first-child { margin-top: 0; }
.cn-article__content p { margin: 0 0 12px; }
.cn-article__content a { color: #0a9be0; text-decoration: underline; }
.cn-article__content ul { list-style: none; padding-left: 0; margin: 0 0 14px; }
.cn-article__content ul li { position: relative; padding-left: 18px; margin-bottom: 4px; }
.cn-article__content ul li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: #00AEFF; }
.cn-article__content ol { padding-left: 20px; margin: 0 0 14px; }
.cn-article__content ol li::marker { color: #00AEFF; font-weight: 600; }
.cn-article__content img { max-width: 100%; height: auto; border-radius: 8px; }
.cn-article__content table { width: 100%; max-width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; }
.cn-article__content th, .cn-article__content td { border: 1px solid #e3e7ee; padding: 8px 10px; }
.cn-article__content blockquote { border-left: 3px solid #00AEFF; margin: 0 0 14px; padding: 4px 0 4px 14px; color: #374151; }

.cn-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
    margin-top: 28px; padding: 22px 26px;
    background: #eef8fe; border: 1px solid #d3eefc; border-radius: 10px;
}
.cn-cta__text { font-size: 17px; font-weight: 600; line-height: 1.45; color: #0b1b33; margin: 0; }
.cn-cta__btn {
    display: inline-block; background: #00AEFF; color: #fff !important;
    border-radius: 8px; padding: 11px 22px; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.cn-cta__btn:hover { background: #0095dc; }

/* sidebar: latest updates */
.cn-latest { background: #fff; border: 1px solid #e3e7ee; border-radius: 12px; padding: 22px 22px 10px; }
.cn-latest__title { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 600; color: #0b1b33; margin: 0 0 18px; }
.cn-latest__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%; background: #00AEFF; color: #fff; font-size: 12px;
}
.cn-latest__list { list-style: none; margin: 0; padding: 0; }
.cn-latest__list li { position: relative; padding: 0 0 16px 22px; }
.cn-latest__list li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: #00AEFF; }
.cn-latest__list li::after { content: ""; position: absolute; left: 7px; top: 18px; bottom: 2px; width: 1px; background: #e3e7ee; }
.cn-latest__list li:last-child::after { display: none; }
.cn-latest__list a { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; color: #0b1b33; }
.cn-latest__list a:hover { color: #0a9be0; }
.cn-latest__list span { display: block; font-size: 12.5px; color: #6b7280; margin-top: 4px; }

/* related slider */
.cn-related { background: #E8EDF8; padding: 46px 0 56px; color: #0b1b33; }
.cn-related a { text-decoration: none; }
.cn-related__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.cn-related__cat { color: #00AEFF; }
.cn-related__nav { display: flex; gap: 10px; }
.cn-arrow {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid #b9dcf2; background: #fff; color: #00AEFF; font-size: 15px;
    transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}
.cn-arrow.is-primary { background: #00AEFF; border-color: #00AEFF; color: #fff; }
.cn-arrow:disabled { opacity: .45; cursor: default; }
.cn-related__track {
    display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 40px) / 3);
    gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    padding-bottom: 4px;
}
.cn-related__track::-webkit-scrollbar { display: none; }
.cn-related__card { scroll-snap-align: start; }
.cn-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin-top: auto; }
.cn-card__meta .cn-date + .cn-date::before { content: ""; width: 1px; height: 14px; background: #d4d9e2; margin: 0 12px; }

@media (max-width: 991px) {
    .cn-related__track { grid-auto-columns: calc((100% - 20px) / 2); }
    .cn-latest { margin-top: 4px; }
}
@media (max-width: 575px) {
    .cn-article { padding: 20px 16px; }
    .cn-article__title { font-size: 21px; }
    .cn-article__top { flex-wrap: wrap; }
    .cn-related__track { grid-auto-columns: 85%; }
}

/* Sidebar stays put while the article scrolls (desktop only). top = sticky
   site header (~70px) + a little air. Only when the screen is tall enough to
   show the whole sidebar; on phones / short screens it just scrolls. */
@media (min-width: 992px) and (min-height: 760px) {
    .cn-sidebar { position: sticky; top: 96px; }
}
