/* Blog Styles - Primarily for blog.html (List of Posts & Sidebar) */

/* Blog Hero Section (FOR BLOG.HTML PAGE HEADER) */
#blog-hero {
    background: linear-gradient(rgba(25, 25, 35, 0.65), rgba(25, 25, 35, 0.65)), url('../img/blog-bg.jpg') no-repeat center center/cover; /* Увери се, че пътят до blog-bg.jpg е верен */
    text-align: center;
    color: white;
    padding: 100px 0 70px; /* body вече има padding-top */
    position: relative; 
}
#blog-hero .blog-hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: white;
    font-family: var(--font-primary); 
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}
#blog-hero .blog-hero-content p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 1rem auto;
    color: #e0e0e0;
    font-family: var(--font-secondary);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}
@media screen and (max-width: 768px) {
    #blog-hero {
        padding: 80px 0 60px;
    }
    #blog-hero .blog-hero-content h1 {
        font-size: 2.2rem;
    }
    #blog-hero .blog-hero-content p {
        font-size: 1rem;
    }
}
@media screen and (max-width: 576px) {
    #blog-hero {
        padding: 60px 0 40px;
    }
    #blog-hero .blog-hero-content h1 {
        font-size: 2rem;
    }
}
/* End of Blog Hero Section */


/* Blog Layout (FOR BLOG.HTML - LIST OF POSTS) */
#blog-content { 
    padding: 4rem 0;
    /* background-color не е нужен тук, управлява се от style.css (section:nth-of-type) */
}

.blog-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

/* STYLES FOR BLOG POST LIST ITEMS (ON BLOG.HTML) */
.blog-layout .blog-posts-main .blog-post { 
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    overflow: hidden; 
    transition: var(--transition);
}
.blog-layout .blog-posts-main .blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}
.blog-layout .blog-posts-main .blog-post .post-image-list { 
    width: 180px; 
    height: 120px;
    float: left;
    margin-right: 1.5rem; 
    margin-bottom: 0.5rem; 
    overflow: hidden;
    border-radius: var(--border-radius);
}
.blog-layout .blog-posts-main .blog-post .blog-thumb-list { 
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.blog-layout .blog-posts-main .blog-post:hover .blog-thumb-list {
    transform: scale(1.05);
}
.blog-layout .blog-posts-main .blog-post .post-content-list { 
    overflow: hidden; 
}
.blog-layout .blog-posts-main .blog-post .post-meta {
    display: flex;
    flex-wrap: wrap; 
    align-items: center; 
    margin-bottom: 0.75rem; 
    font-size: 0.85rem; 
    color: var(--grey-color);
}
.blog-layout .blog-posts-main .blog-post .post-date,
.blog-layout .blog-posts-main .blog-post .post-category {
    margin-right: 1rem;
    margin-bottom: 0.25rem; 
}
.blog-layout .blog-posts-main .blog-post .post-category a {
    color: var(--secondary-color);
    font-weight: 500;
    text-decoration: none;
}
.blog-layout .blog-posts-main .blog-post .post-category a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}
.blog-layout .blog-posts-main .blog-post .post-title { 
    font-size: 1.5rem; 
    margin-bottom: 0.75rem;
    line-height: 1.35; 
    font-family: var(--font-primary);
}
.blog-layout .blog-posts-main .blog-post .post-title a {
    color: var(--primary-color); 
    text-decoration: none;
}
.blog-layout .blog-posts-main .blog-post .post-title a:hover {
    color: var(--secondary-color);
}
.blog-layout .blog-posts-main .blog-post .post-excerpt {
    color: var(--dark-grey);
    margin-bottom: 1.2rem; 
    font-size: 0.95rem; 
    line-height: 1.65; 
}
.blog-layout .blog-posts-main .blog-post .read-more {
    display: inline-flex; 
    align-items: center;
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    font-size: 0.9rem; 
    text-decoration: none;
    padding-bottom: 2px;
}
.blog-layout .blog-posts-main .blog-post .read-more i {
    margin-left: 0.5em;
    transition: transform 0.3s ease;
}
.blog-layout .blog-posts-main .blog-post .read-more:hover i {
    transform: translateX(3px);
}
.blog-layout .blog-posts-main .blog-post .read-more::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
.blog-layout .blog-posts-main .blog-post .read-more:hover::after {
    width: 100%;
}
/* END OF STYLES FOR BLOG POST LIST ITEMS */


