/* Blog-specific styles that complement the main styles.css */

/* Navigation modifications for blog */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    letter-spacing: 0.01em;
}

.nav-home:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

/* Blog Hero Section */
.blog-hero {
    padding: 180px 0 80px;
    background: radial-gradient(ellipse at center top, rgba(94, 106, 210, 0.25) 0%, transparent 50%),
                linear-gradient(180deg, #000000 0%, #050505 100%);
    text-align: center;
    position: relative;
}

.blog-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    max-width: 800px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-secondary), transparent);
    opacity: 0;
    animation: expandLine 1s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

.blog-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.blog-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(94, 106, 210, 0.1);
    border: 1px solid rgba(94, 106, 210, 0.2);
    border-radius: 20px;
    color: var(--accent-primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.blog-headline {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
    padding-bottom: 8px;
    background: linear-gradient(to top, #d8d8d8 0%, #f5f5f5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    /* Refined push-up animation */
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.blog-subheadline {
    font-size: 20px;
    line-height: 1.4;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-weight: 400;
    letter-spacing: -0.01em;
    /* Synchronized with headline */
    opacity: 0;
    transform: translateY(25px);
    animation: pushUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.blog-subtitle {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
    letter-spacing: -0.01em;
    /* Overlapping with line */
    opacity: 0;
    transform: translateY(20px);
    animation: pushUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

/* Categories Filter Section */
.blog-filters {
    padding: 40px 0;
    background: var(--bg-secondary);
    position: relative;
    z-index: 100;
}

.filter-wrapper.loading {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-wrapper.loaded {
    opacity: 1;
}

.filter-wrapper {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Filter tags - Linear-inspired sizing with original colors */
.filter-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #8B9AB8;  /* Original muted gray-blue for inactive */
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: 0;
    white-space: nowrap;
    height: 32px;  /* Slightly taller for better presence */
    line-height: 1;
    /* Slide in animation */
    opacity: 0;
    transform: translateX(-15px) scale(0.95);
    animation: slideInBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Stagger animation - synchronized cascade */
.filter-tag:nth-child(1) { animation-delay: 0.55s; }
.filter-tag:nth-child(2) { animation-delay: 0.65s; }
.filter-tag:nth-child(3) { animation-delay: 0.75s; }
.filter-tag:nth-child(4) { animation-delay: 0.85s; }
.filter-tag:nth-child(5) { animation-delay: 0.95s; }
.filter-tag:nth-child(6) { animation-delay: 1.05s; }

.filter-tag:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: #A8B3CF;  /* Original slightly lighter on hover */
}

.filter-tag.active {
    background: rgba(94, 106, 210, 0.1);
    border-color: rgba(94, 106, 210, 0.2);
    color: var(--accent-primary);  /* Original bright blue for active */
    font-weight: 500;
}

.filter-tag.active:hover {
    background: rgba(94, 106, 210, 0.15);
    border-color: rgba(94, 106, 210, 0.25);
    color: var(--accent-primary);
}

/* Blog Content Section */
.blog-content {
    padding: 80px 0 100px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    min-height: auto;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
    margin-bottom: 80px;
}

@media (max-width: 400px) {
    .articles-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}

/* Article Card - Panel Style matching feature cards */
.article-card {
    position: relative;
    padding: 36px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    animation: articleReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Stagger the article animations - faster loading */
.article-card:nth-child(1) { animation-delay: 0.6s; }
.article-card:nth-child(2) { animation-delay: 0.7s; }
.article-card:nth-child(3) { animation-delay: 0.8s; }
.article-card:nth-child(4) { animation-delay: 0.9s; }
.article-card:nth-child(5) { animation-delay: 1.0s; }
.article-card:nth-child(6) { animation-delay: 1.1s; }
.article-card:nth-child(7) { animation-delay: 1.2s; }
.article-card:nth-child(8) { animation-delay: 1.3s; }
.article-card:nth-child(9) { animation-delay: 1.4s; }

@keyframes articleReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Latest/new articles have lighter background to indicate they're fresh */
.article-card:has(.latest-badge),
.article-card.new,
.article-card[data-new="true"] {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

/* New article label - Matches category label style */
.new-label {
    padding: 4px 10px;
    background: rgba(20, 184, 166, 0.1);
    border-radius: 4px;
    color: #14b8a6;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 11px;
    border: 1px solid rgba(20, 184, 166, 0.15);
}

.article-card:hover {
    border-color: var(--border-secondary);
    transform: translateY(-2px);
}

/* Featured Article - Spans full width */
.article-card.featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(94, 106, 210, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(94, 106, 210, 0.2);
}

.article-card.featured:hover {
    border-color: rgba(94, 106, 210, 0.3);
}

/* Article Meta Information */
.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    position: relative;
}

.article-category {
    padding: 4px 10px;
    background: rgba(94, 106, 210, 0.1);
    border-radius: 4px;
    color: var(--accent-primary);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 11px;
    border: 1px solid rgba(94, 106, 210, 0.15);
}

/* LATEST Badge - Off-white design */
.latest-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    background: rgba(245, 245, 247, 0.08);
    border: 1px solid rgba(245, 245, 247, 0.12);
    border-radius: 4px;
    color: rgba(245, 245, 247, 0.9);
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    position: relative;
}

.latest-badge::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    background: rgba(245, 245, 247, 0.8);
    border-radius: 50%;
    margin-right: 5px;
    animation: pulse-dot 2s ease-in-out infinite;
}

.latest-badge span {
    margin-left: 2px;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 12px 2px rgba(16, 185, 129, 0.3);
    }
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.article-date {
    color: var(--text-tertiary);
    font-weight: 400;
}

/* Article Title */
.article-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    flex-grow: 0;
}

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

.article-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-title a:hover {
    color: var(--accent-primary);
}

/* Article Excerpt */
.article-excerpt {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 24px;
    letter-spacing: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.article-card.featured .article-excerpt {
    font-size: 17px;
    max-width: 800px;
}

/* Article Footer */
.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-primary);
}

.read-time {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.article-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.article-link:hover {
    gap: 10px;
    color: var(--accent-hover);
}

.article-link svg {
    transition: transform 0.2s ease;
}

.article-link:hover svg {
    transform: translateX(2px);
}

/* Load More Button */
.load-more-wrapper {
    text-align: center;
    margin-top: 60px;
}

.load-more {
    min-width: 200px;
}

/* Newsletter Section */
.newsletter-section {
    padding: 100px 0;
    background: radial-gradient(ellipse at center, rgba(94, 106, 210, 0.1) 0%, transparent 60%);
    position: relative;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-secondary), transparent);
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-content h2 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    color: #f5f5f5;
}

.newsletter-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.5;
}

.newsletter-form {
    display: flex;
    gap: 16px;
    max-width: 480px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.2s ease;
}

.newsletter-form input::placeholder {
    color: var(--text-tertiary);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
}

.newsletter-form .btn {
    flex-shrink: 0;
}

/* Horizontal Line Styling - Consistent with landing page */
.section-divider,
hr {
    margin: 48px auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-secondary), transparent);
    border: none;
    width: 100%;
    max-width: 600px;
    position: relative;
}

