/**
 * Qulbay News Page — news.css
 * RUN_ID: QLB-NEWS-PAGE-UI-01 — Rung 2
 *
 * Implements Idea 6: three-column editorial layout.
 * Visual language mirrors the staff portal CSS system
 * (same design tokens as admin.css + ops-pages.css + staff-template.css).
 * Standalone file — zero dependency on plugin CSS.
 *
 * Version: 1.0.0
 */

/* ================================================================
   DESIGN TOKENS — exact match with plugin CSS system
   ================================================================ */
.qlb-news-page {
    --qlb-yellow:      #F5C518;
    --qlb-yellow2:     #facc15;
    --qlb-green:       #059669;
    --qlb-green2:      #10b981;
    --qlb-navy:        #001529;
    --qlb-bg:          #f8fafc;
    --qlb-stripe:      #f1f5f9;
    --qlb-border:      #e2e8f0;
    --qlb-text:        #111827;
    --qlb-muted:       #64748b;
    --qlb-radius:      6px;
    --qlb-shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.06);
    --qlb-shadow-md:   0 4px 14px rgba(0, 0, 0, 0.09);
    --qlb-font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-family:       var(--qlb-font);
    font-size:         14px;
    background:        var(--qlb-bg);
    color:             var(--qlb-text);
    line-height:       1.6;
}

/* Reset margin injected by TT25 */
.qlb-news-page body,
.qlb-news-page .wp-site-blocks,
.qlb-news-page main {
    margin: 0;
    padding: 0;
}

/* ================================================================
   HEADER — staff-template.css visual (yellow gradient, sticky)
   ================================================================ */
.qlb-news-header {
    width: 100%;
    min-height: 64px;
    background-color: var(--qlb-yellow);
    background-image: linear-gradient(135deg, #F5C518 0%, #fde047 60%, #F5C518 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    position: sticky;
    top: 0;
    z-index: 200;
}

.qlb-news-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.qlb-news-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qlb-news-header__logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--qlb-navy);
    letter-spacing: -0.5px;
    text-decoration: none;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.4);
}

.qlb-news-header__page-badge {
    display: inline-flex;
    align-items: center;
    background: var(--qlb-green);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 1px 4px rgba(5, 150, 105, 0.35);
}

.qlb-news-header__nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.qlb-news-header__link {
    font-size: 13px;
    font-weight: 600;
    color: var(--qlb-navy);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: var(--qlb-radius);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    transition: background 0.18s, box-shadow 0.18s;
    white-space: nowrap;
}

.qlb-news-header__link:hover {
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    color: var(--qlb-navy);
}

.qlb-news-header__link--active {
    background: rgba(255, 255, 255, 0.88);
    font-weight: 700;
}

.qlb-news-header__link--cta {
    background: var(--qlb-green);
    color: #fff;
    border-color: var(--qlb-green);
}

.qlb-news-header__link--cta:hover {
    background: var(--qlb-green2);
    color: #fff;
}

/* ================================================================
   CATEGORY TAB BAR — navy strip, yellow underline active tab
   ================================================================ */
.qlb-news-cat-bar {
    background: var(--qlb-navy);
    padding: 0 24px;
    border-bottom: 3px solid var(--qlb-yellow);
}

.qlb-news-cat-bar__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    overflow-x: auto;
    /* hide scrollbar on mobile */
    scrollbar-width: none;
}

.qlb-news-cat-bar__inner::-webkit-scrollbar {
    display: none;
}

.qlb-news-cat-bar__link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 11px 18px;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}

.qlb-news-cat-bar__link:hover {
    color: #fff;
}

.qlb-news-cat-bar__link--active {
    color: var(--qlb-yellow2);
    border-bottom-color: var(--qlb-yellow2);
}

/* ================================================================
   PAGE HEADER — navy block (ops-pages qlb-ph visual)
   ================================================================ */
.qlb-news-ph-wrap {
    background: var(--qlb-navy);
}

.qlb-news-ph {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px;
    color: #f8fafc;
}

