/* ==================== BLOG PAGE VARIABLES ==================== */
:root {
    --blog-accent: #a855f7;
    /* Purple */
    --blog-accent-2: #06b6d4;
    /* Cyan */
    --blog-dark-bg: #030014;
    --blog-card-bg: rgba(255, 255, 255, 0.03);
}

body.blog-page {
    background-color: var(--blog-dark-bg);
    overflow-x: hidden;
}

/* ==================== HERO HEADER ==================== */
/* ==================== HERO HEADER (Compact & Inline) ==================== */
.blog-header {
    position: relative;
    padding: 100px 0 40px;
    /* Reduced from 160px */
    text-align: center;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(168, 85, 247, 0.15) 0%, rgba(3, 0, 20, 1) 70%);
}

.blog-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 0.5rem;
    /* Reduced from 2rem to bring tags closer */
}

.nova-avatar-container {
    position: relative;
    width: 40px;
    height: 40px;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.1);
}

.nova-avatar-icon {
    font-size: 1.5rem;
    color: var(--blog-accent-2);
    filter: drop-shadow(0 0 5px var(--blog-accent-2));
}

.blog-header h1 {
    font-family: 'Outfit', sans-serif;
    /* Changed to 'Outfit' as requested */
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #fff 30%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    text-shadow: none;
    animation: none;
}

/* ==================== SMART TAGS FILTER (Compact Chips) ==================== */
/* ==================== SMART TAGS FILTER (Compact Chips) ==================== */
.smart-tags-container {
    display: flex;
    justify-content: flex-start;
    /* Align left to start, center if fits */
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    /* FORCE SINGLE LINE */
    overflow-x: auto;
    /* Enable horizontal scroll */
    max-width: 100%;
    /* Take full width */
    margin: 0 auto;
    padding: 0.5rem 1rem;
    /* Add padding for scrollbar space */
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar IE */
    width: fit-content;
}

/* Hide scrollbar Chrome/Safari/Edge */
.smart-tags-container::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .smart-tags-container {
        justify-content: center;
        /* Center on desktop if fits */
        max-width: 1000px;
        /* Constrain on desktop */
    }
}

.smart-tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    /* Prevent text wrap inside button */
    flex-shrink: 0;
    /* Prevent buttons from shrinking */
}

.smart-tag:hover,
.smart-tag.active {
    background: rgba(168, 85, 247, 0.1);
    border-color: var(--blog-accent);
    color: white;
    transform: translateY(-1px);
    box-shadow: none;
}

/* ==================== MASONRY GRID (News Portal Layout) ==================== */
.blog-grid {
    display: grid;
    gap: 1.5rem;
    padding: 2rem 0 2rem;
    /* Reduced from 6rem */
    grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1280px) {
    .blog-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}


.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: #64748b;
    font-size: 1.2rem;
}

/* ==================== ARTICLE CARD (Premium Interactive) ==================== */
.article-card {
    background: transparent;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transform: translateZ(0);
    /* Hardware acceleration */
}

/* Hover State - Amplified */
.article-card:hover {
    transform: translateY(-10px) scale(1.02);
    z-index: 2;
    background: rgba(168, 85, 247, 0.05);
    /* Very subtle tint */
}

/* Active/Click State - Tactile Feedback */
.article-card:active {
    transform: scale(0.95);
    transition-duration: 0.1s;
}

.article-image-wrapper {
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: auto;
}

/* Stronger Glow on Image Border */
.article-card:hover .article-image-wrapper {
    box-shadow: 0 20px 40px -5px rgba(168, 85, 247, 0.25);
    border-color: #a855f7;
    /* Solid Purple */
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.article-card:hover .article-image {
    transform: scale(1.15);
    /* Semantic Zoom++ */
}

.article-content {
    padding: 1rem 0.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-tag {
    font-size: 0.65rem;
    color: var(--blog-accent-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 0.3rem;
    display: block;
}

.article-title {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease, transform 0.3s ease, text-shadow 0.3s ease;
}

/* High Contrast Title Highlight + Micro-Animation */
.article-card:hover .article-title {
    color: #e9d5ff;
    /* Lighter, brighter lavender */
    text-shadow: 0 0 15px rgba(168, 85, 247, 0.6);
    /* Stroger Neon Glow */
    transform: translateX(6px);
    /* Slide right effect */
}

.article-excerpt {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 1rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mini-nova-icon {
    width: 20px;
    height: 20px;
    background: var(--blog-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: white;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

/* ==================== PAGINATION ==================== */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    /* Reduced from 4rem */
    padding-top: 1.5rem;
    /* Reduced from 2rem */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pagn-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    padding-bottom: 3px;
    /* Lift text visually */
}

.pagn-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-2px);
}

.pagn-btn.active {
    background: var(--blog-accent);
    color: white;
    border-color: var(--blog-accent);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

/* ==================== MODALS ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 0, 20, 0.95);
    backdrop-filter: blur(15px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-reader {
    background: #0b0f19;
}

@keyframes modalUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: 0.2s;
}

.close-modal:hover {
    background: var(--blog-accent);
    transform: rotate(90deg);
}

/* Reader Styles */
.reader-header {
    position: relative;
    height: 350px;
}

.reader-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.reader-header-text {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
}

.reader-title {
    font-size: 2.5rem;
    color: white;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin: 0.5rem 0;
}

.reader-body {
    padding: 2rem 3rem 4rem;
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Comments & Auth */
.comments-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-lock {
    background: rgba(168, 85, 247, 0.05);
    border: 1px dashed rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: #cbd5e1;
}

.auth-lock i {
    font-size: 2rem;
    color: var(--blog-accent);
    margin-bottom: 1rem;
}

.auth-card {
    max-width: 400px;
    padding: 3rem 2rem;
    text-align: center;
}

.auth-icon {
    font-size: 4rem;
    color: var(--blog-accent-2);
    margin-bottom: 1.5rem;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.auth-btn {
    padding: 1rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: 0.3s;
}

.auth-btn.google {
    background: white;
    color: #333;
}

.auth-btn.email {
    background: #334155;
    color: white;
}

.auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Comment List */
.comment-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.role-badge {
    background: rgba(6, 182, 212, 0.1);
    color: var(--blog-accent-2);
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.hidden {
    display: none !important;
}