/**
 * OFFART AI Articles Page Styles
 * Premium design with gradients and glow effects
 */

/* === Variables === */
:root {
    --articles-bg: #0a0a0f;
    --articles-card-bg: rgba(255, 255, 255, 0.02);
    --articles-card-hover: rgba(255, 255, 255, 0.05);
    --articles-border: rgba(255, 255, 255, 0.06);
    --articles-text: #ffffff;
    --articles-text-muted: rgba(255, 255, 255, 0.55);
    --articles-accent: #00d4ff;
    --articles-gold: #c9a84c;
    --articles-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --articles-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --articles-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --articles-gradient-ai: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    --articles-gradient-tech: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --articles-gradient-web: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
}

/* === Page Container === */
.articles-page {
    min-height: 100vh;
    background: var(--articles-bg);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(120, 119, 198, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(0, 212, 255, 0.08), transparent);
    padding-top: 20px;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

/* Ambient glow */
.articles-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    height: 400px;
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* === Header Section === */
.articles-header {
    padding: 60px 24px 48px;
    text-align: center;
    border-bottom: 1px solid var(--articles-border);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.articles-header-content {
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.articles-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 100px;
    margin-bottom: 24px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

.articles-dot {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
    }
}

.articles-pill-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #00d4ff, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.articles-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 700;
    color: var(--articles-text);
    margin: 0 0 16px 0;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.articles-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    color: var(--articles-text-muted);
    margin: 0;
    line-height: 1.7;
}

/* === Articles Container === */
.articles-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px 100px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* === Articles Grid === */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 28px;
}

/* Featured article spans full width on first row */
.article-card.featured {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .article-card.featured .article-link {
        display: grid;
        grid-template-columns: 1.2fr 1fr;
    }

    .article-card.featured .article-image-wrapper {
        height: 100%;
        min-height: 280px;
        max-height: 360px;
    }

    .article-card.featured .article-image {
        object-fit: cover;
        object-position: center;
    }

    .article-card.featured .article-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 40px;
    }

    .article-card.featured .article-title {
        font-size: 28px;
    }

    .article-card.featured .article-summary {
        font-size: 16px;
    }
}

/* === Article Card === */
.article-card {
    background: var(--articles-card-bg);
    border: 1px solid var(--articles-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Gradient border effect on hover */
.article-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, transparent 40%, rgba(0, 212, 255, 0.3) 60%, rgba(124, 58, 237, 0.3) 80%, transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.article-card:hover::before {
    opacity: 1;
}

.article-card:hover {
    background: var(--articles-card-hover);
    transform: translateY(-8px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(0, 212, 255, 0.05);
}

.article-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* === Article Image === */
.article-image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover .article-image {
    transform: scale(1.08);
}

/* Image overlay gradient */
.article-image-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.9), transparent);
    pointer-events: none;
}

.article-image-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Animated grid pattern for fallback */
.article-image-fallback::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

.fallback-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    font-family: 'Audiowide', sans-serif;
    font-size: 22px;
    font-weight: 400;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    color: var(--articles-accent);
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.05),
        inset 0 -3px 6px rgba(0, 0, 0, 0.2),
        0 4px 20px rgba(0, 212, 255, 0.15),
        0 0 40px rgba(0, 212, 255, 0.1);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* Category badge with gradient based on category */
.article-category {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Category-specific colors */
.article-category {
    color: var(--articles-accent);
}

/* === Article Content === */
.article-content {
    padding: 28px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
}

.article-title {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--articles-text);
    margin: 0 0 14px 0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.article-card:hover .article-title {
    color: var(--articles-accent);
}

.article-summary {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--articles-text-muted);
    margin: 0 0 20px 0;
    line-height: 1.7;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 18px;
    border-top: 1px solid var(--articles-border);
}

.article-source {
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(90deg, var(--articles-accent), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-time {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--articles-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-time::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--articles-accent);
    border-radius: 50%;
    opacity: 0.5;
}

/* === Empty State === */
.articles-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 24px;
    color: var(--articles-text-muted);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.02) 0%, rgba(124, 58, 237, 0.02) 100%);
    border-radius: 20px;
    border: 1px dashed var(--articles-border);
}

/* === Back Button === */
.articles-back {
    text-align: center;
    padding: 40px 24px 80px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 100px;
    color: var(--articles-text);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateX(-4px);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.15);
}

/* ========================================
   SINGLE ARTICLE PAGE
   ======================================== */
.single-article-page {
    min-height: 100vh;
    background: #0f0f17;
    background-image:
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(120, 119, 198, 0.08), transparent),
        radial-gradient(ellipse 40% 30% at 100% 50%, rgba(0, 212, 255, 0.04), transparent);
    padding: 120px 24px 100px;
    position: relative;
}