.qlb-news-ph h1 {
    color: var(--qlb-yellow2);
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.2;
}

.qlb-news-ph p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0;
    max-width: 620px;
}

/* ================================================================
   THREE-COLUMN BODY GRID
   ================================================================ */
.qlb-news-wrap {
    max-width: 1280px;
    margin: 32px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 210px 1fr 260px;
    gap: 28px;
    align-items: start;
}

/* ================================================================
   LEFT SIDEBAR — category + airport filter nav
   ================================================================ */
.qlb-news-left-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.qlb-news-sidebar-section__title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--qlb-muted);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--qlb-border);
    margin-bottom: 6px;
}

.qlb-news-sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: var(--qlb-radius);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--qlb-text);
    transition: background 0.13s;
    gap: 6px;
}

.qlb-news-sidebar-link:hover {
    background: var(--qlb-stripe);
    color: var(--qlb-text);
}

.qlb-news-sidebar-link--active {
    background: var(--qlb-yellow);
    color: var(--qlb-navy);
    font-weight: 700;
}

.qlb-news-sidebar-count {
    background: var(--qlb-navy);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 7px;
    flex-shrink: 0;
}

/* ================================================================
   MAIN FEED — featured post + article tiles
   ================================================================ */
.qlb-news-main-feed {
    min-width: 0; /* prevent grid blowout */
}

/* ── Featured article (first post — navy background) ── */
.qlb-news-article-featured {
    background: var(--qlb-navy);
    border-radius: var(--qlb-radius);
    padding: 28px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.qlb-news-article-featured::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 197, 24, 0.07));
    pointer-events: none;
}

.qlb-news-article-featured__airport {
    display: inline-block;
    background: var(--qlb-green);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.qlb-news-article-featured__title {
    display: block;
    color: var(--qlb-yellow2);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.3;
    text-decoration: none;
    margin-bottom: 12px;
}

.qlb-news-article-featured__title:hover {
    color: #fff;
}

.qlb-news-article-featured__meta {
    color: #64748b;
    font-size: 0.8rem;
    margin-bottom: 14px;
}

.qlb-news-article-featured__excerpt {
    color: #cbd5e1;
    font-size: 0.88rem;
    line-height: 1.65;
    margin-bottom: 20px;
}

/* ── Standard article tiles (left-border variants) ── */
.qlb-news-article-tile {
    background: #fff;
    border: 1px solid var(--qlb-border);
    border-left: 4px solid #94a3b8;
    border-radius: var(--qlb-radius);
    padding: 18px 20px;
    margin-bottom: 14px;
    box-shadow: var(--qlb-shadow-sm);
    transition: box-shadow 0.15s, transform 0.15s;
}

.qlb-news-article-tile:hover {
    box-shadow: var(--qlb-shadow-md);
    transform: translateX(3px);
}

/* Border colour variants — matches ops-pages.css hub-cell pattern */
.qlb-news-article-tile--green { border-left-color: var(--qlb-green2); }
.qlb-news-article-tile--amber { border-left-color: #f59e0b; }
.qlb-news-article-tile--navy  { border-left-color: var(--qlb-navy); }

.qlb-news-article-tile__top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.qlb-news-article-tile__airport {
    display: inline-block;
    background: var(--qlb-navy);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    padding: 2px 7px;
}

.qlb-news-article-tile__date {
    font-size: 0.78rem;
    color: var(--qlb-muted);
}

.qlb-news-article-tile__title {
    display: block;
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--qlb-navy);
    text-decoration: none;
    line-height: 1.35;
    margin-bottom: 6px;
}

.qlb-news-article-tile__title:hover {
    color: var(--qlb-green);
}

.qlb-news-article-tile__excerpt {
    font-size: 0.82rem;
    color: var(--qlb-muted);
    margin: 0;
}

/* ── No posts placeholder ── */
.qlb-news-no-posts {
    background: #fff;
    border: 1px solid var(--qlb-border);
    border-radius: var(--qlb-radius);
    padding: 40px 24px;
    text-align: center;
    color: var(--qlb-muted);
}

/* ── Pagination ── */
.qlb-news-pagination {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

/* ================================================================
   SHARED BUTTON SYSTEM — staff-nav.css qlb-staff-btn pattern
   ================================================================ */
.qlb-news-btn {
    display: inline-block;
    padding: 8px 18px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.18s, opacity 0.15s;
    line-height: 1.4;
}

.qlb-news-btn--warn {
    background: var(--qlb-yellow);
    color: var(--qlb-navy);
    font-weight: 700;
}

.qlb-news-btn--warn:hover {
    background: var(--qlb-yellow2);
    color: var(--qlb-navy);
}

.qlb-news-btn--outline {
    background: #fff;
    color: var(--qlb-navy);
    border: 1px solid var(--qlb-border);
}

.qlb-news-btn--outline:hover {
    background: var(--qlb-stripe);
}

.qlb-news-btn--block {
    display: block;
    text-align: center;
}

/* ================================================================
   RIGHT SIDEBAR — CTA + widgets
   ================================================================ */
.qlb-news-right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Green CTA box */
.qlb-news-cta-green {
    background: var(--qlb-green);
    border-radius: var(--qlb-radius);
    padding: 22px 18px;
    text-align: center;
    color: #fff;
}

.qlb-news-cta-green h3 {
    font-size: 0.97rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.qlb-news-cta-green p {
    font-size: 0.8rem;
    opacity: 0.88;
    margin: 0 0 16px;
}

/* Sidebar widgets */
.qlb-news-sidebar-widget {
    background: #fff;
    border: 1px solid var(--qlb-border);
    border-radius: var(--qlb-radius);
    overflow: hidden;
    box-shadow: var(--qlb-shadow-sm);
}

.qlb-news-sidebar-widget__head {
    background: var(--qlb-navy);
    color: var(--qlb-yellow2);
    padding: 10px 16px;
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.qlb-news-sidebar-widget__body {
    padding: 12px 16px;
}

/* Popular articles rows */
.qlb-news-popular-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--qlb-border);
}

.qlb-news-popular-row:last-child {
    border-bottom: none;
}

.qlb-news-popular-num {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--qlb-yellow);
    line-height: 1;
    min-width: 22px;
}

.qlb-news-popular-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--qlb-navy);
    text-decoration: none;
    line-height: 1.4;
}

