/* ============================================================
   MarketPulse — Clean Editorial News Platform
   Design: Minimal editorial / Financial Times inspired
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --ink: #0f0f0f;
    --ink-mid: #404040;
    --ink-light: #757575;
    --ink-faint: #b0b0b0;
    --bg: #fafaf8;
    --bg-card: #ffffff;
    --border: #e8e8e4;
    --border-light: #f0f0ed;
    --accent: #c0392b;
    --accent-dim: #f9e8e7;
    --blue: #453b74;
    --blue-dim: #e8edf3;
    --green: #1a5c3a;
    --radius: 4px;
    --radius-lg: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .09);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .12);
    --transition: 200ms ease;
    --font-serif: 'Lora', 'Georgia', serif;
    --font-sans: 'Inter', 'Helvetica Neue', 'Arial', sans-serif;
    --nav-h: 56px;

    /* ── Compatibility aliases (used by sfetch(`${SITE_URL}/api/update_profile.php`, {about.php, contact.php) ── */
    --primary-color: #2b00ff;
    --primary-light: #2563eb;
    --primary-dark: #0f2440;
    --accent-color: #c0392b;
    --text-primary: #0f0f0f;
    --text-secondary: #404040;
    --text-muted: #757575;
    --bg-light: #fafaf8;
    --bg-white: #ffffff;
    --border-color: #e8e8e4;
    --border-radius: 4px;
    --border-radius-lg: 8px;
    --success-color: #10b981;
    --success-light: #d1fae5;
    --danger-color: #ef4444;
    --danger-light: #fee2e2;
    --transition-fast: 200ms ease;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, .06);
}

/* ── Custom Icons ────────────────────────────────────────── */
.icon-bbg-eye {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13c0-5 4.5-9 9-9s9 4 9 9'/%3E%3Cpath d='M12 8.5c-2 0-3.5 1.5-3.5 3.5s1.5 3.5 3.5 3.5 3.5-1.5 3.5-3.5c0-.6-.15-1.2-.4-1.7'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13c0-5 4.5-9 9-9s9 4 9 9'/%3E%3Cpath d='M12 8.5c-2 0-3.5 1.5-3.5 3.5s1.5 3.5 3.5 3.5 3.5-1.5 3.5-3.5c0-.6-.15-1.2-.4-1.7'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.icon-bbg-chart {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 18h2V10H4v8zm5 0h2V6H9v12zm5 0h2V12h-2v6zm5 0h2v-5h-2v5z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 18h2V10H4v8zm5 0h2V6H9v12zm5 0h2V12h-2v6zm5 0h2v-5h-2v5z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* ── Reset ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
video,
iframe,
canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea {
    font-family: inherit;
}

/* ── Nav ───────────────────────────────────────────────────── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #000000 !important;
    border-bottom: 1px solid #222;
    box-shadow: none;
}

.nav-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    height: var(--nav-h);
    gap: 20px;
}

.nav-logo {
    font-family: var(--font-sans);
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -1px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.nav-logo span {
    color: #ffffff;
    opacity: 0.7;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    display: block;
    margin-top: -5px;
}

.nav-search-wrap {
    flex: 1;
    max-width: 380px;
    position: relative;
}

.nav-search {
    width: 100%;
    padding: 8px 16px 8px 40px;
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 14px;
    background: var(--bg);
    color: var(--ink);
    transition: var(--transition);
    outline: none;
}

.nav-search:focus {
    border-color: var(--ink-mid);
    background: #fff;
}

.nav-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-light);
    font-size: 14px;
    pointer-events: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-btn {
    padding: 7px 16px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-btn-outline {
    border: 1px solid var(--border);
    color: var(--ink-mid);
}

.nav-btn-outline:hover {
    border-color: var(--ink-mid);
    background: var(--bg);
}

.nav-btn-solid {
    background: var(--ink);
    color: #fff;
}

.nav-btn-solid:hover {
    background: var(--ink-mid);
}

.nav-user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px 5px 6px;
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 13px;
    color: var(--ink-mid);
    transition: var(--transition);
}

.nav-user-pill:hover {
    border-color: var(--ink-mid);
}

.nav-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Secondary nav — category tabs */
.nav-tabs {
    border-top: 1px solid #111;
    background: #000000;
}

.nav-tabs-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-tabs-inner::-webkit-scrollbar {
    display: none;
}

.nav-group {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}

.nav-group+.nav-group::before {
    content: '';
    width: 1px;
    height: 16px;
    background: var(--border);
    margin: 0 12px;
}

.nav-group-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    padding: 10px 8px;
    white-space: nowrap;
}

.nav-tab {
    font-size: 13px;
    font-weight: 500;
    color: #999;
    padding: 10px 12px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-tab:hover {
    color: var(--ink);
}

.nav-tab.active {
    color: var(--ink);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

/* ── Search Suggestions ────────────────────────────────────── */
.search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    overflow: hidden;
    display: none;
}

.search-suggestions.show {
    display: block;
}

.suggestion-section {
    padding: 8px 0;
}

.suggestion-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ink-faint);
    padding: 4px 14px 8px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    transition: var(--transition);
}

