/* Blog Page Styles */
.blog-hero {
    background: linear-gradient(135deg, var(--second-color) 0%, var(--second-color-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 10s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.blog-hero .container {
    position: relative;
    z-index: 1;
}

.blog-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.blog-hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Category Filter */
.blog-categories {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
    justify-content: center;
}

.category-filter {
    padding: 0.5rem 1.5rem;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    color: var(--second-color);
    transition: var(--transition);
    text-decoration: none;
}

.category-filter.active,
.category-filter:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Blog Grid Layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Blog Post Card */
.blog-post {
    background: var(--bg-section);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* Blog Image */
.blog-image {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    min-height: 200px;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.blog-post:hover .blog-image::before {
    transform: translateX(100%);
}

/* Icon positioning when no image */
.blog-image > .blog-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    opacity: 0.2;
}

.blog-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.9);
    z-index: 1;
}

.blog-image i,
.featured-image i {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

/* Content section below image */
.blog-content {
    padding: 1.5rem;
    background: white;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-content .blog-meta {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.blog-content .blog-category {
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-weight: 500;
    font-size: 0.75rem;
}

.blog-content .blog-title {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blog-content .blog-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.blog-content .blog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Blog meta styles */
.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    align-items: center;
    flex-wrap: wrap;
}

.blog-category {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-weight: 500;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.blog-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Featured Post */
.featured-post {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: linear-gradient(135deg, var(--second-color) 0%, var(--second-color-dark) 100%);
    color: white;
    padding: 3rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.featured-post::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

.featured-post:hover {
    transform: scale(1.02);
}

.featured-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: white;
}

.featured-content p {
    font-size: 1.125rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.featured-meta {
    display: flex;
    gap: 2rem;
    font-size: 0.875rem;
    opacity: 0.8;
}

.featured-image {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    min-height: 300px;
    position: relative;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    display: block;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s ease;
}

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

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.pagination a,
.pagination span {
    padding: 0.75rem 1rem;
    background: var(--bg-section);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    transition: var(--transition);
    font-weight: 500;
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
}

.pagination .active {
    background: var(--primary-color);
    color: white;
}

/* Category-specific gradients */
.blog-post[data-category="tutorials"] .blog-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-post[data-category="news"] .blog-image {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.blog-post[data-category="tech-insights"] .blog-image {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.blog-post[data-category="best-practices"] .blog-image {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.blog-post[data-category="product-updates"] .blog-image {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.blog-post[data-category="crm-grundlagen"] .blog-image,
.blog-post[data-category="crm-basics"] .blog-image {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

/* No Posts Message */
.no-posts-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-section);
    border-radius: 15px;
    border: 2px dashed var(--border-color);
}

.no-posts-message i {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: block;
    opacity: 0.6;
}

.no-posts-message h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.no-posts-message p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Category-specific styles for blog-kategorie.php */
.blog-header {
    background: linear-gradient(135deg, #005a73 0%, #0077a0 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.blog-header .container {
    text-align: center;
}

.blog-header h1 {
    margin-bottom: 1rem;
}

.blog-header p {
    margin-bottom: 0;
    opacity: 0.9;
}

/* Blog post grid for category pages */
.blog-post {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.blog-image {
    aspect-ratio: 16/9;
    min-height: 200px;
    background-size: cover;
    background-position: center;
}

.blog-content {
    padding: 1.5rem;
    background: white;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-category {
    display: inline-block;
    background: #e3f2fd;
    color: #005a73;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.blog-title {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-title a {
    color: inherit;
    text-decoration: none;
}

.blog-title a:hover {
    color: #005a73;
}

.blog-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.blog-meta {
    font-size: 0.875rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.blog-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #005a73;
    font-weight: 500;
    text-decoration: none;
    margin-top: 1rem;
}

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

/* No posts message for category pages */
.no-posts-category {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-section);
    border-radius: 15px;
}

.no-posts-category p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.no-posts-category .btn {
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2rem;
    }
    
    .featured-post {
        grid-template-columns: 1fr;
        padding: 2rem;
        margin-bottom: 1rem;
    }
    
    .featured-image {
        min-height: 200px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-categories {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
    }

    .blog-header {
        padding: 2rem 0;
        margin-bottom: 2rem;
    }
}