/* ═══════════════════════════════════════════════
   RADIANT OPTIMIZER — News Page Styles
   Matches index.html design system
   ═══════════════════════════════════════════════ */

/* ── Scroll Progress ── */
#progress {
    position: fixed; top: 0; left: 0; z-index: 9999;
    height: 3px; width: 0;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    transition: width 0.15s ease;
    border-radius: 0 2px 2px 0;
}

.skip-link {
    position: fixed; top: 0; left: 0; z-index: 10000;
    transform: translateY(-150%);
    transition: transform .2s ease;
    padding: 12px 20px;
    background: var(--main, #2563eb);
    color: #fff;
    border-radius: 0 0 8px;
    font-family: "Clash Display", sans-serif;
    font-weight: 700;
}
.skip-link:focus { transform: translateY(0); outline: 2px solid #fff; outline-offset: 2px; }

/* ── Nav ── */
.nav-tab-container {
    position: relative;
    background-color: #0000004d;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    border-radius: 22px;
    padding: 18px 26px;
    border-top: 1px solid rgba(255,255,255,.14);
    border-bottom: 1px solid rgba(255,255,255,.14);
    display: flex;
    align-items: center;
    gap: 22px;
    width: fit-content;
    box-shadow: 0 0 0 1px #3b82f6;
}
.nav-tab-container:before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 44px;
    background: linear-gradient(to bottom, rgba(255,255,255,.02), transparent);
    border-radius: 22px; pointer-events: none;
}
.nav-tab-container:after {
    content: "";
    position: absolute; bottom: 0; left: 0; right: 0; height: 44px;
    background: linear-gradient(to top, rgba(255,255,255,.025), transparent);
    border-radius: 22px; pointer-events: none;
}
.nav-tab-container.compact { padding: 5px; }

.nav-tab {
    background: none; border: none; color: #fff;
    border-radius: 16px; padding: 14px 26px; font-size: 1.15rem; font-weight: 500;
    transition: all .3s ease; cursor: pointer;
    display: flex; align-items: center; gap: 14px;
    font-family: inherit; text-decoration: none;
}
.nav-tab:hover { color: #fff; background: #ffffff0d; transform: translateY(-1px); }
.nav-tab.active {
    position: relative; color: #fff; background: #2563eb; border: none;
    z-index: 1; font-weight: 600;
    box-shadow: 0 0 20px rgba(37,99,235,0.35), 0 4px 12px rgba(0,0,0,0.3);
}
.nav-tab.active:before {
    content: "";
    position: absolute; bottom: -3px; left: 10%; right: 10%;
    height: 3px; background: #60a5fa;
    border-radius: 0 0 3px 3px;
    box-shadow: 0 0 10px rgba(96,165,250,0.6);
}
.nav-tab.active:after {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: rgba(255,255,255,0.2);
    border-radius: 16px 16px 0 0;
}
.tab-container { display: flex; flex-direction: row; gap: 15px; position: relative; }
.centered { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.icon-wrapper {
    display: inline-block; width: 0; overflow: hidden; visibility: hidden;
    transform: translate(-20px);
    transition: width .3s ease-out, transform .3s ease-out, visibility .3s ease-out, opacity .3s ease-out;
    opacity: 0; pointer-events: none;
}
.nav-tab.active .icon-wrapper { width: 20px; visibility: visible; transform: translate(0); opacity: 1; }
.nav-tab:hover .icon-wrapper { width: 20px; visibility: visible; transform: translate(0); opacity: 1; }

.nav-container {
    -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
    position: fixed; top: 0; width: 100%; z-index: 1000;
    font-family: "Clash Display", "Cabinet Grotesk", sans-serif; font-weight: 400;
}
.nav { display: flex; flex-direction: row; justify-content: space-between; padding: 30px; align-items: center; }
.left-side, .right-side { display: flex; flex-direction: row; gap: 16px; align-items: center; }
.right-side { display: flex; flex-direction: row; align-items: center; gap: 14px; }

/* Nav Auth Buttons */
.nav-signup-btn, .nav-login-btn, .nav-dashboard-btn {
    padding: 10px 22px; font-size: 0.95rem; font-weight: 600;
    border-radius: 100px; text-decoration: none;
    font-family: "Clash Display", "Cabinet Grotesk", sans-serif;
    letter-spacing: .01em;
    transition: all .25s ease;
    display: inline-flex; align-items: center;
}
.nav-signup-btn { color: #fff; background: linear-gradient(135deg,#059669,#10b981); border: 1px solid rgba(16,185,129,0.4); box-shadow: 0 0 12px rgba(16,185,129,0.2); }
.nav-signup-btn:hover { transform: translateY(-1px); box-shadow: 0 0 20px rgba(16,185,129,0.35); background: linear-gradient(135deg,#10b981,#34d399); }
.nav-login-btn { color: #fff; background: linear-gradient(135deg,#1d4ed8,#2563eb); border: 1px solid rgba(59,130,246,0.4); box-shadow: 0 0 12px rgba(37,99,235,0.2); }
.nav-login-btn:hover { transform: translateY(-1px); box-shadow: 0 0 20px rgba(37,99,235,0.35); background: linear-gradient(135deg,#2563eb,#3b82f6); }
.nav-dashboard-btn { padding: 10px 24px; font-size: 1rem; font-weight: 700; color: #fff; background: linear-gradient(135deg,#2563eb,#1d4ed8); border: 1px solid rgba(96,165,250,0.4); box-shadow: 0 0 16px rgba(37,99,235,0.3); }
.nav-dashboard-btn:hover { transform: translateY(-2px); box-shadow: 0 0 28px rgba(37,99,235,0.45); background: linear-gradient(135deg,#3b82f6,#2563eb); }

/* ── News Page Layout ── */
.news-page {
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 4vw, 3rem);
    padding: 0 20px;
}

/* ── Hero ── */
.news-hero {
    min-height: auto;
    display: flex; align-items: flex-start; justify-content: center;
    padding: clamp(2rem,5vw,4rem); padding-top: 160px;
    position: relative;
}
.news-hero-inner {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    max-width: 800px; gap: clamp(1rem,2.5vw,2rem);
}
.logo-showcase { position: relative; width: 100%; max-width: 700px; margin-bottom: 0.5rem; }
.desktop-logo { display: block; }
.hero-logo-single {
    max-width: 70%; width: auto; height: auto; object-fit: contain;
    filter: drop-shadow(0 0 50px rgba(37,99,235,.35));
    animation: fadeUpLogo .8s cubic-bezier(0.16,1,0.3,1) .05s both;
    margin-top: -30px;
}
@keyframes fadeUpLogo { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.headline-block { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.news-headline {
    font-family: "Clash Display", "Cabinet Grotesk", sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900;
    line-height: 1.05; margin: 0; letter-spacing: -0.02em;
}
.news-headline .accent { color: #3b82f6; }
.news-tagline {
    font-family: "Satoshi", "Inter", sans-serif;
    font-size: clamp(0.9rem, 1.3vw, 1.05rem);
    color: rgba(255,255,255,0.6); margin: 0;
    max-width: 500px;
}

/* ── Stats Strip ── */
.news-stats-strip {
    display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
    margin-top: 0.5rem;
}
.news-stat-card {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1.2rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border: 1px solid rgba(37,99,235,0.35);
    border-radius: 16px;
    transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
    position: relative; overflow: hidden;
    animation: statFadeIn 0.6s ease both;
}
.news-stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37,99,235,0.4), transparent);
    opacity: 0; transition: opacity 0.35s;
}
.news-stat-card:hover {
    border-color: rgba(37,99,235,0.35);
    background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(255,255,255,0.03));
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.35), 0 0 0 1px rgba(37,99,235,0.12);
}
.news-stat-card:hover::before { opacity: 1; }
.nsc-icon {
    width: 38px; height: 38px; min-width: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(37,99,235,0.15), rgba(59,130,246,0.05));
    border: 1px solid rgba(37,99,235,0.2);
    display: grid; place-items: center;
    color: #3b82f6;
    transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
}
.news-stat-card:hover .nsc-icon {
    background: rgba(37,99,235,0.22);
    border-color: rgba(96,165,250,0.5);
    box-shadow: 0 0 16px rgba(37,99,235,0.2);
    transform: scale(1.06);
}
.nsc-content { display: flex; flex-direction: column; gap: 0.15rem; }
.nsc-value {
    font-family: "Clash Display", "Cabinet Grotesk", sans-serif;
    font-size: 1.25rem; font-weight: 800; color: #fff;
    line-height: 1; letter-spacing: -0.01em;
}
.nsc-label {
    font-family: "Satoshi", "Inter", sans-serif;
    font-size: 0.75rem; color: #ffffff80;
    font-weight: 500;
}
@keyframes statFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Filter Bar ── */
.news-filters-bar {
    display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center;
    max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem);
}
.filter-tag {
    padding: 0.55rem 1.2rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 100px;
    color: rgba(255,255,255,0.55);
    font-family: "Satoshi", "Inter", sans-serif;
    font-size: 0.82rem; font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
}
.filter-tag:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.07);
}
.filter-tag.active {
    color: #fff;
    background: #2563eb;
    border-color: rgba(96,165,250,0.5);
    box-shadow: 0 0 14px rgba(37,99,235,0.25);
    font-weight: 600;
}

/* ── News Content Section ── */
.news-content-section {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

/* ── News Grid ── */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

/* ── News Card ── */
.news-card {
    position: relative;
    display: flex; flex-direction: column;
    gap: 0.85rem;
    padding: 1.5rem;
    background: linear-gradient(160deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
    overflow: hidden;
}
.news-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37,99,235,0.3), transparent);
    opacity: 0; transition: opacity 0.35s;
}
.news-card::after {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #2563eb, #3b82f6);
    border-radius: 0 3px 3px 0;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.news-card:hover {
    border-color: rgba(37,99,235,0.3);
    background: linear-gradient(160deg, rgba(37,99,235,0.06), rgba(255,255,255,0.03));
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.35), 0 0 0 1px rgba(37,99,235,0.08);
}
.news-card:hover::before { opacity: 1; }
.news-card:hover::after { transform: scaleY(1); }

/* Featured card */
.news-card-featured {
    border-color: rgba(37,99,235,0.3);
    background: linear-gradient(160deg, rgba(37,99,235,0.07), rgba(255,255,255,0.02));
}
.news-card-featured::before { opacity: 0.5; }

.news-card-header {
    display: flex; justify-content: space-between;
    align-items: center; gap: 0.5rem;
    flex-wrap: wrap;
}
.news-badges {
    display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center;
}
.news-badge {
    display: inline-flex; align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-family: "Satoshi", "Inter", sans-serif;
    font-size: 0.65rem; font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.news-badge.new {
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.3);
    color: #10b981;
}
.news-badge.category-news {
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.25);
    color: #60a5fa;
}
.news-badge.category-update {
    background: rgba(168,85,247,0.1);
    border: 1px solid rgba(168,85,247,0.25);
    color: #a78bfa;
}
.news-badge.category-announcement {
    background: rgba(251,191,36,0.1);
    border: 1px solid rgba(251,191,36,0.25);
    color: #fbbf24;
}
.news-badge.category-maintenance {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
    color: #f87171;
}

.news-date {
    font-family: "Satoshi", "Inter", sans-serif;
    font-size: 0.7rem; color: rgba(255,255,255,0.35);
    font-weight: 500;
}

.news-title {
    font-family: "Clash Display", "Cabinet Grotesk", sans-serif;
    font-size: 1.15rem; font-weight: 800; color: #fff;
    line-height: 1.3; margin: 0; letter-spacing: -0.01em;
}

.news-content {
    font-family: "Satoshi", "Inter", sans-serif;
    font-size: 0.88rem; line-height: 1.65;
    color: rgba(255,255,255,0.55);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-image {
    border-radius: 12px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    margin: 0.25rem 0;
}
.news-card-image img {
    width: 100%; height: auto; display: block;
}

.news-footer {
    display: flex; justify-content: space-between;
    align-items: center; gap: 0.75rem;
    margin-top: auto; padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.news-actions {
    display: flex; gap: 0.75rem; align-items: center;
}
.news-actions a {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.45rem 1rem;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-family: "Clash Display", "Cabinet Grotesk", sans-serif;
    font-size: 0.8rem; font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(96,165,250,0.3);
    transition: all 0.3s ease;
}
.news-actions a:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 0 16px rgba(37,99,235,0.3);
    transform: translateY(-1px);
}
.news-actions a svg { width: 12px; height: 12px; transition: transform 0.3s; }
.news-actions a:hover svg { transform: translateX(2px); }

.news-like-btn {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: rgba(255,255,255,0.5);
    font-family: "Satoshi", "Inter", sans-serif;
    font-size: 0.8rem; font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.news-like-btn:hover { color: #fff; border-color: rgba(239,68,68,0.4); }
.news-like-btn.liked { color: #ef4444; border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); }
.news-like-btn svg { width: 14px; height: 14px; }

.news-read-badge {
    font-family: "Satoshi", "Inter", sans-serif;
    font-size: 0.7rem; color: #10b981;
    font-weight: 500;
}
.news-footer-caption {
    font-family: "Satoshi", "Inter", sans-serif;
    font-size: 0.72rem; color: rgba(255,255,255,0.3);
}

/* ── Empty State ── */
.empty-state {
    text-align: center; grid-column: 1 / -1;
    padding: 4rem 2rem;
    background: linear-gradient(160deg, rgba(255,255,255,0.02), rgba(255,255,255,0.005));
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
}
.empty-state h3 {
    font-family: "Clash Display", "Cabinet Grotesk", sans-serif;
    font-size: 1.5rem; font-weight: 800;
    color: #fff; margin: 0 0 0.5rem;
}
.empty-state p {
    font-family: "Satoshi", "Inter", sans-serif;
    font-size: 0.95rem; color: rgba(255,255,255,0.45);
    margin: 0;
}

/* ── Custom Modal ── */
.custom-modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 11000;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    align-items: center; justify-content: center;
    padding: 1.5rem;
}
.custom-modal-overlay.active { display: flex; }
.custom-modal {
    background: linear-gradient(160deg, #14171D, #0E1015);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 1.75rem;
    max-width: 420px; width: 100%;
    box-shadow: 0 20px 48px rgba(0,0,0,0.5);
}
.custom-modal-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 1rem;
}
.custom-modal-header h3 {
    font-family: "Clash Display", "Cabinet Grotesk", sans-serif;
    font-size: 1.15rem; font-weight: 800;
    color: #fff; margin: 0;
}
.custom-modal-close {
    background: none; border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.5rem; cursor: pointer;
    padding: 0; line-height: 1;
    transition: color 0.2s;
}
.custom-modal-close:hover { color: #fff; }
.custom-modal-body {
    font-family: "Satoshi", "Inter", sans-serif;
    font-size: 0.9rem; color: rgba(255,255,255,0.6);
    line-height: 1.6;
}
.custom-modal-body p { margin: 0; }
.custom-modal-footer { margin-top: 1.5rem; display: flex; justify-content: flex-end; }
.custom-modal-btn {
    padding: 0.6rem 1.8rem;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-family: "Clash Display", "Cabinet Grotesk", sans-serif;
    font-size: 0.9rem; font-weight: 700;
    border-radius: 10px; border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}
.custom-modal-btn:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}

/* ── Footer ── */
.footer {
    position: relative;
    margin-top: clamp(4rem,8vw,8rem);
    background: transparent;
    border-top: 1px solid rgba(255,255,255,.06);
    overflow: hidden;
}
.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1400px; margin: 0 auto;
    padding: clamp(3rem,6vw,5rem) clamp(1.5rem,4vw,4rem);
}
.footer-nav, .footer-legal { display: flex; flex-direction: column; gap: 1.75rem; }
.nav-title {
    font-family: "Clash Display", "Cabinet Grotesk", sans-serif;
    font-size: 1rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase;
    color: #ffffffcc; margin: 0;
}
.footer .nav-links { display: flex; flex-direction: column; gap: 1rem; }
.nav-link {
    font-family: "Satoshi", "Inter", sans-serif;
    font-size: 1.15rem; color: #ffffffb3;
    text-decoration: none;
    transition: all .2s ease;
    width: fit-content;
    position: relative;
}
.nav-link:after {
    content: "";
    position: absolute; bottom: -2px; left: 0;
    width: 0; height: 1px;
    background: #2563eb;
    transition: width .3s ease;
}
.nav-link:hover { color: #fff; }
.nav-link:hover:after { width: 100%; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.06);
    background: transparent;
}
.bottom-content {
    max-width: 1400px; margin: 0 auto;
    padding: 1.5rem clamp(1.5rem,4vw,4rem);
    display: flex; align-items: flex-start;
    justify-content: space-between; gap: 2rem;
}
.legal-line { max-width: 900px; }
.copyright {
    font-family: "Satoshi", "Inter", sans-serif;
    font-size: .75rem; color: #ffffff4d;
    margin: 0; line-height: 1.8;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .centered { display: none; }
    .news-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .centered { display: none; }
    .news-grid { grid-template-columns: 1fr; }
    .hero-logo-single { max-width: 80%; margin-top: -20px; }
}
@media (max-width: 640px) {
    .news-grid { grid-template-columns: 1fr; }
    .news-stats-strip { flex-direction: column; align-items: center; }
    .news-stat-card { width: 100%; max-width: 320px; }
    .footer-content { grid-template-columns: 1fr; gap: 2rem; }
    .bottom-content { flex-direction: column; gap: 1rem; text-align: center; }
    .news-hero { padding-top: 120px; }
    .news-filters-bar { justify-content: center; }
}
@media (max-width: 480px) {
    .hero-logo-single { max-width: 90%; }
    .news-card { padding: 1.25rem; }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0c0c0c; }
::-webkit-scrollbar-thumb { background: #ffffff1a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #ffffff2a; }