/* Blog List Page Game Style */
/* Optimized card layout with aligned READ-more buttons */

/* Override body for blog listing */
body {
    background: #1a1a2e !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    color: #ddd !important;
}

/* Hero Section - Game Style */
.hero {
    background:
        linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95)) !important;
    border-bottom: 4px solid #8b7355 !important;
    box-shadow: 0 4px 0 rgba(0,0,0,0.5) !important;
}

.hero h1 {
    font-family: 'Press Start 2P', 'Courier New', monospace !important;
    color: #ffd700 !important;
    text-shadow:
        3px 3px 0 #ff6b00,
        6px 6px 0 rgba(0,0,0,0.5) !important;
    line-height: 1.4 !important;
}

.hero p {
    color: #fff !important;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

/* Blog Container */
.blog-container {
    position: relative;
    z-index: 1;
}

/* Blog Grid - Equal Height Cards */
.blog-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)) !important;
    gap: 2rem !important;
    align-items: stretch; /* KEY: Make all cards same height */
}

/* Blog Cards - Game Inventory Style */
.blog-card {
    background: rgba(40, 40, 60, 0.95) !important;
    border: 4px solid #8b7355 !important;
    border-radius: 0 !important;
    box-shadow:
        6px 6px 0 rgba(0,0,0,0.5),
        inset 0 0 0 2px rgba(255,215,0,0.1) !important;
    transition: all 0.2s !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important; /* KEY: Flex column for proper alignment */
}

.blog-card:hover {
    transform: translate(-4px, -4px) !important;
    box-shadow:
        10px 10px 0 rgba(0,0,0,0.5),
        inset 0 0 0 2px rgba(255,215,0,0.3) !important;
    border-color: #ffd700 !important;
}

/* Blog Card Header - Quest Title Style */
.blog-card-header {
    background:
        linear-gradient(135deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8)) !important;
    color: white !important;
    padding: 1.5rem !important;
    border-bottom: 2px solid #8b7355;
}

.blog-card-header h2 {
    font-size: 1.2rem !important;
    margin-bottom: 0.5rem !important;
    color: #ffd700 !important;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.8);
    line-height: 1.4 !important;
    font-weight: bold;
}

.blog-meta {
    font-size: 0.8rem !important;
    color: #ddd !important;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.8);
}

/* Blog Card Body - Item Description Style */
.blog-card-body {
    padding: 1.5rem !important;
    color: #ddd !important;
    flex: 1 !important; /* KEY: Take remaining space */
    display: flex !important;
    flex-direction: column !important;
}

.blog-card-body p {
    color: #ddd !important;
    line-height: 1.5 !important;
    margin-bottom: 1rem !important;
    flex: 1 !important; /* KEY: Text takes available space */
}

/* Blog Tags - Achievement Badge Style */
.blog-card-body > div:first-child {
    margin-bottom: 1rem !important;
}

.blog-tag {
    display: inline-block !important;
    background: rgba(255, 215, 0, 0.2) !important;
    color: #ffd700 !important;
    border: 2px solid #ffd700 !important;
    padding: 0.3rem 0.8rem !important;
    border-radius: 0 !important;
    font-size: 0.75rem !important;
    margin-right: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

/* Read More Button - Game Action Button Style */
.read-more {
    display: inline-block !important;
    background: #ffd700 !important;
    color: #1a1a2e !important;
    padding: 0.8rem 1.5rem !important;
    text-decoration: none !important;
    border: 3px solid #ff6b00 !important;
    border-radius: 0 !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.5) !important;
    transition: all 0.1s !important;
    margin-top: auto !important; /* KEY: Push to bottom */
    align-self: flex-start !important; /* Don't stretch full width */
}

.read-more:hover {
    background: #ffed4e !important;
    transform: translate(-2px, -2px) !important;
    box-shadow: 6px 6px 0 rgba(0,0,0,0.5) !important;
}

.read-more:active {
    transform: translate(1px, 1px) !important;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.5) !important;
}

.read-more::after {
    content: ' 🎮';
}

/* Responsive Grid */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .hero h1 {
        font-size: 1.5rem !important;
    }

    .blog-card-header h2 {
        font-size: 1rem !important;
    }

    .blog-card-body {
        padding: 1rem !important;
    }
}

@media (max-width: 480px) {
    .blog-container {
        padding: 0 1rem !important;
    }

    .hero {
        padding: 2rem 1rem !important;
    }
}

/* Hover Effects for Better Interactivity */
.blog-card-header h2:hover {
    color: #ffed4e !important;
}

.blog-tag:hover {
    background: rgba(255, 215, 0, 0.4) !important;
    transform: scale(1.05);
}

/* Loading Animation for Cards */
.blog-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Ensure all cards are initially hidden for animation */
.blog-card {
    opacity: 0;
    animation-fill-mode: forwards;
}