/* ========================================
   Blog Archive Page Styles
   Vrtnarski svet - vrtnarskisvet.si

   Automatically applied to:
   - Category pages
   - Tag pages
   - Date archives
   - Author archives
   - Blog home page
   ======================================== */

/* ========================================
    GeneratePress Layout Override
    Remove default sidebar space
    ======================================== */

/* Make archive pages full width */
body.archive .site-content,
body.blog .site-content,
body.home.blog .site-content {
    display: block;
}

body.archive #primary,
body.blog #primary,
body.home.blog #primary {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

body.archive .inside-article,
body.blog .inside-article,
body.home.blog .inside-article {
    padding: 0;
    max-width: 100%;
}

/* Remove default content area restrictions */
body.archive .site-content .content-area,
body.blog .site-content .content-area,
body.home.blog .site-content .content-area {
    width: 100%;
    float: none;
}

/* If using separate containers layout */
body.archive.separate-containers .inside-article,
body.blog.separate-containers .inside-article {
    padding: 0;
}

/* Hide default sidebar on archive pages (we have custom one) */
body.archive #right-sidebar,
body.archive #left-sidebar,
body.archive .widget-area,
body.blog #right-sidebar,
body.blog #left-sidebar,
body.blog .widget-area {
    display: none;
}

/* Reset the archive wrapper to take full width */
.blog-archive-wrapper {
    width: 100%;
}


/* CSS Custom Properties */
:root {
    --primary-green: #2d5016;
    --secondary-green: #4a7c59;
    --light-green: #a8d5ba;
    --accent-red: #e74c3c;
    --accent-red-dark: #c0392b;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --text-dark: #333333;
    --text-gray: #666666;
    --text-light: #999999;
}

/* Blog Archive Wrapper */
.blog-archive-wrapper {
    background-color: var(--light-gray);
}

/* ========================================
   Blog Header Section
   ======================================== */
.blog-header {
    background: linear-gradient(rgba(45, 80, 22, 0.85), rgba(74, 124, 89, 0.85)),
                url('/wp-content/uploads/2026/01/blog-header-bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 10rem 0 5rem;
    text-align: center;
    color: var(--white);
    /* Full width - break out of container */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.blog-header-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.archive-label {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

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

.blog-subtitle {
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    opacity: 0.95;
    line-height: 1.6;
}

/* ========================================
   Main Content Layout
   ======================================== */
.blog-main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.blog-content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

/* ========================================
   Blog Posts Column
   ======================================== */
.blog-posts-container {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

/* Featured Post */
.featured-post {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 2px solid var(--medium-gray);
}

.featured-post .post-image {
    display: block;
    width: 100%;
    height: 400px;
    border-radius: 15px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.featured-post .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-post .post-image:hover img {
    transform: scale(1.05);
}

.featured-post .post-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
}

/* Post Meta */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.post-meta i {
    color: var(--secondary-green);
    margin-right: 0.3rem;
}

.post-category {
    background: var(--secondary-green);
    color: var(--white);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s;
}

.post-category:hover {
    background: var(--primary-green);
    color: var(--white);
}

/* Post Title */
.featured-post .post-title {
    font-size: 2rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-post .post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.featured-post .post-title a:hover {
    color: var(--secondary-green);
}

/* Post Excerpt */
.post-excerpt {
    font-size: 1.05rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* Read More Button */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-red);
    color: var(--white);
    padding: 0.9rem 2rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.read-more-btn:hover {
    background: var(--accent-red-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* ========================================
   Recent Posts Section
   ======================================== */
.recent-posts {
    margin-top: 2rem;
}

.recent-posts h3 {
    color: var(--primary-green);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.recent-post-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--medium-gray);
}

.recent-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-post-image {
    width: 140px;
    height: 100px;
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
}

.recent-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-post-image:hover img {
    transform: scale(1.05);
}

.recent-post-content {
    flex: 1;
}

.recent-post-content h4 {
    font-size: 1.1rem;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-weight: 600;
}

.recent-post-content h4 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.recent-post-content h4 a:hover {
    color: var(--secondary-green);
}

.recent-post-date {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.recent-post-excerpt {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ========================================
   Pagination
   ======================================== */
.blog-pagination {
    margin-top: 3rem;
    text-align: center;
}

.blog-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.blog-pagination a,
.blog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    padding: 0.8rem 1rem;
    background: var(--white);
    color: var(--text-gray);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--medium-gray);
    transition: all 0.3s;
    font-weight: 500;
}

.blog-pagination a:hover {
    background: var(--secondary-green);
    color: var(--white);
    border-color: var(--secondary-green);
}

.blog-pagination .current {
    background: var(--secondary-green);
    color: var(--white);
    border-color: var(--secondary-green);
}

/* ========================================
   Sidebar
   ======================================== */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.widget-title {
    color: var(--primary-green);
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--secondary-green);
    font-weight: 700;
}

/* Categories Widget */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    margin-bottom: 0.5rem;
}

.categories-list li.current-cat a {
    color: var(--secondary-green);
    font-weight: 600;
}

.categories-list a {
    color: var(--text-gray);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    transition: color 0.3s;
    border-bottom: 1px solid var(--light-gray);
}

.categories-list li:last-child a {
    border-bottom: none;
}

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

.post-count {
    background: var(--light-gray);
    color: var(--text-gray);
    padding: 0.2rem 0.7rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Newsletter Widget */
.newsletter-form {
    text-align: center;
}

.newsletter-form p {
    color: var(--text-gray);
    margin-bottom: 1.25rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.newsletter-form input[type="email"] {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid var(--medium-gray);
    border-radius: 25px;
    margin-bottom: 1rem;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--secondary-green);
}

.newsletter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--secondary-green);
    color: var(--white);
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    font-size: 1rem;
}

.newsletter-btn:hover {
    background: var(--primary-green);
}

/* Tags Widget */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--light-gray);
    color: var(--text-gray);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.tag:hover,
.tag.current-tag {
    background: var(--secondary-green);
    color: var(--white);
}

/* Recent Comments Widget */
.recent-comment {
    padding: 1rem 0;
    border-bottom: 1px solid var(--light-gray);
}

.recent-comment:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 0.4rem;
}

.comment-author img {
    border-radius: 50%;
}

.comment-text {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    line-height: 1.5;
    font-style: italic;
}

.comment-post {
    font-size: 0.8rem;
    color: var(--text-light);
}

.comment-post a {
    color: var(--secondary-green);
    text-decoration: none;
}

.comment-post a:hover {
    text-decoration: underline;
}

/* No Posts / No Comments */
.no-posts,
.no-comments {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-gray);
}

.no-posts i {
    font-size: 3rem;
    color: var(--light-green);
    margin-bottom: 1rem;
    display: block;
}

.no-posts .read-more-btn {
    margin-top: 1.5rem;
}

/* ========================================
   Animations
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 992px) {
    .blog-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .blog-sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    .blog-header {
        padding: 8rem 0 3rem;
    }

    .blog-title {
        font-size: 2.2rem;
    }

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

    .featured-post .post-title {
        font-size: 1.6rem;
    }

    .featured-post .post-image {
        height: 250px;
    }

    .recent-post-item {
        flex-direction: column;
    }

    .recent-post-image {
        width: 100%;
        height: 180px;
    }

    .blog-main-content {
        padding: 2rem 1rem;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .sidebar-widget {
        padding: 1.25rem;
    }
}