/* Blog Page Styles - Modern 2025 Design */

/* Import modern fonts */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --accent: #ec4899;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Navigation - Minimal & Clean */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 20px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-size: 15px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Blog Hero - Bold & Image-Based */
.blog-hero {
    padding: 180px 0 100px;
    background-image: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=2072&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(99, 102, 241, 0.75) 100%);
    z-index: 1;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.blog-hero-title {
    font-size: 72px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.04em;
    font-family: 'Space Grotesk', sans-serif;
}

.blog-hero-description {
    font-size: 22px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

/* Blog Section - Spacious Layout */
.blog-section {
    padding: 1px 0 120px;
    background: var(--bg-primary);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 48px;
    margin-top: 60px;
}

/* Blog Card - Modern & Clean */
.blog-card {
    background: var(--bg-primary);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    text-decoration: none;
    display: block;
    position: relative;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 20px;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.blog-card:hover::before {
    opacity: 0.03;
}

.blog-card-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.blog-card-content {
    padding: 32px;
    position: relative;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

.blog-card-category {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.05em;
}

.blog-card-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    line-height: 1.3;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.02em;
}

.blog-card-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
    font-size: 16px;
}

.blog-card-read-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.blog-card-read-more::after {
    content: '→';
    font-size: 18px;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-read-more {
    gap: 12px;
}

.blog-card:hover .blog-card-read-more::after {
    transform: translateX(4px);
}

/* Loading State */
.blog-loading {
    text-align: center;
    padding: 120px 20px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.blog-empty {
    text-align: center;
    padding: 120px 20px;
}

.blog-empty-title {
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
}

.blog-empty-description {
    color: var(--text-secondary);
    font-size: 18px;
    max-width: 480px;
    margin: 0 auto;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 100px 0 48px;
    position: relative;
    overflow: hidden;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 100px;
    margin-bottom: 80px;
}

.footer .logo {
    color: white;
    margin-bottom: 20px;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 100px;
}

.footer-column h4 {
    margin-bottom: 24px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.2s ease;
}

.footer-column a:hover {
    color: white;
    transform: translateX(4px);
}

.footer-bottom {
    padding-top: 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    body, html {
        overflow-x: hidden;
        max-width: 100vw;
    }

    * {
        max-width: 100%;
    }

    .container {
        padding: 0 20px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .nav-content {
        padding: 16px 0;
    }

    .nav-links {
        display: none;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 320px;
        max-width: 85vw;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        padding: 100px 32px 32px;
        gap: 28px;
        border-left: 1px solid var(--border);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        overflow-y: auto;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 999;
    }

    .nav-overlay.active {
        display: block;
    }

    .mobile-menu-btn {
        display: flex;
        position: relative;
        z-index: 1002;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .blog-hero {
        padding: 120px 0 60px;
    }

    .blog-hero-title {
        font-size: 42px;
    }

    .blog-hero-description {
        font-size: 18px;
    }

    .blog-section {
        padding: 60px 0 80px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-top: 40px;
    }

    .blog-card-title {
        font-size: 24px;
    }

    .blog-card-content {
        padding: 24px;
    }

    .footer {
        padding: 60px 0 32px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 48px;
        margin-bottom: 48px;
    }

    .footer-links {
        flex-direction: column;
        gap: 40px;
    }
}

/* Add smooth scroll padding for fixed nav */
html {
    scroll-padding-top: 100px;
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
