/* ==========================================
   Blog Archive Page - Primus Theme
   ========================================== */

/* Hero Banner */
.blog-archive-hero {
    position: relative;
    width: 100%;
    /* height: 340px; */
    background: linear-gradient(135deg, #2C2C2C 0%, #4A3728 40%, #821a52 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-archive-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="g" patternUnits="userSpaceOnUse" width="40" height="40"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.06)"/></pattern></defs><rect fill="url(%23g)" width="100" height="100"/></svg>');
    opacity: 0.5;
}

.archive-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(139, 111, 71, 0.3) 0%, transparent 70%);
}

.archive-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
    max-width: 680px;
}

.archive-hero-label {
    display: inline-block;
    font-family: "Montserrat", sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: #d4b88a;
    margin-bottom: 16px;
    padding: 6px 20px;
    border: 1px solid rgba(212, 184, 138, 0.35);
    border-radius: 30px;
}

.archive-hero-title {
    font-family: "Montserrat", sans-serif;
    font-size: 2.6rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin: 0 0 14px;
}

.archive-hero-desc {
    font-family: "Lato", sans-serif;
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
}

/* Body Layout */
.blog-archive-body {
    background: #FAFAF7;
    padding: 48px 20px 64px;
}

.archive-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: start;
}

/* ==========================================
   LEFT SIDEBAR
   ========================================== */
.archive-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.archive-sidebar .sidebar-widget {
    background: #fff;
    border-radius: 16px;
    padding: 26px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.archive-sidebar .sidebar-widget h3 {
    font-family: "Montserrat", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #F5EFE6;
}

/* Search Widget */
.archive-search-form {
    margin: 0;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    background: #FAFAF7;
    border: 1.5px solid #E5DDD3;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-wrap:focus-within {
    border-color: #821a52;
    box-shadow: 0 0 0 3px rgba(139, 111, 71, 0.1);
}

.search-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 16px;
    font-family: "Lato", sans-serif;
    font-size: 0.95rem;
    color: #333;
    outline: none;
}

.search-input-wrap input::placeholder {
    color: #aaa;
}

.search-input-wrap button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: #821a52;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.search-input-wrap button:hover {
    background: #821a52;
    color: #fff;
}

/* Top Stories Widget */
.top-stories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.top-story-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #F5F0EA;
    align-items: flex-start;
}

.top-story-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.top-story-item:first-child {
    padding-top: 0;
}

.story-number {
    font-family: "Montserrat", sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #821a52;
    line-height: 1;
    flex-shrink: 0;
    width: 28px;
    padding-top: 2px;
}

.story-info {
    flex: 1;
    min-width: 0;
}

.story-title {
    font-family: "Montserrat", sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.story-title:hover {
    color: #821a52;
}

.story-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    font-family: "Lato", sans-serif;
    font-size: 0.78rem;
    color: #999;
}

.story-cat {
    color: #821a52;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
}

.story-meta .story-cat::after {
    content: "·";
    margin-left: 8px;
    color: #ccc;
}

