/* UsefulAI Blog Styles */

/* Design System Variables */
:root {
    --purple-primary: #8B5CF6;
    --purple-deep: #7C3AED;
    --purple-light: #A855F7;
    --charcoal: #1a1a1a;
    --gray-medium: #666666;
    --gray-light: #f8fafc;
    --white: #ffffff;

    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 80px;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-purple: 0 4px 16px rgba(139, 92, 246, 0.3);
}

/* Enhanced Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--purple-primary) 0%, var(--purple-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Blog Card Styles */
.blog-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(139, 92, 246, 0.1);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: 100%;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.blog-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: rgba(139, 92, 246, 0.2);
}

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

.blog-card-content {
    position: relative;
    z-index: 2;
    padding: var(--space-lg);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--purple-primary), var(--purple-light));
}

.blog-card-category {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: var(--space-sm);
    color: var(--charcoal);
    font-family: 'Space Grotesk', sans-serif;
    flex-grow: 1;
}

.blog-card-title:hover {
    color: var(--purple-primary);
    transition: color 0.3s ease;
}

.blog-card-excerpt {
    color: var(--gray-medium);
    line-height: 1.6;
    margin-bottom: var(--space-md);
    font-size: 0.95rem;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: var(--space-sm);
    border-top: 1px solid #e2e8f0;
    font-size: 0.875rem;
    color: var(--gray-medium);
}

.blog-card-author {
    font-weight: 600;
    color: var(--charcoal);
}

.blog-card-date {
    color: var(--gray-medium);
}

.blog-card-reading-time {
    display: flex;
    align-items: center;
    color: var(--gray-medium);
}

.blog-card-reading-time i {
    margin-right: 4px;
}

/* Featured Article Styles */
.featured-article {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 2px solid rgba(139, 92, 246, 0.1);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.featured-article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.featured-article:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: var(--shadow-lg);
    border-color: rgba(139, 92, 246, 0.3);
}

.featured-article:hover::before {
    opacity: 1;
}

.featured-article-content {
    position: relative;
    z-index: 2;
    padding: var(--space-xl);
}

.featured-article-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--purple-primary), var(--purple-light));
}

.featured-badge {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    background: linear-gradient(135deg, var(--purple-primary), var(--purple-light));
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 3;
}

.featured-article-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--space-md);
    color: var(--charcoal);
    font-family: 'Space Grotesk', sans-serif;
}

.featured-article-title:hover {
    color: var(--purple-primary);
    transition: color 0.3s ease;
}

/* Category Badge Styles */
.category-ai-automation {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.category-agentic-workflows {
    background-color: rgba(124, 58, 237, 0.1);
    color: #7C3AED;
}

.category-tutorials {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.category-case-studies {
    background-color: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.category-ai-tools-comparison {
    background-color: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.category-industry-insights {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.category-startup-journey {
    background-color: rgba(168, 85, 247, 0.1);
    color: #A855F7;
}

/* Category Grid Styles */
.category-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(139, 92, 246, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: rgba(139, 92, 246, 0.2);
}

.category-card:hover::before {
    opacity: 1;
}

.category-card-content {
    position: relative;
    z-index: 2;
}

.category-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: linear-gradient(135deg, var(--purple-primary), var(--purple-light));
}

.category-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: var(--charcoal);
    font-family: 'Space Grotesk', sans-serif;
}

.category-description {
    font-size: 0.875rem;
    color: var(--gray-medium);
    line-height: 1.5;
}

/* Search and Filter Styles */
.search-highlight {
    background-color: rgba(139, 92, 246, 0.2);
    padding: 2px 4px;
    border-radius: 3px;
}

/* Pagination Styles */
.pagination-button {
    padding: var(--space-sm) var(--space-md);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-md);
    background: white;
    color: var(--purple-primary);
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination-button:hover {
    background: var(--purple-primary);
    color: white;
    transform: translateY(-2px);
}

.pagination-button.active {
    background: var(--purple-primary);
    color: white;
    border-color: var(--purple-primary);
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination-button:disabled:hover {
    background: white;
    color: var(--purple-primary);
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-card-content {
        padding: var(--space-md);
    }

    .featured-article-content {
        padding: var(--space-lg);
    }

    .featured-article-image {
        height: 200px;
    }

    .featured-article-title {
        font-size: 1.25rem;
    }

    .category-card {
        padding: var(--space-md);
    }

    .category-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.animate {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right.animate {
    opacity: 1;
    transform: translateX(0);
}

/* Blog Navigation Enhancement */
.blog-nav-active {
    color: var(--purple-primary) !important;
    border-bottom: 2px solid var(--purple-primary);
}

/* Tag Styles */
.article-tag {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(139, 92, 246, 0.1);
    color: var(--purple-primary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: var(--space-xs);
    margin-bottom: var(--space-xs);
    transition: all 0.3s ease;
}

.article-tag:hover {
    background: var(--purple-primary);
    color: white;
    transform: translateY(-2px);
}

/* Social Share Styles */
.social-share {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.social-share-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.social-share-button:hover {
    transform: translateY(-3px) scale(1.1);
}

.social-share-twitter {
    background: #1DA1F2;
}

.social-share-linkedin {
    background: #0077B5;
}

.social-share-facebook {
    background: #4267B2;
}

/* Newsletter Form Enhancement */
#newsletter-form input:focus {
    border-color: var(--purple-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--purple-primary), var(--purple-light));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-purple);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
}