.qlb-news-popular-title:hover {
    color: var(--qlb-green);
}

/* Airport tag cloud */
.qlb-news-airport-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.qlb-news-airport-tag {
    display: inline-block;
    background: var(--qlb-stripe);
    border: 1px solid var(--qlb-border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--qlb-navy);
    text-decoration: none;
    transition: background 0.15s;
}

.qlb-news-airport-tag:hover {
    background: var(--qlb-yellow);
}

.qlb-news-airport-tag--active {
    background: var(--qlb-yellow);
    border-color: var(--qlb-yellow);
}

/* ================================================================
   FOOTER — staff-footer-nav visual language
   ================================================================ */
.qlb-news-footer-nav {
    background: var(--qlb-navy);
    border-top: 3px solid var(--qlb-yellow);
    padding: 20px 24px;
    margin-top: 48px;
}

.qlb-news-footer-nav__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.qlb-news-footer-nav__label {
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 700;
}

.qlb-news-footer-nav__links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.qlb-news-footer-nav__link {
    color: var(--qlb-yellow2);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
}

.qlb-news-footer-nav__link:hover {
    text-decoration: underline;
}

.qlb-news-footer-nav__divider {
    color: #334155;
}

/* ================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================ */
@media (max-width: 1024px) {
    .qlb-news-wrap {
        grid-template-columns: 1fr 240px;
    }
    .qlb-news-left-sidebar {
        display: none; /* categories visible via tab bar on tablet */
    }
}

