/* Blog Page Specific Styles */

/* Hero Section */
.hero-blog {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-blog .hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-blog .hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.hero-blog .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(30, 58, 138, 0.8) 0%, 
        rgba(79, 70, 229, 0.8) 50%, 
        rgba(139, 92, 246, 0.8) 100%);
}

.hero-blog .hero-content {
    text-align: center;
    z-index: 10;
    position: relative;
    animation: hero-entrance 1s ease-out;
    color: white;
}

.hero-blog .hero-title {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-blog .hero-description {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Categories Section */
.categories-section {
    padding: 40px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #e5e7eb;
}

.categories-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    animation: categories-entrance 0.8s ease-out;
}

@keyframes categories-entrance {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-btn {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.category-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.category-btn:hover::before {
    transform: translateX(100%);
}

.category-btn:hover {
    color: #3b82f6;
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.category-btn.active {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
    animation: category-active-pulse 2s ease-in-out infinite;
}

@keyframes category-active-pulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4); }
    50% { box-shadow: 0 12px 32px rgba(59, 130, 246, 0.6); }
}

/* Blog Posts Section */
.blog-posts {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 64px;
}

.post-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: post-card-entrance 0.8s ease-out;
    opacity: 1;
    transform: scale(1);
}

.post-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

@keyframes post-card-entrance {
    0% {
        opacity: 0;
        transform: translateY(100px) rotateY(-15deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateY(0);
    }
}

.post-card:hover {
    transform: scale(1.02) rotateY(5deg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.post-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.1);
}

.post-category {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    animation: category-badge-float 3s ease-in-out infinite;
}

@keyframes category-badge-float {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.post-content {
    padding: 32px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    color: #64748b;
    font-size: 14px;
}

.post-date, .post-read-time {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-title {
    font-size: 24px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 16px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.post-card:hover .post-title {
    color: #3b82f6;
}

.post-excerpt {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: 16px;
}

.post-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.post-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    transition: width 0.3s ease;
}

.post-link:hover::after {
    width: 100%;
}

.post-link:hover {
    color: #6366f1;
    transform: translateX(4px);
}

.post-link svg {
    transition: transform 0.3s ease;
}

.post-link:hover svg {
    transform: translateX(4px);
}

/* Load More Section */
.load-more-section {
    text-align: center;
    animation: load-more-entrance 0.8s ease-out 1s both;
}

@keyframes load-more-entrance {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-load-more {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 12px 48px rgba(59, 130, 246, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-load-more::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-load-more:hover::before {
    transform: translateX(100%);
}

.btn-load-more:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 64px rgba(59, 130, 246, 0.5);
}

.btn-load-more svg {
    transition: transform 0.3s ease;
}

.btn-load-more:hover svg {
    transform: translateY(4px);
}

/* Newsletter Section */
.newsletter-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.newsletter-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
    margin: 0 auto;
    animation: newsletter-entrance 0.8s ease-out;
}

@keyframes newsletter-entrance {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.newsletter-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 16px;
    animation: newsletter-title-pulse 3s ease-in-out infinite;
}

@keyframes newsletter-title-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.newsletter-description {
    font-size: 20px;
    margin-bottom: 32px;
    opacity: 0.9;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

@media (min-width: 640px) {
    .newsletter-form {
        flex-direction: row;
        justify-content: center;
    }
}

.newsletter-input {
    flex: 1;
    max-width: 300px;
    padding: 16px 24px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    color: #1f2937;
    transition: all 0.3s ease;
}

.newsletter-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

.newsletter-input::placeholder {
    color: #64748b;
}

.btn-newsletter {
    background: white;
    color: #3b82f6;
    border: none;
    padding: 16px 32px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-newsletter:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(255, 255, 255, 0.4);
    background: #f8fafc;
}

.btn-newsletter svg {
    transition: transform 0.3s ease;
}

.btn-newsletter:hover svg {
    transform: translateX(4px);
}

/* Filter Animation */
.post-card.filtering {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card.fade-out {
    opacity: 0;
    transform: scale(0.8) translateY(50px);
}

.post-card.fade-in {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .categories-filter {
        gap: 12px;
    }
    
    .category-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .post-content {
        padding: 24px;
    }
    
    .post-title {
        font-size: 20px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-input {
        max-width: 100%;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .post-card,
    .category-btn,
    .btn-load-more,
    .newsletter-content {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .categories-section,
    .newsletter-section,
    .load-more-section {
        display: none !important;
    }
    
    .post-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .post-image {
        height: 200px !important;
    }
}