/* Two-column wrapper */
.single-article-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

.single-article-main {
    min-width: 0;
}

.single-article-container {
    max-width: 760px;
    position: relative;
    z-index: 1;
}

/* === TLDR Sidebar === */
.single-article-tldr {
    position: sticky;
    top: 140px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    overflow-x: hidden;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.3) transparent;
}

.single-article-tldr::-webkit-scrollbar {
    width: 4px;
}

.single-article-tldr::-webkit-scrollbar-track {
    background: transparent;
}

.single-article-tldr::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 4px;
}

.single-article-tldr::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

.tldr-card {
    background: linear-gradient(145deg, rgba(0, 212, 255, 0.06) 0%, rgba(124, 58, 237, 0.04) 100%);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 20px;
    padding: 28px;
    padding-top: 40px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tldr-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d4ff, #7c3aed, #f59e0b, #00d4ff);
    background-size: 300% 100%;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.tldr-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--articles-border);
}

.tldr-icon {
    font-size: 20px;
}

.tldr-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(90deg, var(--articles-accent), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* TLDR Summary - what happened */
.tldr-summary {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 20px 0;
    font-weight: 400;
}

/* TLDR Hook - the interesting quote */
.tldr-hook {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #fff;
    margin: 0;
    font-weight: 500;
    font-style: italic;
    display: block;
    padding: 12px 0 12px 24px;
    border-left: 2px solid rgba(0, 212, 255, 0.5);
}

.tldr-hook::before,
.tldr-hook::after {
    display: none !important;
    content: none !important;
}

.tldr-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.tldr-bullets li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: var(--articles-text-muted);
}

.tldr-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 6px;
    background: var(--articles-accent);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}

.tldr-insight {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(0, 212, 255, 0.15);
}

.tldr-insight-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--articles-accent);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.insight-icon {
    font-size: 14px;
}

.tldr-insight-text {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-style: italic;
}

/* Responsive: Stack on mobile */
@media (max-width: 900px) {
    .single-article-wrapper {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .single-article-tldr {
        position: relative;
        top: 0;
        order: -1; /* Show TLDR first on mobile */
    }

    .tldr-card {
        padding: 24px;
    }
}

.article-category-badge {
    display: inline-block;
    padding: 8px 18px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 100px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    background-clip: padding-box;
    color: var(--articles-accent);
    text-transform: uppercase;
    margin-bottom: 28px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

.single-article-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 700;
    color: var(--articles-text);
    line-height: 1.15;
    margin: 0 0 24px 0;
    letter-spacing: -0.03em;
}

.single-article-meta {
    display: flex;
    gap: 24px;
    color: var(--articles-text-muted);
    font-size: 14px;
    margin-bottom: 40px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--articles-border);
}

.single-article-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.single-article-image {
    margin: 0 0 40px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.single-article-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.single-article-image img {
    width: 100%;
    height: auto;
    display: block;
}

.single-article-content {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.85);
}

.single-article-content p {
    margin-bottom: 28px;
}

.single-article-content strong {
    color: var(--articles-text);
    font-weight: 600;
}

/* OFFART Insight highlight */
.single-article-content p:has(strong:first-child),
.single-article-content p strong:first-child {
    display: block;
}

/* Force bold headers with maximum specificity */
.single-article-page .single-article-main .single-article-content h2,
.single-article-page .single-article-main .single-article-content h3,
.single-article-content h2,
.single-article-content h3,
article.single-article-page h2,
article.single-article-page h3 {
    color: #fff !important;
    margin: 48px 0 20px !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.3 !important;
    -webkit-text-fill-color: #fff !important;
    background: none !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
    text-shadow: none !important;
}

.single-article-page .single-article-content h2,
.single-article-content h2,
article.single-article-page h2 {
    font-size: 24px !important;
    font-weight: 700 !important;
}

.single-article-page .single-article-content h3,
.single-article-content h3,
article.single-article-page h3 {
    font-size: 20px !important;
    font-weight: 700 !important;
}

