/* ========================================
   MODERN BLOG - ADDITIONAL ENHANCEMENTS
   Advanced Animations & Interactions
   ======================================== */

/* Glassmorphism Effect */
.blog-card.glass-effect {
    background: rgba(17, 32, 37, 0.5);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Neon Glow Effect on Hover */
.blog-card.neon-hover:hover {
    box-shadow: 
        0 0 20px rgba(59, 130, 246, 0.3),
        0 0 40px rgba(59, 130, 246, 0.2),
        0 0 60px rgba(59, 130, 246, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
}

/* Parallax Effect for Images */
@media (min-width: 992px) {
    .blog-image-wrapper.parallax {
        overflow: visible;
    }

    .blog-image-wrapper.parallax .blog-image {
        transition: transform 0.3s ease-out;
    }
}

/* Gradient Text for Titles */
.blog-title.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pulse Animation for New Posts */
.blog-card.new-post::after {
    content: 'NEW';
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 4px;
    z-index: 3;
    animation: pulseNew 2s infinite;
}

@keyframes pulseNew {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Featured Post Styling */
.blog-card.featured {
    border: 2px solid rgba(59, 130, 246, 0.4);
    background: linear-gradient(
        135deg,
        rgba(59, 130, 246, 0.05) 0%,
        rgba(17, 32, 37, 0.6) 100%
    );
}

.blog-card.featured::before {
    content: '⭐ FEATURED';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 20px;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Reading Progress Bar */
.blog-card.with-progress {
    position: relative;
}

.blog-reading-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 0 0 16px 16px;
}

.blog-card:hover .blog-reading-progress {
    width: 100%;
}

/* Hover Lift Effect with Shadow */
@media (hover: hover) {
    .blog-card.lift-effect {
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .blog-card.lift-effect:hover {
        transform: translateY(-12px) scale(1.02);
    }
}

/* Skeleton Loading Animation */
.blog-card.skeleton .blog-image-wrapper {
    background: linear-gradient(
        90deg,
        rgba(17, 32, 37, 0.6) 25%,
        rgba(51, 65, 85, 0.5) 50%,
        rgba(17, 32, 37, 0.6) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.blog-card.skeleton .blog-title,
.blog-card.skeleton .blog-excerpt,
.blog-card.skeleton .blog-meta,
.blog-card.skeleton .blog-footer {
    background: rgba(51, 65, 85, 0.3);
    color: transparent;
    border-radius: 4px;
}

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

/* Staggered Animation for Cards */
.blog-card.stagger-animation {
    opacity: 0;
    transform: translateY(40px);
    animation: staggerFadeIn 0.6s ease-out forwards;
}

.blog-card.stagger-animation:nth-child(1) { animation-delay: 0.1s; }
.blog-card.stagger-animation:nth-child(2) { animation-delay: 0.2s; }
.blog-card.stagger-animation:nth-child(3) { animation-delay: 0.3s; }
.blog-card.stagger-animation:nth-child(4) { animation-delay: 0.4s; }
.blog-card.stagger-animation:nth-child(5) { animation-delay: 0.5s; }
.blog-card.stagger-animation:nth-child(6) { animation-delay: 0.6s; }

@keyframes staggerFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Interactive Border Animation */
.blog-card.animated-border {
    position: relative;
    background: rgba(17, 32, 37, 0.6);
    border: 2px solid transparent;
}

.blog-card.animated-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        45deg,
        #3b82f6,
        #10b981,
        #3b82f6
    );
    background-size: 200% 200%;
    border-radius: 16px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: borderGradient 3s linear infinite;
}

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

@keyframes borderGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Tooltip for Categories */
.blog-category-badge[data-tooltip] {
    position: relative;
    cursor: help;
}

.blog-category-badge[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 6px 12px;
    background: rgba(10, 20, 25, 0.95);
    color: white;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.blog-category-badge[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* Bookmark Button */
.blog-bookmark-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 20, 25, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
    opacity: 0;
    backdrop-filter: blur(10px);
}

.blog-card:hover .blog-bookmark-btn {
    opacity: 1;
}

.blog-bookmark-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #3b82f6;
    transform: scale(1.1);
}

.blog-bookmark-btn.bookmarked {
    background: rgba(59, 130, 246, 0.9);
    border-color: #3b82f6;
    color: white;
}

.blog-bookmark-btn svg {
    width: 18px;
    height: 18px;
}

/* Share Button Group */
.blog-share-group {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 3;
}

.blog-card:hover .blog-share-group {
    opacity: 1;
    transform: translateY(0);
}

.blog-share-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 20, 25, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.blog-share-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    transform: scale(1.1);
}

/* Dark Mode Support */
@media (prefers-color-scheme: light) {
    .modern-blog-section {
        background: linear-gradient(180deg, 
            rgba(248, 250, 252, 0) 0%,
            rgba(241, 245, 249, 0.5) 50%,
            rgba(248, 250, 252, 0) 100%);
    }

    .blog-card {
        background: rgba(255, 255, 255, 0.8);
        border-color: rgba(203, 213, 225, 0.3);
    }

    .blog-title {
        color: #0f172a;
    }

    .blog-excerpt {
        color: #475569;
    }

    .author-name {
        color: #334155;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .blog-image,
    .blog-read-more,
    .blog-arrow,
    .blog-bookmark-btn,
    .blog-share-group {
        transition: none;
        animation: none;
    }

    .blog-card:hover {
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .blog-card {
        border-width: 2px;
        border-color: currentColor;
    }

    .section-badge,
    .blog-category-badge {
        border: 2px solid currentColor;
    }
}