.suggestion-item:hover {
    background: var(--bg);
}

.suggestion-thumb {
    width: 42px;
    height: 30px;
    object-fit: cover;
    border-radius: 3px;
    background: var(--border);
    flex-shrink: 0;
}

.suggestion-title {
    font-size: 13px;
    color: var(--ink);
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ── Layout ────────────────────────────────────────────────── */
.page-wrap {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Page Header ───────────────────────────────────────────── */
.page-header {
    padding: 32px 0 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.page-header h1 {
    font-family: var(--font-serif);
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.page-header .sub {
    font-size: 14px;
    color: var(--ink-light);
    margin-top: 6px;
}

/* ── News Grid ─────────────────────────────────────────────── */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
    align-items: start;
}

/* ── News Card ─────────────────────────────────────────────── */
.news-card {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    box-shadow: none;
    transform: translateY(-2px);
    border-color: transparent;
}

.card-image-wrap {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--border-light);
    border: none;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}

.news-card:hover .card-image {
    transform: scale(1.03);
}

.card-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 8px;
    border-radius: 3px;
    background: var(--accent);
    color: #fff;
}

.card-tag.india {
    background: var(--blue);
}

.card-tag.global {
    background: #5a4e3a;
}

.card-tag.war {
    background: var(--accent);
}

.card-tag.pandemic {
    background: #2d7a4f;
}

.card-body {
    padding: 10px 14px 0 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: none;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--ink-light);
}

.card-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--ink-faint);
}

.card-title {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 65px;
    /* Fixed height for 3 lines */
    margin-bottom: 8px;
}

.news-card:hover .card-title {
    color: var(--blue);
}

.card-excerpt {
    font-size: 13px;
    color: var(--ink-mid);
    line-height: 1.55;
    margin: 0;
    padding-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 10;
    /* Balanced for ~450 chars */
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 202px;
    /* Fixed height for 10 lines */
}

.card-action i {
    cursor: pointer;
    transition: 0.2s;
}

.card-action:hover i {
    transform: scale(1.1);
    color: #62ab84;
}


/* ── Card action bar — sits directly below thumbnail ───────── */
.card-action-bar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--bg-card) !important;
    border: none !important;
    box-shadow: none !important;
}

.news-card *,
.news-card {
    border: none !important;
    border-bottom: none !important;
    border-top: none !important;
    box-shadow: none !important;
}

.card-action-bar::-webkit-scrollbar {
    display: none;
}

.card-action {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--ink-light);
    padding: 5px 8px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transition: var(--transition);
    white-space: nowrap;
    cursor: pointer;
}

.card-action:hover {
    color: var(--ink);
}

.card-action.like-btn.active {
    color: var(--accent);
}

.card-action.save-btn.active {
    color: var(--blue);
}

.card-action.loading {
    opacity: 0.6;
    cursor: wait;
}

.card-views {
    margin-left: auto;
    font-size: 12px;
    color: var(--ink-faint);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Stock tag on card ─────────────────────────────────────── */
.card-stock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--blue);
    background: var(--blue-dim);
    padding: 2px 7px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ══════════════════════════════════════════════════════════════
   ADVERTISEMENT SYSTEM — Card, Header, Inline, General
   ══════════════════════════════════════════════════════════════ */

/* ── Card (In-Feed) Ads ───────────────────────────────────── */
/* Matches .news-card dimensions exactly so it blends into the grid */
.ad-card-slot {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.ad-card-slot:hover {
    transform: translateY(-2px);
}

.ad-card-slot .card-image-wrap {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--border-light);
}

.ad-card-slot .card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}

.ad-card-slot:hover .card-image {
    transform: scale(1.03);
}

.ad-card-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #d97706;
    margin-bottom: 6px;
}

.ad-card-label i {
    font-size: 11px;
}

.ad-card-code-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 16px;
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border-radius: var(--radius-lg);
}

/* ── Full Card (Image Only) Ads ───────────────────────────── */
.ad-card-full {
    padding: 0 !important;
    position: relative;
    border: 1px solid var(--border-light) !important;
}

