/* Blog and Writeups Page Styles */

.posts-container {
    padding: 2rem 0 4rem 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    backdrop-filter: blur(10px);
    height: fit-content;
}

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

.post-card:hover {
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 215, 0, 0.1);
}

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

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

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

.post-content {
    padding: 1.5rem;
    position: relative;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    flex-wrap: wrap;
}

.post-meta time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.post-meta time::before {
    content: '📅';
    font-size: 0.9rem;
}

.post-type {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    color: #FFD700;
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    backdrop-filter: blur(5px);
}

.ctf-name {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.15), rgba(255, 140, 0, 0.05));
    color: #FF8C00;
    border: 1px solid rgba(255, 140, 0, 0.3);
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    backdrop-filter: blur(5px);
}

.post-title {
    margin-bottom: 1.2rem;
    line-height: 1.3;
}

.post-title a {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    background: linear-gradient(45deg, #ffffff, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-title a:hover {
    background: linear-gradient(45deg, #FFD700, #FF8C00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-excerpt {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.post-badges {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    margin-top: auto;
}

.post-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: #FFD700;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: inherit;
}

.post-read-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
    color: #FFD700;
}

.post-read-btn i {
    transition: transform 0.3s ease;
}

.admin-post-actions {
    display: flex;
    gap: 0.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state i {
    font-size: 4rem;
    color: rgba(255, 215, 0, 0.3);
    margin-bottom: 1rem;
    display: block;
}

.empty-state h2 {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.empty-state p {
    font-size: 1.1rem;
}

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

/* Featured Post Styles */
.featured-post {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 140, 0, 0.04) 100%);
    border: 2px solid rgba(255, 215, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.featured-post::after {
    content: 'FEATURED';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(45deg, #FFD700, #FF8C00);
    color: #0F0F23;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 2;
}

.featured-post .post-content {
    padding: 2rem;
}

.featured-post .post-title a {
    font-size: 1.8rem;
}

/* Post Stats */
.post-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.post-stats i {
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .post-card {
        flex-direction: column;
        align-items: stretch;
    }
    
    .post-image {
        width: 100%;
        height: 200px;
    }
    
    .post-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .admin-post-actions {
        margin-left: 0;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .posts-container {
        padding: 2rem 0;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .post-title a {
        font-size: 1.2rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}