/**
 * Blog Stílus
 * Szterszky Krisztián - szterszkykrisztian.hu
 */

:root {
    --primary-color: #0F172A;
    --secondary-color: #1E293B;
    --accent-yellow: #f39c12;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
}

/* ==========================================
   BLOG HEADER
   ========================================== */

.blog-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 80px 0 60px;
    text-align: center;
}

.blog-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.blog-subtitle {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.95;
}

/* Breadcrumb */
.breadcrumb {
    margin-top: 2rem;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
}

.breadcrumb li {
    color: var(--white);
    font-size: 0.9rem;
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    opacity: 0.7;
}

.breadcrumb a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ==========================================
   BLOG LAYOUT
   ========================================== */

.blog-content {
    padding: 60px 0;
    background: var(--bg-light);
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        order: 2;
    }
}

/* ==========================================
   BLOG GRID (LISTA)
   ========================================== */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.blog-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.blog-card-image-link {
    display: block;
    overflow: hidden;
}

.blog-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.blog-card-content {
    padding: 25px;
}

.blog-card-category {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 12px;
    transition: background 0.3s ease;
}

.blog-card-category:hover {
    background: var(--accent-yellow);
}

.blog-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-card-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: var(--secondary-color);
}

.blog-card-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
}

.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.blog-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-meta-item i {
    color: var(--secondary-color);
}

/* ==========================================
   SIDEBAR
   ========================================== */

.blog-sidebar {
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

.sidebar-widget {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-form input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.search-form button {
    padding: 10px 20px;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form button:hover {
    background: var(--accent-yellow);
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.category-list a:hover,
.category-list a.active {
    background: var(--secondary-color);
    color: var(--white);
}

/* Post List (sidebar) */
.post-list {
    list-style: none;
    padding: 0;
}

.post-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.post-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.post-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 5px;
}

.post-list a:hover {
    color: var(--secondary-color);
}

.post-date {
    font-size: 0.85rem;
    color: var(--text-light);
    display: block;
}

/* Newsletter CTA */
.sidebar-newsletter {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: var(--white);
}

.sidebar-newsletter h3 {
    color: var(--white);
    border-color: rgba(255,255,255,0.3);
}

.sidebar-newsletter p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 15px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ==========================================
   PAGINATION
   ========================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 10px 20px;
    background: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.pagination-info {
    font-weight: 600;
    color: var(--text-light);
}

/* ==========================================
   SINGLE POST
   ========================================== */

.blog-post-container {
    padding: 60px 0;
    background: var(--bg-light);
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
}

.post-category {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 20px;
    transition: background 0.3s ease;
}

.post-category:hover {
    background: var(--accent-yellow);
}

.post-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.3;
    margin-bottom: 25px;
}

.post-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item i {
    color: var(--secondary-color);
}

.post-featured-image {
    max-width: 900px;
    margin: 0 auto 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 12px;
    padding: 50px;
    box-shadow: var(--shadow);
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 40px;
}

.post-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 40px;
    margin-bottom: 20px;
}

.post-content h3 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content ul, .post-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content a {
    color: var(--secondary-color);
    text-decoration: underline;
}

.post-content a:hover {
    color: var(--accent-yellow);
}

/* Tags */
.post-tags {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
}

.post-tags h4 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--text-light);
}

.tag {
    display: inline-block;
    background: var(--white);
    color: var(--primary-color);
    padding: 6px 14px;
    margin: 5px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

/* Social Share */
.social-share {
    margin-bottom: 40px;
    padding: 25px;
    background: var(--bg-light);
    border-radius: 8px;
}

.social-share h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-btn {
    padding: 10px 20px;
    border-radius: 6px;
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.share-btn.facebook { background: #1877f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.email { background: #666; }

/* Author Bio */
.author-bio {
    display: flex;
    gap: 25px;
    padding: 30px;
    background: var(--bg-light);
    border-radius: 12px;
    margin-bottom: 40px;
    border-left: 4px solid var(--secondary-color);
}

.author-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--secondary-color);
}

.author-info h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.author-info p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
}

.author-social a {
    display: inline-block;
    margin-right: 10px;
    color: var(--secondary-color);
    font-size: 1.4rem;
    transition: color 0.3s ease;
}

.author-social a:hover {
    color: var(--accent-yellow);
}

/* Related Posts */
.related-posts {
    margin-bottom: 40px;
}

.related-posts h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.related-post-card {
    background: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-3px);
}

.related-post-card a {
    text-decoration: none;
}

.related-post-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-post-card h4 {
    padding: 15px;
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.related-meta {
    padding: 0 15px 15px;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* CTA */
.post-cta {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    border-radius: 12px;
    color: var(--white);
}

.post-cta h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.post-cta p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.95;
}

.post-cta .btn {
    margin: 0 10px;
}

/* ==========================================
   NO POSTS
   ========================================== */

.no-posts {
    text-align: center;
    padding: 80px 20px;
    background: var(--white);
    border-radius: 12px;
}

.no-posts i {
    font-size: 5rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.no-posts h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.no-posts p {
    color: var(--text-light);
    margin-bottom: 30px;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .blog-title {
        font-size: 2rem;
    }

    .blog-subtitle {
        font-size: 1rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .post-title {
        font-size: 2rem;
    }

    .post-content-wrapper {
        padding: 30px 20px;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
    }

    .share-buttons {
        flex-direction: column;
    }

    .post-cta .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}