/* Blockquote styling */
.single-article-content blockquote {
    margin: 32px 0;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
    border-left: 3px solid var(--articles-accent);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

/* Source Attribution Box */
.single-article-source {
    margin-top: 56px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid var(--articles-border);
    border-radius: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.single-article-source::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
}

.source-label {
    font-size: 11px;
    color: var(--articles-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.source-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--articles-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 17px;
    transition: all 0.3s ease;
}

.source-link:hover {
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.source-link svg {
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.source-link:hover svg {
    transform: translate(2px, -2px);
    opacity: 1;
}

/* Back Link */
.single-article-back {
    margin-top: 56px;
    padding-top: 36px;
    border-top: 1px solid var(--articles-border);
}

.back-to-articles {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--articles-border);
    border-radius: 100px;
    color: var(--articles-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-to-articles:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--articles-text);
    transform: translateX(-6px);
}

.back-to-articles svg {
    transition: transform 0.3s ease;
}

.back-to-articles:hover svg {
    transform: translateX(-4px);
}

/* === Mobile Responsive === */
@media (max-width: 600px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .article-card.featured {
        grid-column: 1;
    }

    .articles-header {
        padding: 48px 20px 36px;
    }

    .articles-container {
        padding: 32px 16px 80px;
    }

    .article-content {
        padding: 20px;
    }

    .article-title {
        font-size: 18px;
    }

    .article-image-wrapper {
        height: 180px;
    }

    .single-article-page {
        padding: 100px 20px 80px;
    }

    .single-article-content {
        font-size: 16px;
    }
}

/* === Animations === */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fade-in-up 0.6s ease backwards;
}

.article-card:nth-child(1) { animation-delay: 0s; }
.article-card:nth-child(2) { animation-delay: 0.1s; }
.article-card:nth-child(3) { animation-delay: 0.2s; }
.article-card:nth-child(4) { animation-delay: 0.3s; }
.article-card:nth-child(5) { animation-delay: 0.4s; }
.article-card:nth-child(6) { animation-delay: 0.5s; }

/* ========================================
   SHARE BAR - Floating Social Share
   ======================================== */
.article-share-bar {
    position: fixed;
    left: 32px;
    top: 50%;
    transform: translateY(-50%) translateX(-20px);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-share-bar.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

.share-bar-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--articles-text-muted);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    margin-bottom: 8px;
}

.share-bar-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 12px;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--articles-border);
    border-radius: 100px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    padding: 0;
    margin: 0;
    font: inherit;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.share-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    pointer-events: none;
}

.share-btn:hover {
    transform: scale(1.1);
}

/* Platform colors - visible default, stronger on hover */
.share-whatsapp {
    color: #25D366;
    border-color: rgba(37, 211, 102, 0.35);
    background: rgba(37, 211, 102, 0.08);
}
.share-whatsapp:hover {
    background: rgba(37, 211, 102, 0.18);
    border-color: rgba(37, 211, 102, 0.5);
}

.share-twitter {
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}
.share-twitter:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.share-linkedin {
    color: #0077B5;
    border-color: rgba(0, 119, 181, 0.35);
    background: rgba(0, 119, 181, 0.08);
}
.share-linkedin:hover {
    background: rgba(0, 119, 181, 0.18);
    border-color: rgba(0, 119, 181, 0.5);
}

.share-facebook {
    color: #1877F2;
    border-color: rgba(24, 119, 242, 0.35);
    background: rgba(24, 119, 242, 0.08);
}
.share-facebook:hover {
    background: rgba(24, 119, 242, 0.18);
    border-color: rgba(24, 119, 242, 0.5);
}

.share-native {
    color: #00d4ff;
    border-color: rgba(0, 212, 255, 0.4);
    background: rgba(0, 212, 255, 0.08);
}
.share-native:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.5);
    color: #00d4ff;
}

.share-copy {
    color: #00d4ff;
    border-color: rgba(0, 212, 255, 0.4);
    background: rgba(0, 212, 255, 0.08);
}
.share-copy:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.5);
    color: #00d4ff;
}

/* Copy tooltip */
.copy-tooltip {
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    background: var(--articles-accent);
    color: #000;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.copy-tooltip::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-right-color: var(--articles-accent);
}

.share-copy.copied .copy-tooltip {
    opacity: 1;
}

.share-copy.copied {
    background: rgba(0, 212, 255, 0.2) !important;
    color: var(--articles-accent) !important;
}

/* Mobile: Bottom bar */
@media (max-width: 1200px) {
    .article-share-bar {
        left: 50%;
        top: auto;
        bottom: 24px;
        transform: translateX(-50%) translateY(20px);
        flex-direction: row;
    }

    .article-share-bar.visible {
        transform: translateX(-50%) translateY(0);
    }

    .share-bar-label {
        writing-mode: horizontal-tb;
        transform: none;
        margin-bottom: 0;
        margin-right: 8px;
    }

    .share-bar-buttons {
        flex-direction: row;
        padding: 10px 16px;
        border-radius: 100px;
    }

    .share-btn {
        width: 44px;
        height: 44px;
    }

    .copy-tooltip {
        left: 50%;
        top: auto;
        bottom: 55px;
        transform: translateX(-50%);
    }

    .copy-tooltip::before {
        left: 50%;
        top: auto;
        bottom: -8px;
        transform: translateX(-50%);
        border: 4px solid transparent;
        border-top-color: var(--articles-accent);
    }
}

