/**
 * Blog Page Custom Styles
 * Modern blog styling with glassmorphism and responsive design
 * Version: 1.0.0
 */

/* ================================
   Blog-specific CSS Variables
   ================================ */
:root {
    --blog-primary: #6366f1;
    --blog-secondary: #8b5cf6;
    --blog-accent: #f472b6;
    --blog-success: #10b981;
    --blog-glass-bg: rgba(255, 255, 255, 0.05);
    --blog-glass-border: rgba(255, 255, 255, 0.1);
    --blog-border-radius: 16px;
    --blog-border-radius-lg: 20px;
    --blog-transition: all 0.3s ease;
}

/* ================================
   Blog Hero Section
   ================================ */
.blog-hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.blog-hero-content {
    position: relative;
    z-index: 1;
}

.blog-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-hero p {
    font-size: 1.2rem;
    color: #9ca3af;
    max-width: 600px;
}

/* ================================
   Featured Post
   ================================ */
.featured-section {
    padding: 4rem 0;
}

.featured-post {
    background: var(--blog-glass-bg);
    border: 1px solid var(--blog-glass-border);
    border-radius: var(--blog-border-radius-lg);
    overflow: hidden;
    transition: var(--blog-transition);
    /* Glassmorphism fallback */
    background-color: rgba(30, 30, 40, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.featured-post:hover {
    transform: translateY(-5px);
    border-color: var(--blog-primary);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
}

.featured-post-img {
    height: 350px;
    background: linear-gradient(135deg, var(--blog-primary), var(--blog-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.featured-post-img::before {
    content: '\f075';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.15);
    position: absolute;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, var(--blog-primary), var(--blog-secondary));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
}

.featured-post-content {
    padding: 2rem;
}

/* ================================
   Post Category Badge
   ================================ */
.post-category {
    display: inline-block;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ================================
   Post Title
   ================================ */
.post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    line-height: 1.3;
}

.post-title a {
    color: #fff;
    text-decoration: none;
    transition: var(--blog-transition);
}

.post-title a:hover {
    color: #a5b4fc;
}

/* ================================
   Post Excerpt
   ================================ */
.post-excerpt {
    color: #9ca3af;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* ================================
   Post Meta Information
   ================================ */
.post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: #6b7280;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-meta-item i {
    color: #a5b4fc;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--blog-primary), var(--blog-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

/* ================================
   Read Time Badge
   ================================ */
.read-time {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.85rem;
}

.read-time i {
    color: #a5b4fc;
}

/* ================================
   Blog Grid Section
   ================================ */
.blog-grid {
    padding: 5rem 0;
    position: relative;
    z-index: 1;
}

.blog-card {
    background: var(--blog-glass-bg);
    border: 1px solid var(--blog-glass-border);
    border-radius: var(--blog-border-radius-lg);
    overflow: hidden;
    height: 100%;
    transition: var(--blog-transition);
    /* Glassmorphism fallback */
    background-color: rgba(30, 30, 40, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.blog-card:hover {
    transform: translateY(-8px);
    border-color: var(--blog-primary);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
}

.blog-card-img {
    height: 200px;
    background: linear-gradient(135deg, var(--blog-secondary), var(--blog-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.blog-card-img::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.2);
}

.blog-card-img.instagram::before { content: '\f16d'; }
.blog-card-img.youtube::before { content: '\f167'; }
.blog-card-img.tiktok::before { content: '\e07b'; }
.blog-card-img.facebook::before { content: '\f09a'; }
.blog-card-img.smm::before { content: '\f0e3'; }
.blog-card-img.api::before { content: '\f121'; }

.blog-card-content {
    padding: 1.5rem;
}

.blog-card .post-title {
    font-size: 1.2rem;
}

.blog-card .post-excerpt {
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ================================
   Categories Section
   ================================ */
.categories-section {
    padding: 5rem 0;
    background: #1e1e2e;
    position: relative;
    z-index: 1;
}

.category-card {
    background: var(--blog-glass-bg);
    border: 1px solid var(--blog-glass-border);
    border-radius: var(--blog-border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--blog-transition);
    text-decoration: none;
    /* Glassmorphism fallback */
    background-color: rgba(30, 30, 40, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.category-card:hover {
    border-color: var(--blog-primary);
    transform: translateX(5px);
}

.category-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--blog-primary), var(--blog-secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.category-info h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.category-count {
    color: #6b7280;
    font-size: 0.85rem;
}

/* ================================
   Newsletter Section
   ================================ */
.newsletter-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.newsletter-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.newsletter-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.newsletter-content p {
    color: #9ca3af;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--blog-glass-border);
    background: rgba(30, 30, 40, 0.8);
    color: #fff;
    font-size: 1rem;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--blog-primary);
}

.newsletter-form input::placeholder {
    color: #6b7280;
}

.newsletter-form button {
    padding: 1rem 2rem;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--blog-primary), var(--blog-secondary));
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--blog-transition);
    white-space: nowrap;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* ================================
   Section Header
   ================================ */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #9ca3af;
    font-size: 1.1rem;
}

/* ================================
   Sidebar Widget
   ================================ */
.sidebar-widget {
    background: var(--blog-glass-bg);
    border: 1px solid var(--blog-glass-border);
    border-radius: var(--blog-border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    /* Glassmorphism fallback */
    background-color: rgba(30, 30, 40, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sidebar-widget h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #fff;
}

/* ================================
   Z-Index and Overflow Handling
   ================================ */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.blog-hero,
.newsletter-section {
    position: relative;
    z-index: 1;
}

.featured-section,
.blog-grid,
.categories-section {
    position: relative;
    z-index: 2;
    background: #1a1a2e;
}

/* ================================
   Responsive Styles
   ================================ */
@media (max-width: 991px) {
    .blog-hero h1 {
        font-size: 2.5rem;
    }
    
    .featured-post-img {
        height: 250px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form button {
        width: 100%;
    }
    
    .post-meta {
        flex-wrap: wrap;
    }
}

@media (max-width: 767px) {
    .blog-hero {
        padding: 120px 0 60px;
    }
    
    .blog-hero h1 {
        font-size: 2rem;
    }
    
    .blog-hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .featured-post-content {
        padding: 1.5rem;
    }
    
    .post-title {
        font-size: 1.25rem;
    }
    
    .post-meta {
        gap: 1rem;
    }
    
    .newsletter-form {
        padding: 0 1rem;
    }
}

@media (max-width: 575px) {
    .blog-hero h1 {
        font-size: 1.75rem;
    }
    
    .featured-post-img {
        height: 200px;
    }
    
    .category-card {
        padding: 1rem;
    }
    
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ================================
   Animation Fallbacks
   ================================ */
[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* Fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(10px)) {
    .featured-post,
    .blog-card,
    .category-card,
    .sidebar-widget {
        background-color: rgba(30, 30, 40, 0.95);
    }
}

/* ================================
   Print Styles
   ================================ */
@media print {
    .blog-hero,
    .newsletter-section,
    #particles-canvas {
        display: none;
    }
    
    .blog-card,
    .featured-post {
        break-inside: avoid;
    }
}