@media (max-width: 680px) {
    .qlb-news-wrap {
        grid-template-columns: 1fr;
        padding: 0 16px;
        margin: 20px auto;
    }
    .qlb-news-right-sidebar {
        display: none;
    }
    .qlb-news-header__nav {
        display: none;
    }
    .qlb-news-header__inner {
        padding: 0 16px;
    }
    .qlb-news-ph {
        padding: 24px 16px;
    }
    .qlb-news-ph h1 {
        font-size: 1.4rem;
    }
    .qlb-news-article-featured {
        padding: 20px;
    }
    .qlb-news-article-featured__title {
        font-size: 1.05rem;
    }
    .qlb-news-footer-nav__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* =================================================================
   SINGLE NEWS ARTICLE — qlb-news-single
   RUN_ID: QLB-NEWS-PAGE-UI-01 Rung 3
   ================================================================= */

.qlb-news-breadcrumb {
    background: var(--qlb-stripe);
    border-bottom: 1px solid var(--qlb-border);
    font-size: 0.82rem;
    color: var(--qlb-muted);
}
.qlb-news-breadcrumb__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 24px;
}
.qlb-news-breadcrumb a {
    color: var(--qlb-navy);
    text-decoration: none;
}
.qlb-news-breadcrumb a:hover {
    text-decoration: underline;
}
.qlb-news-breadcrumb span[aria-current] {
    color: var(--qlb-muted);
}

/* Two-column layout: article + sidebar */
.qlb-news-single__wrap {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 32px;
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 24px;
    align-items: start;
}

/* Article */
.qlb-news-single__article {
    background: #fff;
    border: 1px solid var(--qlb-border);
    border-radius: var(--qlb-radius);
    padding: 36px 40px;
}

/* Category badge */
.qlb-news-single__cat-badge {
    display: inline-block;
    background: var(--qlb-yellow);
    color: var(--qlb-navy);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 3px;
    text-decoration: none;
    margin-bottom: 14px;
}

/* Title */
.qlb-news-single__title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--qlb-navy);
    line-height: 1.25;
    margin: 0 0 16px;
}

/* Meta row */
.qlb-news-single__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.83rem;
    color: var(--qlb-muted);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.qlb-news-single__sep {
    color: var(--qlb-border);
}
.qlb-news-single__airport-tag {
    background: var(--qlb-navy);
    color: var(--qlb-yellow);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 3px;
}

/* Featured image */
.qlb-news-single__thumb {
    margin: 0 0 28px;
    border-radius: var(--qlb-radius);
    overflow: hidden;
}
.qlb-news-single__thumb img {
    width: 100%;
    height: auto;
    display: block;
}

/* Body text */
.qlb-news-single__body {
    font-size: 1rem;
    line-height: 1.75;
    color: #374151;
}
.qlb-news-single__body h2,
.qlb-news-single__body h3 {
    font-family: 'Poppins', sans-serif;
    color: var(--qlb-navy);
    margin: 28px 0 12px;
}
.qlb-news-single__body p {
    margin: 0 0 18px;
}
.qlb-news-single__body ul,
.qlb-news-single__body ol {
    padding-left: 22px;
    margin: 0 0 18px;
}
.qlb-news-single__body a {
    color: var(--qlb-green);
    text-decoration: underline;
}

/* Airport info footer */
.qlb-news-single__airport-info {
    margin-top: 28px;
    padding: 14px 18px;
    background: var(--qlb-stripe);
    border-left: 4px solid var(--qlb-yellow);
    border-radius: 0 var(--qlb-radius) var(--qlb-radius) 0;
    font-size: 0.88rem;
    color: var(--qlb-navy);
}
.qlb-news-single__airport-label {
    font-weight: 700;
    margin-right: 6px;
}

/* Back link */
.qlb-news-single__back {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--qlb-border);
}

/* Sidebar */
.qlb-news-single__sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Responsive */
@media ( max-width: 900px ) {
    .qlb-news-single__wrap {
        grid-template-columns: 1fr;
    }
    .qlb-news-single__article {
        padding: 24px 20px;
    }
    .qlb-news-single__title {
        font-size: 1.4rem;
    }
}