@media (max-width: 600px) {
    .article-share-bar {
        bottom: 16px;
    }

    .share-bar-label {
        display: none;
    }

    .share-btn {
        width: 40px;
        height: 40px;
    }

    .share-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* ========================================
   ABSTRACT CSS BACKGROUNDS FOR ARTICLES
   Used when article has no image
   ======================================== */

.article-abstract-bg {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 32px;
}

/* Style 1: Tech Grid */
.article-abstract-bg.style-1 {
    background:
        linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px),
        linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
        linear-gradient(135deg, #0a0a0f 0%, #0d1117 100%);
    background-size: 50px 50px, 50px 50px, 100% 100%;
}
.article-abstract-bg.style-1::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 30%, rgba(0, 212, 255, 0.2) 0%, transparent 50%);
}
.article-abstract-bg.style-1::after {
    content: 'AI';
    position: absolute;
    right: 30px;
    bottom: 20px;
    font-size: 64px;
    font-weight: 900;
    color: rgba(0, 212, 255, 0.06);
    letter-spacing: 8px;
}

/* Style 2: Mesh Gradient */
.article-abstract-bg.style-2 {
    background:
        radial-gradient(at 40% 20%, rgba(0, 212, 255, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(139, 92, 246, 0.12) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(236, 72, 153, 0.08) 0px, transparent 50%),
        radial-gradient(at 80% 100%, rgba(0, 212, 255, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(139, 92, 246, 0.08) 0px, transparent 50%),
        #0a0a0f;
}

/* Style 3: Circuit Pattern */
.article-abstract-bg.style-3 {
    background: linear-gradient(135deg, #0a0a0f 0%, #12121a 100%);
}
.article-abstract-bg.style-3::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 40%, transparent 100%);
}
.article-abstract-bg.style-3::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 40%, rgba(0, 212, 255, 0.15) 0%, transparent 40%);
}

/* Style 4: Waves */
.article-abstract-bg.style-4 {
    background: linear-gradient(180deg, #0a0a0f 0%, #0f0f1a 100%);
    overflow: hidden;
}
.article-abstract-bg.style-4::before {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -20%;
    width: 140%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: abstractWave 10s ease-in-out infinite;
}
.article-abstract-bg.style-4::after {
    content: '';
    position: absolute;
    bottom: -60%;
    left: -10%;
    width: 120%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: abstractWave 12s ease-in-out infinite reverse;
}

@keyframes abstractWave {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

/* ========================================
   PAGINATION
   ======================================== */

.articles-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 48px 24px 64px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    transform: translateY(-2px);
}

.pagination-btn svg {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.pagination-btn:hover svg {
    opacity: 1;
}

.pagination-info {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

@media (max-width: 600px) {
    .articles-pagination {
        gap: 12px;
        padding: 32px 16px 48px;
    }

    .pagination-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .pagination-btn span {
        display: none;
    }

    .pagination-btn svg {
        width: 24px;
        height: 24px;
    }
}

/* ========================================
   AJAX TRANSITIONS
   ======================================== */

.articles-grid {
    will-change: opacity, transform;
}

/* Swipe hint for mobile */
@media (max-width: 768px) {
    .articles-pagination::after {
        content: 'Swipe to navigate';
        display: block;
        width: 100%;
        text-align: center;
        color: rgba(255, 255, 255, 0.3);
        font-size: 12px;
        margin-top: 12px;
    }
}

/* ========================================
   RELATED ARTICLES
   ======================================== */

.related-articles {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.related-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.related-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

.related-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-card:hover .related-image img {
    transform: scale(1.05);
}

.related-content {
    padding: 14px;
}

.related-category {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--articles-accent, #00d4ff);
    margin-bottom: 6px;
    display: block;
}

.related-card-title {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .related-card {
        flex-direction: row;
    }

    .related-image {
        width: 100px;
        aspect-ratio: 1;
        flex-shrink: 0;
    }

    .related-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* ========================================
   FILTER BAR
   ======================================== */

.articles-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 32px;
    padding: 32px 24px 0;
    gap: 16px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.filter-tab.active {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.3);
    color: #00d4ff;
}

/* Date Pills - Separator line before */
.date-pills {
    position: relative;
    padding-left: 20px;
    margin-left: 20px;
}

.date-pills::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
    .articles-filter-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 24px 16px 0;
        margin-bottom: 24px;
    }

    .filter-tabs {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .filter-tab {
        flex-shrink: 0;
        padding: 6px 14px;
        font-size: 12px;
    }

    /* Date pills - remove separator on mobile */
    .date-pills {
        padding-left: 0;
        margin-left: 0;
    }

    .date-pills::before {
        display: none;
    }
}
