/* View Toggle Buttons */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Vertically center items */
    margin-bottom: var(--spacing-xl);
}

.view-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border-radius: var(--radius);
    /* Update to use style.css var if match */
    border-radius: 4px;
    /* Fallback or use var(--radius) if available in this scope context */
    color: var(--gray-4);
    transition: all 0.2s;
    background: var(--color-white);
    border: 1px solid var(--gray-2);
    /* margin-left removed as we use gap in container */
    margin-left: 0;
}

.toggle-btn:hover {
    color: var(--gray-7);
    border-color: var(--gray-4);
}

.toggle-btn.active {
    color: hsl(var(--primary));
    /* Updated for HSL variable */
    border-color: hsl(var(--primary));
    background-color: hsl(var(--primary) / 0.1);
    /* Light Primary Background */
}

/* List Layout */
.list-layout {
    grid-template-columns: 1fr;
}

.list-layout .card {
    flex-direction: row;
    height: 220px;
    /* Fixed height for list view items */
}

.list-layout .card-image-wrapper {
    width: 300px;
    height: 100%;
    flex-shrink: 0;
}

.list-layout .card-content {
    padding: var(--spacing-lg);
    justify-content: center;
}

.list-layout .card-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.list-layout .card-summary {
    -webkit-line-clamp: 3;
    margin-bottom: var(--spacing-md);
}

/* Responsive adjustments for List View */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .list-layout .card {
        flex-direction: column;
        height: auto;
    }

    .list-layout .card-image-wrapper {
        width: 100%;
        height: 200px;
    }

    .list-layout .card-title {
        font-size: 1.1rem;
        /* Reset to previous size on mobile */
    }
}