/* CTA Box (reuse from single-blog) */
.archive-sidebar .sidebar-cta-box {
    background: linear-gradient(135deg, #821a52 0%, #fff 100%);
    color: #fff;
}

.archive-sidebar .sidebar-cta-box h3 {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.archive-sidebar .sidebar-cta-box p {
    font-family: "Lato", sans-serif;
    font-size: 0.93rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 18px;
}

.archive-sidebar .cta-button {
    display: inline-block;
    background: #fff;
    color: #821a52;
    padding: 11px 26px;
    border-radius: 30px;
    font-family: "Montserrat", sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
}

.archive-sidebar .cta-button:hover {
    background: #FAF6F0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ==========================================
   RIGHT: POSTS GRID
   ========================================== */
.archive-posts-area {
    min-width: 0;
}

/* Search results info */
.search-results-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.search-results-info p {
    font-family: "Lato", sans-serif;
    font-size: 0.95rem;
    color: #555;
    margin: 0;
}

.clear-search {
    font-family: "Montserrat", sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #821a52;
    text-decoration: none;
    white-space: nowrap;
    margin-left: 16px;
}

.clear-search:hover {
    text-decoration: underline;
}

/* Post Cards Grid */
.archive-posts-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.archive-post-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s;
    border: 1px solid transparent;
}

.archive-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
    border-color: #EDE8E0;
}

/* Card Image */
.card-image-link {
    display: block;
    text-decoration: none;
}

.card-image {
    width: 100%;
    height: 100%;
    min-height: 220px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

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

/* Card Body */
.card-body {
    padding: 26px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.card-category {
    font-family: "Montserrat", sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: #821a52;
    padding: 3px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.2s;
}

.card-category:hover {
    /* background: #6B5535; */
    background: #821a52;
}

.card-date {
    font-family: "Lato", sans-serif;
    font-size: 0.82rem;
    color: #999;
}

.card-title {
    font-family: "Montserrat", sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a {
    color: #2C2C2C;
    text-decoration: none;
    transition: color 0.2s;
}

.card-title a:hover {
    color: #821a52;
}

.card-excerpt {
    font-family: "Lato", sans-serif;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #666;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: "Montserrat", sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #821a52;
    text-decoration: none;
    transition: gap 0.2s, color 0.2s;
}

.card-read-more:hover {
    color: #6B5535;
    gap: 10px;
}

/* ==========================================
   PAGINATION
   ========================================== */
.archive-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    padding-top: 32px;
}

.archive-pagination .page-item a,
.archive-pagination .page-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    font-family: "Montserrat", sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.archive-pagination .page-item a {
    color: #555;
    background: #fff;
    border: 1px solid #E5DDD3;
}

.archive-pagination .page-item a:hover {
    color: #fff;
    background: #821a52;
    border-color: #821a52;
    transform: translateY(-1px);
}

.archive-pagination .page-item span.current {
    color: #fff;
    background: #821a52;
    border: 1px solid #821a52;
    box-shadow: 0 2px 8px rgba(139, 111, 71, 0.3);
}

.archive-pagination .page-item span.dots {
    color: #999;
    background: transparent;
    border: none;
    min-width: auto;
    padding: 0 6px;
}

.archive-pagination .page-item a.prev,
.archive-pagination .page-item a.next {
    color: #821a52;
}

.archive-pagination .page-item a.prev:hover,
.archive-pagination .page-item a.next:hover {
    color: #fff;
}

/* ==========================================
   NO POSTS STATE
   ========================================== */
.archive-no-posts {
    text-align: center;
    padding: 80px 32px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.archive-no-posts svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.archive-no-posts h3 {
    font-family: "Montserrat", sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0 0 10px;
}

.archive-no-posts p {
    font-family: "Lato", sans-serif;
    font-size: 1rem;
    color: #777;
    line-height: 1.6;
    margin: 0 0 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.archive-no-posts .cta-button {
    display: inline-block;
    background: #821a52;
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    font-family: "Montserrat", sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
}

.archive-no-posts .cta-button:hover {
    background: #6B5535;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.archive-hero-content {
    position: absolute;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
    width: 100%;
    display: flex;
    top: 0;
    bottom: 0;
    height: 100%;
    align-items: center;
    flex-direction: column;
    justify-content: center;
}

.blog-archive-hero img {
    width: 100%;
    height: 100%;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    .archive-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .archive-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        order: 2;
    }

    .archive-sidebar .sidebar-cta-box {
        grid-column: 1 / -1;
    }

    .archive-posts-area {
        order: 1;
    }

    .archive-post-card {
        grid-template-columns: 240px 1fr;
        height: 225px;
    }
}

@media(max-width:992px) {
    .blog-archive-hero {
        height: 340px !important;
        margin-top: 100px !important;
    }

    .blog-archive-hero img {
        padding-top: initial !important;
    }

}

@media (max-width: 768px) {
    .blog-archive-hero {
        height: 280px;
    }

    .archive-hero-title {
        font-size: 1.8rem;
    }

    .archive-hero-desc {
        font-size: 0.95rem;
    }

    .archive-sidebar {
        grid-template-columns: 1fr;
    }

    .archive-post-card {
        grid-template-columns: 1fr;
    }

    .card-image {
        min-height: 200px;
        max-height: 220px;
    }

    .card-body {
        padding: 20px 22px 24px;
    }

    .card-title {
        font-size: 1.05rem;
    }

    .search-results-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .clear-search {
        margin-left: 0;
    }

    .archive-post-card {
        height: auto !important;
    }

    .card-image {
        height: auto !important;
    }

    .blog-archive-hero {
        height: 100vh !important;
    }

    .blog-archive-hero picture {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .blog-archive-hero {
        height: 240px;
    }

    .archive-hero-label {
        font-size: 0.68rem;
        letter-spacing: 2px;
    }

    .archive-hero-title {
        font-size: 1.5rem;
    }

    .archive-hero-desc {
        font-size: 0.88rem;
    }

    .blog-archive-body {
        padding: 32px 14px 48px;
    }

    .archive-sidebar .sidebar-widget {
        padding: 20px;
    }

    .card-body {
        padding: 18px 18px 22px;
    }

    .archive-pagination .page-item a,
    .archive-pagination .page-item span {
        min-width: 36px;
        height: 36px;
        font-size: 0.82rem;
    }

    .story-number {
        font-size: 1.2rem;
    }
}