/**
 * CuiveMedia Blog - Stylesheet
 * News- und Blog-Design
 */

:root {
    --blog-primary: #2563eb;
    --blog-secondary: #10b981;
    --blog-accent: #f59e0b;
    --blog-danger: #ef4444;
    --blog-dark: #1e293b;
    --blog-light: #f8fafc;
    --blog-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

/* Header */
.blog-header {
    background: var(--bg-primary, #fff);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.blog-header .header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.blog-header .header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.blog-header .logo-img {
    height: 40px;
    width: auto;
}

.blog-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--blog-gradient);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    color: white;
}

.blog-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-secondary, #64748b);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.blog-nav .nav-item:hover,
.blog-nav .nav-item.active {
    background: var(--bg-secondary, #f1f5f9);
    color: var(--blog-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.blog-search {
    display: flex;
    align-items: center;
    background: var(--bg-secondary, #f1f5f9);
    border-radius: 8px;
    overflow: hidden;
}

.blog-search input {
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    width: 200px;
    font-size: 0.9rem;
}

.blog-search input:focus {
    outline: none;
}

.blog-search button {
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.blog-search button:hover {
    color: var(--blog-primary);
}

.header-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-secondary, #f1f5f9);
    border-radius: 8px;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    transition: all 0.2s;
}

.header-btn:hover {
    background: var(--bg-tertiary, #e2e8f0);
    color: var(--text-primary, #1e293b);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 10px;
    background: var(--bg-secondary, #f1f5f9);
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary, #1e293b);
    border-radius: 2px;
}

/* Hero Section */
.blog-hero {
    background: var(--blog-gradient);
    color: white;
    padding: 3rem 0;
}

.blog-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.blog-hero .lead {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Post Cards */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--bg-primary, #fff);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.post-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-image .category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.post-card-image .ai-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.35rem 0.75rem;
    background: rgba(0,0,0,0.7);
    border-radius: 20px;
    font-size: 0.75rem;
    color: white;
}

.post-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-card-excerpt {
    color: var(--text-secondary, #64748b);
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Featured Post */
.featured-post {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 0;
}

.featured-post .post-card-image {
    height: 100%;
    min-height: 350px;
    border-radius: 16px 0 0 16px;
}

.featured-post .post-card-body {
    padding: 2rem;
}

.featured-post .post-card-title {
    font-size: 1.75rem;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--bg-primary, #fff);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sidebar-widget h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--blog-primary);
}

.sidebar-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-categories li {
    margin-bottom: 0.5rem;
}

.sidebar-categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.sidebar-categories a:hover {
    background: var(--bg-secondary);
    color: var(--blog-primary);
}

.sidebar-categories .count {
    background: var(--bg-secondary);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* Trending Widget */
.trending-post {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.trending-post:last-child {
    border-bottom: none;
}

.trending-post-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--blog-primary);
    opacity: 0.3;
    min-width: 30px;
}

.trending-post-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.4;
}

.trending-post-title:hover {
    color: var(--blog-primary);
}

/* Single Post */
.single-post-header {
    padding: 3rem 0;
    background: var(--bg-secondary);
}

.single-post-category {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    margin-bottom: 1rem;
}

.single-post-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.single-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.single-post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.single-post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.single-post-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
}

.single-post-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
}

.single-post-content p {
    margin-bottom: 1.25rem;
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.single-post-content blockquote {
    border-left: 4px solid var(--blog-primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.single-post-content ul,
.single-post-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.single-post-content li {
    margin-bottom: 0.5rem;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 0.5rem;
    margin: 2rem 0;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-decoration: none;
    color: white;
    transition: opacity 0.2s;
}

.share-btn:hover {
    opacity: 0.9;
    color: white;
}

.share-btn.twitter { background: #1da1f2; }
.share-btn.facebook { background: #1877f2; }
.share-btn.linkedin { background: #0a66c2; }
.share-btn.whatsapp { background: #25d366; }

/* Comments Section */
.comments-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.comment {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.comment:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--blog-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.comment-content {
    color: var(--text-primary);
    line-height: 1.6;
}

.comment-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
}

.comment-action {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.comment-action:hover {
    color: var(--blog-primary);
}

/* Comment Replies */
.comment-replies {
    margin-left: 3rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

/* Comment Form */
.comment-form {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.comment-form h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.comment-form .form-group {
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--blog-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.comment-form button[type="submit"] {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--blog-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-form button[type="submit"]:hover {
    background: #1d4ed8;
}

/* Honeypot */
.comment-form .hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

/* Related Posts */
.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.related-posts h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Footer */
.blog-footer {
    background: var(--bg-secondary, #f8fafc);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.blog-footer h5,
.blog-footer h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary, #e2e8f0);
    border-radius: 8px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.footer-social a:hover {
    background: var(--blog-primary);
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--blog-primary);
}

.newsletter-form .input-group {
    display: flex;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.blog-pagination a,
.blog-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.blog-pagination a {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.blog-pagination a:hover {
    background: var(--blog-primary);
    color: white;
}

.blog-pagination span.current {
    background: var(--blog-primary);
    color: white;
}

/* Load More Button */
.load-more-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 2rem auto 0;
    padding: 1rem;
    background: var(--bg-secondary);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:hover {
    background: var(--blog-primary);
    color: white;
}

/* Alert Messages */
.blog-alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.blog-alert.success {
    background: #d1fae5;
    color: #065f46;
}

.blog-alert.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Mobile Styles */
@media (max-width: 991px) {
    .blog-posts-grid {
        grid-template-columns: 1fr;
    }

    .featured-post {
        grid-template-columns: 1fr;
    }

    .featured-post .post-card-image {
        border-radius: 16px 16px 0 0;
        min-height: 250px;
    }

    .blog-search {
        display: none;
    }
}

@media (max-width: 767px) {
    .blog-hero h1 {
        font-size: 1.75rem;
    }

    .single-post-title {
        font-size: 1.75rem;
    }

    .comment-form .form-row {
        grid-template-columns: 1fr;
    }

    .single-post-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    .comment-replies {
        margin-left: 1rem;
    }
}

/* Mobile Navigation */
.mobile-blog-nav {
    display: flex;
    flex-direction: column;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-item:hover {
    color: var(--blog-primary);
}

.mobile-search {
    margin-bottom: 1rem;
}

/* No Image Placeholder */
.post-card-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blog-gradient);
    color: white;
    font-size: 3rem;
}