.ad-card-full .full-card-link {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    overflow: hidden !important;
}

.ad-card-full .full-card-image-wrap {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
}

.ad-card-full .full-card-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s ease !important;
}

.ad-card-full:hover .full-card-image {
    transform: scale(1.05) !important;
}

.ad-card-full .ad-tag {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important; /* Move back to left for premium look */
    right: auto !important;
    z-index: 10 !important;
}

/* ── Header Banner Ad ─────────────────────────────────────── */
.ad-placeholder[data-position="header"],
.ad-slot[data-ad-position="header"] {
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.ad-placeholder[data-position="header"] .ad-slot,
.ad-slot[data-ad-position="header"] {
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ad-slot[data-ad-position="header"] img {
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-lg);
}

/* ── Inline (Article Detail) Ad ───────────────────────────── */
.ad-placeholder[data-position="inline"],
.ad-slot[data-ad-position="inline"] {
    margin: 32px 0;
    text-align: center;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 4px;
}

.ad-slot[data-ad-position="inline"] img {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: cover;
    display: block;
    border-radius: var(--radius);
}

/* ── Popup Ad Modal ────────────────────────────────────────── */
.ad-popup-overlay {
    backdrop-filter: blur(5px);
}

.ad-popup-content {
    animation: popupFadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ad-popup-content .ad-slot img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* ── Sidebar Layout ────────────────────────────────────────── */
.article-layout {
    display: flex;
    max-width: 1200px;
    margin: 40px auto;
    gap: 40px;
    padding: 0 20px;
}

.article-main-col {
    flex: 1;
    min-width: 0;
}

.article-sidebar-col {
    width: 320px;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .article-layout {
        flex-direction: column;
    }

    .article-sidebar-col {
        width: 100%;
    }
}

/* ══ End Advertisement System ════════════════════════════════ */

/* ── Pagination ─────────────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 32px 0;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-mid);
    transition: var(--transition);
    padding: 0 10px;
}

.page-btn:hover {
    border-color: var(--ink-mid);
    color: var(--ink);
}

.page-btn.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.page-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ── Alert / Toast ─────────────────────────────────────────── */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid #f0c0bb;
}

.alert-success {
    background: #e6f4ea;
    color: var(--green);
    border: 1px solid #b7dfbf;
}

/* ── Auth Page ─────────────────────────────────────────────── */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--bg);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.auth-logo {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
    text-align: center;
    margin-bottom: 8px;
}

.auth-logo span {
    color: var(--accent);
}

.auth-sub {
    text-align: center;
    font-size: 14px;
    color: var(--ink-light);
    margin-bottom: 32px;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: var(--transition);
    cursor: pointer;
}

.auth-tab.active {
    color: var(--ink);
    border-bottom-color: var(--accent);
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-mid);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--ink);
    background: var(--bg);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--ink-mid);
    background: #fff;
}

.form-btn {
    width: 100%;
    padding: 12px;
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    margin-top: 8px;
}

.form-btn:hover {
    background: var(--ink-mid);
}

/* ── News Detail ────────────────────────────────────────────── */
.article-wrap {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 24px;
}

.article-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--ink-light);
    margin-bottom: 16px;
}

.article-kicker .tag {
    background: var(--blue-dim);
    color: var(--blue);
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 3px;
}

.article-title {
    font-family: var(--font-serif);
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.article-excerpt {
    font-size: 18px;
    color: var(--ink-mid);
    line-height: 1.6;
    border-left: 3px solid var(--accent);
    padding-left: 20px;
    margin-bottom: 28px;
    font-style: italic;
}

.article-hero {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 36px;
}

.article-body {
    font-size: 17px;
    line-height: 1.8;
    color: var(--ink-mid);
}

.article-body p {
    margin-bottom: 20px;
}

.article-body strong {
    color: var(--ink);
}

/* ── Article Layout with Sidebar ── */
.article-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
}

.article-main {
    min-width: 0;
}

.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* ── Sidebar Widgets ── */
.widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    overflow: hidden;
}

.widget-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.widget-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.widget-title i {
    color: var(--accent);
    font-size: 14px;
}

.widget-body {
    padding: 16px;
}

/* Stock Widget Item */
.stock-widget-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.stock-widget-item:last-child {
    border-bottom: none;
}

.stock-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stock-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--blue-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--blue);
}

.stock-name h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
}

.stock-name span {
    font-size: 11px;
    color: var(--ink-light);
}

.stock-price {
    text-align: right;
}

.stock-price .price {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
}

.stock-price .change {
    font-size: 11px;
    font-weight: 600;
}

.stock-price .change.positive {
    color: var(--green);
}

