/* Blog-specific styles */
.blog-posts {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.featured-post {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.featured-post:hover {
    transform: translateY(-5px);
}

.post-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.post-media {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg-light);
}

.post-media::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border: 4px solid var(--text-muted);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0.5;
}

.post-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    position: relative;
    z-index: 1;
    background: var(--card-bg-light);
}

.post-media video::-webkit-media-controls {
    background: rgba(0, 0, 0, 0.5);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.post-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.post-category {
    display: inline-flex;
    align-items: center;
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    gap: 0.5rem;
}

.post-date {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    gap: 0.5rem;
}

.post-info h3 {
    font-size: 1.8rem;
    margin: 0.5rem 0;
    color: var(--text-primary);
    line-height: 1.3;
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 1rem 0;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(1.6em * 4); /* Fallback for browsers that don't support line-clamp */
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: gap 0.3s ease;
    margin-top: auto;
}

.read-more:hover {
    gap: 1rem;
}

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

/* Categories Section */
#categories {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.category-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.category-card.active {
    border-color: var(--accent-color);
    background: var(--card-bg-light);
}

.category-card i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.category-card:hover i,
.category-card.active i {
    transform: scale(1.1);
}

.category-card h3 {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    line-height: 1.3;
}

.post-count {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Blog Hero Section */
#blog-hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg-light);
    margin-bottom: 2rem;
}

#blog-hero .hero-content {
    max-width: 800px;
}

#blog-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
}

#blog-hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Empty Category Message */
.empty-category-message {
    padding: 2rem;
    text-align: center;
    margin: 2rem auto;
    max-width: 600px;
}

.empty-category-message .highlight-box {
    padding: 3rem 2rem;
    background: var(--card-bg-light);
    border-radius: 15px;
    border-left: 4px solid var(--accent-color);
}

.empty-category-message i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.empty-category-message h3 {
    font-size: 1.5rem;
    margin: 1rem 0;
    color: var(--text-primary);
}

.empty-category-message p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.text-center {
    text-align: center;
}

/* Post Card Styles */
.post-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.post-card .post-media {
    height: 250px;
    min-height: auto;
}

.post-card .post-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card h3 {
    font-size: 1.4rem;
    margin: 0.5rem 0;
    line-height: 1.3;
    color: var(--text-primary);
}

.post-card .read-more {
    margin-top: auto;
    padding-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .post-content {
        grid-template-columns: 1fr;
    }

    .post-media {
        min-height: 200px;
    }

    #blog-hero h1 {
        font-size: 2rem;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }

    .category-card {
        padding: 1rem;
        min-height: 150px;
    }

    .category-card i {
        font-size: 1.5rem;
    }

    .category-card h3 {
        font-size: 1rem;
    }
    
    /* Header adjustments for blog section */
    header nav {
        padding: 0 1rem;
    }
    
    header nav ul li {
        margin: 2px 5px;
    }
    
    header nav ul li a {
        font-size: 0.85rem;
    }

    .portfolio-link {
        justify-content: flex-start;
        width: 100%;
        padding: 12px 16px !important;
    }
}

@media (max-width: 480px) {
    .blog-posts {
        padding: 1rem;
    }

    .post-info h3 {
        font-size: 1.5rem;
    }

    .category-card {
        padding: 1rem;
    }

    #categories {
        padding: 1rem;
    }

    .empty-category-message {
        padding: 1rem;
    }
    
    /* Smaller header for mobile devices */
    header nav {
        padding: 0 0.5rem;
    }
    
    header nav ul {
        margin-top: 5px;
    }
    
    header nav ul li {
        margin: 2px;
    }
    
    header nav ul li a {
        padding: 2px 3px;
        font-size: 0.8rem;
    }
}

/* Adjust video size in featured post */
.featured-post .post-media {
    min-height: 400px;
}

/* Enhanced Portfolio Link */
.portfolio-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color) !important;
    font-weight: 600;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 20px;
    padding: 8px 16px !important;
    transition: all 0.3s ease;
}

.portfolio-link i {
    font-size: 0.9em;
    transition: transform 0.3s ease;
}

.portfolio-link:hover {
    background-color: rgba(59, 130, 246, 0.2);
    transform: translateX(-5px);
    color: var(--accent-color) !important;
}

.portfolio-link:hover i {
    transform: translateX(-5px);
} 