/* ==========================================================================
 * RankwellPress — ARCHIVE LAYOUT (CSS Grid)
 * FLAT — no card borders, no backgrounds, no shadows.
 * ========================================================================== */

.archive-grid * { box-sizing: border-box; }

/* ==========================================================================
 * ARCHIVE HEADER — flat, no card
 * ========================================================================== */

.archive-header {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: var(--rw-space-5, 1.5rem);
    border: none;
    box-shadow: none;
}

.archive-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--rw-text-heading, #111827);
    text-transform: capitalize;
}

.archive-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background-color: var(--rw-color-primary, #0d7c3e);
    border-radius: 2px;
    margin-right: var(--rw-space-2, 0.5rem);
    vertical-align: middle;
}

.archive-description {
    font-size: 0.9rem;
    color: var(--rw-text-muted, #6b7280);
    margin: var(--rw-space-1, 0.25rem) 0 0;
}

/* ==========================================================================
 * ARCHIVE GRID LAYOUT
 * ========================================================================== */

.archive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 30px 0;
}

@media (min-width: 769px) {
    .archive-grid {
        grid-template-columns: minmax(0, 1fr) var(--rw-sidebar-width, 320px);
        grid-template-areas: "content sidebar";
        align-items: start;
    }
    .archive-main { grid-area: content; min-width: 0; }
    .archive-sidebar {
        grid-area: sidebar;
        min-width: 0;
        position: sticky;
        top: 90px;
        align-self: start;
    }
}

@media (max-width: 768px) {
    .archive-grid {
        grid-template-columns: 1fr;
        grid-template-areas: "content" "sidebar";
    }
    .archive-main { grid-area: content; min-width: 0; }
    .archive-sidebar { grid-area: sidebar; width: 100%; position: static; }
}

/* ==========================================================================
 * ARCHIVE POSTS — flat list
 * ========================================================================== */

.archive-posts {
    display: flex;
    flex-direction: column;
    gap: var(--rw-space-6, 2rem);
}

.archive-post-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    transition: none;
}

.archive-post-item:hover {
    transform: none;
    box-shadow: none;
}

.archive-post-item .post-thumbnail {
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 16/9;
    margin-bottom: 12px;
}

.archive-post-item .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--rw-transition-standard, 0.3s ease);
    display: block;
}

.archive-post-item .post-thumbnail:hover img {
    transform: scale(1.04);
}

.archive-post-item .post-content {
    padding: 0;
}

.archive-post-item .post-title {
    font-size: 1.25rem;
    line-height: 1.3;
    font-weight: 700;
    margin: 0 0 var(--rw-space-2, 0.5rem) 0;
}

.archive-post-item .post-title a {
    color: var(--rw-grid-title, var(--rw-text-heading, #111827));
    text-decoration: none;
    transition: color 0.2s ease;
}

.archive-post-item .post-title a:hover {
    color: var(--rw-grid-title-hover, var(--rw-color-primary, #0d7c3e));
}

.archive-post-item .post-excerpt {
    color: var(--rw-text-body, #4b5563);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.archive-post-item .read-more {
    display: inline-block;
    margin-top: 8px;
    font-weight: 600;
    color: var(--rw-color-primary, #0d7c3e);
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.2s ease;
}

.archive-post-item .read-more:hover {
    opacity: 0.75;
    color: var(--rw-color-primary, #0d7c3e);
}

/* ==========================================================================
 * OVERFLOW PROTECTION
 * ========================================================================== */

.archive-main {
    overflow-wrap: break-word;
}

.archive-main img,
.archive-main iframe,
.archive-main video {
    max-width: 100%;
    height: auto;
}

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

.archive-pagination {
    margin-top: var(--rw-space-5, 1.5rem);
    text-align: center;
}

/* ==========================================================================
 * DARK MODE — stays flat
 * ========================================================================== */

html[data-theme="dark"] .archive-header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .archive-title {
    color: #f8fafc !important;
}

html[data-theme="dark"] .archive-description {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .archive-post-item {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .archive-post-item .post-title a {
    color: #f8fafc !important;
}

html[data-theme="dark"] .archive-post-item .post-title a:hover {
    color: var(--rw-color-primary, #0d7c3e) !important;
}

html[data-theme="dark"] .archive-post-item .post-excerpt {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .archive-post-item .read-more {
    color: var(--rw-color-primary, #0d7c3e) !important;
}