.stock-price .change.negative {
    color: var(--accent);
}

/* Popular News Item */
.popular-news-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.popular-news-item:last-child {
    border-bottom: none;
}

.popular-news-number {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--border);
    line-height: 1;
}

.popular-news-content h4 {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 4px;
}

.popular-news-content h4 a:hover {
    color: var(--blue);
}

.popular-news-content span {
    font-size: 11px;
    color: var(--ink-faint);
}

/* Newsletter Widget */
.newsletter-widget {
    background: var(--blue);
    color: #fff;
    text-align: center;
    border: none;
}

.newsletter-widget .widget-body {
    padding: 32px 24px;
}

.newsletter-icon {
    font-size: 32px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.4);
}

.newsletter-widget h3 {
    font-family: var(--font-serif);
    font-size: 20px;
    margin-bottom: 8px;
}

.newsletter-widget p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    line-height: 1.5;
}

.newsletter-widget .newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-widget input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 16px;
    border-radius: var(--radius);
    color: #fff;
    font-size: 13px;
    outline: none;
}

.newsletter-widget button {
    background: #fff;
    color: var(--blue);
    font-weight: 700;
    padding: 10px;
    border-radius: var(--radius);
}

@media (max-width: 992px) {
    .article-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .sidebar {
        position: static;
    }
}

.article-share {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 36px 0;
}

.share-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.share-btn {
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--ink-mid);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.share-btn:hover {
    border-color: var(--ink-mid);
    color: var(--ink);
}

.share-btn.like-btn.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

.share-btn.save-btn.active {
    background: var(--blue-dim);
    border-color: var(--blue);
    color: var(--blue);
}

/* ── Comments ───────────────────────────────────────────────── */
.comments-section {
    margin-top: 48px;
}

.comments-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.comment-form {
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.comment-textarea {
    width: 100%;
    min-height: 100px;
    resize: vertical;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--ink);
    background: var(--bg);
    outline: none;
    font-family: var(--font-sans);
    transition: var(--transition);
}

.comment-textarea:focus {
    border-color: var(--ink-mid);
    background: #fff;
}

.comment-submit {
    align-self: flex-start;
    padding: 9px 20px;
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.comment-submit:hover {
    background: var(--ink-mid);
}

.comment-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--border-light);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.comment-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

.comment-time {
    font-size: 11px;
    color: var(--ink-faint);
}

.comment-text {
    font-size: 14px;
    color: var(--ink-mid);
    line-height: 1.6;
}

/* ── Watchlist Page ─────────────────────────────────────────── */
.watchlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.stocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.stock-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: var(--transition);
}

.stock-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--ink-faint);
}

.stock-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--blue-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--blue);
}

.stock-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.stock-symbol {
    font-size: 11px;
    color: var(--ink-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stock-followers {
    font-size: 12px;
    color: var(--ink-light);
}

.follow-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-mid);
    transition: var(--transition);
    margin-top: auto;
}

.follow-btn:hover {
    border-color: var(--ink-mid);
    color: var(--ink);
}

.follow-btn.following {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-count {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-light);
}

/* ── Search Page ────────────────────────────────────────────── */
.search-hero {
    padding: 48px 0 32px;
    text-align: center;
}

.search-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    margin-bottom: 24px;
}

.search-big-wrap {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-big {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border: 1.5px solid var(--border);
    border-radius: 32px;
    font-size: 16px;
    background: var(--bg-card);
    color: var(--ink);
    outline: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.search-big:focus {
    border-color: var(--ink-mid);
    box-shadow: var(--shadow-md);
}

.search-big-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-light);
    font-size: 16px;
}

.results-section {
    margin-bottom: 48px;
}

.results-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ink-faint);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.result-row {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    align-items: flex-start;
    transition: var(--transition);
}

.result-row:hover {
    padding-left: 4px;
}

.result-thumb {
    width: 80px;
    height: 54px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--border);
    flex-shrink: 0;
}

.result-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.4;
}

.result-title:hover {
    color: var(--blue);
}

.result-meta {
    font-size: 11px;
    color: var(--ink-faint);
    margin-top: 4px;
}

.result-excerpt {
    font-size: 12px;
    color: var(--ink-light);
    margin-top: 4px;
    line-height: 1.5;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--ink-light);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink-mid);
    margin-bottom: 8px;
}

/* ── Featured / Top Stories Section ────────────────────────── */
.featured-section {
    margin-bottom: 40px;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    min-height: 360px;
}

/* Hero card — large featured */
.featured-hero {
    display: block;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--ink);
}

.featured-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms ease;
    opacity: 0.85;
}

