/*
 * Vista Archive Styles v1.1
 * For LyricsRaag Archive & Taxonomy Pages
 * FIX: Added flex-wrap to pagination for proper mobile display.
 * -------------------------------------------------- */

:root {
    --bg-page: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #595959;
    --accent-color: #06597a;
    --border-color: #dee2e6;
}

.font-serif {
    font-family: 'Source Serif 4', serif;
}

/* --- Layout Container --- */
.vista-container {
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem 1rem;
}

/* --- Archive Header --- */
.vista-archive-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
@media (min-width: 768px) {
    .vista-archive-header {
        flex-direction: row;
        text-align: left;
    }
}
.vista-archive-header__image-wrapper {
    flex-shrink: 0;
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .vista-archive-header__image-wrapper {
        margin-bottom: 0;
        margin-right: 2rem;
    }
}
.vista-archive-header__image {
    width: 128px;
    height: 128px;
    border-radius: 9999px;
    object-fit: cover;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
.vista-archive-title {
    font-family: 'Source Serif 4', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.vista-archive-title span {
    color: var(--accent-color);
}
.vista-archive-description {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Posts Grid --- */
.vista-post-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
}
@media (min-width: 640px) {
    .vista-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 1024px) {
    .vista-post-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* --- Post Card Styling --- */
.vista-post-card {
    background-color: var(--bg-card);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}
.vista-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
.vista-post-card__link {
    display: block;
    text-decoration: none;
}
.vista-post-card__image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}
.vista-post-card__image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vista-post-card__content {
    padding: 1.25rem;
}
.vista-post-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    transition: color 0.2s ease-in-out;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vista-post-card__link:hover .vista-post-card__title {
    color: var(--accent-color);
}
.vista-post-card__meta {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vista-post-card__excerpt {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- PAGINATION FIX --- */
.vista-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap; /* This is the key fix: allows items to wrap onto the next line on mobile */
}
.vista-pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem; /* 40px */
    height: 2.5rem; /* 40px */
    padding: 0 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0.25rem;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.vista-pagination__item.dots {
    border: none;
    background: transparent;
}
.vista-pagination__item:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}
.vista-pagination__item.current {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    cursor: default;
}
