/* ========================================
   SIMPLIFAQ BLOG - MODERN DESIGN
   ======================================== */

:root {
    /* Brand Colors */
    --brand-primary: #6366F1;
    --brand-secondary: #8B5CF6;
    --brand-accent: #EC4899;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    --gradient-secondary: linear-gradient(135deg, #EC4899 0%, #F59E0B 100%);
    --gradient-hero: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    
    /* Neutral Colors */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    
    /* Spacing */
    --container-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--gray-900);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========================================
   HEADER
   ======================================== */
.blog-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.blog-nav {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
}

.brand-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.brand-highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    transition: color var(--transition-base);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.nav-link.active {
    color: var(--brand-primary);
    font-weight: 600;
}

.nav-link.admin-link {
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-full);
}

.nav-link.admin-link:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   HERO SECTION
   ======================================== */
.blog-hero {
    position: relative;
    padding: 8rem 2rem 4rem;
    background: var(--gradient-hero);
    overflow: hidden;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-primary);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.7;
}

.hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.decoration-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--brand-primary);
    top: -200px;
    right: -100px;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--brand-secondary);
    bottom: -150px;
    left: -50px;
    animation-delay: -5s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: var(--brand-accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(-10px) translateX(-10px); }
    75% { transform: translateY(-30px) translateX(5px); }
}

/* ========================================
   FEATURED POST
   ======================================== */
.featured-section {
    padding: 3rem 0;
    background: white;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background: var(--gradient-secondary);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 2rem;
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all var(--transition-base);
}

.featured-post:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.featured-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 300px;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-content h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.featured-content p {
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
}

/* ========================================
   FILTER BAR
   ======================================== */
.filter-bar {
    padding: 2rem 0;
    background: white;
    border-bottom: 1px solid var(--gray-200);
}

.filter-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-left h2 {
    font-size: 1.5rem;
    font-weight: 700;
    display: inline;
    margin-right: 1rem;
}

.post-count {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.search-box:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-box svg {
    color: var(--gray-400);
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.9375rem;
    width: 250px;
    color: var(--gray-900);
}

.search-box input::placeholder {
    color: var(--gray-400);
}

/* ========================================
   POSTS GRID
   ======================================== */
.posts-section {
    padding: 3rem 0 4rem;
    background: white;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
    cursor: pointer;
}

.post-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
    border-color: var(--brand-primary);
}

.post-thumbnail {
    height: 200px;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-thumbnail.no-image {
    background: var(--gradient-primary);
}

.post-thumbnail.no-image svg {
    width: 64px;
    height: 64px;
    color: white;
    opacity: 0.5;
}

.post-body {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.post-meta svg {
    width: 16px;
    height: 16px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.post-body h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
    line-height: 1.3;
}

.post-excerpt {
    color: var(--gray-600);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.post-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.post-views svg {
    width: 16px;
    height: 16px;
}

/* Loading & Empty States */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    border: 4px solid var(--gray-200);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state svg {
    color: var(--gray-300);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.empty-state p {
    color: var(--gray-600);
}

/* Load More */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-base);
}

.load-more-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    transform: translateY(-2px);
}

/* ========================================
   NEWSLETTER CTA
   ======================================== */
.newsletter-cta {
    padding: 4rem 0;
    background: var(--gray-50);
}

.newsletter-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2.5rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
}

.newsletter-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    color: white;
}

.newsletter-content {
    flex: 1;
}

.newsletter-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.newsletter-content p {
    color: var(--gray-600);
}

.newsletter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-base);
}

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

/* ========================================
   FOOTER
   ======================================== */
.blog-footer {
    padding: 3rem 0 2rem;
    background: var(--gray-900);
    color: var(--gray-400);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
}

.footer-column h4 {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-column a {
    display: block;
    color: var(--gray-400);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color var(--transition-base);
}

.footer-column a:hover {
    color: var(--brand-primary);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    text-align: center;
    font-size: 0.875rem;
}

/* ========================================
   MODAL
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: white;
    border-radius: var(--radius-xl);
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.modal-close {
    position: sticky;
    top: 1rem;
    right: 1rem;
    float: right;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 10;
}

.modal-close:hover {
    background: var(--gray-100);
}

.article-content {
    padding: 3rem;
}

.article-content img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
}

.article-content h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
}

.article-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.article-content a {
    color: var(--brand-primary);
    text-decoration: underline;
}

.article-content ul, .article-content ol {
    margin: 1rem 0 1rem 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content code {
    padding: 0.2rem 0.4rem;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.article-content pre {
    padding: 1.5rem;
    background: var(--gray-900);
    color: var(--gray-100);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .featured-post {
        grid-template-columns: 1fr;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .newsletter-card {
        flex-direction: column;
        text-align: center;
    }
    
    .filter-bar .container {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}