.featured-hero:hover .featured-hero-img {
    transform: scale(1.04);
    opacity: 0.75;
}

.featured-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 28px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .75));
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.featured-hero-overlay .card-tag {
    position: static;
    align-self: flex-start;
}

.featured-hero-title {
    font-family: var(--font-serif);
    font-size: clamp(20px, 2.5vw, 30px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

.featured-hero-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sidebar — smaller featured cards */
.featured-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.featured-side-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    flex: 1;
}

.featured-side-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--ink-faint);
}

.featured-side-img {
    width: 90px;
    height: 65px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
    background: var(--border-light);
}

.featured-side-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.featured-side-body .card-tag {
    position: static;
    align-self: flex-start;
    font-size: 9px;
}

.featured-side-title {
    font-family: var(--font-serif);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-side-card:hover .featured-side-title {
    color: var(--blue);
}

/* ═══════════════════════════════════════════════════════════════
   SITE HEADER — Full header component styles
   ═══════════════════════════════════════════════════════════════ */

/* Container */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Header Top Bar ───────────────────────────────────────────── */
.site-header {

    top: 0;
    z-index: 100;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.header-top {
    background: #0f172a;
    color: #94a3b8;
    font-size: 12px;
    border-bottom: 1px solid #1e3a5f;
}

.header-top-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 36px;
    gap: 16px;
}

.header-top-left {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 12px;
}

.header-top-left span {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.header-top-left .header-date i,
.header-top-left span i {
    opacity: 0.7;
}

.header-top-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-top-right a {
    color: #94a3b8;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.header-top-right a:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, .06);
}

/* ── Header Main ──────────────────────────────────────────────── */
.header-main {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.header-main-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #1a3a5c, #2563eb);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
}

.logo-text h1 {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.logo-text span {
    font-size: 11px;
    color: var(--ink-light);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
}

/* Search */
.header-search {
    flex: 1;
    max-width: 400px;
}

.search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-form input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border: 1.5px solid var(--border);
    border-radius: 24px;
    font-size: 14px;
    background: var(--bg);
    color: var(--ink);
    outline: none;
    transition: var(--transition);
}

.search-form input:focus {
    border-color: var(--ink-mid);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 58, 92, .08);
}

.search-form input::placeholder {
    color: var(--ink-faint);
}

.search-form button {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-light);
    font-size: 14px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-watchlist,
.btn-login {
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-watchlist {
    border: 1px solid var(--border);
    color: var(--ink-mid);
    background: transparent;
}

.btn-watchlist:hover {
    border-color: var(--ink-mid);
    color: var(--ink);
}

.btn-watchlist i {
    color: #eab308;
}

.btn-login {
    background: var(--ink);
    color: #fff;
    border: 1px solid var(--ink);
}

.btn-login:hover {
    background: var(--ink-mid);
    border-color: var(--ink-mid);
}

/* ── Main Navigation ──────────────────────────────────────────── */
.main-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #000000;
    border-bottom: 1px solid #222;
}

.nav-container {
    display: flex;
    align-items: center;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    flex-wrap: wrap;
}

.nav-menu>li {
    position: relative;
    flex-shrink: 0;
}

.nav-menu>li>a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    transition: var(--transition);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-menu>li>a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, .1);
}

.nav-menu>li.active>a,
.nav-menu>li>a.active-link {
    color: #ffffff;
    font-weight: 800;
    border-bottom-color: #ff0000;
}

.nav-menu>li>a .fa-chevron-down {
    font-size: 9px;
    opacity: 0.5;
    transition: transform 200ms ease;
}

.nav-menu>li:hover>a .fa-chevron-down {
    transform: rotate(180deg);
}

/* ── Dropdown Menu ────────────────────────────────────────────── */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #111111;
    border: 1px solid #222;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 200ms ease;
    z-index: 200;
    list-style: none;
    margin: 0;
}

.nav-menu>li:hover>.dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #cccccc;
    transition: var(--transition);
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background: #222;
    color: #ffffff;
    padding-left: 20px;
}

.dropdown-menu li a i {
    width: 18px;
    text-align: center;
    opacity: 0.6;
    font-size: 12px;
}

/* ── Mobile Menu Toggle ───────────────────────────────────────── */
.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--ink);
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    border-color: var(--ink-mid);
}

/* ═══════════════════════════════════════════════════════════════
   SITE FOOTER — Full footer component styles
   ═══════════════════════════════════════════════════════════════ */
.site-footer {
    background: #000000 !important;
    color: #ffffff;
    margin-top: 60px;
    font-size: 14px;
    border-top: 1px solid #222;
}

