/* ==========================================================================
   MAIN STYLES - Global Blog Styles
   ========================================================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --text-color: #334155;
    --text-light: #64748b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warm: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-ocean: linear-gradient(135deg, #2e3192 0%, #1bffff 100%);
    --gradient-sunset: linear-gradient(135deg, #ff6e7f 0%, #bfe9ff 100%);
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-serif: Georgia, 'Times New Roman', serif;
    --font-mono: 'Courier New', monospace;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --radius-xl: 2rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.4);
    
    /* 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);
}

body {
    font-family: var(--font-sans);
    color: var(--text-color);
    line-height: 1.6;
    background: linear-gradient(to bottom right, #f8fafc 0%, #e0e7ff 50%, #fce7f3 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(100, 116, 139, 0.4);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s;
}

.btn-icon:hover {
    transform: scale(1.1);
}

/* Site Header */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: all var(--transition-base);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.site-title {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
    letter-spacing: -0.5px;
    transition: all var(--transition-base);
}

.site-title:hover {
    transform: scale(1.05);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Search Box */
.search-box {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    padding: 0.25rem;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.search-box input {
    border: none;
    outline: none;
    padding: 0.75rem;
    min-width: 250px;
    font-size: 0.875rem;
    background: transparent;
    transition: all var(--transition-base);
}

.search-box button {
    background: var(--gradient-primary);
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    font-size: 1.125rem;
    color: white;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.search-box button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Featured Section */
.featured-section {
    margin: var(--spacing-xl) 0;
}

.featured-article {
    position: relative;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
    transition: all var(--transition-slow);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.featured-article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-slow);
    z-index: 0;
}

.featured-article:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px -15px rgba(102, 126, 234, 0.3);
}

.featured-article:hover::before {
    opacity: 0.05;
}

.featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: all var(--transition-slow);
}

.featured-article:hover .featured-image {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.featured-content {
    padding: var(--spacing-xl);
    position: relative;
    z-index: 1;
}

.featured-category {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all var(--transition-base);
}

.featured-category:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.featured-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    color: var(--dark-color);
    line-height: 1.2;
    letter-spacing: -0.5px;
    transition: all var(--transition-base);
}

.featured-article:hover .featured-title {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.featured-excerpt {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Filter Section */
.filter-section {
    margin: var(--spacing-lg) 0;
}

.category-filters {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    padding: var(--spacing-md) 0;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-radius: var(--radius-xl);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left var(--transition-base);
    z-index: -1;
}

.category-btn:hover {
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.category-btn:hover::before {
    left: 0;
}

.category-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.category-btn.active::before {
    left: 0;
}

/* Articles Section */
.articles-section {
    margin: var(--spacing-xl) 0;
}

.articles-section h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    color: var(--dark-color);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

/* Article Card */
.article-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
}

.article-card:hover::before {
    transform: scaleX(1);
}

.article-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all var(--transition-slow);
}

.article-card:hover .article-thumbnail {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.article-card-content {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-category {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-xl);
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
    width: fit-content;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    transition: all var(--transition-base);
}

.article-card:hover .article-card-category {
    transform: scale(1.05);
}

.article-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--dark-color);
    line-height: 1.4;
}

.article-card-excerpt {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-light);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
}

.article-author {
    font-weight: 500;
    color: var(--text-color);
}

/* Loading & Error States */
.loading, .featured-placeholder {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-light);
}

.no-results {
    text-align: center;
    padding: var(--spacing-xl);
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--dark-color);
}

.load-more {
    text-align: center;
    margin: var(--spacing-xl) 0;
}

/* Footer */
.site-footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.site-footer p {
    margin: 0.5rem 0;
    opacity: 0.9;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1.25rem 1.75rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 300px;
    border-left: 4px solid transparent;
}

.notification.show {
    display: block;
}

.notification.success {
    border-left-color: var(--success-color);
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.2);
}

.notification.error {
    border-left-color: var(--danger-color);
    box-shadow: 0 10px 40px rgba(239, 68, 68, 0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }
    
    .site-nav {
        width: 100%;
        flex-direction: column;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        flex: 1;
        min-width: auto;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-image {
        height: 250px;
    }
    
    .featured-title {
        font-size: 1.5rem;
    }
}