/* --- СТИЛОВЕ ЗА СТРАНИЦА НА ЕДИНИЧНА СТАТИЯ (articleX.html) --- */
/* Основните стилове за .article-page са в style.css. */
/* Този файл (blog.css) е предимно за blog.html. */
/* Ако има нужда от МНОГО специфични корекции САМО за статии, */
/* които са част от блога и не са покрити от общите стилове, */
/* могат да се добавят тук, насочени към елементи ВЪТРЕ в .article-page. */
/* Например: */
/*
.article-page .some-blog-specific-element {
    color: blue;
}
*/
/* --- END OF STYLES FOR SINGLE ARTICLE PAGES --- */


/* Sidebar Styles */
.blog-sidebar {
    position: sticky;
    top: 100px; /* Нагласи спрямо padding-top на body + височина на хедър, ако е фиксиран и се променя */
    align-self: flex-start;
}
.sidebar-widget {
    background-color: white;
    padding: 1.8rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2.5rem;
}
.sidebar-widget h3 {
    font-size: 1.25rem;
    margin-bottom: 1.2rem;
    position: relative;
    padding-bottom: 0.6rem;
    color: var(--primary-color); 
    font-family: var(--font-primary);
}
.sidebar-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 45px;
    height: 3px;
    background-color: var(--accent-color);
}
.search-form {
    display: flex;
    position: relative;
}
.search-form input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    border: 1px solid var(--light-grey);
    border-radius: var(--border-radius);
    outline: none;
    font-family: var(--font-secondary);
    font-size: 0.9rem;
}
.search-form input:focus {
    border-color: var(--primary-color);
}
.search-form button {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    width: 40px;
    background: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem; 
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    transition: background-color 0.3s ease;
}
.search-form button:hover {
    background-color: var(--secondary-color);
}
.categories-widget ul,
.recent-posts-widget ul {
    padding-left: 0; 
    list-style: none;
}
.categories-widget ul li,
.recent-posts-widget ul li {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--light-grey);
}
.categories-widget ul li:last-child,
.recent-posts-widget ul li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.categories-widget a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    color: var(--dark-grey); 
    text-decoration: none;
    padding: 0.2rem 0;
}
.categories-widget a:hover {
    color: var(--primary-color);
}
.categories-widget a:hover span { 
    color: var(--primary-color);
}
.categories-widget span { 
    color: var(--grey-color);
    font-size: 0.9em;
    transition: var(--transition);
    margin-left: 0.5em; /* Разстояние за брояча, ако бъде добавен */
}
.recent-posts-widget a {
    display: flex;
    align-items: center;
    color: inherit; 
    text-decoration: none;
}
.post-thumb-small {
    width: 65px;
    height: 65px;
    margin-right: 1rem;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}
.post-thumb-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    line-height: 1.35;
    transition: var(--transition);
    color: var(--dark-color); 
    font-family: var(--font-secondary); 
    font-weight: 500;
}
.post-info .post-date {
    font-size: 0.8rem;
    color: var(--grey-color);
}
.recent-posts-widget a:hover h4 {
    color: var(--primary-color);
}
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tags a {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background-color: var(--light-grey);
    color: var(--dark-grey); 
    border-radius: 3px;
    font-size: 0.8rem;
    transition: var(--transition);
    text-decoration: none;
}
.tags a:hover {
    background-color: var(--primary-color);
    color: white;
}
/* END OF Sidebar Styles */


/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    padding: 1rem 0;
}
.pagination a {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    padding: 0 10px;
    border-radius: var(--border-radius);
    background-color: white;
    color: var(--dark-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    text-decoration: none;
    font-weight: 500;
}
.pagination a:hover,
.pagination a.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.pagination a.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--light-grey);
}
.pagination a.disabled:hover {
    background-color: var(--light-grey);
    color: var(--dark-color);
}
/* END OF Pagination Styles */

/* Media Queries for blog.html specific elements */
@media screen and (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr; 
    }
    .blog-sidebar {
        position: static; 
        margin-top: 3rem; 
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media screen and (max-width: 768px) {
    /* #blog-hero { /* Корекция за padding-top, ако хедърът е по-малък */
        /* padding-top: 80px; /* Съобразено с padding-top на body */
    /* } */
    .blog-layout .blog-posts-main .blog-post .post-image-list {
        width: 150px;
        height: 100px; 
    }
     #blog-content { 
        padding: 3rem 0; 
    }
    .blog-layout {
        gap: 2rem; 
    }
}

@media screen and (max-width: 576px) {
    /* #blog-hero { */
        /* padding-top: 60px; /* Корекция за padding-top */
    /* } */
    .blog-layout .blog-posts-main .blog-post {
        padding: 1rem;
    }
    .blog-layout .blog-posts-main .blog-post .post-image-list { 
        width: 100%; 
        height: 180px;
        float: none;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    .blog-layout .blog-posts-main .blog-post .post-title { 
        font-size: 1.3rem;
    }
    .sidebar-widget {
        padding: 1.5rem;
    }
}