/* Full-width variant for blog content */
.section-divider--full,
hr.full-width {
    max-width: none;
    background: linear-gradient(90deg, transparent 10%, var(--border-secondary) 50%, transparent 90%);
}

/* Hidden articles for filtering */
.article-card.hidden {
    display: none;
}

/* Fade in animation for filtered articles - matching landing page */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Removed duplicate article-card rules - now handled by main definition */

/* Responsive Design */
@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: 1fr !important;
        gap: 24px;
    }
    
    .article-card.featured {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 140px 0 60px;
    }
    
    .blog-headline {
        font-size: 64px;
    }
    
    .blog-subheadline {
        font-size: 18px;
        margin-bottom: 24px;
    }
    
    .blog-subtitle {
        font-size: 16px;
    }
    
    .blog-filters {
        padding: 24px 0;
        position: relative;
    }
    
    .filter-wrapper {
        padding: 0 20px;
        justify-content: center;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .filter-wrapper::-webkit-scrollbar {
        display: none;
    }
    
    .filter-tag {
        padding: 6px 14px;
        font-size: 11px;
        flex-shrink: 0;
        height: 30px;
    }
    
    .blog-content {
        padding: 60px 0 80px;
    }
    
    .article-card {
        padding: 28px;
    }
    
    .article-title {
        font-size: 20px;
    }
    
    .article-card.featured .article-title {
        font-size: 24px;
    }
    
    .article-excerpt {
        font-size: 16px;
    }
    
    .article-card.featured .article-excerpt {
        font-size: 16px;
    }
    
    .newsletter-content h2 {
        font-size: 36px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input,
    .newsletter-form .btn {
        width: 100%;
    }
}

/* Mobile responsive - keep Linear's clean approach */
@media (max-width: 768px) {
    .filter-wrapper {
        gap: 8px;
    }
    
    /* Maintain same compact size on mobile */
    .filter-tag {
        font-size: 13px;
        padding: 6px 12px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .filter-wrapper {
        gap: 6px;
        padding: 0 12px;
    }
    
    /* Slightly smaller on very small screens */
    .filter-tag {
        font-size: 12px;
        padding: 5px 10px;
        height: 26px;
    }
}

@media (max-width: 480px) and (min-width: 421px) {
    .nav-home span {
        display: none;
    }
    
    .blog-hero {
        padding: 120px 0 40px;
    }
    
    .blog-headline {
        font-size: 42px;
    }
    
    .blog-subheadline {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .blog-subtitle {
        font-size: 16px;
    }
    
    /* Enhanced filter tag styling for small screens */
    .filter-wrapper {
        padding: 0 16px;
        gap: 8px;
        justify-content: center;
        max-width: 100%;
    }
    
    .filter-tag {
        padding: 8px 14px;
        font-size: 14px;  /* Increased from 13px for better readability */
        min-width: auto;
        letter-spacing: 0.05em;  /* Reduced letter spacing */
        height: 38px;  /* Taller for better touch targets */
    }
    
    .article-card {
        padding: 20px;
    }
    
    .article-meta {
        font-size: 13px;
    }
    
    .article-category {
        font-size: 13px;
    }
    
    .article-title {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .article-card.featured .article-title {
        font-size: 22px;
    }
    
    .article-excerpt {
        font-size: 17px;
        margin-bottom: 20px;
    }
    
    .newsletter-section {
        padding: 60px 0;
    }
    
    .newsletter-content h2 {
        font-size: 32px;
    }
    
    .newsletter-description {
        font-size: 16px;
    }
}


/* Push-up animation keyframes */
@keyframes pushUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero reveal with subtle scale */
@keyframes heroReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Refined slide in for filter tags */
@keyframes slideInBounce {
    0% {
        opacity: 0;
        transform: translateX(-15px) scale(0.95);
    }
    50% {
        opacity: 0.8;
        transform: translateX(2px) scale(1);
    }
    75% {
        transform: translateX(-1px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Expand line from center animation - elegant underscore */
@keyframes expandLine {
    0% {
        opacity: 0;
        transform: translateX(-50%) scaleX(0.05);
    }
    30% {
        opacity: 0.5;
        transform: translateX(-50%) scaleX(0.3);
    }
    60% {
        opacity: 0.8;
        transform: translateX(-50%) scaleX(0.7);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scaleX(1);
    }
}
