/* ── News / Blog Page — news.css ─────────────────────────────────── */

/* ── Hero ───────────────────────────────────────────────────────── */
.news-hero {
    background: linear-gradient(135deg, var(--cn-navy, #092c40) 0%, #0d4060 100%);
    padding: 64px 0 56px;
    text-align: center;
}
.news-hero h1 {
    font-size: 38px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px;
    letter-spacing: -.5px;
}
.news-hero p {
    font-size: 16px;
    color: rgba(255,255,255,.75);
    margin: 0;
}

/* ── Category filter tabs ───────────────────────────────────────── */
.news-filter {
    background: #ffffff;
    border-bottom: 1px solid var(--cn-border, #e2e8f0);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.news-filter-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.news-filter-tabs::-webkit-scrollbar { display: none; }
.news-tab {
    flex-shrink: 0;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cn-light, #718096);
    cursor: pointer;
    transition: color .2s, border-color .2s;
    white-space: nowrap;
}
.news-tab:hover  { color: var(--cn-blue, #00a1e9); }
.news-tab.active {
    color: var(--cn-blue, #00a1e9);
    border-bottom-color: var(--cn-blue, #00a1e9);
}

/* ── Grid section ───────────────────────────────────────────────── */
.news-grid-section {
    background: var(--cn-bg, #f7f9fc);
    padding: 52px 0 72px;
    min-height: 400px;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ── Loading / empty / error states ────────────────────────────── */
.news-loading,
.news-empty,
.news-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-size: 15px;
    color: var(--cn-light, #718096);
}
.news-loading i { margin-right: 8px; color: var(--cn-blue, #00a1e9); }
.news-error     { color: #c0392b; }

/* ── Card ───────────────────────────────────────────────────────── */
.news-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

/* Cover image */
.news-card-cover {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--cn-bg, #f7f9fc);
    flex-shrink: 0;
}
.news-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.news-card:hover .news-card-img { transform: scale(1.04); }
.news-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--cn-border, #e2e8f0);
}

/* Body */
.news-card-body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.news-card-cat {
    display: inline-block;
    background: var(--cn-blue, #00a1e9);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 3px 9px;
    border-radius: 4px;
    margin-bottom: 10px;
}
.news-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--cn-navy, #092c40);
    margin: 0 0 8px;
    line-height: 1.4;
}
.news-card-date {
    font-size: 12px;
    color: var(--cn-light, #718096);
    margin: 0 0 10px;
}
.news-card-date i { margin-right: 5px; }
.news-card-summary {
    font-size: 13px;
    color: var(--cn-mid, #4a5568);
    line-height: 1.65;
    margin: 0 0 18px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--cn-blue, #00a1e9);
    text-decoration: none;
    margin-top: auto;
}
.news-card-link:hover {
    color: var(--cn-orange, #ee7700);
    text-decoration: none;
}

/* ── Modal ──────────────────────────────────────────────────────── */
.news-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    overflow-y: auto;
}
.news-modal-backdrop.open { display: flex; }
.news-modal {
    background: #ffffff;
    border-radius: 14px;
    max-width: 780px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: modalIn .25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.news-modal-close {
    position: absolute;
    top: 16px; right: 16px;
    background: rgba(0,0,0,.08);
    border: none;
    border-radius: 50%;
    width: 36px; height: 36px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cn-mid, #4a5568);
    z-index: 1;
    transition: background .2s;
}
.news-modal-close:hover { background: rgba(0,0,0,.15); }
.news-modal-cover {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 14px 14px 0 0;
    display: block;
}
.news-modal-body {
    padding: 28px 32px 36px;
}
.news-modal-cat {
    display: inline-block;
    background: var(--cn-blue, #00a1e9);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 3px 9px;
    border-radius: 4px;
    margin-bottom: 12px;
}
.news-modal-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--cn-navy, #092c40);
    margin: 0 0 8px;
    line-height: 1.3;
}
.news-modal-date {
    font-size: 13px;
    color: var(--cn-light, #718096);
    margin: 0 0 22px;
}
.news-modal-content {
    font-size: 14px;
    color: var(--cn-mid, #4a5568);
    line-height: 1.85;
}
.news-modal-content p   { margin-bottom: 14px; }
.news-modal-content h2,
.news-modal-content h3  { color: var(--cn-navy, #092c40); margin: 20px 0 10px; }
.news-modal-content img { max-width: 100%; border-radius: 8px; margin: 12px 0; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .news-grid         { grid-template-columns: 1fr; }
    .news-hero         { padding: 44px 0 36px; }
    .news-hero h1      { font-size: 26px; }
    .news-hero p       { font-size: 14px; }
    .news-modal-body   { padding: 20px 18px 28px; }
    .news-modal-title  { font-size: 20px; }
    .news-modal-cover  { height: 180px; }
}
