/*
 * Vista Page Styles v2.6
 * For LyricsRaag Custom Homepage Template
 * FIX: Re-architected the artist slider with higher specificity to be a
 * wrapping grid on mobile and a horizontal slider on desktop,
 * permanently fixing all overflow issues.
 * -------------------------------------------------- */

:root {
    --bg-page: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #595959;
    --accent-color: #06597a;
    --border-color: #dee2e6;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
}

.font-serif {
    font-family: 'Source Serif 4', serif;
}
        
.vista-container {
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem 1rem;
    overflow-x: hidden; /* Failsafe to prevent any horizontal scroll */
}
@media (min-width: 640px) {
    .vista-container {
        padding: 3rem 1.5rem;
    }
}

.vista-hero {
    text-align: center;
    padding: 2rem 0;
}
@media (min-width: 768px) {
    .vista-hero {
        padding: 3rem 0;
    }
}
.vista-hero__title {
    font-family: 'Source Serif 4', serif;
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--accent-color);
    line-height: 1.2;
}
@media (min-width: 768px) {
    .vista-hero__title {
        font-size: 3.75rem;
    }
}
.vista-hero__subtitle {
    margin-top: 1rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.125rem;
    line-height: 1.75rem;
    color: #4b5563;
}

.vista-section-title {
    font-family: 'Source Serif 4', serif;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
}
@media (min-width: 768px) {
    .vista-section-title {
        font-size: 1.875rem;
    }
}

.vista-recommendations {
    margin-bottom: 3rem;
}
.vista-recommendations__grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .vista-recommendations__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem;
    }
}
.vista-rec-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: box-shadow 0.3s ease-in-out;
    overflow: hidden;
}
.vista-rec-card:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
.vista-rec-card a {
    display: block;
    text-decoration: none;
}
.vista-rec-card__image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}
.vista-rec-card__image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}
.vista-rec-card:hover .vista-rec-card__image-wrapper img {
    transform: scale(1.05);
}
.vista-rec-card__placeholder-img {
    background-color: #e5e7eb;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}
.vista-rec-card__content {
    padding: 1rem;
}
.vista-rec-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.3s ease-in-out;
}
.vista-rec-card a:hover .vista-rec-card__title {
    color: var(--accent-color);
}
.vista-rec-card__category {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* --- FINAL ARTIST LAYOUT FIX --- */
.vista-artists {
    margin-bottom: 3rem;
}
/* Mobile-first: A wrapping grid with 2 columns */
.vista-artists__slider {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    justify-items: center; /* Center items within the grid cell */
}
/* Tablet and larger: Switch to the horizontal slider */
@media (min-width: 768px) {
    .vista-artists__slider {
        display: flex;
        overflow-x: auto;
        justify-content: flex-start; /* Align items to the start */
        padding-bottom: 1rem;
        scrollbar-width: thin;
        scrollbar-color: #9ca3af #e5e7eb;
        -webkit-overflow-scrolling: touch;
    }
    .vista-artists__slider::-webkit-scrollbar { height: 8px; }
    .vista-artists__slider::-webkit-scrollbar-track { background: #e5e7eb; border-radius: 10px; }
    .vista-artists__slider::-webkit-scrollbar-thumb { background-color: #9ca3af; border-radius: 10px; border: 2px solid #e5e7eb; }
    .vista-artists__slider::-webkit-scrollbar-thumb:hover { background-color: #6b7280; }
}

.vista-artist-card {
    text-align: center;
    width: 8rem; /* Set a consistent width */
}
/* On desktop, prevent cards from shrinking in the flex container */
@media (min-width: 768px) {
    .vista-artist-card {
        flex-shrink: 0;
    }
}
.vista-artist-card a {
    text-decoration: none;
    display: inline-block;
}
.vista-artist-card__image-wrapper {
    width: 8rem;
    height: 8rem;
    margin-left: auto;
    margin-right: auto;
    border-radius: 9999px;
    overflow: hidden;
    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-in-out, box-shadow 0.3s ease-in-out;
    border: 3px solid transparent;
}
.vista-artist-card a:hover .vista-artist-card__image-wrapper {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    border-color: var(--accent-color);
}
.vista-artist-card__image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vista-artist-card__name {
    margin-top: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.3s ease-in-out;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vista-artist-card a:hover .vista-artist-card__name {
    color: var(--accent-color);
}

/* --- Category Grid Section --- */
.vista-category-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .vista-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem;
    }
}
@media (min-width: 1024px) {
    .vista-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
.vista-cat-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);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}
.vista-cat-card__header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.vista-cat-card__title {
    font-size: 1.25rem;
    font-weight: 700;
}
.vista-cat-card__body {
    padding: 1rem;
    flex-grow: 1;
}
.vista-cat-card__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.vista-cat-card__list li {
    margin: 0;
    padding: 0;
}
.vista-cat-card__list a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
}
.vista-cat-card__song-title {
    font-weight: 700;
    color: var(--accent-color);
    transition: color 0.3s ease-in-out;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vista-cat-card__list a:hover .vista-cat-card__song-title {
    color: var(--text-primary);
}
.vista-cat-card__song-artist {
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.vista-cat-card__no-posts {
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.vista-cat-card__footer {
    padding: 1rem;
    background-color: #f9fafb;
    border-top: 1px solid var(--border-color);
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}
.vista-cat-card__footer a.vista-cat-card__view-all {
    font-weight: 500;
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}
.vista-cat-card__footer a.vista-cat-card__view-all:hover {
    color: var(--text-primary);
}