/* Footer Top */
.footer-top {
    padding: 48px 0 36px;
    border-bottom: 1px solid var(--footer-border, rgba(255, 255, 255, .08));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
}

/* Footer About Column */
.footer-about {}

.footer-about .logo-text h2 {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--footer-heading, #f1f5f9);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
}

.footer-about .logo-text h2 i {
    color: #3b82f6;
}

.footer-about p {
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--footer-text, #94a3b8);
    margin-bottom: 20px;
}

/* Footer Social Icons */
.footer-social {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(var(--footer-text-rgb, 255, 255, 255), .06);
    border: 1px solid var(--footer-border, rgba(255, 255, 255, .08));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--footer-text, #94a3b8);
    font-size: 14px;
    transition: all 250ms ease;
}

.footer-social a:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    transform: translateY(-2px);
}

/* Footer Link Columns */
.footer-links-col {}

.footer-heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--footer-heading, #f1f5f9);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2b00ff;
    display: inline-block;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    font-size: 13.5px;
    color: var(--footer-text, #94a3b8);
    transition: all 200ms ease;
}

.footer-links a:hover {
    color: #e2e8f0;
    padding-left: 6px;
}

.footer-links a i {
    font-size: 9px;
    opacity: 0.4;
    transition: all 200ms ease;
}

.footer-links a:hover i {
    opacity: 0.8;
    color: #3b82f6;
}

/* Footer Bottom */
.footer-bottom {
    padding: 20px 0;
    background: #2d2c2cff !important;
}

.footer-bottom .container>div,
.footer-bottom>.container>.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copyright {
    font-size: 13px;
    color: var(--footer-text, #64748b);
    margin: 0;
}

.footer-copyright span {
    opacity: 0.6;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    font-size: 12.5px;
    color: #64748b;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: var(--footer-heading, #e2e8f0);
}

/* ── Footer Newsletter ─────────────────────────────────────────── */
.footer-newsletter {
    margin-top: 20px;
}

.footer-newsletter p {
    font-size: 12px;
    color: var(--footer-text);
    margin-bottom: 10px;
}

.newsletter-form {
    display: flex;
    gap: 0;
}

.newsletter-form input {
    flex: 1;
    padding: 9px 14px;
    border: 1px solid var(--footer-border, rgba(255, 255, 255, .12));
    border-right: none;
    border-radius: 6px 0 0 6px;
    background: var(--bg-card);
    color: var(--ink);
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.newsletter-form input::placeholder {
    color: #64748b;
}

.newsletter-form input:focus {
    border-color: #3b82f6;
    background: rgba(255, 255, 255, .08);
}

.newsletter-form button {
    padding: 9px 18px;
    background: #3b82f6;
    color: #fff;
    border: 1px solid #3b82f6;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.newsletter-form button:hover {
    background: #2563eb;
}

/* ── Loading skeleton ───────────────────────────────────────── */
@keyframes shimmer {
    0% {
        background-position: -800px 0;
    }

    100% {
        background-position: 800px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, var(--border) 25%, var(--border-light) 50%, var(--border) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

/* ── Responsive ─────────────────────────────────────────────── */
/* Large Desktops (1920px+) */
@media (min-width: 1920px) {

    .container,
    .page-wrap,
    .nav-top,
    .nav-tabs-inner {
        max-width: 1600px;
        padding: 0 40px;
    }

    .news-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 32px;
    }

    #gl-gainers,
    #gl-losers {
        padding: 24px;
    }
}

/* Specific Laptops (1366px - 1440px) */
@media (max-width: 1440px) {

    .container,
    .page-wrap,
    .nav-top,
    .nav-tabs-inner {
        padding: 0 24px;
    }

    .news-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* Tablets Landscape & Smaller Laptops (1100px) */
@media (max-width: 1100px) {
    .news-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}
@media (max-width: 1100px) {

    .featured-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .featured-sidebar {
        flex-direction: row;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .featured-side-card {
        min-width: 280px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .stock-info-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Tablets Portrait (768px - 1024px) */
@media (max-width: 992px) {
    .sector-hero-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .sector-info {
        flex-direction: column;
        align-items: center;
    }

    .sector-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .stocks-table th,
    .stocks-table td {
        padding: 12px 16px;
        font-size: 13px;
    }

    .stock-header-top {
        flex-direction: column;
        gap: 24px;
        align-items: center;
        text-align: center;
    }

    .stock-identity {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    .stock-price-section {
        text-align: center;
    }

    .stock-quick-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stock-identity {
        width: 100%;
    }
}

/* Mobile Devices (<768px) */
@media (max-width: 900px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Mobile Devices (<768px) */
@media (max-width: 800px) {

    .container,
    .page-wrap,
    .nav-top,
    .nav-tabs-inner {
        padding: 0 16px;
    }

    .nav-search-wrap,
    .header-search {
        display: none;
    }

    .comment-input-row {
        grid-template-columns: 1fr;
    }

    /* Header mobile */
    .header-top-left {
        gap: 10px;
        font-size: 11px;
    }

    .header-top-right a span {
        display: none;
    }

    .header-actions .btn-watchlist span,
    .header-actions .btn-login span {
        display: none;
    }

    .btn-watchlist,
    .btn-login {
        padding: 8px 12px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: #000000 !important;
        z-index: 1000;
        transition: left 300ms ease;
        overflow-y: auto;
        box-shadow: none;
        border-right: 1px solid #222;
        padding-top: 16px;
    }

    .main-nav.mobile-open {
        left: 0;
    }

    .nav-container {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin-top: 16px;
    }

    .nav-menu>li {
        width: 100%;
    }

    .nav-menu>li>a {
        padding: 14px 20px;
        border-bottom: 1px solid var(--border-light);
        margin-bottom: 0;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0 0 0 20px;
        background: var(--bg-card);
        display: none;
    }

    .nav-menu>li.mobile-dropdown-open>.dropdown-menu {
        display: block;
    }

    .nav-menu>li:hover>.dropdown-menu {
        transform: none;
    }

    /* Footer mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .footer-about p {
        margin: 0 auto 20px;
    }

    .footer-social,
    .footer-bottom-links {
        justify-content: center;
    }

    .footer-bottom .container>div {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    /* Sector & Stock specifics */
    .sector-hero {
        padding: 40px 0;
    }

    .sector-details h1 {
        font-size: 28px;
    }

    .sector-news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .action-cell {
        display: none;
    }

    .chart-timeframes {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .live-news-item {
        grid-template-columns: 100px 1fr;
        padding: 16px;
    }
}

@media (max-width: 600px) {
    .live-news-item {
        grid-template-columns: 1fr;
    }
    .live-news-thumb,
    .live-news-thumb-ph {
        width: 100% !important;
        height: 180px !important;
    }
}

    .stocks-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 520px) {

    .auth-card {
        padding: 24px 20px;
        box-shadow: none;
        border-width: 0;
        border-top: 1px solid var(--border);
    }

    .featured-sidebar {
        flex-direction: column;
    }

    .featured-side-card {
        min-width: 100%;
    }

    .featured-hero-overlay {
        padding: 20px;
    }

    .header-top-left .header-date {
        display: none;
    }

    .nav-actions {
        gap: 4px;
    }

    .article-hero {
        margin-bottom: 24px;
    }

    .article-title {
        font-size: 24px;
    }

    .live-news-thumb,
    .live-news-thumb-ph {
        display: block;
        width: 100%;
        height: 180px;
    }

    .live-news-item {
        grid-template-columns: 1fr;
    }

    .stock-quick-stats {
        grid-template-columns: 1fr;
    }

    .stock-header-top {
        padding: 20px 15px !important;
    }

    .stock-logo-img img, 
    .stock-logo-large {
        width: 60px !important;
        height: 60px !important;
    }

    .quick-stat {
        padding: 10px;
        width: 100%;
        justify-content: center;
    }
}

/* ── Article Specifics ────────────────────────────────────── */
.article-main {
    max-width: 800px;
    margin: 40px auto;
    width: 100%;
    padding: 0 24px;
}

.article-title {
    font-family: var(--font-serif);
    font-size: clamp(26px, 5vw, 36px);
    line-height: 1.2;
    margin-bottom: 24px;
    font-weight: 800;
    color: var(--ink);
}

@media (max-width: 600px) {
    .article-main {
        margin: 20px auto;
        padding: 0 16px;
    }
    .article-title {
        font-size: 24px;
    }
}

/* Mobile menu overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.mobile-overlay.show {
    display: block;
}

.header-top-content {
    height: 30px;
}

.container {
    padding: 0 16px;
}

.footer-top {
    padding: 32px 0 24px;
}

.footer-social {
    justify-content: center;
}

/* ── News Card Summary & Comment Toggle Animation ───────────── */
.card-toggle-wrapper {
    position: relative;
    width: 100%;
    height: 202px;
    overflow: hidden;
}

.card-excerpt-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.card-toggle-wrapper.show-comments .card-excerpt-container {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.card-toggle-wrapper .card-comments {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    z-index: 5;
    padding: 0 !important;
    border: none !important;
}

.card-toggle-wrapper.show-comments .card-comments {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Custom scrollbar for comments list to look sleek and modern */
.card-toggle-wrapper .card-comments-list::-webkit-scrollbar {
    width: 4px;
}
.card-toggle-wrapper .card-comments-list::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: 4px;
}
.card-toggle-wrapper .card-comments-list::-webkit-scrollbar-thumb {
    background: var(--ink-faint);
    border-radius: 4px;
}
.card-toggle-wrapper .card-comments-list::-webkit-scrollbar-thumb:hover {
    background: var(--ink-light);
}

/* ── Card Comments (Improved Design) ────────────────────── */
.card-comments {
    border-top: 1px solid var(--border-light);
    background: var(--bg-card);
    padding: 12px 16px;
    font-family: var(--font-sans);
}

.card-comments-list {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.card-comments-list .comment-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    padding: 0;
}

.card-comments-list .comment-avatar {
    width: 22px;
    height: 22px;
    font-size: 8px;
    background: var(--blue-dim);
    color: var(--blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.card-comments-list .comment-content-wrap {
    flex: 1;
    font-size: 11px;
    /* Smaller font */
    line-height: 1.4;
}

.card-comments-list .comment-username {
    font-weight: 700;
    color: var(--ink);
    margin-right: 4px;
}

.card-comments-list .comment-text {
    color: var(--ink-mid);
}

.card-comments-list .comment-actions-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    font-size: 10px;
    color: var(--ink-faint);
}

.card-comments-list .comment-actions-meta span {
    cursor: pointer;
}

.card-comments-list .comment-actions-meta span:hover {
    color: var(--blue);
}

.reply-btn {
    cursor: pointer;
    font-weight: 600;
    color: var(--blue);
    transition: var(--transition);
}

.reply-btn:hover {
    text-decoration: underline;
    color: var(--accent);
}

.reply-form-container {
    width: 100%;
}

.toggle-replies-btn {
    cursor: pointer;
    font-weight: 500;
    color: var(--ink-light);
    font-size: 10px;
    background: var(--border-light);
    padding: 2px 8px;
    border-radius: 12px;
    transition: var(--transition);
}

.toggle-replies-btn:hover {
    background: var(--border);
    color: var(--ink);
}


.card-comment-form {
    border-top: 1px solid var(--border-light);
    padding: 16px;
    /* Even better padding */
    background: var(--bg-card);
}



.comment-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px;
    /* Padding inside the wrapper */
    border: 1px solid var(--border-faint);
    border-radius: 24px;
    background: var(--bg);
}


.emoji-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--ink-light);
    cursor: pointer;
    display: flex;
    transition: color .2s;
}

.emoji-btn:hover {
    color: var(--blue);
}

.card-comment-form textarea {
    flex: 1;
    border: none;
    background: transparent;
    padding: 4px 0;
    font-size: 12px;
    resize: none;
    outline: none;
    color: var(--ink);
}

.card-comment-form textarea::placeholder {
    color: var(--ink-faint);
}

.post-btn {
    background: transparent;
    border: none;
    color: var(--blue);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 0;
    transition: opacity 0.2s;
}

.post-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

/* Ensure textarea doesn't feel cramped */
.card-comment-form textarea {
    padding: 8px 4px;
}


.card-comment-form .guest-name-row {
    display: flex;
    padding: 8px 0 0;
    border-bottom: 1px solid #efefef;
    margin-bottom: 4px;
}

.card-comment-form .guest-name-input {
    border: none;
    font-size: 11px;
    outline: none;
    width: 100%;
    padding: 4px 0;
    background: transparent;
    color: var(--ink);
}

.comment-toggle.active {
    color: var(--blue);
}

/* ── News Detail Comments Section (Improved) ──────────────── */
.comments-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.comments-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-form {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 32px;
}

.comment-textarea {
    width: 100%;
    min-height: 100px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 12px;
    font-size: 13px;
    /* Small font */
    font-family: inherit;
    resize: vertical;
    margin-bottom: 12px;
    outline: none;
    transition: border-color .2s;
}

.comment-textarea:focus {
    border-color: var(--blue);
}

.comment-submit {
    background: var(--blue);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.comment-submit:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
}

.comments-section .comment-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-faint);
}

.comments-section .comment-item:last-child {
    border-bottom: none;
}

.comments-section .comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--blue-dim);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.comment-content-wrap {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--ink);
}

.comment-time {
    font-size: 11px;
    color: var(--ink-faint);
}

.comment-text {
    font-size: 12px;
    /* Small font */
    line-height: 1.6;
    color: var(--ink-mid);
}